Failed to aspectize class
felipe.leite Dec 19, 2004 8:43 AMHi all,
I origanally posted this topic on the begginers corner, but it seems that this can be a more appropriate forum to post this topic. If you know a better forum to post this, tell me and I will post there.
I am using JBossCache as hibernate's 2nd level cache for my application. Actually I am trying to use TreeCacheAOP, but without success.
I am using the JBossAOP class loader (-Djava.system.class.loader=org.jboss.aop.standalone.SystemClassLoader) to make the AOP magic, but the application fails while trying to aspectize some classes that I thought would not be touched.
The error message is:
[error] Failed to aspectize class oracle.sql.converter.CharacterConverterFactoryOGS. Could not find class it references oracle.i18n.text.converter.CharacterConverterOGS.. Do verbose mode if you want full stack trace.
java.lang.Error: Error transforming the class oracle.sql.converter.CharacterConverterFactoryOGS: org.jboss.aop.instrument.TransformationException: Failed to aspectize class oracle.sql.converter.CharacterConverterFactoryOGS. Could not find class it references oracle.i18n.text.converter.CharacterConverterOGS
at org.jboss.aop.standalone.SystemClassLoader.loadClass(SystemClassLoader.java:191)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at net.sf.hibernate.connection.DBCPConnectionProvider.configure(DBCPConnectionProvider.java:64)
Now I don't know what to do. I would like a lot to use TreeCacheAOP, because it seems to be significantly faster than TreeCache for my cluster enviroment.
I don't know if it is possible, but can I make jboss-aop only play with the classes whose instances will be cached, or it has to aspectize every class that the classloader loads? Sorry if this is a silly question, but I am a begginer with either JBossCache, JBossAOP and AOP in general and I couldn't find much help in the documentation.
I'm not running JBoss server, but i think that all needed jars are in the JARs in classpath:
hibernate2.jar
jboss-cache.jar
jboss-common.jar
jboss-jmx.jar
jboss-system.jar
concurrent.jar
jboss-remoting.jar
log4j.jar
jboss-minimal.jar
jboss-aop.jar
javassist.jar
trove.jar
All these jars came with hibernate 2.1.6 or with jboss-cache 1.2.
Thanks in advance,
Felipe Leite