0 Replies Latest reply on Nov 12, 2003 8:17 PM by lio

    ClassNotFoundException for Integer.TYPE

    lio Newbie

      I got an exception on EJB invocation with an object representing primitive types, such as Integer.TYPE etc.
      Example in minimal remote bean method,
      public void test(java.lang.Class arg) throws RemoteException;

      If I call it with Integer.TYPE from client code like below,
      bean.test(Integer.TYPE)

      the following exception was shown in the console where JBoss runs.

      java.lang.ClassNotFoundException: int
      at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:217)
      at org.jboss.invocation.MarshalledValueInputStream.resolveClass(MarshalledValueInputStream.java:48)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
      at java.io.ObjectInputStream.readClass(ObjectInputStream.java:1402)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1260)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
      at org.jboss.invocation.MarshalledValue.get(MarshalledValue.java:78)
      at org.jboss.invocation.MarshalledInvocation.getArguments(MarshalledInvocation.java:320)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:144)
      at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
      at org.jboss.ejb.Container.invoke(Container.java:738)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:383)
      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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      at java.lang.Thread.run(Thread.java:536)

      Integer.TYPE is declared as java.lang.Class that is a serializable, so I believe it doesn't excess the J2EE constraint.
      In my another test on RMI with the same method, I could successfully pass the Integer.TYPE to my RMI Object.
      Is this a bug of JBoss ?

      My environment: Win2K, JBoss3.0.8, JDK1.4.1_03