8

リンクhttp://wiki.eclipse.org/Jetty/Tutorial/Jetty_HelloWorldチュートリアル(Eclipseを使用)をたどりました。また、ここで既存のスタックオーバーフローを確認しました

集約桟橋8.0.0.jarと8.1.3.jarをservlet-api-2.5.jarと一緒に使用しています。これらの2つのjarをクラスパスに追加し、slf4j-simple-1.6.4.jarも含めました。

私はまだ得ています

`
2012-05-23 15:23:06.813:WARN:oeji.nio:java.lang.NoClassDefFoundError:javax / servlet / AsyncContext

at org.eclipse.jetty.server.HttpConnection.<init>(HttpConnection.java:155)
at org.eclipse.jetty.server.AsyncHttpConnection.<init>(AsyncHttpConnection.java:19)
at org.eclipse.jetty.server.nio.SelectChannelConnector$SelectChannelHttpConnection.<init>(SelectChannelConnector.java:309)
at org.eclipse.jetty.server.nio.SelectChannelConnector$SelectChannelHttpConnection.<init>(SelectChannelConnector.java:303)
at org.eclipse.jetty.server.nio.SelectChannelConnector.newConnection(SelectChannelConnector.java:286)
at org.eclipse.jetty.server.nio.SelectChannelConnector$ConnectorSelectorManager.newConnection(SelectChannelConnector.java:364)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.<init>(SelectChannelEndPoint.java:71)
at org.eclipse.jetty.server.nio.SelectChannelConnector.newEndPoint(SelectChannelConnector.java:274)
at org.eclipse.jetty.server.nio.SelectChannelConnector$ConnectorSelectorManager.newEndPoint(SelectChannelConnector.java:370)
at org.eclipse.jetty.io.nio.SelectorManager$SelectSet.createEndPoint(SelectorManager.java:938)
at org.eclipse.jetty.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java:497)
at org.eclipse.jetty.io.nio.SelectorManager$1.run(SelectorManager.java:283)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
at java.lang.Thread.run(Thread.java:679)

   Caused by: 
    java.lang.ClassNotFoundException: javax.servlet.AsyncContext
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.eclipse.jetty.server.HttpConnection.<init>(HttpConnection.java:155)
at org.eclipse.jetty.server.AsyncHttpConnection.<init>(AsyncHttpConnection.java:19)
at org.eclipse.jetty.server.nio.SelectChannelConnector$SelectChannelHttpConnection.<init>(SelectChannelConnector.java:309)
at org.eclipse.jetty.server.nio.SelectChannelConnector$SelectChannelHttpConnection.<init>(SelectChannelConnector.java:303)
at org.eclipse.jetty.server.nio.SelectChannelConnector.newConnection(SelectChannelConnector.java:286)
at org.eclipse.jetty.server.nio.SelectChannelConnector$ConnectorSelectorManager.newConnection(SelectChannelConnector.java:364)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.<init>(SelectChannelEndPoint.java:71)
at org.eclipse.jetty.server.nio.SelectChannelConnector.newEndPoint(SelectChannelConnector.java:274)
at org.eclipse.jetty.server.nio.SelectChannelConnector$ConnectorSelectorManager.newEndPoint(SelectChannelConnector.java:370)
at org.eclipse.jetty.io.nio.SelectorManager$SelectSet.createEndPoint(SelectorManager.java:938)
at org.eclipse.jetty.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java:497)
at org.eclipse.jetty.io.nio.SelectorManager$1.run(SelectorManager.java:283)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
at java.lang.Thread.run(Thread.java:679)

`

何かご意見は ?

4

1 に答える 1

23

2.5ではなくサーブレットAPI3が必要だと思います。AsyncContextはサーブレット3.0で導入されましたが、2.5には存在しません。

于 2012-05-23T07:38:34.000 に答える