Java-код и демон Unix - PullRequest
       28

Java-код и демон Unix

1 голос
/ 22 декабря 2010

У меня возникла проблема при попытке запустить мой Java-код с nohup:

[root@ /]# nohup opt/jdk1.6.0_22/bin/java -cp "lib/hibernate/*:lib/tuscany-sca-1.6/lib/*:lib/tuscany-sca-1.6/modules/*:./*" com.lab.launch.Launcher &

[1] 23148

Содержимое nohup.out:

22 dec. 2010 18:20:21 org.apache.tuscany.sca.node.impl.NodeImpl <init>
INFO: Creating node: SOAPExchange.composite
22 dec. 2010 18:20:22 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
INFO: Loading contribution: file:/xf_exchange.jar
22 dec. 2010 18:20:23 org.apache.tuscany.sca.node.impl.NodeImpl start
INFO: Starting node: SOAPExchange.composite
22 dec. 2010 18:20:32 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://ns200534.ovh.net:8094/SOAPExchange
Exception in thread "main" java.io.IOException: Bad file descriptor
    at java.io.FileInputStream.readBytes(Native Method)
    at java.io.FileInputStream.read(FileInputStream.java:199)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
    at com.xavier.launch.Launcher.main(Launcher.java:24)
Exception in thread "Thread-1" java.lang.IllegalStateException: Shutdown in progress
    at java.lang.ApplicationShutdownHooks.remove(ApplicationShutdownHooks.java:55)
    at java.lang.Runtime.removeShutdownHook(Runtime.java:220)
    at org.apache.tuscany.sca.binding.ws.axis2.TuscanyListenerManager.stop(TuscanyListenerManager.java:87)
    at org.apache.tuscany.sca.binding.ws.axis2.TuscanyListenerManager$ListenerManagerShutdownThread.run(TuscanyListenerManager.java:100)
java.lang.IllegalStateException: Shutdown in progress
    at java.lang.ApplicationShutdownHooks.remove(ApplicationShutdownHooks.java:55)
    at java.lang.Runtime.removeShutdownHook(Runtime.java:220)
    at org.apache.tuscany.sca.binding.ws.axis2.TuscanyListenerManager.stop(TuscanyListenerManager.java:87)
    at org.apache.axis2.context.ConfigurationContext.terminate(ConfigurationContext.java:744)
    at org.apache.axis2.transport.http.AxisServlet.destroy(AxisServlet.java:465)
    at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceServlet.destroy(Axis2ServiceServlet.java:295)
    at org.mortbay.jetty.servlet.ServletHolder.destroyInstance(ServletHolder.java:315)
    at org.mortbay.jetty.servlet.ServletHolder.doStop(ServletHolder.java:286)
    at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
    at org.mortbay.jetty.servlet.ServletHandler.doStop(ServletHandler.java:170)
    at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
    at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:129)
    at org.mortbay.jetty.servlet.SessionHandler.doStop(SessionHandler.java:124)
    at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
    at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:129)
    at org.mortbay.jetty.handler.ContextHandler.doStop(ContextHandler.java:566)
    at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
    at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:129)
    at org.mortbay.jetty.Server.doStop(Server.java:281)
    at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
    at org.mortbay.jetty.Server$ShutdownHookThread.run(Server.java:559)

спасибо за вашу помощь

1 Ответ

3 голосов
/ 22 декабря 2010
Exception in thread "main" java.io.IOException: Bad file descriptor
    at java.io.FileInputStream.readBytes(Native Method)
    at java.io.FileInputStream.read(FileInputStream.java:199)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
    at com.xavier.launch.Launcher.main(Launcher.java:24)

Похоже, что в вашем приложении (или в его параметрах) есть ошибка, и я не уверен, что она не связана с nohup. Какой файл он пытается прочитать?

...