2016-12-30 11 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">