surfjungle
Programmer
Hi there,
I'm having a problem running a Windows Server 2008 service. The strange thing is that it works fine via the command prompt.
I'm running 64-bit Windows Server 2008 SP2 as an VMware image on a EM64T ESX Server. On this server, I'm running 32-bit Java5 from IBM and 32-bit MS Word 2007. I compile and run my Java application with IBM's 32-bit Java5. The application is trying to create a document and is using, amongst other things, the IBM bridge2java.dll and MS Word 2007.
After setting up my classpath, running the following from the command prompt works fine: <java.exe myjavapackage.MyJavaClass 1 1 1>.
However, when I create the service using the following command: <sc.exe create MySimpleService binPath= "java.exe myjavapackage.MyJavaClass 1 1 1" DisplayName= "MySimpleService"> and then try to start it, I get the following message box from Windows: "Windows could not start the MySimpleService service on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion". However, know part of the Java application is running as MS Word's WINWORD.EXE process is listed in the Task Manager. There seems to be nothing helpful in the Event Viewer.
I can successfully run the above via the command line AND as a Windows service in 32-bit Windows XP SP3.
The following is a list where one or more of may be causing the issue (or something I haven't thought of):
- DEP / Data Execution Prevention. Have to look into this more.
- Elevated privileges issue. Have to look into this more.
- Service access control list / startup mode / account. Have to look into this more.
- UAC issue. I turned this off from msconfig->Tools, restarted the server - I tried to run the service, again to no avail.
- File security. For java.exe and java jars etc, I added the user which starts the service, to have full control over those files it uses, to no avail.
- Security tab of the Properties of the java.exe and java jars etc is not set correctly for the logged in user. (Set these to full control for the user bound to the service to no avail).
- Something else which I have not thought of.
Any ideas? I'm out of office on holidays next week and will respond to posts when I get back on Monday, the 14th of June.
Thanks in advance for any help - much appreciated... : )
- Jason.
I'm having a problem running a Windows Server 2008 service. The strange thing is that it works fine via the command prompt.
I'm running 64-bit Windows Server 2008 SP2 as an VMware image on a EM64T ESX Server. On this server, I'm running 32-bit Java5 from IBM and 32-bit MS Word 2007. I compile and run my Java application with IBM's 32-bit Java5. The application is trying to create a document and is using, amongst other things, the IBM bridge2java.dll and MS Word 2007.
After setting up my classpath, running the following from the command prompt works fine: <java.exe myjavapackage.MyJavaClass 1 1 1>.
However, when I create the service using the following command: <sc.exe create MySimpleService binPath= "java.exe myjavapackage.MyJavaClass 1 1 1" DisplayName= "MySimpleService"> and then try to start it, I get the following message box from Windows: "Windows could not start the MySimpleService service on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion". However, know part of the Java application is running as MS Word's WINWORD.EXE process is listed in the Task Manager. There seems to be nothing helpful in the Event Viewer.
I can successfully run the above via the command line AND as a Windows service in 32-bit Windows XP SP3.
The following is a list where one or more of may be causing the issue (or something I haven't thought of):
- DEP / Data Execution Prevention. Have to look into this more.
- Elevated privileges issue. Have to look into this more.
- Service access control list / startup mode / account. Have to look into this more.
- UAC issue. I turned this off from msconfig->Tools, restarted the server - I tried to run the service, again to no avail.
- File security. For java.exe and java jars etc, I added the user which starts the service, to have full control over those files it uses, to no avail.
- Security tab of the Properties of the java.exe and java jars etc is not set correctly for the logged in user. (Set these to full control for the user bound to the service to no avail).
- Something else which I have not thought of.
Any ideas? I'm out of office on holidays next week and will respond to posts when I get back on Monday, the 14th of June.
Thanks in advance for any help - much appreciated... : )
- Jason.