Java Webservice java.lang.ClassCastException: org.apache.cxf.jaxws.ServiceImpl
- by JohnC
I am using Maven, CXF 2.2.7, JBoss 4.2.3 and JRE 1.5
I have a Webservice that I can see on the server by using the URL myURL/myService?wsdl
I am trying to develop a web app to ping that webservice by calling this in my bean:
MyWebService webservice = new MyWebService();
However, it dies and throws the following error, which is very vague:
java.lang.ClassCastException: org.apache.cxf.jaxws.ServiceImpl
09:25:59,450 ERROR [STDERR] at javax.xml.ws.Service.<init>(Service.java:81)
09:25:59,450 ERROR [STDERR] at org.otherservice.webservice.MyWebServiceService.<init>(MyWebService.java:44)
09:25:59,450 ERROR [STDERR] at net.myservice.beans.MyBean.getMyServiceSoap(MyBean.java:109)
09:25:59,450 ERROR [STDERR] at net.myservice.beans.MyBean.ack(MyBean.java:240)
09:25:59,450 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
09:25:59,450 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
09:25:59,450 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
09:25:59,450 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
09:25:59,450 ERROR [STDERR] at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
09:25:59,450 ERROR [STDERR] at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
09:25:59,450 ERROR [STDERR] at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
09:25:59,450 ERROR [STDERR] at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
09:25:59,450 ERROR [STDERR] at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:95)
09:25:59,450 ERROR [STDERR] at javax.faces.component.UICommand.broadcast(UICommand.java:383)
09:25:59,450 ERROR [STDERR] at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:450)
09:25:59,450 ERROR [STDERR] at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:759)
09:25:59,450 ERROR [STDERR] at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
09:25:59,450 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266)
09:25:59,450 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:132)
09:25:59,450 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
09:25:59,450 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
09:25:59,450 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
09:25:59,450 ERROR [STDERR] at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:301)
09:25:59,450 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
09:25:59,450 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
09:25:59,450 ERROR [STDERR] at net.faces.filters.AuthorizationFilter.doFilter(AuthorizationFilter.java:84)
09:25:59,450 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
09:25:59,450 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
09:25:59,450 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
09:25:59,450 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
09:25:59,450 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
09:25:59,450 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
09:25:59,450 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
09:25:59,450 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
09:25:59,450 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
09:25:59,450 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
09:25:59,450 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
09:25:59,450 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
09:25:59,450 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
09:25:59,450 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
09:25:59,450 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
09:25:59,450 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
09:25:59,450 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
09:25:59,450 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
I am hoping someone has seen this exception before and can help me.