I am using JBoss 4.0.2 version and JDK 1.6. I have added service.bat, jbosssvc.exe files in JBoss bin directory. When I try running the service I am getting the error prompt "The JBossService on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service." I have set my JAVA_HOME to \jdk1.6\bin folder and tried moving JDK installation from program files to different location. But still not able to get this resolved.
Am I missing something here..Could you please help me on this. Many thanks.
The echo %JAVA_HOME% value was - C:\Prashant\Java\jdk1.6.0_20\bin;
I have changed it to C:\Prashant\Java\jdk1.6.0_20\; both in JAVA_HOME and PATH environmental variable. And I tried running the JBoss in Services, but it is throwing me the same error. Am I missing something else. Please let me know your thoughts on this. Many thanks.
Prashant Shivashimpi wrote:
After making this changes, I tried running the JBoss service, it's still failing with same error. Do I need to restart anything after making this changes.
Where did you set that JAVA_HOME value? In command prompt? In the Windows environment entries (there are 2 of those one for system and one for the logged in user)? What does JBOSS_HOME/bin/run.log show?
I have installed jdk1.5.0_22 and using jboss-4.2.3.GA. I have created a service.bat and jbosssvc files. I have set my JAVA_HOME in
1) JAVA_HOME variable in system variables as : C:\Program Files\Java\jdk1.5.0_22\ [No semicolon at the end].
2) In Path variable under system variables, I have added C:\Program Files\Java\jdk1.5.0_22\ After making these changes, I ran "service.bat install" from Jboss bin folder and it created JBoss service in Services in Administrative tools in the control panel.
When I try to run this service, I am getting the same error as mentioned earlier above. I am not sure what exactly causing this issue that JBoss service is not starting.
Could you please let me know your thoughts on this issue. Many thanks.
Joined: Mar 31, 2011
One good news..It is working now. I have added JAVA_HOME value is service.bat file.
Thanks a lot Peter, your idea on this worked..
But my question is, if I do not want to set JAVA_HOME in service.bat it should work as it was working earlier. Any changes needs to be made to make this work without having JAVA_HOME variable in service.bat file in JBoss bin folder. Many thanks for your time.
After you set JAVA_HOME in the system variables, did you reboot the system? I seem to recall that the part of Windows responsible for starting services doesn't listen for system variable updates, thus it would be aware of the JAVA_HOME setting only after a reboot.
But I highly recommend that you set it in service.bat anyway - having all of the settings in one place makes maintenance much easier.
Also, take a look at the updated service.bat provided as part of the source code for JBoss in Action. That one makes configuring a service easy because all of the settings are presented at the start of the bat file.
Joined: Mar 31, 2011
I did not restarted my system after setting the JAVA_HOME system variable. I removed JDK installation and moved it to a different folder to check whether this has any impact on starting the JBoss as a service.
As mentioned by you it is always a good practice to have all the settings in one place. Thank you so much for your time and help on this. It was really very helpful..
Where I will get the updated service.bat present in JBoss in Action ? Many thanks.