[jboss-user] [Beginners Corner] - Re: Error Could not initialise deployment jbossws.sar on run

jaikiran do-not-reply at jboss.com
Mon Sep 15 04:07:35 EDT 2008


"Defrian" wrote : i added the following lines to the build.bat and run.bat to assure that it is compiled and run by my jdk 1.5
  | 
  |   | set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_15
  |   | set PATH=%JAVA_HOME%\bin;%PATH%
  |   | 
  | 

I think i know what the problem is. You are setting JAVA_HOME to C:\Program Files\Java\jdk1.5.0_15. 
Java (and JBoss too) does not like space in the folder names. It always recommended to install Java and JBoss in a folder without a space in its path name.

In your case, you then set the PATH as
anonymous wrote : set PATH=%JAVA_HOME%\bin;%PATH%

Later on during the build when a java command is issued, the PATH is checked. Since the JAVA_HOME has a space in its path, that folder will be completely ignored during this check and the rest of the PATH will be checked for "java.exe". I believe, your PATH already has a reference to the bin folder of JDK6. As a result, the build process uses JDK6 for building the server. Later on when you start the server with JDK5, it throws those errors. 

Just to verify that this is what is happening, you can add the following statement just after setting the JAVA_HOME and PATH in the build.bat :

  | set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_15
  | set PATH=%JAVA_HOME%\bin;%PATH%
  | 
  | java -version

Then you can check the output in the build.log file.

To fix this, i would recommend that you move your JDK installation to a folder which does not have a space in its path name. I have it installed at C:\jdk1.5.0_10. 





View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176421#4176421

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176421



More information about the jboss-user mailing list