[jboss-user] [Javassist user questions] - Re: A javassist is in the problem in the WEB application

omotelet do-not-reply at jboss.com
Fri Jul 13 10:59:39 EDT 2007


Hi, 
I think I have the same problem thus maybe I can help to formulate it.

I use javassist in an eXist extension. This extension comes as a jar package automatically loaded by eXist. 
Let com.Foo.class com.Bar.class 2 classes contained in the package myCom.jar

If I call in Foo
ClassPool.getDefault().get("com.Bar") I got an javassist.NotFoundException: com.Bar.

Nevertheless when I run eXist form inside an IDE and providing Foo and Bar as part of the build path of eXist I have no problem...
 
The problem seems to arise with multiple bootloaders in order to overpass it you may use the following hint:

 try {
               pool.get("com.Bar");
            } catch (NotFoundException e) {
                 pool.appendClassPath(new ClassClassPath(Class.forName("com.Bar")));
                 pool.get("com.Bar");
            }


Regards,
olivier
PS thanx to matthieu for the hint

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4064033#4064033

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4064033



More information about the jboss-user mailing list