Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Critical
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: 1.0
-
Component/s: None
-
Labels:None
-
Environment:All
-
Number of attachments :2
Description
Loom can run under jdk1.5 if compiled with 1.4, but not all parts work correctly. At least the Admin GUI chokes if turned on.
If building with jdk1.5 some testcases fail with a VerifyError. Same thing happens if running a 1.5 compiled version.
All tests where done with the HelloWorld demo.
-
Hide
- phoenix-404-java15.zip
- 16/Aug/05 8:18 AM
- 128 kB
- Simon Goldsmith
-
- phoenix-loader.jar 5 kB
- lib/phoenix-engine.jar 141 kB
-
Hide
- phoenix-engine.jar
- 18/Aug/05 9:39 AM
- 141 kB
- Simon Goldsmith
-
- META-INF/MANIFEST.MF 0.1 kB
- org/apache/.../application/BlockEntry.class 3 kB
- org/apache/.../BlockInvocationHandler.class 2 kB
- org/apache/.../BlockResourceProvider.class 6 kB
- org/apache/.../DefaultApplication.class 11 kB
- org/apache/.../DefaultBlockContext.class 2 kB
- org/apache/.../DependencyGraph.class 3 kB
- org/apache/.../ExportHelper.class 3 kB
- org/.../ListenerResourceProvider.class 4 kB
- org/apache/.../ListenerSupport.class 5 kB
- org/apache/.../Resources.properties 2 kB
- org/apache/.../AbstractPolicy.class 5 kB
- org/.../ContextClassLoaderManager.class 1 kB
- org/.../DefaultClassLoaderManager.class 8 kB
- org/apache/.../DefaultPolicy.class 11 kB
- org/apache/.../PolicyClassLoader.class 3 kB
- org/apache/.../classloader/PolicyEntry.class 0.8 kB
- org/apache/.../PropertyUtil.class 4 kB
- org/apache/.../Resources.properties 1 kB
- org/.../ConfigurationDirectoryFilter.class 0.6 kB
- org/apache/.../ConfigurationFileFilter.class 0.7 kB
- org/apache/.../ConfigurationKey.class 1 kB
- org/.../DefaultConfigurationRepository.class 3 kB
- org/.../FileSystemPersistentConfigurationRepository.class 9 kB
- org/apache/.../Resources.properties 0.4 kB
- org/apache/.../validator/DelegateEntry.class 1 kB
- org/.../DelegatingConfigurationValidator.class 6 kB
- org/.../JarvConfigurationValidator$1.class 2 kB
- org/.../JarvConfigurationValidator.class 10 kB
- org/.../NoopConfigurationValidator.class 2 kB
Activity
I got this stacktrace. It seems that it has the classholder has a problem loading the MX4J libraries. Here's my environment:
OS - Gentoo Linux
Java VM - JDK 5.0
I already tried tweaking with the classpath but it still doesn't work.
>>>>
Using LOOM_HOME: /home/donvito/apps/java/loom-1.0-rc3-bin
Using LOOM_TMPDIR: /home/donvito/apps/java/loom-1.0-rc3-bin/temp
Using LOOM_ENDORSED: /home/donvito/apps/java/loom-1.0-rc3-bin/lib/endorsed
Using JAVA_HOME: /home/donvito/apps/java/jdk1.5.0_01
Using JVM_EXT_DIRS: /home/donvito/apps/java/loom-1.0-rc3-bin/lib:/home/donvito/apps/java/loom-1.0-rc3-bin/tools/lib
Running Loom:
Loom Engine 1.0-rc3
There was an uncaught exception:
---------------------------------------------------------
— Message —
The MBean class could not be loaded by the context classloader
— Stack Trace —
java.lang.ClassNotFoundException: mx4j/adaptor/http/HttpAdaptor
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at com.sun.jmx.mbeanserver.MBeanInstantiatorImpl.loadClass(MBeanInstantiatorImpl.java:429)
at com.sun.jmx.mbeanserver.MBeanInstantiatorImpl.findClass(MBeanInstantiatorImpl.java:72)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.createMBean(DefaultMBeanServerInterceptor.java:279)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.createMBean(DefaultMBeanServerInterceptor.java:227)
at com.sun.jmx.mbeanserver.JmxMBeanServer.createMBean(JmxMBeanServer.java:354)
---------------------------------------------------------
The log file may contain further details of error.
Please check the configuration files and restart Loom.
If the problem persists, contact the Loom project. See
http://loom.codehaus.org/ for more information.
Shutting down Loom.
Logging Error: Writing event to closed stream.
Logging Error: Writing event to closed stream.
Here's the stacktrace from loom.log...
INFO 2005-03-04 11:09:21.872 [Loom ] (): Logger started
WARN 2005-03-04 11:09:21.910 [Loom ] (): Container was not started by the daemon thus it will not be possible to restart the JVM via the Management interface.
ERROR 2005-03-04 11:09:22.121 [Loom ] (): There was a fatal error while starting Embeddor.
javax.management.ReflectionException: The MBean class could not be loaded by the context classloader
at com.sun.jmx.mbeanserver.MBeanInstantiatorImpl.loadClass(MBeanInstantiatorImpl.java:432)
at com.sun.jmx.mbeanserver.MBeanInstantiatorImpl.findClass(MBeanInstantiatorImpl.java:72)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.createMBean(DefaultMBeanServerInterceptor.java:279)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.createMBean(DefaultMBeanServerInterceptor.java:227)
at com.sun.jmx.mbeanserver.JmxMBeanServer.createMBean(JmxMBeanServer.java:354)
at org.codehaus.loom.components.manager.MX4JSystemManager.startHttpAdaptor(MX4JSystemManager.java:227)
at org.codehaus.loom.components.manager.MX4JSystemManager.initialize(MX4JSystemManager.java:198)
at org.codehaus.dna.impl.ContainerUtil.initialize(ContainerUtil.java:119)
at org.codehaus.loom.components.embeddor.DefaultEmbeddor.setupComponent(DefaultEmbeddor.java:501)
at org.codehaus.loom.components.embeddor.DefaultEmbeddor.setupComponents(DefaultEmbeddor.java:480)
at org.codehaus.loom.components.embeddor.DefaultEmbeddor.initialize(DefaultEmbeddor.java:219)
at org.codehaus.dna.impl.ContainerUtil.initialize(ContainerUtil.java:119)
at org.codehaus.loom.frontends.CLIMain.startup(CLIMain.java:291)
at org.codehaus.loom.frontends.CLIMain.execute(CLIMain.java:225)
at org.codehaus.loom.frontends.CLIMain.main(CLIMain.java:207)
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:585)
at org.codehaus.loom.launcher.Main.startup(Main.java:185)
at org.codehaus.loom.launcher.Main.main(Main.java:117)
Caused by: java.lang.ClassNotFoundException: mx4j/adaptor/http/HttpAdaptor
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at com.sun.jmx.mbeanserver.MBeanInstantiatorImpl.loadClass(MBeanInstantiatorImpl.java:429)
... 20 more
ERROR 2005-03-04 11:09:22.174 [Loom ] (): The MBean class could not be loaded by the context classloader
javax.management.ReflectionException: The MBean class could not be loaded by the context classloader
at com.sun.jmx.mbeanserver.MBeanInstantiatorImpl.loadClass(MBeanInstantiatorImpl.java:432)
at com.sun.jmx.mbeanserver.MBeanInstantiatorImpl.findClass(MBeanInstantiatorImpl.java:72)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.createMBean(DefaultMBeanServerInterceptor.java:279)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.createMBean(DefaultMBeanServerInterceptor.java:227)
at com.sun.jmx.mbeanserver.JmxMBeanServer.createMBean(JmxMBeanServer.java:354)
at org.codehaus.loom.components.manager.MX4JSystemManager.startHttpAdaptor(MX4JSystemManager.java:227)
at org.codehaus.loom.components.manager.MX4JSystemManager.initialize(MX4JSystemManager.java:198)
at org.codehaus.dna.impl.ContainerUtil.initialize(ContainerUtil.java:119)
at org.codehaus.loom.components.embeddor.DefaultEmbeddor.setupComponent(DefaultEmbeddor.java:501)
at org.codehaus.loom.components.embeddor.DefaultEmbeddor.setupComponents(DefaultEmbeddor.java:480)
at org.codehaus.loom.components.embeddor.DefaultEmbeddor.initialize(DefaultEmbeddor.java:219)
at org.codehaus.dna.impl.ContainerUtil.initialize(ContainerUtil.java:119)
at org.codehaus.loom.frontends.CLIMain.startup(CLIMain.java:291)
at org.codehaus.loom.frontends.CLIMain.execute(CLIMain.java:225)
at org.codehaus.loom.frontends.CLIMain.main(CLIMain.java:207)
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:585)
at org.codehaus.loom.launcher.Main.startup(Main.java:185)
at org.codehaus.loom.launcher.Main.main(Main.java:117)
Caused by: java.lang.ClassNotFoundException: mx4j/adaptor/http/HttpAdaptor
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at com.sun.jmx.mbeanserver.MBeanInstantiatorImpl.loadClass(MBeanInstantiatorImpl.java:429)
... 20 more
If all you want is a 1.5 compatable phoenix-4.0.4 server I have attached a version here (unzip into your phoenix install in $PHOENIX_HOME/bin) and change the java startup line in the phoenix.sh script to have -Djavax.management.builder.initial=mx4j.server.MX4JMBeanServerBuilder in the startup of the JVM. You also need to download the mx4j-2.1.1 from sourceforge and install mx4j jars into $PHOENIX_HOME/bin/lib as well. There are several jars in the mx4j pkg whereas the old one had only 2. The final $PHOENIX_HOME/bin/lib should look like this:
rw-r---- 1 ****** ******_grp 96673 Aug 16 13:51 mx4j-examples.jar
rw-r---- 1 ****** ******_grp 148213 Aug 16 13:51 mx4j-impl.jar
rw-r---- 1 ****** ******_grp 261174 Aug 16 13:51 mx4j-jmx.jar
rw-r---- 1 ****** ******_grp 167410 Aug 16 13:51 mx4j-remote.jar
rw-r---- 1 ****** ******_grp 94716 Aug 16 13:51 mx4j-rimpl.jar
rw-r---- 1 ****** ******_grp 73072 Aug 16 13:51 mx4j-rjmx.jar
rw-r---- 1 ****** ******_grp 2249058 Aug 16 13:51 mx4j-soap.war
rw-r---- 1 ****** ******_grp 485831 Aug 16 13:51 mx4j-tools.jar
rw-r---- 1 ****** ******_grp 409009 Aug 16 13:51 mx4j.jar
rw-r---- 1 ****** ******_grp 144291 Aug 16 13:51 phoenix-engine.jar
Simon, thanks for the info! I'll take a look and see what we can do.
Here's yet another version of the phoenix-engine.jar. I noticed that the MX4J now implements the JSR160 inspired cacheing of operations and unfortunately the phoenix code has this in the org.apache.avalon.phoenix.components.manager.MBeanInfoBuilder class:
private ModelMBeanOperationInfo buildOperationInfo( final MethodDescriptor method,
final Configuration config )
throws ConfigurationException
which now works according to the JSR160 spec and means that previously you would always get the Managed Object for a JMX Bean being invoked by phoenix when you invoked an MX4j "operation", but by upgrading to MX4j2.1.1 mean that it will call it once then cache the result forever, never calling your code again if you invoke it again in the future. I have recompiled with the last line above (descriptor.setField...) commented out and phoenix behaves as before. Just use the attached jar and replace $PHOENIX_HOME/bin/lib/phoenix-engine.jar. Really you should be able to set this using an attribute on the operation using the mx-attribute tag, but phoenix doesn't process these on operations only on topics (blocks).
Hope that is helpful - not confusing!
simon
Loom doesn't compile with version 2.1.1 or 3.0.1 of MX4J due to missing imports in MX4JSystemManager [1]. Is there an easy migration path from 1.1 to 2.1.1 or 3.0.1, that would keep the RMI functionality?
MX4J 3.0.1 and the HTTP GUI now works with cvs-head. One jar is missing though, the tools jar. Currently it needs to added by hand. For some reason it has not been uploaded to ibiblio.
The MX4J problem seems to be because JMX is now standard in jdk1.5.