Two class loaders are attempting to load the org.ca.ejb.services.CService class in the same application context. How is this service packaged and deployed?


--
xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx

George Icriverzi wrote:

Hi,

Here's my problem, please reply if you have any ideas about its cause:

I have an mbean, and an inner class defined inside the mbean.
In the start() of the mbean, I try to instantiate the inner class. Using jboss-3.0.7 was ok, but jboss-3.2.1 throws IllegalAccessError when I try to deploy . It looks like this:


WARN [ServiceController] Problem starting service eu:service=CService
java.lang.IllegalAccessError: try to access class org.ca.ejb.services.CService$Scanner from class org.ca.ejb.services.CService
at org.ca.ejb.services.CService.start(CService.java:209)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)


at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)


...... & Co.

The start() contains :

  public void start() throws Exception{
       .....
     scanner = new Scanner( delay ); // here I get the error
       .....
   }


and the inner class looks like:


  private class Scanner extends Thread{
     int timeout;

     Scanner(int delay){
           ....
     }     }


If I set the inner class and its constructor as public, the error is the following, at the same line:


WARN [ServiceController] Problem starting service eu:service=CService
java.lang.LinkageError: loader constraints violated when linking org/ca/ejb/services/CService class
at org.ca.ejb.services.CService.start(CService.java:209)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)


at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)


at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)


....

In both cases the mbean does not start.
Does anyone have any explanation about this?
Again, this is happening when I use jboss-3.2.1 .

Thanks,
George





------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to