[logback-user] Struggling with Tomcat6 and logback ...
Gunnar Eketrapp
gunnar.eketrapp at gmail.com
Sat Jan 29 18:59:22 CET 2011
Missed this one that comes first of all ...
FINE: Could not clean fields for class
org.apache.commons.logging.impl.Log4JLogger
java.lang.NoClassDefFoundError: org/apache/log4j/Category
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
at java.lang.Class.getDeclaredFields(Class.java:1743)
at
org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1627)
at
org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1524)
at
org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:707)
at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4557)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4387)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at
org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:123)
at
org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:145)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:769)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:516)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
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:597)
at
org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Category
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
2011/1/29 Gunnar Eketrapp <gunnar.eketrapp at gmail.com>
> I added a janino dependency and got rid of that error. Now I get .... se
> below.
>
> Thanks for the fast answer !!!
>
> FINE: Could not set field logger to null in class
> org.springframework.jdbc.datasource.JdbcTransactionObjectSupport
> java.lang.ExceptionInInitializerError
> at sun.misc.Unsafe.ensureClassInitialized(Native Method)
> at
> sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
> at
> sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
> at java.lang.reflect.Field.acquireFieldAccessor(Field.java:918)
> at java.lang.reflect.Field.getFieldAccessor(Field.java:899)
> at java.lang.reflect.Field.get(Field.java:358)
> at
> org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1641)
> at
> org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1524)
> at
> org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:707)
> at
> org.apache.catalina.core.StandardContext.stop(StandardContext.java:4557)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4387)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
> at
> org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:123)
> at
> org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:145)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:769)
> at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
> at
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
> at
> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
> at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
> at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
> at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
> at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
> at
> org.apache.catalina.core.StandardService.start(StandardService.java:516)
> at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
> 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:597)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
> 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:597)
> at
> org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)
> Caused by: java.lang.NullPointerException
> at
> org.apache.commons.logging.LogFactory.getCachedFactory(LogFactory.java:979)
> at
> org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:435)
> at
> org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
> at
> org.springframework.jdbc.datasource.JdbcTransactionObjectSupport.<clinit>(JdbcTransactionObjectSupport.java:52)
> ... 40 more
>
>
> 2011/1/29 Gunnar Eketrapp <gunnar.eketrapp at gmail.com>
>
> Nope!
>>
>> Here ir is ...
>>
>> <configuration>
>> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
>> <encoder>
>> <Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} -
>> %msg%n</Pattern>
>> </encoder>
>> </appender>
>> <logger name="utskicket" level="DEBUG"/>
>> <logger name="utskicket.util" level="DEBUG"/>
>> <logger name="utskicket.model.persistence" level="DEBUG"/>
>>
>> <root level="INFO">
>> <appender-ref ref="STDOUT" />
>> </root>
>> </configuration>
>>
>> 2011/1/29 Ceki Gülcü <ceki at qos.ch>
>>
>> Hi Gunnar,
>>>
>>> Conditionals (<if>/<then>/<else>) in logback.xml require the janino
>>> library. Do you have conditionals in your logback.xml?
>>>
>>>
>>> On 29/01/2011 6:02 PM, Gunnar Eketrapp wrote:
>>>
>>>> Hi!
>>>>
>>>> I have problems getting my webapp to start under tomcat6.
>>>>
>>>> I am currently facing problem such as ...
>>>>
>>>> Caused by: java.lang.ClassNotFoundException:
>>>> org.codehaus.janino.ScriptEvaluator
>>>> at
>>>>
>>>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
>>>> at
>>>>
>>>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
>>>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>>>> ... 37 more
>>>>
>>>> ... and I have placed following in tomcat's lib
>>>>
>>>> /usr/share/tomcat6/lib/logback-classic-0.9.28.jar
>>>> /usr/share/tomcat6/lib/logback-core-0.9.28.jar
>>>>
>>>> Are there any known problems with logback and tomcat6 ?
>>>>
>>>> Thanks in advance,
>>>> Gunnar Eketrapp
>>>>
>>>>
>>>> _______________________________________________
>>> Logback-user mailing list
>>> Logback-user at qos.ch
>>> http://qos.ch/mailman/listinfo/logback-user
>>>
>>
>>
>>
>> --
>> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
>> Allévägen 2A, 132 42 Saltsjö-Boo
>>
>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> Allévägen 2A, 132 42 Saltsjö-Boo
>
--
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20110129/d34874e1/attachment-0001.html>
More information about the Logback-user
mailing list