投稿‎ > ‎

Start Jboss5.1.0 from Eclipse (Galileo)

posted Sep 7, 2013, 1:29 AM by Unknown user
With the help from internet, I just started Jboss5.1.0 from Eclipse successfully,and I am happy to share my story.
The environment is as the following.
OS: windows vista, Japanese Version
Eclipse: Galileo
JBoss: jboss-5.1.0.GA

0.prerequisitions
 java(version 1.6 or above) is needed.

1.install Eclipse
 Eclipse can be downloaded from its official website.
you can just download the zip file and unzip it to anywhere you like, for example,to c:\program files.

2.install Jboss5.1.0
Jboss can be downloaded from the following website.
like eclipse,you just need to download the zip file and unzip it to anywhere you like, for example, to c:\opt\jboss
IMPORTANT:you need to create a system variable JBOSS_HOME,and set it to the directory where you unzipped it,for example,set it to "C:\opt\jboss\jboss-5.1.0.GA".

3.open Eclipse
Navigate to the directory where you installed your eclipse, and double click the file "eclipse.exe",eclipse will start.

4.modify profile.xml in jboss
it seems there is a bug that occurs with certain specific combinations of JRE and OS versions (see https://jira.jboss.org/jira/browse/JBAS-6981). Basically, the JBoss config is relying on reflection to return constructors in a certain order, and in some cases this order is different, causing the exception. Did you change your JRE version when you reinstalled, say from 1.6.0_17 to _18?
Anyway, the workaround is described in the JIRA issue, and also here. You need to change the content of conf/bootstrap/profile.xml. Look for the definition of the AttachmentStore, and change the constructor line so that it starts:
<constructor><parameter class="java.io.File">
The original version doesn't have the class="java.io.File" attribute.
Pretty sloppy of the JBoss folks, but there you go.

5.create a jboss 5.0 server from Eclipse.

6.Start jboss 5.0 from Eclipse.

Note:step 4 is important.If you did not do this step.The following exception will occur:
ERROR [AbstractKernelController] Error installing to Instantiated: name=AttachmentStore state=Described
Comments