-
1. Re: JBOSS deploy cannot success
ben_coster Jan 14, 2010 2:03 PM (in response to design2006)I am getting the same ClassCastException when deploying.
10:55:27,063 ERROR [MessageResourcesFactory] MessageResourcesFactory.createFactory
java.lang.ClassCastException: org.apache.struts.util.PropertyMessageResourcesFactory
at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:172)
at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:523)
at org.apache.struts.action.ActionServlet.initInternal(ActionServlet.java:1045)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:326)
at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.init(AutoRegisterActionServlet.java:103)
at org.apache.beehive.netui.pageflow.PageFlowActionServlet.init(PageFlowActionServlet.java:133)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4071)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4375)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
at sun.reflect.GeneratedMethodAccessor147.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
at sun.reflect.GeneratedMethodAccessor143.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)Does anyone have any ideas?
Thanks,
Ben
-
2. Re: JBOSS deploy cannot success
adrian.brock Jan 14, 2010 2:29 PM (in response to ben_coster)You can't put some struts classes in server/default/lib and some in your web-app.
The classes in server/default/lib can't see classes inside the war.
So you'll get one of:
ClassNotFoundException - the class is missing from server/default/lib but its in the war - its inaccessible to classes in server/default/lib
(assuming the class isn't just missing altogether)
ClassCastException - one of the classes is in both places while others are not, the others see different versions of the duplicated classes
There's a longer explanation in the docs