1 2 Previous Next 22 Replies Latest reply on Mar 14, 2007 1:30 PM by bbonanno

    JBoss Remoting & JDK 6.0 situation deadlock

    alexg79

      I really need some JDK 6.0 features in my client software.

      The problem:
      Loading of array classes in JBoss Remoting does not work under JDK6.

      JBoss point of view:
      This is a JDK6 bug, since it worked fine with JDK5 and earlier.
      We'll wait for Sun to fix this.

      Sun point of view:
      It should never have worked that way in the first place, and it's not a bug.
      Programs should use Class.forName() instead.

      Given all this, it doesn't look like the problem is going away. What can we do?

      References:
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=97229
      http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=fd1fb524c02e2ffffffffc6cff53ffa3be42:YfiG?bug_id=6500212

        • 1. Re: JBoss Remoting & JDK 6.0 situation deadlock
          aron-smith

          I also need it. This is a real shame. It is still broken in the 5.0 beta so no sign of this being fixed.


          I wonder if we can download the source and make the changes ourselves - can anyone figure it out?

          • 2. Re: JBoss Remoting & JDK 6.0 situation deadlock
            aron-smith

            Also this should not be a deadlock, Sun clearly explains the loadClass() working on a Arrays was an unintentional feature (bug) pre 1.6

            http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=86f7b4413e0c95ffffffffcfe91677a830785:WuuT?bug_id=6446627

            • 3. Re: JBoss Remoting & JDK 6.0 situation deadlock
              fcorneli

              The patch of jboss-remoting is quite simple. See:
              http://jira.jboss.com/jira/browse/JBREM-659

              I really don't get why this is taking so long for JBoss to tackle this issue (I know, a support contract would probably help). If JBoss feels like this is a Java6 bug, they could just call it a "work-around". (while actually everybody knows by now it's a bug :) )

              Index: ./src/main/org/jboss/remoting/loading/ObjectInputStreamWithClassLoader.java
              ===================================================================
              RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/loading/ObjectInputStreamWithClassLoader.java,v
              retrieving revision 1.2.4.1
              diff -u -r1.2.4.1 ObjectInputStreamWithClassLoader.java
              --- ./src/main/org/jboss/remoting/loading/ObjectInputStreamWithClassLoader.java 11 May 2006 20:39:42 -0000 1.2.4.1
              +++ ./src/main/org/jboss/remoting/loading/ObjectInputStreamWithClassLoader.java 10 Jan 2007 14:18:32 -0000
              @@ -136,7 +136,8 @@
               // EJBTHREE-440
               try
               {
              - return cl.loadClass(v.getName());
              + // JBREM-659
              + return Class.forName(v.getName(), false, cl);
               }
               catch(ClassNotFoundException ex)
               {
              


              • 4. Re: JBoss Remoting & JDK 6.0 situation deadlock
                alexg79

                Ok, I have compiled JBoss Remoting v1.4.4 with the fix. According to my initial testing, it now works with JDK 6!
                Could someone provide hosting for the binary? It's not big, just a little under 400k.

                • 5. Re: JBoss Remoting & JDK 6.0 situation deadlock

                  If you can send me the source changes (tom.elrod@jboss.com), I can apply them to the 1.4 branch and make sure testsuite passes, and then create official release for it (i.e. 1.4.6).

                  • 6. Re: JBoss Remoting & JDK 6.0 situation deadlock

                    (Per http://jira.jboss.com/jira/browse/JBREM-659)

                    Have update all the places where ClassLoader.loadClass() was being called and either replaced with Class.forName() call or changed to use the ClassLoaderUtility class. These changes have been made to HEAD, remoting_2_x and remoting_1_4 branches.

                    Have also created a 1.4.6.GA release for these changes (with tag of remoting_1_4_6_GA) and have published to jboss repository (see Jhttp://repository.jboss.com/jboss/remoting/1.4.6.GA/lib/)

                    Although was able to manually test some of the remoting tests within the testsuite using jdk 1.6, could not run the automated testsuite run with jdk 1.6. The reason for this is that distributed test framework used (JBoss JRunit) uses JGroups for its communication transport, which itself uses ClassLoader.loadClass() and therefore can't run under jdk 1.6 (see http://javagroups.cvs.sourceforge.net/javagroups/JGroups/src/org/jgroups/util/Util.java?revision=1.113&view=markup).

                    Therefore, although 1.4.6.GA, 2.2.0.Beta1 and any 3.x releases *should* work with jdk 1.6, I can't say they will with certainty since can't run the full testsuite.

                    • 7. Re: JBoss Remoting & JDK 6.0 situation deadlock
                      fcorneli

                      Hi Tom,


                      I'm using JBoss Remoting 1.4.6.GA now in my integration tests (for an application deployed on JBoss AS 4.0.5.GA) running Java 6, and the thing seems to behave just fine.

                      Thanks for the work on this issue.


                      Regards,
                      Frank.

                      • 8. Re: JBoss Remoting & JDK 6.0 situation deadlock
                        nicarran

                         

                        "fcorneli" wrote:
                        Hi Tom,


                        I'm using JBoss Remoting 1.4.6.GA now in my integration tests (for an application deployed on JBoss AS 4.0.5.GA) running Java 6, and the thing seems to behave just fine.

                        Thanks for the work on this issue.


                        Regards,
                        Frank.


                        java.lang.ClassNotFoundException: [Lorg.jboss.aop.advice.Interceptor

                        :(

                        Don't forget jbossall-client.jar

                        Thanks!

                        PD:
                        When will this patch become official?

                        • 9. Re: JBoss Remoting & JDK 6.0 situation deadlock
                          jmjatlanta

                          Awesome fix. Thanks for the research and help.

                          • 10. Re: JBoss Remoting & JDK 6.0 situation deadlock
                            alexg79

                            I just tried to launch my app via Java Web Start, and while running it I got a familiar looking exception. Here's the stack trace:

                            java.lang.reflect.UndeclaredThrowableException
                             at $Proxy1.getList(Unknown Source)
                             at fi.karico.etikettu.client.view.editor.ProductEditor$ListTableRefreshTask.refreshModelData(ProductEditor.java:6350)
                             at fi.karico.etikettu.client.view.task.TableRefreshTask.runBackground(TableRefreshTask.java:39)
                             at fi.karico.etikettu.client.view.task.SwingTask.run(SwingTask.java:30)
                             at fi.karico.etikettu.client.view.task.TaskManager.run(TaskManager.java:150)
                             at java.lang.Thread.run(Thread.java:619)
                            Caused by: java.lang.ClassNotFoundException: [Ljava.lang.Object;
                             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 com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:255)
                             at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
                             at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
                             at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:50)
                             at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:139)
                             at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
                             at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
                             at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1624)
                             at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
                             at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
                             at java.util.ArrayList.readObject(ArrayList.java:593)
                             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:597)
                             at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
                             at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1846)
                             at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
                             at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
                             at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
                             at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:122)
                             at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
                             at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
                             at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
                             at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
                             at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
                             at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
                             at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
                             at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
                             at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
                             at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
                             at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
                             at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
                             at org.jboss.remoting.Client.invoke(Client.java:525)
                             at org.jboss.remoting.Client.invoke(Client.java:488)
                             at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:61)
                             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                             at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
                             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                             at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
                             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                             at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:77)
                             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                             at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
                             at $Proxy1.getList(Unknown Source)
                             at fi.karico.etikettu.client.view.editor.ProductEditor$ListTableRefreshTask.refreshModelData(ProductEditor.java:6350)
                             at fi.karico.etikettu.client.view.task.TableRefreshTask.runBackground(TableRefreshTask.java:39)
                             at fi.karico.etikettu.client.view.task.SwingTask.run(SwingTask.java:30)
                             at fi.karico.etikettu.client.view.task.TaskManager.run(TaskManager.java:150)
                             at java.lang.Thread.run(Thread.java:619)
                             at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:73)
                             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                             at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
                             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                             at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
                             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                             at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:77)
                             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                             at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
                             ... 6 more
                            

                            Where can I find the source for Remoting v1.4.6? CVS only seems to have the 2.x branches. Or am I looking at the wrong directory? The JBoss CVS structure is quite chaotic.

                            • 11. Re: JBoss Remoting & JDK 6.0 situation deadlock
                              alexg79

                              I just tried to launch my app via Java Web Start, and while running it I got a familiar looking exception. Here's the stack trace:

                              java.lang.reflect.UndeclaredThrowableException
                               at $Proxy1.getList(Unknown Source)
                               at fi.karico.etikettu.client.view.editor.ProductEditor$ListTableRefreshTask.refreshModelData(ProductEditor.java:6350)
                               at fi.karico.etikettu.client.view.task.TableRefreshTask.runBackground(TableRefreshTask.java:39)
                               at fi.karico.etikettu.client.view.task.SwingTask.run(SwingTask.java:30)
                               at fi.karico.etikettu.client.view.task.TaskManager.run(TaskManager.java:150)
                               at java.lang.Thread.run(Thread.java:619)
                              Caused by: java.lang.ClassNotFoundException: [Ljava.lang.Object;
                               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 com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:255)
                               at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
                               at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
                               at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:50)
                               at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:139)
                               at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
                               at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
                               at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1624)
                               at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
                               at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
                               at java.util.ArrayList.readObject(ArrayList.java:593)
                               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:597)
                               at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
                               at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1846)
                               at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
                               at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
                               at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
                               at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:122)
                               at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
                               at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
                               at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
                               at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
                               at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
                               at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
                               at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
                               at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
                               at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
                               at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
                               at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
                               at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
                               at org.jboss.remoting.Client.invoke(Client.java:525)
                               at org.jboss.remoting.Client.invoke(Client.java:488)
                               at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:61)
                               at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                               at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
                               at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                               at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
                               at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                               at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:77)
                               at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                               at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
                               at $Proxy1.getList(Unknown Source)
                               at fi.karico.etikettu.client.view.editor.ProductEditor$ListTableRefreshTask.refreshModelData(ProductEditor.java:6350)
                               at fi.karico.etikettu.client.view.task.TableRefreshTask.runBackground(TableRefreshTask.java:39)
                               at fi.karico.etikettu.client.view.task.SwingTask.run(SwingTask.java:30)
                               at fi.karico.etikettu.client.view.task.TaskManager.run(TaskManager.java:150)
                               at java.lang.Thread.run(Thread.java:619)
                               at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:73)
                               at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                               at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
                               at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                               at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
                               at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                               at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:77)
                               at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                               at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
                               ... 6 more
                              

                              Where can I find the source for Remoting v1.4.6? CVS only seems to have the 2.x branches. Or am I looking at the wrong directory? The JBoss CVS structure is quite chaotic.

                              • 12. Re: JBoss Remoting & JDK 6.0 situation deadlock
                                alexg79

                                Sorry for the accidental double post. Anyway, I found the sources from the link in Tom's post. Let's see what causes this.

                                • 13. Re: JBoss Remoting & JDK 6.0 situation deadlock
                                  alexg79

                                  Sorry again, folks -- false alarm! Turns out I was including jbossall-client.jar on the list of resources in my application's JNLP file, and apparently that jar contains the old remoting code, which caused the exception.

                                  • 14. Re: JBoss Remoting & JDK 6.0 situation deadlock
                                    aron-smith

                                    I wonder when this will be available in an official release?

                                    1 2 Previous Next