1

We are deploying our application from maven compiled code to JBoss.

Maven is able to compile the code and it is shared by people. Also, it is using log4j version 1.2.16. Within JBoss the application build is successful, but the web page is not opening.

JBoss has the log4j.jar in server\default\lib and client folders.Plus, log4jboot.jar is in client folder.

As it is not working with opening web page, I changed all log jars in JBoss to version 1.2.16.

Now the application is up and web page is running, but I am not able to see the log details in server command prompt.

Currently this is the error:

failed to initialize plugin org.jboss.logging.log4jloggerplugin

Could anybody give an idea on this?

Edit:

With log4jboot.jar, the error is 500 error:

type Exception report

// message:

 The server encountered an internal error () that prevented it from fulfilling this request.

// exception:

javax.servlet.ServletException: Filter execution threw an exception
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


// root cause:

java.lang.NoSuchMethodError: org/apache/log4j/MDC.clear()V
diogo
  • 3,769
  • 1
  • 24
  • 30
pratap m
  • 106
  • 2
  • 11
  • You shouldn't replace log4jboot.jar. Post the details why it didn't start with old log4j. – Vadzim Mar 01 '13 at 05:43
  • @Vadzim I did edit... – pratap m Mar 01 '13 at 05:53
  • Missing JBoss version. Did you try just updating log4j.jar to 1.2.16 and leaving original log4jboot.jar? – Vadzim Mar 01 '13 at 14:06
  • thats what i did before edit 1 – pratap m Mar 04 '13 at 05:22
  • We have working setups of JBoss 4.2.x with original log4j-boot.jar and upgraded server/default/lib/log4j.jar. You could use `-verbose:class` to make sure no other obsolete copy of log4j is taking precedence on classpath. – Vadzim Mar 04 '13 at 08:57
  • i am new to this ...could you elaborate what exactly you are telling...a link can help apart from your elaboration...thanks in advance – pratap m Mar 06 '13 at 05:42
  • My guess is that you have somewhere on classpath another old copy of log4j that hides the upgraded one. See http://stackoverflow.com/questions/10230279/java-verbose-class-loading. It could help to track it down. – Vadzim Mar 06 '13 at 12:27

1 Answers1

2

It would help to know which version of JBoss you are using.

JBoss 5.1.0.GA ships with log4j version 1.2.14. The MDC.clear() method was introduce in 1.2.16 which would explain the NoSuchMethodError you are getting if you are using an older version of JBoss.

Some solutions to try:

  1. Remove all uses of the MDC.clear() method.
  2. Upgrade your JBoss server.
  3. Replace the provided log4j jar with your own.
Jono
  • 908
  • 9
  • 13