2

I am using JBoss 7. It is spring hibernate application. I am getting

ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-1) Error listenerStart 

when I restart my JBoss. Earlier I have this issue in tomcat but it is resolved by adding logging.porpeties in classes folder. I am able to see which listener is causing issue in tomcat. But in JBoss I don't have any clue how to fix it.

dds
  • 2,335
  • 1
  • 31
  • 45
dmay
  • 1,305
  • 6
  • 21
  • 31

2 Answers2

3

Update: if you are using JBoss EAP 6 or AS 7.1.2+ and not getting much logging, it may help to specify the system property -Dorg.jboss.as.logging.per-deployment=false: https://stackoverflow.com/a/14575830/14379

The problem is that "Error listenerStart" is a very generic error message. It is supposed to be preceded by other, more helpful error messages, but in some cases it isn't.

Other people have solved the logging problem by removing log4j.properties from the war file or a jar inside it, so try leaving out log4j.properties when deploying on JBoss AS 7.

In my case, there was no log4j.properties to remove. The only workaround I have found is to set a breakpoint in org.apache.catalina.core.StandardContext.contextListenerStart() where it calls getLogger().error(), and then run JBoss in debug mode while deploying my war file. Then I can inspect the Throwable to see what went wrong.

In Eclipse, I have configured a Debug Detail Formatter (in Preferences) for java.lang.Throwable which returns the stack trace:

java.io.StringWriter sw = new java.io.StringWriter();
this.printStackTrace(new java.io.PrintWriter(sw));
return sw.toString();
Community
  • 1
  • 1
seanf
  • 6,504
  • 3
  • 42
  • 52
0

If you are deploying an EAR, try deploying the WAR alone, as JBoss will show more information about the error.

  • I miss to specify that i try to deploy WAR in Jboss and not EAR. It is only showing Error listenerstart – dmay Dec 06 '12 at 16:56