Reputation: 4636
I have a legacy application with JAX-RPC webservices that is deployed on Weblogic. I'm trying to create a test harness around it using embedded glassfish and it's ScatteredEAR.
The app seems to deploy fine and the webservice endpoints are available. However, when I make a request I get this exception.
SEVERE: ws.error_next_pipe
java.lang.ClassCastException: org.glassfish.webservices.monitoring.JAXRPCEndpointImpl cannot be cast to org.glassfish.webservices.monitoring.JAXWSEndpointImpl
at org.glassfish.webservices.MonitoringPipe.process(MonitoringPipe.java:123)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:119)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:1136)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:1050)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:1019)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:877)
at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:136)
at com.sun.enterprise.security.webservices.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:210)
at com.sun.enterprise.security.webservices.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:142)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:119)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:1136)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:1050)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:1019)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:877)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:420)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:687)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:266)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:169)
at org.glassfish.webservices.JAXWSServlet.doPost(JAXWSServlet.java:169)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:744)
I'm not sure why JAXRPCEndpoint is being cast to JAXWSEndpoint. Can anyone shed some light on what's possibly happening?
I also looked at the source of MonitoringPipe and it simply casts everything to JAXWSEndpoint. Any chance JAXRPC is not supported on Glassfish?
Also, any chance to disable the MonitoringPipe at all? I tried disabling monitoring on Glassfish but with no luck.
Any ideas appreciated.
Upvotes: 1
Views: 1081
Reputation: 13857
I'm not sure why JAXRPCEndpoint is being cast to JAXWSEndpoint. Can anyone shed some light on what's possibly happening?
I guess this is happening because the MonitoringPipe
doesn't expect any JAXRPCEndpoint
as an endpoint in this situation.
I also looked at the source of MonitoringPipe and it simply casts everything to JAXWSEndpoint. Any chance JAXRPC is not supported on Glassfish?
JAX-RPC 1.1 is supported by GlassFish v3. From the Oracle docs:
Java API for XML-Based Web Services (JAX-WS) version 2.2 is supported. Java API for XML-Based Remote Procedure Calls (JAX-RPC) version 1.1 is supported for backward compatibility.
The docs also contain some more details. The same should be valid for GlassFish 4.
Also, any chance to disable the MonitoringPipe at all? I tried disabling monitoring on Glassfish but with no luck.
You can disable monitoring of different parts of GlassFish via the Admin GUI in the Monitoring
section of the server-config
. I guess you tried that already.
You can also add the JVM property -Dcom.sun.xml.ws.monitoring.endpoint=false
and see if that helps.
Any ideas appreciated.
From the question JAX-WS vs. JAX-RPC:
JAX-RPC is a dead standard that has been pruned in Java EE 6 (and might thus be removed from future versions). Reason for Pruning: JAX-RPC was an early attempt at modeling SOAP web services as RPC calls. Web services have since grown out of being an RPC model. The much more robust, feature-rich and popular JAX-WS API effectively supercedes JAX-RPC.
Without seeing any code I can only guess that you are using a too old technique to implement the webservice which is supported by the Weblogic server you used before but not by the GlassFish server you are using now. I guess you use v3 or higher, you may try the web application on GlassFish v2.
Upvotes: 1