1 Reply Latest reply on Aug 27, 2012 2:48 AM by zhuyanxuan

    how can I hot-reload a war on jboss6?

    zhuyanxuan Newbie

      有个.war的web项目通过local访问同在目录下的EJB接口.当reload EJB的jar时候 .war项目再访问会报错.

      java.lang.ClassCastException: com.chujian.ha.bean.APIBean cannot be cast to com.chujian.ha.bean.APIBean 相同的类却因为jboss的timer服务出错,有人有好的解决方案望告之谢谢。

       

      i deploy a jar and a war on jboos6,and they running well,the war through local interface to view the jar's method.

      but when i rebuilt and hot-reload the jar.there is displaying a warn:WARN  [org.jboss.ejb3.TimerServiceContainer] (HDScanner) EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers

       

       

      and then the war can't work well:when i get the bean,here throw many error:

      2012-08-27 13:01:47,485 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/HAPlatformControl].[jsp]] (http-0.0.0.0-8080-1) Servlet.service() for servlet jsp threw exception: java.lang.ClassCastException: com.chujian.ha.bean.APIBean cannot be cast to com.chujian.ha.bean.APIBean

          at $Proxy198.findAPIBeanById(Unknown Source)    at org.apache.jsp.api.api_005fadd_jsp._jspService(api_005fadd_jsp.java:109)

          at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [:6.0.0.Final]

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]

          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) [:6.0.0.Final]

          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [:6.0.0.Final]

          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [:6.0.0.Final]

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

          at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88) [:2.3.1.2]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

          at com.chujian.hacontrol.filter.EjbClient.doFilter(EjbClient.java:99) [:]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

          at com.chujian.hacontrol.filter.AccessControlFilter.doFilter(AccessControlFilter.java:54) [:]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

          at com.chujian.hacontrol.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:63) [:]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]

          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]

          at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]

          at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]

          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]

          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]

          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]

          at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]

          at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:893) [:6.0.0.Final]

          at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:600) [:6.0.0.Final]

          at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2019) [:6.0.0.Final]

          at java.lang.Thread.run(Thread.java:662) [:1.6.0_31]

       

       

      how can i solve the problem,i want when i rebuilt and hot-reload the jar.the war can automatic redeploy.thank you very much............