axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jnedzel <jned...@broad.mit.edu>
Subject Log4J and tomcat 5?
Date Tue, 15 May 2007 17:28:40 GMT
I'm having problems with Axis2, Tomcat 5.5.23, and Log4J.

I'm creating a REST service using Axis2, creating an AAR file, and 
dropping that in the services directory.  The REST service uses 
Hibernate (which uses Log4J).  I have put log4j.properties in the root 
level of my AAR file, and log4j-1.2.11.jar in the lib directory of my 
AAR file.

NOTE: this exact same AAR file works fine when deployed to Tomcat 6. 
Any ideas?

When I call my REST service, I get a ClassDefNotFoundError:

INFO: Server startup in 7246 ms
entered gene method
May 15, 2007 1:26:27 PM 
org.apache.axis2.rpc.receivers.RPCMessageReceiver invokeBusinessLogic
SEVERE: Exception occurred while trying to invoke service method gene
java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at 
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:95)
         at 
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39)

         at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:497)
         at 
org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:156)
         at 
org.apache.axis2.transport.http.util.RESTUtil.processGetRequest(RESTUtil.java:143)
         at 
org.apache.axis2.transport.http.AxisRESTServlet.doGet(AxisRESTServlet.java:45)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
         at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
         at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
         at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
         at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
         at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
         at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
         at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java
:665)
         at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
         at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
         at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
         at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ExceptionInInitializerError
         at org.genecruiser.service.GeneService.gene(Unknown Source)
         ... 26 more
Caused by: org.apache.commons.logging.LogConfigurationException: 
org.apache.commons.logging.LogConfigurationException: N
o suitable Log constructor [Ljava.lang.Class;@fb6354 for 
org.apache.commons.logging.impl.Log4JLogger (Caused by java.lan
g.NoClassDefFoundError: org/apache/log4j/Category) (Caused by 
org.apache.commons.logging.LogConfigurationException: No s
uitable Log constructor [Ljava.lang.Class;@fb6354 for 
org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.N
oClassDefFoundError: org/apache/log4j/Category))
         at 
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
         at 
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
         at 
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
         at 
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
         at org.genecruiser.util.HibernateUtil.<clinit>(Unknown Source)
         ... 27 more
Caused by: org.apache.commons.logging.LogConfigurationException: No 
suitable Log constructor [Ljava.lang.Class;@fb6354 f
or org.apache.commons.logging.impl.Log4JLogger (Caused by 
java.lang.NoClassDefFoundError: org/apache/log4j/Category)
         at 
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:413)
         at 
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
         ... 31 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category
         at java.lang.Class.getDeclaredConstructors0(Native Method)
         at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
         at java.lang.Class.getConstructor0(Class.java:2671)
         at java.lang.Class.getConstructor(Class.java:1629)
         at 
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410)
         ... 32 more
May 15, 2007 1:26:27 PM org.apache.axis2.transport.http.AxisRESTServlet 
doGet
SEVERE: org.apache.axis2.AxisFault: Exception occurred while trying to 
invoke service method gene

Thanks,

Jared


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message