次のように実行すると、Ubuntu 13 (JDK 1.5) および HP-UX 11.23 (JDK 1.5 を使用) で jetty runner 7.6 に .war をデプロイできません。
/opt/java1.5/bin/java -classpath jetty-runner-7.6.jar \
org.mortbay.jetty.runner.Runner MyWar.war
このエラーが発生しています:
20XX-XX-XX ##:10:07.233:INFO:omjr.Runner:Runner
20XX-XX-XX ##:10:07.235:WARN:omjr.Runner:No tx manager found
20XX-XX-XX ##:10:07.396:INFO:omjr.Runner:Deploying file:/home/myuser/MyWar.war @ /
20XX-XX-XX ##:10:07.472:INFO:oejs.Server:jetty-7.x.y-SNAPSHOT
20XX-XX-XX ##:10:07.599:INFO:oejw.WebInfConfiguration:Extract jar:file:/home/myuser/MyWar.war!/ to /var/tmp/jetty-0.0.0.0-8080-MyWar.war-_-any-/webapp
20XX-XX-XX ##:10:08.740:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,file:/var/tmp/jetty-0.0.0.0-8080-MyWar.war-_-any-/webapp/},file:/home/myuser/MyWar.war java.lang.IllegalStateException: zip file closed
JDK 1.6 を使用すると、Ubuntu と HP-UX の両方で動作します。
JDK 1.5で動作させる方法を見つけました。jetty -runner の .jar をフォルダーに「展開」し、次のように実行します。
/opt/java1.5/bin/java -classpath jetty-runner-7.6 \
org.mortbay.jetty.runner.Runner MyWar.war
http://mvnrepository.com/artifact/org.mortbay.jetty/jetty-runner/7.6.12.v20130726から入手した jetty-runner-7.6.jar には、java.util との互換性の問題があるようです。 zip.ZipFile. 再度 7-zip で圧縮してみましたが、問題は解決しません。
完全なスタックトレースは次のとおりです。
20XX-XX-XX ##:10:07.233:INFO:omjr.Runner:Runner
20XX-XX-XX ##:10:07.235:WARN:omjr.Runner:No tx manager found
20XX-XX-XX ##:10:07.396:INFO:omjr.Runner:Deploying file:/home/myuser/MyWar.war @ /
20XX-XX-XX ##:10:07.472:INFO:oejs.Server:jetty-7.x.y-SNAPSHOT
20XX-XX-XX ##:10:07.599:INFO:oejw.WebInfConfiguration:Extract jar:file:/home/myuser/MyWar.war!/ to /var/tmp/jetty-0.0.0.0-8080-MyWar.war-_-any-/webapp
20XX-XX-XX ##:10:08.740:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,file:/var/tmp/jetty-0.0.0.0-8080-MyWar.war-_-any-/webapp/},file:/home/myuser/MyWar.war java.lang.IllegalStateException: zip file closed
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:535)
at java.util.zip.ZipFile.getEntry(ZipFile.java:268)
at java.util.jar.JarFile.getEntry(JarFile.java:200)
at sun.net.www.protocol.jar.URLJarFile.getEntry(URLJarFile.java:90)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:112)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:124)
at java.net.URL.openStream(URL.java:1007)
at com.sun.naming.internal.VersionHelper12$InputStreamEnumeration$1.run(VersionHelper12.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.naming.internal.VersionHelper12$InputStreamEnumeration.getNextElement(VersionHelper12.java:190)
at com.sun.naming.internal.VersionHelper12$InputStreamEnumeration.hasMore(VersionHelper12.java:210)
at com.sun.naming.internal.ResourceManager.getApplicationResources(ResourceManager.java:470)
at com.sun.naming.internal.ResourceManager.getInitialEnvironment(ResourceManager.java:159)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at org.eclipse.jetty.plus.webapp.EnvConfiguration.createEnvContext(EnvConfiguration.java:256)
at org.eclipse.jetty.plus.webapp.EnvConfiguration.preConfigure(EnvConfiguration.java:72)
at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:445)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:481) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:172)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:281)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.mortbay.jetty.runner.Runner.run(Runner.java:511)
at org.mortbay.jetty.runner.Runner.main(Runner.java:632)
20XX-XX-XX ##:10:08.747:WARN:oejsh.RequestLogHandler:!RequestLog
20XX-XX-XX ##:10:08.824:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080 ^C
20XX-XX-XX ##:13:20.301:INFO:oejsh.ContextHandler:stopped o.e.j.w.WebAppContext{/,file:/var/tmp/jetty-0.0.0.0-8080-MyWar.war-_-any-/webapp/},file:/home/myuser/MyWar.war
20XX-XX-XX ##:13:20.303:WARN:oejuc.AbstractLifeCycle:FAILED o.e.j.w.WebAppContext{/,file:/var/tmp/jetty-0.0.0.0-8080-MyWar.war-_-any-/webapp/},file:/home/myuser/MyWar.war: java.lang.IllegalStateException: zip file closed java.lang.IllegalStateException: zip file closed
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:535)
at java.util.zip.ZipFile.getEntry(ZipFile.java:268)
at java.util.jar.JarFile.getEntry(JarFile.java:200)
at sun.net.www.protocol.jar.URLJarFile.getEntry(URLJarFile.java:90)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:112)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:124)
at java.net.URL.openStream(URL.java:1007)
at com.sun.naming.internal.VersionHelper12$InputStreamEnumeration$1.run(VersionHelper12.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.naming.internal.VersionHelper12$InputStreamEnumeration.getNextElement(VersionHelper12.java:190)
at com.sun.naming.internal.VersionHelper12$InputStreamEnumeration.hasMore(VersionHelper12.java:210)
at com.sun.naming.internal.ResourceManager.getApplicationResources(ResourceManager.java:470)
at com.sun.naming.internal.ResourceManager.getInitialEnvironment(ResourceManager.java:159)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at org.eclipse.jetty.plus.webapp.EnvConfiguration.deconfigure(EnvConfiguration.java:152)
at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:511)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at org.eclipse.jetty.server.handler.HandlerCollection.doStop(HandlerCollection.java:250)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at org.eclipse.jetty.server.handler.HandlerCollection.doStop(HandlerCollection.java:250)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStop(HandlerWrapper.java:107)
at org.eclipse.jetty.server.Server.doStop(Server.java:342)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at org.eclipse.jetty.util.thread.ShutdownThread.run(ShutdownThread.java:132)
20XX-XX-XX ##:13:20.306:WARN:oejuc.AbstractLifeCycle:FAILED org.eclipse.jetty.server.handler.ContextHandlerCollection@1c0ec97: java.lang.IllegalStateException: zip file closed java.lang.IllegalStateException: zip file closed
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:535)
at java.util.zip.ZipFile.getEntry(ZipFile.java:268)
at java.util.jar.JarFile.getEntry(JarFile.java:200)
at sun.net.www.protocol.jar.URLJarFile.getEntry(URLJarFile.java:90)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:112)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:124)
at java.net.URL.openStream(URL.java:1007)
at com.sun.naming.internal.VersionHelper12$InputStreamEnumeration$1.run(VersionHelper12.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.naming.internal.VersionHelper12$InputStreamEnumeration.getNextElement(VersionHelper12.java:190)
at com.sun.naming.internal.VersionHelper12$InputStreamEnumeration.hasMore(VersionHelper12.java:210)
at com.sun.naming.internal.ResourceManager.getApplicationResources(ResourceManager.java:470)
at com.sun.naming.internal.ResourceManager.getInitialEnvironment(ResourceManager.java:159)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at org.eclipse.jetty.plus.webapp.EnvConfiguration.deconfigure(EnvConfiguration.java:152)
at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:511)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at org.eclipse.jetty.server.handler.HandlerCollection.doStop(HandlerCollection.java:250)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at org.eclipse.jetty.server.handler.HandlerCollection.doStop(HandlerCollection.java:250)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStop(HandlerWrapper.java:107)
at org.eclipse.jetty.server.Server.doStop(Server.java:342)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at org.eclipse.jetty.util.thread.ShutdownThread.run(ShutdownThread.java:132)
20XX-XX-XX ##:13:20.309:WARN:oejuc.AbstractLifeCycle:FAILED org.eclipse.jetty.server.handler.HandlerCollection@ecb281: java.lang.IllegalStateException: zip file closed java.lang.IllegalStateException: zip file closed
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:535)
at java.util.zip.ZipFile.getEntry(ZipFile.java:268)
at java.util.jar.JarFile.getEntry(JarFile.java:200)
at sun.net.www.protocol.jar.URLJarFile.getEntry(URLJarFile.java:90)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:112)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:124)
at java.net.URL.openStream(URL.java:1007)
at com.sun.naming.internal.VersionHelper12$InputStreamEnumeration$1.run(VersionHelper12.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.naming.internal.VersionHelper12$InputStreamEnumeration.getNextElement(VersionHelper12.java:190)
at com.sun.naming.internal.VersionHelper12$InputStreamEnumeration.hasMore(VersionHelper12.java:210)
at com.sun.naming.internal.ResourceManager.getApplicationResources(ResourceManager.java:470)
at com.sun.naming.internal.ResourceManager.getInitialEnvironment(ResourceManager.java:159)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at org.eclipse.jetty.plus.webapp.EnvConfiguration.deconfigure(EnvConfiguration.java:152)
at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:511)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at org.eclipse.jetty.server.handler.HandlerCollection.doStop(HandlerCollection.java:250)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at org.eclipse.jetty.server.handler.HandlerCollection.doStop(HandlerCollection.java:250)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStop(HandlerWrapper.java:107)
at org.eclipse.jetty.server.Server.doStop(Server.java:342)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at org.eclipse.jetty.util.thread.ShutdownThread.run(ShutdownThread.java:132)
20XX-XX-XX ##:13:20.312:WARN:oejuc.AbstractLifeCycle:FAILED org.eclipse.jetty.server.Server@1bb60c3: java.lang.IllegalStateException: zip file closed java.lang.IllegalStateException: zip file closed
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:535)
at java.util.zip.ZipFile.getEntry(ZipFile.java:268)
at java.util.jar.JarFile.getEntry(JarFile.java:200)
at sun.net.www.protocol.jar.URLJarFile.getEntry(URLJarFile.java:90)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:112)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:124)
at java.net.URL.openStream(URL.java:1007)
at com.sun.naming.internal.VersionHelper12$InputStreamEnumeration$1.run(VersionHelper12.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.naming.internal.VersionHelper12$InputStreamEnumeration.getNextElement(VersionHelper12.java:190)
at com.sun.naming.internal.VersionHelper12$InputStreamEnumeration.hasMore(VersionHelper12.java:210)
at com.sun.naming.internal.ResourceManager.getApplicationResources(ResourceManager.java:470)
at com.sun.naming.internal.ResourceManager.getInitialEnvironment(ResourceManager.java:159)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at org.eclipse.jetty.plus.webapp.EnvConfiguration.deconfigure(EnvConfiguration.java:152)
at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:511)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at org.eclipse.jetty.server.handler.HandlerCollection.doStop(HandlerCollection.java:250)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at org.eclipse.jetty.server.handler.HandlerCollection.doStop(HandlerCollection.java:250)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStop(HandlerWrapper.java:107)
at org.eclipse.jetty.server.Server.doStop(Server.java:342)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at org.eclipse.jetty.util.thread.ShutdownThread.run(ShutdownThread.java:132)