11/26/2007

JBossAS 5.0.0 beta2 cannot start with JDK 6

I wanted to run some EJB3 applications on JBoss, and so I installed the most recent version of JBoss (JBossAS-5.0.0.Beta2). When starting the server with JDK 6 (build 1.6.0_02-b06), I immediately got ClassNotFoundException.
===============================================================================

JBoss Bootstrap Environment

JBOSS_HOME: C:\tools\jboss

JAVA: C:\jdk6\bin\java

JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

CLASSPATH: C:\jdk6\lib\tools.jar;C:\tools\jboss\bin\run.jar

===============================================================================

11:24:31,328 INFO [ServerImpl] Starting JBoss (Microcontainer)...
11:24:31,328 INFO [ServerImpl] Release ID: JBoss [Morpheus] 5.0.0.Beta2 (build: SVNTag=JBoss_5_0_0_Beta2 date=200704060017)
11:24:31,328 INFO [ServerImpl] Home Dir: C:\tools\jboss
11:24:31,328 INFO [ServerImpl] Home URL: file:/C:/tools/jboss/
11:24:31,328 INFO [ServerImpl] Library URL: file:/C:/tools/jboss/lib/
11:24:31,328 INFO [ServerImpl] Patch URL: null
11:24:31,328 INFO [ServerImpl] Server Name: default
11:24:31,328 INFO [ServerImpl] Server Home Dir: C:\tools\jboss\server\default
11:24:31,328 INFO [ServerImpl] Server Home URL: file:/C:/tools/jboss/server/default/
11:24:31,328 INFO [ServerImpl] Server Data Dir: C:\tools\jboss\server\default\data
11:24:31,328 INFO [ServerImpl] Server Temp Dir: C:\tools\jboss\server\default\tmp
11:24:31,343 INFO [ServerImpl] Server Config URL: file:/C:/tools/jboss/server/default/conf/
11:24:31,343 INFO [ServerImpl] Server Library URL: file:/C:/tools/jboss/server/default/lib/
11:24:31,343 INFO [ServerImpl] Root Deployment Filename: jboss-service.xml
11:24:31,359 INFO [ServerImpl] Starting Microcontainer, bootstrapURL=file:/C:/tools/jboss/server/default/conf/bootstrap-beans.xml
11:24:32,109 INFO [ProfileImpl] Using profile root:C:\tools\jboss\server\default
11:24:33,078 ERROR [AbstractKernelController] 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.BasicKernelDeployer.deploy(BasicKernelDeployer.java:64)
at org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer.deploy(BasicXMLDeployer.java:76)
at org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer.deploy(BasicXMLDeployer.java:146)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.deploy(ProfileServiceBootstrap.java:295)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.bootstrap(ProfileServiceBootstrap.java:222)
at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:89)
at org.jboss.system.server.profileservice.ServerImpl.doStart(ServerImpl.java:403)
at org.jboss.system.server.profileservice.ServerImpl.start(ServerImpl.java:342)
at org.jboss.Main.boot(Main.java:210)
at org.jboss.Main$1.run(Main.java:522)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: [Ljava.lang.String;
A search showed this JBoss bug JBAS-4491. As mentioned by one user in the report, one workaround is to use JDK 5. I don't like keeping multiple versions of JDK in my machine, and I have been running my other java applications with JDK 6 for some time. I will wait for JBossAS-5.0.0.Beta3.

Update on 10/24/2008 Friday: with more recent releases, e.g., jboss-5.0.0.CR2 & jboss-5.0.0.CR1, JBoss AS runs fine on JDK 6.

Technorati Tags:

4 comments:

Supriya said...

Can any1 explain about JBoss AS Server..bec in my project im using JBoss AS Server in eclipse gandy..say how to create a ejb program in Eclipse using JBoss AS Server,i need step by step process bec im new to this Ejb in JBoss..pls help me..

Anonymous said...

There are some problems JBoss 5 and JDK 6

The following are current compatibility issues for JBoss AS5:

1.

JBossAS 5 runs under Java 5 but there is an ongoing task to make it run safely under Java 6, too http://jira.jboss.org/jira/browse/JBAS-5031. If using a Sun Java 6 runtime, you may want to set -Dsun.lang.ClassLoader.allowArraySyntax=true, as described in http://jira.jboss.org/jira/browse/JBAS-4491.
2.

If using proprietary JBoss/EJB3 annotations, those have moved into the org.jboss.ejb3.annotation package, http://jira.jboss.org/jira/browse/EJBTHREE-1099. Those are now included in a new artifact, jboss-ejb3-ext-api.jar
3.

Work on EJB3 Extended Persistence Context support is not completed, http://jira.jboss.org/jira/browse/EJBTHREE-1026.
4.

Interoperating with previous JBoss EJB3 implementations may present problems due to serialVersionUIDs issues, http://jira.jboss.org/jira/browse/EJBTHREE-1118.
5.

EJB 2.1 View requirements
*

Home extending EJBLocalHome? or EJBHome must be defined
*

Remote or Local interface must either be defined via @Local/@Remote or via return type of "create" methods of the Home
*

EJB 2.1 Remote/Local interfaces must extend EJBObject/EJBLocalObject

6.

@Local/@Remote may be used to define either EJB 3.0 View Business Interface, or EJB 2.1 View Remote/Local interface
7.

Use of JBoss Cache 2.x. JBC 2.x has a significantly different API from the 1.x releases used in JBoss AS 4.x and 3.2.x.

SO dont use any of this please use glassfish and netbeans.those will work together fine.

Anna said...

Great and Useful Article.

Online Java Course

Java Online Training

Java Course Online

J2EE training

online J2EE training

Best Recommended books for Spring framework

Java Interview Questions












Java Training Institutes in Chennai

Java Training in Chennai

J2EE Training in Chennai

java j2ee training institutes in chennai

Vũ Diệu Linh said...

I enjoyed on reading your blog post. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. Please visit my website, Friv 4000 Games is where all the free friv games.
Friv 4000