10 Replies Latest reply on Jan 9, 2006 10:11 AM by Fernando Otero

    InvalidClassException when accesing from external App on 4.0

    Guillermo Guisado Newbie

      Hi:
      I had and java app that connected to a jboss EJB and was working fine with 4.0.0.
      I have recompiled both the EJB and the app with the jboss 4.0.3 classes, deployed them on a 4.0.3 jboss, made sure configuration between 4.0.0 and 4.0.3 was same and now the external app does not work.
      I get:

      javax.naming.CommunicationException [Root exception is java.io.InvalidClassException: org.jboss.invocation.MarshallingInvokerInterce
      ptor; unable to create instance]
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:707)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
       at javax.naming.InitialContext.lookup(Unknown Source)


      I have gone through the changes between versions but can't find anything related (that at least makes sense to me)
      I have not changed the code of any of the apps.
      Any ideas?

        • 2. Re: InvalidClassException when accesing from external App on
          Guillermo Guisado Newbie

           

          "darranl" wrote:
          Have you made sure the client is using the jars from 4.0.3 and not from 4.0.0?

          http://java.sun.com/j2se/1.5.0/docs/api/java/io/InvalidClassException.html

          Compiled and run with them...Yes I have :-)
          Good try though!

          • 3. Re: InvalidClassException when accesing from external App on
            Darran Lofthouse Master

            Is that all of the exception? There should be a nested cause.

            • 4. Re: InvalidClassException when accesing from external App on
              Guillermo Guisado Newbie

              Yes there is.... it is the
              InvalidClassException

              "darranl" wrote:
              Is that all of the exception? There should be a nested cause.

              javax.naming.CommunicationException [Root exception is java.io.InvalidClassException: org.jboss.invocation.MarshallingInvokerInterce
              ptor; unable to create instance]
               at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:707)
               at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
               at javax.naming.InitialContext.lookup(Unknown Source)
               at com.core.ejbs.ParameterFactory.<clinit>(ParameterFactory.java:19)
               at com.mail.LogEmailImpl.setParmeters(LogEmailImpl.java:16)
               at com.mail.LogEmail.<init>(LogEmail.java:21)
               at com.mail.LogEmailImpl.<init>(LogEmailImpl.java:11)
               at com.util.Log.init(Log.java:27)
               at com.util.Log.info(Log.java:224)
               at com.util.Log.info(Log.java:181)
               at com.core.Global.getApplicationName(Global.java:226)
               at com.util.Log.init(Log.java:25)
               at com.util.Log.info(Log.java:224)
               at com.util.Log.info(Log.java:181)
               at com.xtatic.ImportMain.main(ImportMain.java:31)
              Caused by: java.io.InvalidClassException: org.jboss.invocation.MarshallingInvokerInterceptor; unable to create instance
               at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
               at java.io.ObjectInputStream.readObject0(Unknown Source)
               at java.io.ObjectInputStream.readObject(Unknown Source)
               at org.jboss.proxy.Interceptor.readExternal(Interceptor.java:66)
               at java.io.ObjectInputStream.readExternalData(Unknown Source)
               at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
               at java.io.ObjectInputStream.readObject0(Unknown Source)
               at java.io.ObjectInputStream.readObject(Unknown Source)
               at org.jboss.proxy.Interceptor.readExternal(Interceptor.java:66)
               at java.io.ObjectInputStream.readExternalData(Unknown Source)
               at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
               at java.io.ObjectInputStream.readObject0(Unknown Source)
               at java.io.ObjectInputStream.readObject(Unknown Source)
               at org.jboss.proxy.Interceptor.readExternal(Interceptor.java:66)
               at java.io.ObjectInputStream.readExternalData(Unknown Source)
               at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
               at java.io.ObjectInputStream.readObject0(Unknown Source)
               at java.io.ObjectInputStream.readObject(Unknown Source)
               at org.jboss.proxy.ClientContainer.readExternal(ClientContainer.java:142)
               at java.io.ObjectInputStream.readExternalData(Unknown Source)
               at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
               at java.io.ObjectInputStream.readObject0(Unknown Source)
               at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
               at java.io.ObjectInputStream.readSerialData(Unknown Source)
               at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
               at java.io.ObjectInputStream.readObject0(Unknown Source)
               at java.io.ObjectInputStream.readObject(Unknown Source)
               at java.rmi.MarshalledObject.get(Unknown Source)
               at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:57)
               at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:637)
               ... 14 more
              


              • 5. Re: InvalidClassException when accesing from external App on
                Guillermo Guisado Newbie

                Funny enough I have even made sure the actual classes are the same files and still get the error.

                • 6. Re: InvalidClassException when accesing from external App on
                  Guillermo Guisado Newbie

                  Funny enough I have even made sure the actual classes are the same files and still get the error.

                  • 7. Re: InvalidClassException when accesing from external App on
                    simon ohlmer Newbie

                    What happens if you start JBoss in one window and then try to call the shutodown command in another, do you get the same timeoutexception?

                    • 8. Re: InvalidClassException when accesing from external App on
                      Guillermo Guisado Newbie

                       

                      "simonsal" wrote:
                      What happens if you start JBoss in one window and then try to call the shutodown command in another, do you get the same timeoutexception?


                      Shutdown works fine but remote program keeps giving problems.
                      I have made sure I am using the correct libraries when compiling and running....


                      javax.naming.CommunicationException [Root exception is java.io.InvalidClassException: org.jboss.invocation.MarshallingInvokerInterceptor; unable to create instance]
                      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:707)
                      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
                      at javax.naming.InitialContext.lookup(InitialContext.java:347)



                      • 9. Re: InvalidClassException when accesing from external App on
                        Guillermo Guisado Newbie

                        ok... solved it....
                        i was not using the jbossall-client.jar but several other Jars...

                        The fun part is that they all belong to 4.0.3 so there are classes in the jboss-4.0.3/client directory jars that are not compatible with 4.0.3!!!!!!!

                        • 10. Re: InvalidClassException when accesing from external App on
                          Fernando Otero Newbie

                          I had the same problem trying to select individual jar files, to avoid including desnecesary classes (like servlet stuff) in the classpath.

                          I found that the InvalidClassException was caused by a missing class (EDU.oswego.cs.dl.util.concurrent.SynchronizedLong), which is included only in the jbossall jar. Then, I just created a jar file with this classes.

                          Here is the list of jars files that I use to make remote calls to EJBs in JBoss 4.0.3:

                          - jboss-client.jar
                          - jboss-common-client.jar
                          - jbosssx-client.jar
                          - jboss-system-client.jar
                          - jboss-transaction-client.jar
                          - jnp-client.jar
                          - concurrent.jar (EDU.oswego.cs.* classes)