4

jetty 7.6 から jetty-9.2.1 に切り替えようとしています。必要な構成変更を行いました。しかし、jetty サーバーの初期化中に「クラスパスで検出された Spring WebApplicationInitializer タイプがありません」というメッセージが継続的に表示されます。

私の展開マネージャーは次のとおりでした。

新しいクラス="org.eclipse.jetty.deploy.providers.WebAppProvider">

<Set name="monitoredDirName">
  <Property name="cometd.deploy.dir" default="/u/khandela/cometD/webapps_dev/" />
</Set>
<Set name="defaultsDescriptor">
  <Property name="jetty.home" default="."/>/etc/webdefault.xml
</Set>
<Set name="scanInterval">1</Set>
<Set name="extractWars">true</Set>
<Set name="contextXmlDir">
 <Property name="jetty.home" default="." />/contexts
</Set>

新しいバージョンでは、「contextXmlDir」が削除されました。そのため、構成からも削除しました。実行すると、上記のメッセージが表示され続けます。はいの場合、どのように追加する必要がありますか?

そして、実行中に使用しています: --module=server,jsp,deploy,jmx,resources,websocket,ext,plus,annotations

以下は、サーバーを実行したときに表示される詳細なメッセージです。

2014-07-08 14:07:42.634:INFO::main: Logging initialized @512ms
2014-07-08 14:07:43.253:INFO:oejs.Server:main: jetty-9.2.1.v20140609
2014-07-08 14:07:43.306:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/u/khandela/cometD/logs_dev/webapps] at interval 1
2014-07-08 14:07:43.306:WARN:oejdp.ScanningAppProvider:main: Does not exist: file:/u/khandela/cometD/logs_dev/webapps
2014-07-08 14:07:43.450:INFO:oejs.AbstractNCSARequestLog:main: Opened /u/khandela/cometD/logs_dev/jetty-20140708.log
2014-07-08 14:07:43.468:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/u/khandela/cometD/webapps_dev/] at interval 1
2014-07-08 14:07:46.945:INFO:cometd:main: No Spring WebApplicationInitializer types detected on classpath
2014-07-08 14:07:47.332:INFO:cometd:main: Initializing Spring root WebApplicationContext
2014-07-08 14:07:48.696:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@6fd02e5{/cometd,file:/tmp/jetty-0.0.0.0-8107-cometd.war-_cometd-any-404202732061519131.dir/webapp/,AVAILABLE}{/u/khandela/cometD/webapps_dev/cometd.war}
2014-07-08 14:07:49.183:INFO:oejs.ServerConnector:main: Started ServerConnector@180bc464{HTTP/1.1}{0.0.0.0:8107}
2014-07-08 14:07:49.184:INFO:oejs.Server:main: Started @7083ms

ありがとう、

アヌジ

4

1 に答える 1

3

org.eclipse.jetty.server.webapp.ContainerIncludeJarPatternjetty.xml で属性を構成すると、機能します。このパラメーターの詳細については、Jetty のドキュメントorg.eclipse.jetty.webapp.WebAppContextを参照してください。これは、コンテナーのクラスパスのどの部分を注釈などのために処理する必要があるかを制御するために設定できるコンテキスト属性です。

<Call name="setAttribute">
  <Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
  <Arg>.*/foo-[^/]*\.jar$|.*/bar-[^/]*\.jar$|.*/bin/.*|.*/classes/.*|.*/target/.</Arg>
</Call>
于 2016-09-23T21:07:34.223 に答える