2016-12-30 10 views
0

jetty-maven-pluginを使用している場合、jetty 8からjetty 9への移行では、アプリケーションなぜなら、クラスキャスト例外をロードすることはできません。java.lang.ClassCastException:org.eclipse.jetty.webapp.WebAppContextをorg.eclipse.jetty.maven.plugin.JettyWebAppContextにキャストできません

とjava.lang.ClassCastException:org.eclipse.jetty.webapp.WebAppContext はorg.eclipse.jetty.maven.plugin.JettyWebAppContext

にキャストすることはできません

答えて

0

コンテキストハンドラをWebAppContextからJettyWebAppコンテキストに変更します。

<contextHandlers> 
         <contextHandler implementation="org.eclipse.jetty.maven.plugin.JettyWebAppContext"> 
          <war>../../flieName.war</war> 
          <contextPath>/yourPath</contextPath> 
         </contextHandler> 
         <contextHandler implementation="org.eclipse.jetty.maven.plugin.JettyWebAppContext"> 
          <war>../../yourWar.war</war> 
          <contextPath>/anotherPath</contextPath> 
         </contextHandler> 
         <contextHandler implementation="org.eclipse.jetty.maven.plugin.JettyWebAppContext"> 
          <war>../../../anotherApp.war</war> 
          <contextPath>/oneMorePath</contextPath> 
         </contextHandler> 

はまた、あなたの桟橋-のcontext.xmlに同じ変更を加える

<Configure class="org.eclipse.jetty.maven.plugin.JettyWebAppContext"> 
関連する問題