9 Replies Latest reply: Apr 12, 2011 2:29 PM by Wolf-Dieter Fink RSS

Updation Jboss from 4.0 to jboss-5.1.0.GA

shawn aslam Newbie

Everything working fine with jboss 4.0 and jdk 1.4.... but now as per request I need to update the jboss to latest version which i chosed to "jboss-5.1.0.GA" and here I need help from you brilliant guysFollowing configuration I have made on my machine and eclipse

 

------------------------------------------------------------------

In eclipse Compiler set to 1.6 and jre 1.6.

Environment Variable classpath set to jdk 1.6

and JAVA_HOME = jdk 1.6

build.xml is attached for reference folder name jboss 4.0 so dont confuse from it

when build for war file through ANT it gives me following error

 

 

 

 

 

43: cannot access java.lang.Object

bad class file: C:\Program Files\Java\jre6\lib\rt.jar(java/lang/Object.class)

class file has wrong version 49.0, should be 48.0    

Please remove or make sure it appears in the correct subdirectory of the classpath.

 

-------------------------------------------------------------------

which obviousely shows me version issue when use 1.4 jdk with 1.4 jre it builds and create the war file.

But after that if I run jboss got the error.

Command prompt shows the following error detail

 

Calling D:\jboss-4.0\bin\run.conf.
==================================

  JBoss Bootstrap Environment

  JBOSS_HOME: D:\jboss-4.0

  JAVA: C:\Program Files\Java\jdk1

  JAVA_OPTS: -Dprogram.name=run.ba
.rmi.dgc.client.gcInterval=3600000
.jboss.resolver.warning=true -serv

  CLASSPATH: D:\jboss-4.0\bin\run.

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

Unrecognized option: -server
Could not create the Java virtual
Press any key to continue . . .

 

 

Can you guys please help me in this regard.

  • 1. Updation Jboss from 4.0 to jboss-5.1.0.GA
    Peter Johnson Master

    >>class file has wrong version 49.0, should be 48.0

    Looks like you have a 1.4.x JVM referencing 1.5 rt.jar file. Most liekly you still have Eclipse running with 1.4.

     

    >>Unrecognized option: -server

    I suspect that your JAVA_HOME is set to a JRE and that the JRE doesn't contain the 'server' JVM. This is typical for JREs in Windows. Unfortunately, you didn't post the whole output - many of the lines are cut off.

  • 2. Re: Updation Jboss from 4.0 to jboss-5.1.0.GA
    shawn aslam Newbie

    I configured the eclipse with 1.5 jdk and then build with ANT and successfully it was built, might be jboss-5.1.0.GA is not compatible with jdk 1.6.

    Now the problem is when run jboss server (run.bat) i got the errors which are logged in the attached boot.log file.

    following is my environment setting for the java and jboss

    CATLINA_HOME = C:\Program Files\Apache Software Foundation\Tomcat 5.5

    CLASSPATH = C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api;C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\jsp-api;C:\Program Files\Java\jdk1.5.0_11\jre

    JBOSS_HOME = D:\jboss-4.0

    JAVA_HOME = C:\Program Files\Java\jdk1.5.0_11\

     

    Please help me to find out the exact issue.I am playing around having no success.

  • 3. Re: Updation Jboss from 4.0 to jboss-5.1.0.GA
    Peter Johnson Master

    >>might be jboss-5.1.0.GA is not compatible with jdk 1.6.

    JBoss AS 5.1.0 is compatible with JDK 6. There are two binary downloads - one for JDK 6 and one for JDK 5.

     

    >>build with ANT

    Do you mean that you compiled JBoss AS with Ant? If so, why are you compiling it rather than downloading and installing the binary?

     

    Here is the first error from boot.log:

      Caused by: java.lang.IllegalArgumentException: Unable to find operation setDefaultJBossServerLogThreshold(java.lang.String)

    I suspect that you have mixed JARs between your 4.0 deployment and 5.1.0. Exactly what changes have you made to 5.1.0? Also, why is the base directory called jboss-4.0? You did not, by any chance, copy the 5.1.0 files to an existing 4.0 installation?

  • 4. Re: Updation Jboss from 4.0 to jboss-5.1.0.GA
    shawn aslam Newbie

    >>JBoss AS 5.1.0 is compatible with JDK 6. There are two binary downloads - one for JDK 6 and one for JDK 5.

    then I might have downloaded for the 1.5 jdk

     

    >>Do you mean that you compiled JBoss AS with Ant? If so, why are you compiling it rather than downloading and installing the binary?

    I mean compliled my project for the war file using ANT, and project is complied and war file is created successfully by using the jdk 1.5.

     

    >>I suspect that you have mixed JARs between your 4.0 deployment and 5.1.0. Exactly what changes have you made to 5.1.0? Also, why is the base directory called jboss-4.0? You did not, by any chance, copy the 5.1.0 files to an existing 4.0 installation?

     

    I just rename the jboss 5.1.0 to jboss-4.0 so that for the time being i would need to update the build.xml.

    you might be right about the jars file mixing.... I only make the following changes while in the process of updation

    1. download jboss 1.5 and put it to the same folder where 1.4 were located
    2. change the evironment variables as mentioned above
    3. configure eclipse according to the 1.5 jdk and successfully created the war file

     

     

    So if i am mixing jar files there could be only one way which is to refer the jboss 1.4 jar files to the 1.5 which seem like not the mistake I have made.

    Any other idea?

  • 5. Re: Updation Jboss from 4.0 to jboss-5.1.0.GA
    shawn aslam Newbie

    one more thing which might help you I blank the jboss 1.5 default/lib folder as i read it somewhere that it should be blanked and when i hit again to run this time got the server.log file as can be found attached

  • 6. Updation Jboss from 4.0 to jboss-5.1.0.GA
    Wolf-Dieter Fink Master

    As you set Eclipse to Java 1.6 and the environment of JBoss to JDK1.5 I suppose that your classes are compiled as Java1.6 and this can not run with a runtime Java 1.5 environment (this will be the Exception you show).

     

    You might download JBoss 5.1 for Java1.5, compile your classes with Eclips(Java 1.5, or use Java1.6 and set the Java5 compatibility flag).

    Other option is to use Java6 as runtime JVM, in that case it make no difference whether JBoss 5.1 is the JDK5 or JDK6 version and your classes might compiled with Java6.

  • 7. Updation Jboss from 4.0 to jboss-5.1.0.GA
    Peter Johnson Master

    >>I download jboss 1.5 and put it to the same folder where 1.4 were located

    You do not wat to do this. You need to place JBoss AS 5.1 into a completely different folder from 4.0

     

    You really cannot "upgrade" JBoss AS from one version to another. Instead, you need to migrate your application to the new version. See this post for some suggestions:

    http://www.coderanch.com/t/517946/JBoss/Migration-jboss

  • 8. Updation Jboss from 4.0 to jboss-5.1.0.GA
    shawn aslam Newbie

    I placed jboss 5.1 in different folder update doesn't mean at all that I update the jboss folder sorry if you get wrong idea from my wording.

    I just want to run the jboss 1.5 successfully and still not able to do this.

    I read you blog but i dont see that we have made any jboss related configuration in the project.

  • 9. Updation Jboss from 4.0 to jboss-5.1.0.GA
    Wolf-Dieter Fink Master

    To get a clear path you should unzip a JBoss 5.1 and start it without any change.

    -> this should work if you install/configure the correct JBoss->JVM combination

     

    After this you should deploy your *.xml (e.g. *-ds.xml) to see that this will work.

    If it is working you should deploy your application, step by step if you have more than one jar/ear/war.