Olá a todos,
Tenho uma aplicação que necessito rodar como serviço do windows, para isso estou usando o java service wrapper, porém quando quando vou rodar o serviço, o aplicativo nao encontra as classes do JDOM. Quando rodo diretamente sem ser um serviço o aplicativo roda normalmente, o que poderia ser isso? Segue erro abaixo.
STATUS | wrapper | 2012/06/25 12:34:58 | MDWService removed.
STATUS | wrapper | 2012/06/25 12:35:00 | MDWService installed.
STATUS | wrapper | 2012/06/25 12:35:04 | --> Wrapper Started as Console
STATUS | wrapper | 2012/06/25 12:35:04 | Java Service Wrapper Community Edition 32-bit 3.3.6
STATUS | wrapper | 2012/06/25 12:35:04 | Copyright (C) 1999-2009 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper | 2012/06/25 12:35:04 | http://wrapper.tanukisoftware.org
STATUS | wrapper | 2012/06/25 12:35:04 |
STATUS | wrapper | 2012/06/25 12:35:04 | Launching a JVM...
INFO | jvm 1 | 2012/06/25 12:35:04 | WrapperManager: Initializing...
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp:
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp: Encountered an error running main:
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp: java.lang.NoClassDefFoundError: org/jdom/input/SAXBuilder
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp: at br.com.ykp.mdw.util.ConfiguraSistema.getParametrosXML(ConfiguraSistema.java:94)
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp: at br.com.ykp.mdw.backend.BackEnd.main(BackEnd.java:45)
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp: at java.lang.reflect.Method.invoke(Method.java:597)
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp: at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:244)
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp: at java.lang.Thread.run(Thread.java:662)
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp: Caused by: java.lang.ClassNotFoundException: org.jdom.input.SAXBuilder
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp: at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp: at java.security.AccessController.doPrivileged(Native Method)
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp: at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp: at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp: at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp: at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
INFO | jvm 1 | 2012/06/25 12:35:05 | WrapperSimpleApp: ... 8 more
STATUS | wrapper | 2012/06/25 12:35:07 | <-- Wrapper Stopped
Obrigado
[quote=entanglement]http://wrapper.tanukisoftware.com/doc/english/prop-java-classpath-n.html
Você tem de listar os jars do JDom nessa configuração. [/quote]
Olá entanglement, obrigado pela ajuda.
Mas o JDOM está dentro do jar do aplicativo, como posso listar-lo?
Segue o arquivo de configuração
wrapper.java.command=java
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
wrapper.java.classpath.1=lib/wrapper.jar
wrapper.java.classpath.2=BackEnd.jar
wrapper.java.classpath.3=lib
wrapper.java.library.path.1=lib
wrapper.app.parameter.1=br.com.ykp.mdw.backend.BackEnd
wrapper.app.parameter.2=org.jdom.input.SAXBuilder
wrapper.java.additional.auto_bits=TRUE
wrapper.java.additional.1=-Duser.timezone=America/Sao_Paulo
wrapper.console.format=PM
wrapper.console.loglevel=INFO
wrapper.logfile=logs/wrapper.log
wrapper.logfile.format=LPTM
wrapper.logfile.loglevel=INFO
wrapper.logfile.maxsize=2m
wrapper.logfile.maxfiles=10
wrapper.syslog.loglevel=NONE
wrapper.ignore_sequence_gaps=TRUE
wrapper.check.deadlock=TRUE
wrapper.check.deadlock.interval=60
wrapper.check.deadlock.action=RESTART
wrapper.check.deadlock.output=FULL
wrapper.filter.trigger.1000=java.lang.OutOfMemoryError
wrapper.filter.action.1000=RESTART
wrapper.filter.message.1000=The JVM has run out of memory.
WRAPPER_NAME%:%WRAPPER_EVENT_NAME%] Event Notification
wrapper.event.jvm_restart.email.body=The JVM was restarted.\n\nPlease check on its status.\n
wrapper.console.title=MDWService
wrapper.name=MDWService
wrapper.displayname=MDWService
wrapper.description=MDW Service
wrapper.ntservice.dependency.1=
wrapper.ntservice.starttype=AUTO_START
wrapper.ntservice.interactive=false
wrapper.ntservice.hide_console=true
Att,
[quote=cenriqueos][quote=entanglement]http://wrapper.tanukisoftware.com/doc/english/prop-java-classpath-n.html
Você tem de listar os jars do JDom nessa configuração. [/quote]
Olá entanglement, obrigado pela ajuda.
Mas o JDOM está dentro do jar do aplicativo, como posso listar-lo?
Segue o arquivo de configuração
wrapper.java.command=java
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
wrapper.java.classpath.1=lib/wrapper.jar
wrapper.java.classpath.2=BackEnd.jar
wrapper.java.classpath.3=lib
wrapper.java.library.path.1=lib
wrapper.app.parameter.1=br.com.ykp.mdw.backend.BackEnd
wrapper.app.parameter.2=org.jdom.input.SAXBuilder
wrapper.java.additional.auto_bits=TRUE
wrapper.java.additional.1=-Duser.timezone=America/Sao_Paulo
wrapper.console.format=PM
wrapper.console.loglevel=INFO
wrapper.logfile=logs/wrapper.log
wrapper.logfile.format=LPTM
wrapper.logfile.loglevel=INFO
wrapper.logfile.maxsize=2m
wrapper.logfile.maxfiles=10
wrapper.syslog.loglevel=NONE
wrapper.ignore_sequence_gaps=TRUE
wrapper.check.deadlock=TRUE
wrapper.check.deadlock.interval=60
wrapper.check.deadlock.action=RESTART
wrapper.check.deadlock.output=FULL
wrapper.filter.trigger.1000=java.lang.OutOfMemoryError
wrapper.filter.action.1000=RESTART
wrapper.filter.message.1000=The JVM has run out of memory.
WRAPPER_NAME%:%WRAPPER_EVENT_NAME%] Event Notification
wrapper.event.jvm_restart.email.body=The JVM was restarted.\n\nPlease check on its status.\n
wrapper.console.title=MDWService
wrapper.name=MDWService
wrapper.displayname=MDWService
wrapper.description=MDW Service
wrapper.ntservice.dependency.1=
wrapper.ntservice.starttype=AUTO_START
wrapper.ntservice.interactive=false
wrapper.ntservice.hide_console=true
Att,
[/quote]
Consegui resolver
Criei uma pasta lib e coloquei todos os jar que estavam no jar do aplicativo principal.
Obrigado a todos