6 Replies Latest reply on Jun 12, 2007 10:36 AM by peterj

    how to run ex04_1a from remote ?

    pstrotmann

      Hi all,

      running ex04_1a,b on one computer works fine, but running the client on a remote computer I get:

      javax.Naming.CommunicatonException. Root Exception is java.io.InvalidClassException:org.jboss.proxy.ejb.GenericEJBInterceptor local class incompatible....

      the Only change I made was uncommenting the properties-part in getInitialContext like this:

      public static Context getInitialContext()
      throws javax.naming.NamingException
      {
      /* return new InitialContext(); */
      /**** context initialized by jndi.properties file */
      Properties p = new Properties();
      p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
      p.put(Context.PROVIDER_URL, "192.168.0.1:1099");
      return new javax.naming.InitialContext(p);
      /**/

      }

      Are there further modifications necessary ?

      peter

        • 1. Re: how to run ex04_1a from remote ?
          pstrotmann

          no reply, just some additional trace and information:

          running ex04_1a I get:

          run.client_41a:
          [java] getInitialContext() successful
          [java] jndiContext.lookup not successful
          [java] javax.naming.CommunicationException. Root exception is java.io.InvalidClassException: org.jboss.proxy.ejb.GenericEJBInterceptor; local class incompatible: stream classdesc serialVersionUID = 4582256576523491346, local class serialVersionUID = 3844706474734439975
          [java] at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:459)
          [java] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521)
          [java] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)

          peter

          • 2. Re: how to run ex04_1a from remote ?
            jkmuncy

            I have been working with the O'Reilly book and JBoss 3.0 beta workbook for some time now and want to let the rest of you know about a few items I have figured out. From the start I have been using two RedHat 8.0 boxes, one for the JBoss server and one for running the client app.

            First off, multicasting does not work if the server is run in "default" mode. Multicasting does work if the server is run in "all" mode.

            And if default mode is what is wanted then:
            Second, setting up jndi.properties with an entry:
            java.naming.provider.url=jnp://server:1099/
            does not work because it gets stepped on by
            java.naming.provider.url=jnp://localhost:1099
            in a jndi.properties file buried in JBoss-3.0.X/client/jbossjmx-ant.jar

            Hope this help those of you who are also using two machines.

            • 3. Re: how to run ex04_1a from remote ?
              wf_won

              Thank you very much jkmuncy. It is definitely helpful.

              • 4. Re: how to run ex04_1a from remote ?
                pstrotmann

                Hi all,

                thanks a lot for your hints, meantime I made it work with upgrading to
                3.2.1 Version, it even works in default mode.

                peter

                • 5. Re: how to run ex04_1a from remote ?
                  atelieux

                  ------- summary of (server) machine ---------
                  OS: Windows Vista (!!)
                  JDK & JRE: 1.6.0
                  JBOSS: 4.0.5
                  ANT: 1.7.0
                  JAVA DEV.ENV.: Eclipse 3.2.2
                  ----------------------------------------------------------
                  Hi all! i'm a newbie with Jboss...i'm porting an application from jboss 3.0.5 (PERFECTLY WORKING) to jboss 4.0.5 GA, and when i run the application, java diplays this error:

                  [java] Root exception is java.io.InvalidClassException:
                  [java] org.jboss.proxy.ejb.GenericEJBInterceptor; local class incompatible:
                  [java] stream classdesc serialVersionUID = 3844706474734439975, local
                  [java] class serialVersionUID = 4582256576523491346

                  The error is displayed when the application do the context lookup.
                  I tried to make the changes explained in this thread for jboss 3.x but the problem remains...the issue persists on local and on remote side.

                  I post also the properties file:

                  [prop] PROVIDER_URL=192.168.2.82:1099
                  [prop] INITIAL_CONTEXT_FACTORY=org.jnp.interfaces.NamingContextFactory

                  Obviously, i re-build ALL ejb with the new jdk, 1.6.0, but the previous version was 1.4.0, with ant 1.7.0.

                  Somebody has any idea?? thanks...

                  A.


                  • 6. Re: how to run ex04_1a from remote ?
                    peterj

                    First, do not ask new questions at the end of existing posts, especially not posts that are 4 years old!

                    Second, try using JDK 1.5, 1.6 is not yet qualified for use with 4.0.5 (I have seen some people use it successfully and others have all kinds of problems, so your best bet it to use 1.5).

                    Third, the exception means that your remote clients are not using the same version of the jar files as what is available in the app server. Most likely, the clients are still using the older jars.