Announcement Announcement Module
Collapse
No announcement yet.
Can't enable weaving (aspectjweaver.jar) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't enable weaving (aspectjweaver.jar)

    Hi !

    I am using spring2.0rc2 with aspectJ1.5.2a (cf http://opensource.atlassian.com/proj...rowse/SPR-2347) under a default tomcat 5.5.17 installation.

    Whenever I set the JAVA_OPTS option to "-javaagent:lib/aspectjweaver.jar" in tomcat to enable weaving of my <aop:spring-configured/> beans, I get the following exception :

    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(SAX ParserFactory.java:
    107)
    at org.aspectj.weaver.loadtime.definition.DocumentPar ser.getXMLReader(Do
    cumentParser.java:129)
    at org.aspectj.weaver.loadtime.definition.DocumentPar ser.parse(DocumentP
    arser.java:85)
    at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdap tor.parseDefinition
    s(ClassLoaderWeavingAdaptor.java:170)
    at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdap tor.initialize(Clas
    sLoaderWeavingAdaptor.java:104)
    at org.aspectj.weaver.loadtime.Aj$ExplicitlyInitializ edClassLoaderWeavin
    gAdaptor.initialize(Aj.java:130)
    at org.aspectj.weaver.loadtime.Aj$ExplicitlyInitializ edClassLoaderWeavin
    gAdaptor.getWeavingAdaptor(Aj.java:135)
    at org.aspectj.weaver.loadtime.Aj$WeaverContainer.get Weaver(Aj.java:101)

    at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java: 61)
    at org.aspectj.weaver.loadtime.ClassPreProcessorAgent Adapter.transform(C
    lassPreProcessorAgentAdapter.java:55)
    at sun.instrument.TransformerManager.transform(Transf ormerManager.java:1
    22)
    at sun.instrument.InstrumentationImpl.transform(Instr umentationImpl.java
    :155)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java :620)
    at java.security.SecureClassLoader.defineClass(Secure ClassLoader.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.j ava:188)
    at org.apache.cocoon.classloader.DefaultClassLoader.g etClass(DefaultClas
    sLoader.java:94)
    at org.apache.cocoon.classloader.DefaultClassLoader.l oadClass(DefaultCla
    ssLoader.java:119)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
    at org.apache.cocoon.bootstrap.servlet.ShieldingListe ner.init(ShieldingL
    istener.java:111)
    at org.apache.cocoon.bootstrap.servlet.ShieldingListe ner.contextInitiali
    zed(ShieldingListener.java:201)
    at org.apache.catalina.core.StandardContext.listenerS tart(StandardContex
    t.java:3729)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4
    187)
    at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase
    .java:759)
    at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:73
    9)
    at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:524)

    at org.apache.catalina.startup.HostConfig.deployDirec tory(HostConfig.jav
    a:904)
    at org.apache.catalina.startup.HostConfig.deployDirec tories(HostConfig.j
    ava:867)
    at org.apache.catalina.startup.HostConfig.deployApps( HostConfig.java:474
    )
    at org.apache.catalina.startup.HostConfig.start(HostC onfig.java:1122)
    at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java
    :310)
    at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(Lifecycl
    eSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1021)

    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:718)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1013)

    at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:442
    )
    at org.apache.catalina.core.StandardService.start(Sta ndardService.java:4
    50)
    at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:709
    )
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:551)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:294)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:432)

    I tried to downgrade my xercesImpl/xml-apis to 2.6.0 because spring-framework-2.0-rc2-with-dependencies.zip says it uses xml-apis.jar from xerces2.6, but no luck.

    Does anyone have an aspectjweaver working with 2.0RC2 ? If so, could you point me to the right version of xerces/xml-apis to get ?

    thanks
Working...
X