11 Replies Latest reply on Apr 25, 2003 12:41 PM by sugramoin

    j2ee.jar Vs jboss-j2ee.jar and nessecity of j2sdkee for clie

    sugramoin

      I have my Jboss client which uses JMS and communicates with jboss server through JMS as well as Session beans.
      The question which i have is do i need to have J2ee installed in my computer, or jboss-j2ee.jar file is enough for my client.

      (1) when I copied all the jboss's client jar files and tried to run the client application then it says javax.jms.Message not found.
      (2) When i Installed J2ee and in System Classpath when i set J2EE_HOME\lib\j2ee.jar then it worked fine.
      (3) When i unistalled J2ee and copied the j2ee.jar itself in the lib directory of the client it gave me the same error javax.jms.Message not found.

      I don't understand why it worked when i installed J2ee, and also i can't understand why can't it take javax.jms.Message from jboss-j2ee.jar package which is already there in my client's lib directory

      I need help
      TIA
      MOIN

        • 1. Re: j2ee.jar Vs jboss-j2ee.jar and nessecity of j2sdkee for

          Show the stacktrace.

          You probably have something in the
          system classpath that is trying to load from
          a classloader it cannot see.

          See the java documentation on classloader
          hierarchies.

          Regards,
          Adrian

          • 2. Re: j2ee.jar Vs jboss-j2ee.jar and nessecity of j2sdkee for
            sugramoin

            java -Djava.rmi.server.codebase=file:///c:/RazorEyeBeta2.5/K5-client/ -classpath j2ee.jar;concurrent.jar;gnu-regexp.jar;jaas.jar;jacorb.jar;jboss-client.jar;jboss-common-client.jar;jbossha-client.jar;jboss-iiop-client.jar;jboss-j2ee.jar;jboss-jsr77.jar;jbossmq-client.jar;jbossmqha.jar;jboss-net-client.jar;jbosssx-client.jar;jboss-system-client.jar;jcert.jar;jmx-connector-client-factory.jar;jmx-ejb-connector-client.jar;jmx-rmi-connector-client.jar;jnet.jar;jnp-client.jar;jsse.jar;log4.jar;gnujaxp.jar;jcommon-0.7.2.jar;iText-0.96.jar;pixie.jar;jfreereport-0.8.1_02.jar;Multivalent.jar;jfreechart-0.9.6.jar kommander.session.KapeumLogin DEBUG_ON


            This is my command to run my client application.

            do i need to lookinto java's classloader or
            jboss's classloader

            can you point out what is wrong in my command above
            Thanks
            Nas.

            • 3. Re: j2ee.jar Vs jboss-j2ee.jar and nessecity of j2sdkee for

              Post the stacktrace of the error.

              Regards,
              Adrian

              • 4. Re: j2ee.jar Vs jboss-j2ee.jar and nessecity of j2sdkee for
                sugramoin


                java.rmi.ServerError: Error occurred in server thread; nested exception is:
                java.lang.NoClassDefFoundError: javax.jms.Message
                at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:349)
                at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:207)
                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)
                at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.jav
                :247)
                at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
                at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:350)
                at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
                at java.rmi.Naming.rebind(Naming.java:160)
                at kommander.session.GenesisTopicMsgReciever.startListener(GenesisTopicMsgReciever.jav
                :35)
                at kommander.session.KapeumLogin.passwordFieldKeyReleased(KapeumLogin.java:190)
                at kommander.session.KapeumLogin.access$100(KapeumLogin.java:33)
                at kommander.session.KapeumLogin$2.keyReleased(KapeumLogin.java:120)
                at java.awt.Component.processKeyEvent(Component.java:5054)
                at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
                at java.awt.Component.processEvent(Component.java:4902)
                at java.awt.Container.processEvent(Container.java:1566)
                at java.awt.Component.dispatchEventImpl(Component.java:3598)
                at java.awt.Container.dispatchEventImpl(Container.java:1623)
                at java.awt.Component.dispatchEvent(Component.java:3439)
                at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1688)
                at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.j
                va:593)
                at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManage
                .java:765)
                at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManage
                .java:698)
                at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java
                559)
                at java.awt.Component.dispatchEventImpl(Component.java:3468)
                at java.awt.Container.dispatchEventImpl(Container.java:1623)
                at java.awt.Window.dispatchEventImpl(Window.java:1585)
                at java.awt.Component.dispatchEvent(Component.java:3439)
                at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
                at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
                at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
                at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
                at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
                at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
                Caused by: java.lang.NoClassDefFoundError: javax.jms.Message
                at kommander.session.AddServerImpl_Stub.class$(Unknown Source)
                at kommander.session.AddServerImpl_Stub.(Unknown Source)
                at sun.misc.Unsafe.ensureClassInitialized(Native Method)
                at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.
                ava:20)
                at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
                at java.lang.reflect.Field.acquireFieldAccessor(Field.java:779)
                at java.lang.reflect.Field.getFieldAccessor(Field.java:760)
                at java.lang.reflect.Field.getLong(Field.java:398)
                at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1434)
                at java.io.ObjectStreamClass.access$400(ObjectStreamClass.java:45)
                at java.io.ObjectStreamClass$3.run(ObjectStreamClass.java:331)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.io.ObjectStreamClass.(ObjectStreamClass.java:329)
                at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:249)
                at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:449)
                at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521)
                at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
                at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
                at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
                at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
                at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
                at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:342)
                at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:207)
                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)


                This is the stack trace

                • 5. Re: j2ee.jar Vs jboss-j2ee.jar and nessecity of j2sdkee for

                  I don't see any JBoss code here.

                  I do see it trying to bind something into a remote
                  RMI registry that doesn't know
                  anything about javax.jms.Message.

                  Regards,
                  Adrian

                  • 6. Re: j2ee.jar Vs jboss-j2ee.jar and nessecity of j2sdkee for
                    sugramoin

                    Iam actually having some RMI Skeletons on client side,
                    is there any problem with that.

                    I don't know whats happening .

                    I have posted my Stack trace

                    needed help

                    • 7. Re: j2ee.jar Vs jboss-j2ee.jar and nessecity of j2sdkee for

                      What are you trying to do with your
                      Naming.rebind()
                      I don't understand how this relates to JMS

                      Regards,
                      Adrian

                      • 8. Re: j2ee.jar Vs jboss-j2ee.jar and nessecity of j2sdkee for
                        sugramoin

                        well there a story behing this..
                        I was having JMS in my application which is not working now, so i replaced Asynchronous JMS with Synchronous RMI , to change the cod eeasily i did this.

                        package kommander.session;


                        import java.rmi.*;

                        /**
                        *
                        * @author Administrator
                        */
                        public interface AddServerIntf extends Remote {

                        void onMessage(javax.jms.Message msg) throws RemoteException;

                        }


                        Is there any thing wrong in just using JMS type Objects like Map and mesage objects.

                        Need Help.

                        • 9. Re: j2ee.jar Vs jboss-j2ee.jar and nessecity of j2sdkee for

                          So the problem is that you bind this into
                          the RMI registry, but the server running
                          the RMI registry does not know about the
                          class javax.jms.Message

                          Most of the j2ee classes are just interfaces,
                          you need an implementation to make it work.

                          Regards,
                          Adrian

                          • 10. Re: j2ee.jar Vs jboss-j2ee.jar and nessecity of j2sdkee for
                            sugramoin

                            So what should i do now to avoid this problem.

                            i don't want to install j2sdkee on my client machines.

                            Waiting for reply

                            • 11. Re: j2ee.jar Vs jboss-j2ee.jar and nessecity of j2sdkee for
                              sugramoin

                              I figured it out i need not use j2ee.jar at all
                              all i did now is i have written a bat file in which i set the classpath before start the rmiregistry.
                              it solved the problem

                              now my client does'nt requires j2sdk installed or j2ee.jar in its class path, coz iam already using jboss client jar files.

                              Thanks for all teh help