-
1. Re: PojoCacheMBean getObject(fqn); throws java.lang.Ille
brian.stansberry Oct 4, 2006 11:33 AM (in response to sting_hz)Is there more than one copy of jboss-cache.jar on the classpath? The jboss-cache.jar from 1.4.0.SP1 should replace the one in server/.../lib.
That's just a guess, and probably not a good one :( -
2. Re: PojoCacheMBean getObject(fqn); throws java.lang.Ille
brian.stansberry Oct 4, 2006 11:36 AM (in response to sting_hz)I noticed this in your stack trace:
at $Proxy65.gutObject(Unknown Source)
Note it's "gutObject" not "getObject". Was that really in the original stack trace, or did it get altered somehow? -
3. Re: PojoCacheMBean getObject(fqn); throws java.lang.Ille
sting_hz Oct 4, 2006 12:08 PM (in response to sting_hz)Hi Brian,
Thanks for your info.
There's same jboss-cache.jar both under web-inf/lib and server/all/lib, so I removed the one under web-inf/lib.
Then I got another exception,java.lang.IllegalArgumentException: interface org.jboss.mx.util.MBeanProxyInstance is not visible from class loader at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353) at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581) at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:345) at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:308) at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:283) at com.letu.netprint.util.cache.BaseCacheManager.initCache(BaseCacheManager.java:101) at com.letu.netprint.util.cache.BaseCacheManager.getCache(BaseCacheManager.java:120) ...
The stack trace is related with this code:MBeanServer server=MBeanServerLocator.locateJBoss(); cache_=(PojoCacheMBean)MBeanProxyExt.create(PojoCacheMBean.class, "jboss.cache:service=testPojoCache", server);
Seems it has problem to create the cache object now. Am I moving backward?
Thanks,
Steven -
4. Re: PojoCacheMBean getObject(fqn); throws java.lang.Ille
sting_hz Oct 4, 2006 12:11 PM (in response to sting_hz)yes,
:
at $Proxy65.gutObject(Unknown Source)
it should be getObject , I made a mistake when editing the post. -
5. Re: PojoCacheMBean getObject(fqn); throws java.lang.Ille
brian.stansberry Oct 4, 2006 12:22 PM (in response to sting_hz)If you added any other jars from the JBoss Cache dist to WEB-INF/lib, get rid of those as well -- they are all already on the classpath in the AS and a second copy will screw things up.
-
6. Re: PojoCacheMBean getObject(fqn); throws java.lang.Ille
sting_hz Oct 4, 2006 1:01 PM (in response to sting_hz)I've removed thoese jboss cache dist jars from the web-inf/lib as you said,
but the exception is still there:
java.lang.IllegalArgumentException: interface org.jboss.mx.util.MBeanProxyInstance is not visible from class loader
... -
7. Re: PojoCacheMBean getObject(fqn); throws java.lang.Ille
brian.stansberry Oct 4, 2006 1:21 PM (in response to sting_hz)Well, the line numbers in your stack trace above are from a 4.0.3 version of jboss-jmx.jar, not the 4.0.4.GA version. So, there's any extra copy of that jar somewhere. Perhaps you copied it to server/all/lib?
The only thing to do to upgrade 4.0.4.GA to use JBC 1.4.0.SP1 is to replace jboss-cache.jar in server/all/lib. If you put any other jars from the JBC distribution on the classpath anywhere, you should undo that change. -
8. Re: PojoCacheMBean getObject(fqn); throws java.lang.Ille
sting_hz Oct 4, 2006 1:38 PM (in response to sting_hz)Hi Brian ,
Thank you very much!
The error is because I also copied and overided the jboss-j2ee.jar to the /server/all/lib.
Now it runs! :)
Steven