• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java service launcher

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I launched my application as windows service using JSL and iam able to start the application.But the application is not running(shows started in the services list) and iam not able to find the jsl log file.
But the application is running fine in the jsl -debug mode


Any help is highly appreciated...

Thanks
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By JSL, do you mean this tool: http://forge.objectweb.org/projects/javaservice/ ? I ask because there are many tools that can be used to launch a Java app as a service.

If is is this tool, then there should be registry entries that redirect STDOUT and STDERR. You should look into those files to determine what went wrong.

If it is not this tool, the same general principle applies. There is usually a way to redirect STDOUT and STDERR to a log file and you have to look there. The service tool will not place any application-related messages into the Windows event logs, so looking there for why the Java app failed to run is useless. And the service tool only knows that it attempted to run the Java app, thus it reports success to the Windows service manager.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, I found JSL - http://www.roeschter.com/index.html .

By "the application is running fine in the jsl -debug mode" do you mean that when you run "jsl.exe -debug" from the command line that it runs OK? Is so, I have two questions:

1) What account are you using to run the applicaiton as a service?

2) Does the application open a window? If so, did you configure the service to allow that? Check the "Allow service to interact with desktop" on the "Log On" tab for the service.
 
Velayudhaperumal bhagavathikannu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks peter.
No the application doent open any window

Iam able to solve the problem.
In the jsl.exe -debug mode, the configuration file is to be placed outside the application jar, but while running the application as a service ,it was not able to find the config file which is in the root directory.The config file should be placed inside the jar.

Iam able to debug this by uncommenting
systemerr=c:\systemerr.log
in the jsl.ini file

 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Vel", please check your private messages for an important administrative matter.
 
I hired a bunch of ninjas. The fridge is empty, but I can't find them to tell them the mission.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic