Announcement Announcement Module
Collapse
No announcement yet.
Issue with dm 2.0.0.M4 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue with dm 2.0.0.M4

    I was trying to run my application over dm 2.0.0M4 which was running successfully over 1.0.2
    But this time strangely i am getting ClassNotFound Exceptions for the classes which are already there in the deployed bundle itself

    My assumption is ,Before the bundle get deployed succesfully (classes getting loaded),The activator was called .Hence the exception

    What is the exact issue ?? I am still not sure

  • #2
    It's hard to tell what the problem is from the information that you've provided so far. Can you please provide us with some more details, e.g. the stack traces of the exception that you're seeing and the steps to recreate the problem.

    Comment


    • #3
      I have a remote Object RemoteGS.java,implementing Remote interface IRemoteGS.
      Using rmic i generated stub for the RemoteGS and packed everything in a bundle .

      The bundle has an Activator which calls main of ContextInit class
      The main method of ContextInit class initialize RemoteGS

      Code:
      new RemoteGS();
      The constructor of RemoteGS() has all what is required for RMI registeration of a remote Object
      Code:
      UnicastRemoteObject.exportObject(this);
      LocateRegistry.createRegistry(7099);
      Naming.rebind("rmi://127.0.0.1:7099/Remote", this);
      Now here i get ClassNotFound for RemoteGS_stub which is already there in the bundle
      Last edited by vishalj; Aug 17th, 2009, 05:50 AM.

      Comment


      • #4
        Can you please provide the full stack trace of the ClassNotFoundException? My guess is that it's not the bundle's classloader that's being used for some reason, hence the class from the bundle not being visible. Hopefully the stack trace will help us to pin point the problem.

        Comment


        • #5
          It seems like some classLoader issue but my concern is how do i solve it .Have put the stacktrace here
          Code:
          java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
          	java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
          	java.lang.ClassNotFoundException: com.pg.remote.RemoteGS_Stub
          	at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:396)
          	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
          	at sun.rmi.transport.Transport$1.run(Transport.java:159)
          	at java.security.AccessController.doPrivileged(Native Method)
          	at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
          	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
          	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
          	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
          	at java.lang.Thread.run(Thread.java:619)
          	at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
          	at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
          	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
          	at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
          	at java.rmi.Naming.rebind(Naming.java:160)
          	at com.pg.remote.RemoteGS.register(RemoteGS.java:49)
          	at com.pg.remote.RemoteGS.init(RemoteGS.java:38)
          	at com.pg.remote.RemoteGS.<init>(RemoteGS.java:17)
          	at com.pg.context.ContextInit$1.run(ContextInit.java:31)
          Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
          	java.lang.ClassNotFoundException: com.pg.remote.RemoteGS_Stub
          	at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
          	at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:386)
          	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
          	at sun.rmi.transport.Transport$1.run(Transport.java:159)
          	at java.security.AccessController.doPrivileged(Native Method)
          	at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
          	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
          	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
          	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
          	at java.lang.Thread.run(Thread.java:619)
          Caused by: java.lang.ClassNotFoundException: com.pg.remote.RemoteGS_Stub
          	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
          	at java.security.AccessController.doPrivileged(Native Method)
          	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
          	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
          	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
          	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
          	at java.lang.Class.forName0(Native Method)
          	at java.lang.Class.forName(Class.java:247)
          	at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:434)
          	at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
          	at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
          	at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
          	at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
          	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
          	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
          	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
          	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
          	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

          Comment


          • #6
            The same thing was working on dm 1.0.2

            Comment


            • #7
              Thanks for the stack trace. The key thing here will be which ClassLoader is passed into the Class.forName call that's being made by sun.rmi.server.LoaderHandler. Unfortunately, it's not immediately apparent what this ClassLoader will be.

              It's interesting that this works for you on 1.0.2, but fails on 2.0 M4. It would be great if you could open a JIRA, and attach your app that works on 1.0.2 but fails on 2.0 M4.

              Comment


              • #8
                Thanks ,
                I have raised a jira issue
                https://issuetracker.springsource.com/browse/DMS-1375

                Comment

                Working...
                X