[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] ClassCastException using JAVA_OPTS="-javaagent:lib/aspectjweaver.jar"

Hello

I'm using aspectjweaver from aspectj1.5.2a to enable load-time-weaving
of spring2.0rc2 beans inside my webapp, hosted under tomcat5.5.17.

Whenever I set this environment variable in catalina.sh, I get the
following exception on webapp startup :

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)

I do believe the weaver isn't happy with my xerces/xml-apis jars,
unfortunately I don't know which version to use to get rid of the
casting exception.
Jars version I use are : xercesImpl-2.8.0.jar, xml-apis-1.3.02.jar,
jdk is 1.5.0_08.

Does aspectj require a specific version of them ?

Thanks!

--
<a href="http://in-pocket.blogspot.com";>http://in-pocket.blogspot.com
- Mobile world, technology and more</a>