3 Replies Latest reply on Jun 30, 2002 11:34 PM by zhulei

    Does JDK1.4 Reflection actually work at all?

    Juha Lindfors Master

      I've been trying to run the JBossMX test suites (both compliance and performance) on JDK1.4 and both die on trying to use reflection (reporting missing classes in sun/reflect/* package).

      Both systems running W2K and build 1.4.0-b92 of JDK.

      Anyone else seeing this? I'm about ready to uninstall this garbage from SUN.

      test-compliance-RI:
      
      BUILD FAILED
      
      D:\jboss-mx\jmx\build.xml:684: java.lang.NoClassDefFoundError: sun/reflect/Const
      ructorAccessorImpl
      
      Total time: 1 second
      


      line 684 of build.xml is

       <java classname="test.compliance.ComplianceSUITE">
       <classpath refid="compliance.RI.classpath"/>
       </java>
      



      performance suite actually starts but wont work past dynamic invocation tests:

      test-performance-JBossMX:
       [java] .
       [java] DYNAMIC: void invocation with DefaultDomain
       [java] 100000 Invocations, Repeat: x10
       [java] (this may take a while...)
       [java]
       [java] 70 70 60 70 70 60 71 70 60 70
       [java] Average: 67.1
       [java] .
       [java] DYNAMIC: void invocation
       [java] 100000 Invocations, Repeat: x10
       [java] (this may take a while...)
       [java]
       [java] 30 40 30 30 30 20 30 40 30 30
       [java] Average: 31.0
       [java] RuntimeErrorException: Error in AttributeProvider for getting 'MBean
      ServerId'
       [java] Cause: java.lang.NoClassDefFoundError: sun/reflect/MethodAccessorImp
      l
       [java] at org.jboss.mx.capability.ReflectedMBeanDispatcher.getAttribute
      (Unknown Source)
       [java] at org.jboss.mx.server.MBeanServerImpl.getAttribute(Unknown Sour
      ce)
       [java] at javax.management.MBeanServerFactory.releaseMBeanServer(Unknow
      n Source)
       [java] at test.performance.dynamic.InvocationTEST.testVoidInvocation(Un
      known Source)
       [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
      sorImpl.java:39)
       [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:25)
       [java] at java.lang.reflect.Method.invoke(Method.java:324)
       [java] at junit.framework.TestCase.runTest(TestCase.java:166)
       [java] at junit.framework.TestCase.runBare(TestCase.java:140)
       [java] at junit.framework.TestResult$1.protect(TestResult.java:106)
       [java] at junit.framework.TestResult.runProtected(TestResult.java:124)
       [java] at junit.framework.TestResult.run(TestResult.java:109)
       [java] at junit.framework.TestCase.run(TestCase.java:131)
       [java] at junit.framework.TestSuite.runTest(TestSuite.java:173)
       [java] at junit.framework.TestSuite.run(TestSuite.java:168)
       [java] at junit.framework.TestSuite.runTest(TestSuite.java:173)
       [java] at junit.framework.TestSuite.run(TestSuite.java:168)
       [java] at junit.framework.TestSuite.runTest(TestSuite.java:173)
       [java] at junit.framework.TestSuite.run(TestSuite.java:168)
       [java] at junit.textui.TestRunner.doRun(TestRunner.java:74)
       [java] at junit.textui.TestRunner.run(TestRunner.java:200)
       [java] at test.performance.PerformanceSUITE.main(Unknown Source)
       [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
      sorImpl.java:39)
       [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:25)
       [java] at java.lang.reflect.Method.invoke(Method.java:324)
       [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava
      .java:124)
       [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:305)
       [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:127)
      
       [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:88)
       [java] at org.apache.tools.ant.Task.perform(Task.java:217)
       [java] at org.apache.tools.ant.Target.execute(Target.java:164)
       [java] at org.apache.tools.ant.Target.performTasks(Target.java:182)
       [java] at org.apache.tools.ant.Project.executeTarget(Project.java:601)
       [java] at org.apache.tools.ant.Project.executeTargets(Project.java:560)
      
       [java] at org.apache.tools.ant.Main.runBuild(Main.java:454)
       [java] at org.apache.tools.ant.Main.start(Main.java:153)
       [java] at org.apache.tools.ant.Main.main(Main.java:176)
       [java] F.
       [java] DYNAMIC: counter invocation
       [java] 100000 Invocations, Repeat: x10
       [java] (this may take a while...)
       [java]
       [java] RuntimeErrorException: Error in AttributeProvider for getting 'MBean
      ServerId'
       [java] Cause: java.lang.NoClassDefFoundError: sun/reflect/MethodAccessorImp
      l
       [java] at org.jboss.mx.capability.ReflectedMBeanDispatcher.getAttribute
      (Unknown Source)
       [java] at org.jboss.mx.server.MBeanServerImpl.getAttribute(Unknown Sour
      ce)
       [java] at javax.management.MBeanServerFactory.createMBeanServer(Unknown
       Source)
       [java] at javax.management.MBeanServerFactory.createMBeanServer(Unknown
       Source)
       [java] at javax.management.MBeanServerFactory.createMBeanServer(Unknown
       Source)
       [java] at test.performance.dynamic.InvocationTEST.testCounterInvocation
      (Unknown Source)
       [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
      sorImpl.java:39)
       [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:25)
       [java] at java.lang.reflect.Method.invoke(Method.java:324)
       [java] at junit.framework.TestCase.runTest(TestCase.java:166)
       [java] at junit.framework.TestCase.runBare(TestCase.java:140)
       [java] at junit.framework.TestResult$1.protect(TestResult.java:106)
       [java] at junit.framework.TestResult.runProtected(TestResult.java:124)
       [java] at junit.framework.TestResult.run(TestResult.java:109)
       [java] at junit.framework.TestCase.run(TestCase.java:131)
       [java] at junit.framework.TestSuite.runTest(TestSuite.java:173)
       [java] at junit.framework.TestSuite.run(TestSuite.java:168)
       [java] at junit.framework.TestSuite.runTest(TestSuite.java:173)
       [java] at junit.framework.TestSuite.run(TestSuite.java:168)
       [java] at junit.framework.TestSuite.runTest(TestSuite.java:173)
       [java] at junit.framework.TestSuite.run(TestSuite.java:168)
       [java] at junit.textui.TestRunner.doRun(TestRunner.java:74)
       [java] at junit.textui.TestRunner.run(TestRunner.java:200)
       [java] at test.performance.PerformanceSUITE.main(Unknown Source)
       [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
      sorImpl.java:39)
       [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:25)
       [java] at java.lang.reflect.Method.invoke(Method.java:324)
       [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava
      .java:124)
       [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:305)
       [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:127)
      
       [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:88)
       [java] at org.apache.tools.ant.Task.perform(Task.java:217)
       [java] at org.apache.tools.ant.Target.execute(Target.java:164)
       [java] at org.apache.tools.ant.Target.performTasks(Target.java:182)
       [java] at org.apache.tools.ant.Project.executeTarget(Project.java:601)
       [java] at org.apache.tools.ant.Project.executeTargets(Project.java:560)
      
       [java] at org.apache.tools.ant.Main.runBuild(Main.java:454)
       [java] at org.apache.tools.ant.Main.start(Main.java:153)
       [java] at org.apache.tools.ant.Main.main(Main.java:176)
       [java] F.
       [java] DYNAMIC: mixed arguments invocation
       [java] 100000 Invocations, Repeat: x10
       [java] (this may take a while...)
       [java]
       [java] java.lang.RuntimeException: Unable to create the MBean server instan
      ce. Class org.jboss.mx.server.MBeanServerImpl has raised an exception in constru
      ctor: java.lang.NoClassDefFoundError: sun/reflect/ConstructorAccessorImpl
      
      


      and so on ad nauseam.

      -- Juha