4 Replies Latest reply on Oct 27, 2007 12:24 AM by Manjunatha Sharma

    [2.0 beta1]Problem caused by regression between jdk 1.5 and

    Ning Zhao Apprentice

      environment: Seam 2.0 beta1, JBoss 4.2, JDK 1.6 b06 on Windows XP. My project configuration all correctly updated using the Seam-gen came with 2.0 beta1.

      Today when I ran test classes extending SeamTest, there was this exception:

      DeploymentFilter -> java.lang.ClassNotFoundException: [Ljava.lang.String;

      jboss.kernel:service=Kernel -> **ERROR**
      at org.jboss.embedded.Bootstrap.checkIncomplete(Bootstrap.java:144)
      at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:169)
      at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:201)
      at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:214)
      at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:919)
      at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:856)
      at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
      ... Removed 22 stack frames

      I have tried to compile all my own code at the source level 1.5, did not work. And then tried to build the Seam 2.0 beta 1 at source level 1.6. The build was successful but it did not solve the problem, either. Then I googled for this strange exception and got some useful information here:

      https://glassfish.dev.java.net/issues/show_bug.cgi?id=714

      Seems it is not a Seam problem but something lies in the jboss-embedded-all.jar. (Which is JBossAS 5.0 project I think). The fix should be easy according to the bug-report I linked above.

      For now I would have to install a jdk 1.5. But I'll try to file a JIRA bug report for JBossAS 5.0.

      I hope this info could be helpful to those who are developing on JBoss AS + Seam + JDK 1.6 stack.


      Regards,
      Ellen

        • 1. Re: [2.0 beta1]Problem caused by regression between jdk 1.5
          Ning Zhao Apprentice

          Ah, someone has already filed a bug report on June 18th. Please see here:

          http://jira.jboss.org/jira/browse/JBAS-4491

          I forgot to paste the whole stack trace in my last post. Here it is:

          [Invoker 24561483] Invoking @BeforeClass org.jboss.seam.mock.SeamTest.init()
          WARN 26-06 15:32:56,062 [org.jboss.mx.loading.UnifiedLoaderRepository3.addClassLoader():675] Tried to add non-URLClassLoader. Ignored
          ERROR 26-06 15:32:56,265 [org.jboss.dependency.plugins.AbstractController.incrementState():456] Error installing to Instantiated: name=DeploymentFilter state=Described
          java.lang.IllegalStateException: Class not found: [Ljava.lang.String;
          at org.jboss.metadata.spi.signature.Signature.stringsToClasses(Signature.java:174)
          at org.jboss.metadata.spi.signature.Signature.stringsToClasses(Signature.java:125)
          at org.jboss.metadata.spi.signature.Signature.getParametersTypes(Signature.java:292)
          at org.jboss.metadata.plugins.loader.reflection.AnnotatedElementMetaDataLoader.getComponentMetaDataRetrieval(AnnotatedElementMetaDataLoader.java:138)
          at org.jboss.metadata.plugins.context.AbstractMetaDataContext.getComponentMetaDataRetrieval(AbstractMetaDataContext.java:280)
          at org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge.getComponentMetaData(MetaDataRetrievalToMetaDataBridge.java:159)
          at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.methodHasAnnotations(AOPConstructorJoinpoint.java:202)
          at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.hasMethodMetaData(AOPConstructorJoinpoint.java:172)
          at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.hasInstanceOrJoinpointMetaData(AOPConstructorJoinpoint.java:152)
          at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.dispatch(AOPConstructorJoinpoint.java:99)
          at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:103)
          at org.jboss.kernel.plugins.dependency.InstantiateAction.installActionInternal(InstantiateAction.java:52)
          at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:197)
          at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.install(KernelControllerContextAction.java:136)
          at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:233)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:724)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:445)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:555)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:489)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:289)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:192)
          at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:302)
          at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:272)
          at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:119)
          at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:96)
          at org.jboss.embedded.Bootstrap.deployBaseBootstrapUrl(Bootstrap.java:150)
          at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:162)
          at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:201)
          at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:214)
          at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:919)
          at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:856)
          at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:604)
          at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:394)
          at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
          at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
          at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:165)
          at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
          at org.testng.TestRunner.runWorkers(TestRunner.java:678)
          at org.testng.TestRunner.privateRun(TestRunner.java:624)
          at org.testng.TestRunner.run(TestRunner.java:495)
          at org.testng.SuiteRunner.runTest(SuiteRunner.java:300)
          at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:295)
          at org.testng.SuiteRunner.privateRun(SuiteRunner.java:275)
          at org.testng.SuiteRunner.run(SuiteRunner.java:190)
          at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:792)
          at org.testng.TestNG.runSuitesLocally(TestNG.java:765)
          at org.testng.TestNG.run(TestNG.java:699)
          at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
          at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:122)
          Caused by: java.lang.ClassNotFoundException: [Ljava.lang.String;
          at java.net.URLClassLoader$1.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at org.jboss.metadata.spi.signature.Signature.stringsToClasses(Signature.java:170)
          ... 54 more
          Failed to invoke @Configuration method org.jboss.seam.mock.SeamTest.init:Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

          *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}

          ResourcesToDeploy
          -> DeploymentFilter{Configured:**ERROR**}

          ResourcesToDeploy2
          -> jboss.kernel:service=Kernel{Configured:**ERROR**}
          -> DeploymentFilter{Configured:**ERROR**}

          ResourcesToDeploy3
          -> jboss.kernel:service=Kernel{Configured:**ERROR**}
          -> DeploymentFilter{Configured:**ERROR**}


          *** CONTEXTS IN ERROR: Name -> Error

          DeploymentFilter -> java.lang.ClassNotFoundException: [Ljava.lang.String;

          jboss.kernel:service=Kernel -> **ERROR**


          [Invoker 24561483] Keeping method org.jboss.seam.mock.SeamTest.begin() for class [TestClass class org.ningning.eatsmart.test.action.NewRecipeTest]
          [Invoker 24561483] Keeping method org.jboss.seam.mock.SeamTest.end() for class [TestClass class org.ningning.eatsmart.test.action.NewRecipeTest]
          [Invoker 24561483] Keeping method org.jboss.seam.mock.SeamTest.begin() for class [TestClass class org.ningning.eatsmart.test.action.NewRecipeTest]
          [Invoker 24561483] Keeping method org.jboss.seam.mock.SeamTest.end() for class [TestClass class org.ningning.eatsmart.test.action.NewRecipeTest]
          [Invoker 24561483] Keeping method org.jboss.seam.mock.SeamTest.cleanup() for class [TestClass class org.ningning.eatsmart.test.action.NewRecipeTest]

          *********** INVOKED METHODS

          org.jboss.seam.mock.SeamTest.init() 3449340
          org.ningning.eatsmart.test.action.NewRecipeTest.testStartOver() 3449340

          ***********

          Creating C:\sd\projects\eatsmart2\test-report\UseCases\UseCases.html
          FAILED CONFIGURATION: @BeforeClass init
          org.jboss.deployers.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

          *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}

          ResourcesToDeploy
          -> DeploymentFilter{Configured:**ERROR**}

          ResourcesToDeploy2
          -> jboss.kernel:service=Kernel{Configured:**ERROR**}
          -> DeploymentFilter{Configured:**ERROR**}

          ResourcesToDeploy3
          -> jboss.kernel:service=Kernel{Configured:**ERROR**}
          -> DeploymentFilter{Configured:**ERROR**}

          • 2. Re: [2.0 beta1]Problem caused by regression between jdk 1.5
            Ning Zhao Apprentice

            I just submitted a patch (only one line was changed in the original file), please see here:

            http://jira.jboss.org/jira/browse/JBAS-4491

            I've compiled it and tested on my machine, seems working well. For anyone who has the same problem: You just need to download the Signature.java, compile it (it has no other dependency so can be compiled using your jdk 1.6 anyhow) and get the Signature.class. Then swap the Signature.class file in jboss-embedded-all.jar with the patched class file. That's it. The Signature.class lies in package: org.jboss.metadata.spi.signature.

            This solved the regression problem and now I do not need to install jdk 1.5 just for this. :-)


            Regards,
            Ellen

            • 3. Re: [2.0 beta1]Problem caused by regression between jdk 1.5
              Jonas Buechel Novice

              Thanks a lot for this post and the detailed explanation!
              It helped a lot and quickly!

              Regards,
              Jonas

              • 4. Re: [2.0 beta1]Problem caused by regression between jdk 1.5
                Manjunatha Sharma Newbie

                I installed jboss-5.0.0.Beta2 without any additonal frameworks like seam. But I could not find jboss-embedded-all.jar to update Signature.class. In which jar would I find Signature.class and its location in jboss-5.0.0.Beta2