Harmony
  1. Harmony
  2. HARMONY-3773

Caucho Resin 3.1 AppServer doesn't work with Harmony

    Details

    • Type: Task Task
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Estimated Complexity:
      Advanced

      Description

      Caucho Resin 3.1 accessible from http://www.caucho.com/download/index.xtp doesn't work with Harmony.

      To reproduce just download, install following the readme and try to start the http daemon.

      The sympthoms are as follows:

      java.lang.Error: java.lang.NoSuchFieldException: classes
      at org.apache.yoko.rmi.util.ClassLoaderLocal$1.run(ClassLoaderLocal.java:119)
      at java.security.AccessController.doPrivilegedImpl(AccessController.java:171)
      at java.security.AccessController.doPrivileged(AccessController.java:53)
      at org.apache.yoko.rmi.util.ClassLoaderLocal.<clinit>(ClassLoaderLocal.java:111)
      at org.apache.yoko.rmi.impl.PortableRemoteObjectExtImpl.<clinit>(PortableRemoteObjectExtImpl.java:31)
      at java.lang.reflect.VMReflection.newClassInstance(VMReflection.java)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:298)
      at java.lang.Class.newInstance(Class.java:719)
      at org.apache.yoko.rmi.api.PortableRemoteObjectExt.init(PortableRemoteObjectExt.java:53)
      at org.apache.yoko.rmi.api.PortableRemoteObjectExt.getState(PortableRemoteObjectExt.java:65)
      at org.apache.yoko.rmi.impl.RMIState.current(RMIState.java:153)
      at org.apache.yoko.rmi.impl.UtilImpl.createValueHandler(UtilImpl.java:452)
      at javax.rmi.CORBA.Util.createValueHandler(Util.java:61)
      at com.caucho.iiop.any.TypeCodeFactory.<clinit>(TypeCodeFactory.java:40)
      at com.caucho.iiop.orb.ORBImpl.<init>(ORBImpl.java:57)
      at com.caucho.loader.EnvironmentClassLoader.initializeEnvironment(EnvironmentClassLoader.java:567)
      at com.caucho.loader.EnvironmentClassLoader.init(EnvironmentClassLoader.java:161)
      at com.caucho.loader.ClassLoaderConfig.init(ClassLoaderConfig.java:164)
      at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
      at java.lang.reflect.Method.invoke(Method.java:381)
      at com.caucho.config.j2ee.PostConstructProgram.configureImpl(PostConstructProgram.java:62)
      at com.caucho.config.BeanTypeStrategy.init(BeanTypeStrategy.java:355)
      at com.caucho.config.NodeBuilder.configureImpl(NodeBuilder.java:253)
      at com.caucho.config.EnvironmentAttributeStrategy.configure(EnvironmentAttributeStrategy.java:60)
      at com.caucho.config.NodeBuilder.configureAttributeImpl(NodeBuilder.java:390)
      at com.caucho.config.NodeBuilder.configureBeanImpl(NodeBuilder.java:329)
      at com.caucho.config.TypeStrategy.configureBean(TypeStrategy.java:104)
      at com.caucho.config.BeanTypeStrategy.configureBean(BeanTypeStrategy.java:257)
      at com.caucho.config.EnvironmentTypeStrategy.configureBean(EnvironmentTypeStrategy.java:65)
      at com.caucho.config.NodeBuilder.configureImpl(NodeBuilder.java:251)
      at com.caucho.config.NodeBuilder.configure(NodeBuilder.java:160)
      at com.caucho.config.Config.configure(Config.java:232)
      at com.caucho.config.Config.configure(Config.java:176)
      at com.caucho.boot.ResinBoot.<init>(ResinBoot.java:134)
      at com.caucho.boot.ResinBoot.main(ResinBoot.java:397)
      at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
      at java.lang.reflect.Method.invoke(Method.java:381)
      at org.apache.harmony.vm.JarRunner.main(JarRunner.java:80)
      Caused by: java.lang.NoSuchFieldException: classes
      at java.lang.Class.getDeclaredField(Class.java:398)
      at org.apache.yoko.rmi.util.ClassLoaderLocal$1.run(ClassLoaderLocal.java:114)
      at java.security.AccessController.doPrivilegedImpl(AccessController.java:171)

      The problem is caused by incompatibility with Yoko and described in https://issues.apache.org/jira/browse/YOKO-258

      After fixing above Yoko problem it still fails with:

      java.lang.Error: cannot find computeSerialVersionUID method
      at org.apache.yoko.rmi.impl.ValueDescriptor$1.run(ValueDescriptor.java:158)
      at java.security.AccessController.doPrivilegedImpl(AccessController.java:171)
      at java.security.AccessController.doPrivileged(AccessController.java:53)
      at org.apache.yoko.rmi.impl.ValueDescriptor.getSerialVersionUID(ValueDescriptor.java:138)
      at org.apache.yoko.rmi.impl.ValueDescriptor.getRepositoryID(ValueDescriptor.java:109)
      at org.apache.yoko.rmi.impl.TypeRepository.init(TypeRepository.java:81)
      at org.apache.yoko.rmi.impl.TypeRepository.<init>(TypeRepository.java:45)
      at org.apache.yoko.rmi.impl.RMIState.getTypeRepository(RMIState.java:63)
      at org.apache.yoko.rmi.impl.RMIState.createValueHandler(RMIState.java:146)
      at org.apache.yoko.rmi.impl.UtilImpl.createValueHandler(UtilImpl.java:450)
      at javax.rmi.CORBA.Util.createValueHandler(Util.java:61)
      at com.caucho.iiop.any.TypeCodeFactory.<clinit>(TypeCodeFactory.java:40)
      at com.caucho.iiop.orb.ORBImpl.<init>(ORBImpl.java:57)
      at com.caucho.loader.EnvironmentClassLoader.initializeEnvironment(EnvironmentClassLoader.java:567)
      at com.caucho.loader.EnvironmentClassLoader.init(EnvironmentClassLoader.java:161)
      at com.caucho.loader.ClassLoaderConfig.init(ClassLoaderConfig.java:164)
      at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
      at java.lang.reflect.Method.invoke(Method.java:381)
      at com.caucho.config.j2ee.PostConstructProgram.configureImpl(PostConstructProgram.java:62)
      at com.caucho.config.BeanTypeStrategy.init(BeanTypeStrategy.java:355)
      at com.caucho.config.NodeBuilder.configureImpl(NodeBuilder.java:253)
      at com.caucho.config.EnvironmentAttributeStrategy.configure(EnvironmentAttributeStrategy.java:60)
      at com.caucho.config.NodeBuilder.configureAttributeImpl(NodeBuilder.java:390)
      at com.caucho.config.NodeBuilder.configureBeanImpl(NodeBuilder.java:329)
      at com.caucho.config.TypeStrategy.configureBean(TypeStrategy.java:104)
      at com.caucho.config.BeanTypeStrategy.configureBean(BeanTypeStrategy.java:257)
      at com.caucho.config.EnvironmentTypeStrategy.configureBean(EnvironmentTypeStrategy.java:65)
      at com.caucho.config.NodeBuilder.configureImpl(NodeBuilder.java:251)
      at com.caucho.config.NodeBuilder.configure(NodeBuilder.java:160)
      at com.caucho.config.Config.configure(Config.java:232)
      at com.caucho.config.Config.configure(Config.java:176)
      at com.caucho.boot.ResinBoot.<init>(ResinBoot.java:134)
      at com.caucho.boot.ResinBoot.main(ResinBoot.java:397)
      at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
      at java.lang.reflect.Method.invoke(Method.java:381)
      at org.apache.harmony.vm.JarRunner.main(JarRunner.java:80)
      Caused by: java.lang.NoSuchMethodException: computeDefaultSUID(java.lang.Class)
      at java.lang.Class.findMatchingMethod(Class.java:802)
      at java.lang.Class.getDeclaredMethod(Class.java:429)
      at org.apache.yoko.rmi.impl.ValueDescriptor$1.run(ValueDescriptor.java:149)
      at java.security.AccessController.doPrivilegedImpl(AccessController.java:171)

      This failure occurs as Yoko depends on private java.lang.Class.computeSerialVersionUID method which is of course not present in Harmony.

      After resolving above problem in Yoko it just quietly hangs.

        Issue Links

          Activity

          Hide
          Sergey Salishev added a comment -

          I've retested with 587111 Harmony snapshot.

          The Resin throws 3 exception and starts successfully. It still eats 100% CPU in idle.

          The Yoko is still not updated in Harmony build so YOKO-250 still reproduces on Harmony while already fixed in Yoko.

          java.lang.IllegalStateException: Recursive invocation while initializing system class loader
          at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:672)
          at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:161)
          at org.apache.harmony.archive.internal.nls.Messages$1.run(Messages.java:227)
          at java.security.AccessController.doPrivilegedImpl(AccessController.java:171)
          at java.security.AccessController.doPrivileged(AccessController.java:53)
          at org.apache.harmony.archive.internal.nls.Messages.setLocale(Messages.java:223)
          at org.apache.harmony.archive.internal.nls.Messages.<clinit>(Messages.java:239)
          at java.util.zip.ZipFile.openZip(ZipFile.java:120)
          at java.util.zip.ZipFile.<init>(ZipFile.java:93)
          at java.util.jar.JarFile.<init>(JarFile.java:172)
          at org.apache.harmony.luni.internal.net.www.protocol.jar.JarURLConnection.openJarFile(JarURLConnection.java:145)
          at org.apache.harmony.luni.internal.net.www.protocol.jar.JarURLConnection.findJarFile(JarURLConnection.java:121)
          at org.apache.harmony.luni.internal.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:87)
          at org.apache.harmony.luni.internal.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:104)
          at java.net.URLClassLoader.createURLJarHandler(URLClassLoader.java:1040)
          at java.net.URLClassLoader.makeNewHandler(URLClassLoader.java:997)
          at java.net.URLClassLoader.getHandler(URLClassLoader.java:980)
          at java.net.URLClassLoader.findClassImpl(URLClassLoader.java:1189)
          at java.net.URLClassLoader$4.run(URLClassLoader.java:888)
          at java.net.URLClassLoader$4.run(URLClassLoader.java:1)
          at java.security.AccessController.doPrivilegedImpl(AccessController.java:171)
          at java.security.AccessController.doPrivileged(AccessController.java:64)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:890)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:575)
          at java.lang.ClassLoader$SystemClassLoader.loadClass(ClassLoader.java:963)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
          at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:704)
          at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:161)
          java.lang.Error: java.lang.NoSuchFieldException: classes
          at org.apache.yoko.rmi.util.ClassLoaderLocal$1.run(ClassLoaderLocal.java:119)
          at java.security.AccessController.doPrivilegedImpl(AccessController.java:171)
          at java.security.AccessController.doPrivileged(AccessController.java:53)
          at org.apache.yoko.rmi.util.ClassLoaderLocal.<clinit>(ClassLoaderLocal.java:111)
          at org.apache.yoko.rmi.impl.PortableRemoteObjectExtImpl.<clinit>(PortableRemoteObjectExtImpl.java:31)
          at java.lang.reflect.VMReflection.newClassInstance(VMReflection.java)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:283)
          at java.lang.Class.newInstance(Class.java:694)
          at org.apache.yoko.rmi.api.PortableRemoteObjectExt.init(PortableRemoteObjectExt.java:53)
          at org.apache.yoko.rmi.api.PortableRemoteObjectExt.getState(PortableRemoteObjectExt.java:65)
          at org.apache.yoko.rmi.impl.RMIState.current(RMIState.java:153)
          at org.apache.yoko.rmi.impl.UtilImpl.createValueHandler(UtilImpl.java:452)
          at javax.rmi.CORBA.Util.createValueHandler(Util.java:63)
          at com.caucho.iiop.any.TypeCodeFactory.<clinit>(TypeCodeFactory.java:40)
          at com.caucho.iiop.orb.ORBImpl.<init>(ORBImpl.java:57)
          at com.caucho.loader.EnvironmentClassLoader.initializeEnvironment(EnvironmentClassLoader.java:568)
          at com.caucho.loader.EnvironmentClassLoader.init(EnvironmentClassLoader.java:161)
          at com.caucho.loader.SystemClassLoader.init(SystemClassLoader.java:85)
          at com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1067)
          at com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1026)
          Caused by: java.lang.NoSuchFieldException: classes
          at java.lang.Class.getDeclaredField(Class.java:373)
          at org.apache.yoko.rmi.util.ClassLoaderLocal$1.run(ClassLoaderLocal.java:114)
          at java.security.AccessController.doPrivilegedImpl(AccessController.java:171)
          ... 18 more
          Resin-3.1.s070319 (built Mon, 19 Mar 2007 04:44:57 PDT)
          Copyright(c) 1998-2006 Caucho Technology. All rights reserved.

          Using Resin(R) Open Source under the GNU Public License (GPL).

          See http://www.caucho.com for information on Resin Professional,
          including caching, clustering, JNI acceleration, and OpenSSL integration.

          Starting Resin on Tue, 30 Oct 2007 15:11:14 +0300 (MSK)

          Show
          Sergey Salishev added a comment - I've retested with 587111 Harmony snapshot. The Resin throws 3 exception and starts successfully. It still eats 100% CPU in idle. The Yoko is still not updated in Harmony build so YOKO-250 still reproduces on Harmony while already fixed in Yoko. java.lang.IllegalStateException: Recursive invocation while initializing system class loader at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:672) at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:161) at org.apache.harmony.archive.internal.nls.Messages$1.run(Messages.java:227) at java.security.AccessController.doPrivilegedImpl(AccessController.java:171) at java.security.AccessController.doPrivileged(AccessController.java:53) at org.apache.harmony.archive.internal.nls.Messages.setLocale(Messages.java:223) at org.apache.harmony.archive.internal.nls.Messages.<clinit>(Messages.java:239) at java.util.zip.ZipFile.openZip(ZipFile.java:120) at java.util.zip.ZipFile.<init>(ZipFile.java:93) at java.util.jar.JarFile.<init>(JarFile.java:172) at org.apache.harmony.luni.internal.net.www.protocol.jar.JarURLConnection.openJarFile(JarURLConnection.java:145) at org.apache.harmony.luni.internal.net.www.protocol.jar.JarURLConnection.findJarFile(JarURLConnection.java:121) at org.apache.harmony.luni.internal.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:87) at org.apache.harmony.luni.internal.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:104) at java.net.URLClassLoader.createURLJarHandler(URLClassLoader.java:1040) at java.net.URLClassLoader.makeNewHandler(URLClassLoader.java:997) at java.net.URLClassLoader.getHandler(URLClassLoader.java:980) at java.net.URLClassLoader.findClassImpl(URLClassLoader.java:1189) at java.net.URLClassLoader$4.run(URLClassLoader.java:888) at java.net.URLClassLoader$4.run(URLClassLoader.java:1) at java.security.AccessController.doPrivilegedImpl(AccessController.java:171) at java.security.AccessController.doPrivileged(AccessController.java:64) at java.net.URLClassLoader.findClass(URLClassLoader.java:890) at java.lang.ClassLoader.loadClass(ClassLoader.java:575) at java.lang.ClassLoader$SystemClassLoader.loadClass(ClassLoader.java:963) at java.lang.ClassLoader.loadClass(ClassLoader.java:319) at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:704) at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:161) java.lang.Error: java.lang.NoSuchFieldException: classes at org.apache.yoko.rmi.util.ClassLoaderLocal$1.run(ClassLoaderLocal.java:119) at java.security.AccessController.doPrivilegedImpl(AccessController.java:171) at java.security.AccessController.doPrivileged(AccessController.java:53) at org.apache.yoko.rmi.util.ClassLoaderLocal.<clinit>(ClassLoaderLocal.java:111) at org.apache.yoko.rmi.impl.PortableRemoteObjectExtImpl.<clinit>(PortableRemoteObjectExtImpl.java:31) at java.lang.reflect.VMReflection.newClassInstance(VMReflection.java) at java.lang.reflect.Constructor.newInstance(Constructor.java:283) at java.lang.Class.newInstance(Class.java:694) at org.apache.yoko.rmi.api.PortableRemoteObjectExt.init(PortableRemoteObjectExt.java:53) at org.apache.yoko.rmi.api.PortableRemoteObjectExt.getState(PortableRemoteObjectExt.java:65) at org.apache.yoko.rmi.impl.RMIState.current(RMIState.java:153) at org.apache.yoko.rmi.impl.UtilImpl.createValueHandler(UtilImpl.java:452) at javax.rmi.CORBA.Util.createValueHandler(Util.java:63) at com.caucho.iiop.any.TypeCodeFactory.<clinit>(TypeCodeFactory.java:40) at com.caucho.iiop.orb.ORBImpl.<init>(ORBImpl.java:57) at com.caucho.loader.EnvironmentClassLoader.initializeEnvironment(EnvironmentClassLoader.java:568) at com.caucho.loader.EnvironmentClassLoader.init(EnvironmentClassLoader.java:161) at com.caucho.loader.SystemClassLoader.init(SystemClassLoader.java:85) at com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1067) at com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1026) Caused by: java.lang.NoSuchFieldException: classes at java.lang.Class.getDeclaredField(Class.java:373) at org.apache.yoko.rmi.util.ClassLoaderLocal$1.run(ClassLoaderLocal.java:114) at java.security.AccessController.doPrivilegedImpl(AccessController.java:171) ... 18 more Resin-3.1.s070319 (built Mon, 19 Mar 2007 04:44:57 PDT) Copyright(c) 1998-2006 Caucho Technology. All rights reserved. Using Resin(R) Open Source under the GNU Public License (GPL). See http://www.caucho.com for information on Resin Professional, including caching, clustering, JNI acceleration, and OpenSSL integration. Starting Resin on Tue, 30 Oct 2007 15:11:14 +0300 (MSK)
          Hide
          Sergey Salishev added a comment -

          I've found 2 more issues blocking the Resin run. This time they are in system classloading process.

          Show
          Sergey Salishev added a comment - I've found 2 more issues blocking the Resin run. This time they are in system classloading process.

            People

            • Assignee:
              Unassigned
              Reporter:
              Sergey Salishev
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Development