user1209298
user1209298

Reputation:

JSL windows service is not starting

I am trying to setup a Java service with JSL. I can install the service and it shows up in the service.msc. However, once I start the service it hangs in the status "starting". I played all day with the .ini configurations, but could no make it run. Every time I start it, it hangs. Below is my .ini, the command provided under cmdline works fine in the standard command prompt. I also tried to set up the .ini with providing the parameters individually. I am on a Windows Server 2003 32bit, logged in as admin.

Your help is greatly appreciated!

[defines]
PATH = C:\company\server\client
JAVA = %JAVA_HOME%
PP = %PATH%
P1 = %P2%
P2 = %PP%
ROOT_DIR = %PATH%
WORK_DIR = %ROOT_DIR%\work\server

[service]
appname = HsqlDB
servicename = Hsql DB
displayname = Hsql DB
servicedescription = Hsql DB

stringbuffer = 16000
starttype=demand
loadordergroup=someorder    
useconsolehandler=false
stopclass=java/lang/System 
stopmethod=exit
stopsignature=(I)V

premainmethod=run 
premainsignature=()I
premain.modules=threaddump

premain.threaddump.class=com.roeschter.jsl.ThreadDumpListener
premain.threaddump.method=start
premain.threaddump.wait=3000
premain.threaddump.critical=no
premain.threaddump.interface=127.0.0.1
wrkdir=%PATH%

cmdline = java -cp C:\company\server\core\lib\com.springsource.org.hsqldb-1.8.0.10.jar org.hsqldb.Server -database.0 file:database -dbname.0 name

Upvotes: 3

Views: 1984

Answers (2)

mekondelta
mekondelta

Reputation: 993

The application FAQ explains how to notify JSL of the JRE location:-

  1. It reads the jrepath parameter from the configuration file
  2. It loks for a java.dll in the bin directoy colocated with the jsl.exe
  3. It loks for a java.dll in the jre\bin directoy colocated with the jsl.exe
  4. It looks for JRE path in the registry

The URL is http://jslwin.sourceforge.net/faq.html

Upvotes: 0

user1209298
user1209298

Reputation:

The solution was quite easy. I had the JDK installed, but JSL is looking for the JRE. After running the JSL in debug mode, the following hint led to the solution: "The system can't find the registry key specified: HKey_LOCAL_ MACHINE\SOFTWARE\Javasoft\" Installing JRE solved the problem, as the JSL found the "Java Runtime Environment" registry key, which is not created by the JDK.

Upvotes: 2

Related Questions