cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laurent Perez" <hak...@gmail.com>
Subject Re: trunk webapp not working under tomcat5.5.17
Date Mon, 11 Sep 2006 13:45:43 GMT
Ok, I've managed to load my beans. The SEVERE log entry was caused by
some classpath troubles.

Anyway, I'm using AspectJ runtime weaving with Spring, and it looks
like it doesn't play nice with Cocoon xerces' version
(xercesImpl-2.8.0.jar, xml-apis-1.3.02.jar).

To enable runtime weaving, I use <aop:spring-configured/> context tag
with a JAVA_OPTS entry of "-javaagent:lib/aspectjweaver.jar", from
AspectJ1.5.2a (cf
http://opensource.atlassian.com/projects/spring/browse/SPR-2347).
Whenever I set this entry I get the following exception during cocoon
startup :

INFO: XML validation disabled
warning parse definitions failed -- (ClassCastException) org.apache.xerces.jaxp.
SAXParserFactoryImpl
org.apache.xerces.jaxp.SAXParserFactoryImpl
java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
        at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:
107)
        at org.aspectj.weaver.loadtime.definition.DocumentParser.getXMLReader(Do
cumentParser.java:129)
        at org.aspectj.weaver.loadtime.definition.DocumentParser.parse(DocumentP
arser.java:85)
        at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.parseDefinition
s(ClassLoaderWeavingAdaptor.java:170)
        at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.initialize(Clas
sLoaderWeavingAdaptor.java:104)
        at org.aspectj.weaver.loadtime.Aj$ExplicitlyInitializedClassLoaderWeavin
gAdaptor.initialize(Aj.java:130)
        at org.aspectj.weaver.loadtime.Aj$ExplicitlyInitializedClassLoaderWeavin
gAdaptor.getWeavingAdaptor(Aj.java:135)
        at org.aspectj.weaver.loadtime.Aj$WeaverContainer.getWeaver(Aj.java:101)

        at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:61)
        at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(C
lassPreProcessorAgentAdapter.java:55)
        at sun.instrument.TransformerManager.transform(TransformerManager.java:1
22)
        at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java
:155)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at org.apache.cocoon.classloader.DefaultClassLoader.getClass(DefaultClas
sLoader.java:94)
        at org.apache.cocoon.classloader.DefaultClassLoader.loadClass(DefaultCla
ssLoader.java:119)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at org.apache.cocoon.bootstrap.servlet.ShieldingListener.init(ShieldingL
istener.java:111)
        at org.apache.cocoon.bootstrap.servlet.ShieldingListener.contextInitiali
zed(ShieldingListener.java:201)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:3729)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
187)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:759)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73
9)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)

        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
a:904)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
ava:867)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474
)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:310)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)

        at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)

        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442
)
        at org.apache.catalina.core.StandardService.start(StandardService.java:4
50)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:709
)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

I tried to downgrade xerces to 2.6.0 because spring2-rc2 uses
xml-amis.jar from xerces2.6, but no luck.

Do you use runtime weaving ?

thanks
laurent

Mime
View raw message