尝试使用nohup运行我的java代码时遇到问题:
[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)
感谢您的帮助
答案 0 :(得分:3)
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
无关。它试图读取的文件是什么?