[JBossWS] - Re: ClassCastException in HandlerResolverImpl.addHandler
by rishabh2u
I am getting this problem as well when implementing jaxws on jboss421 and 423.
As per the java spec the handler class should either implement the javax.xml.ws.handler.LogicalHandler OR javax.xml.ws.handler.SOAPHandler.
I have a handler class that does this.
|
| package handlertest.server;
|
| import java.util.Set;
|
| import javax.xml.namespace.QName;
| import javax.xml.ws.handler.MessageContext;
| import javax.xml.ws.handler.soap.SOAPHandler;
| import javax.xml.ws.handler.soap.SOAPMessageContext;
|
| public class ServerSOAPHandler implements SOAPHandler<SOAPMessageContext> {
| private final String HANDLERNAME = "ServerSOAPHandler";
|
| public ServerSOAPHandler() {
| super();
| System.out.println(HANDLERNAME + " ServerSOAPHandler():");
| }
|
| public Set<QName> getHeaders() {
| System.out.println(HANDLERNAME + " getHeaders():");
| return null;
| }
|
| public boolean handleFault(SOAPMessageContext arg0) {
| System.out.println(HANDLERNAME + " handleFault():");
| return false;
| }
|
| public boolean handleMessage(SOAPMessageContext arg0) {
| System.out.println(HANDLERNAME + " handleMessage():");
| return false;
| }
|
| public void close(MessageContext arg0) {
| System.out.println(HANDLERNAME + " close():");
| }
| }
|
I get the same exception when this handler is loaded. This is the stacktrace.
| java.lang.ClassCastException: handlertest.server.ServerSOAPHandler
| at org.jboss.ws.core.jaxws.handler.HandlerResolverImpl.addHandler(HandlerResolverImpl.java:148)
| at org.jboss.ws.core.jaxws.handler.HandlerResolverImpl.initHandlerChain(HandlerResolverImpl.java:134)
| at org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callRequestHandlerChain(HandlerDelegateJAXWS.java:80)
| at org.jboss.ws.core.server.AbstractServiceEndpointInvoker.callRequestHandlerChain(AbstractServiceEndpointInvok
| at org.jboss.ws.core.server.AbstractServiceEndpointInvoker.invoke(AbstractServiceEndpointInvoker.java:162)
| at org.jboss.ws.core.server.ServiceEndpoint.processRequest(ServiceEndpoint.java:212)
| at org.jboss.ws.core.server.ServiceEndpointManager.processRequest(ServiceEndpointManager.java:448)
| at org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
| at org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
|
The proposed solution of using Generic handler from Jboss works but this is not a proper solution. To be able to work with JAXws 2 spec I need to implement the javax.xml.ws.handler.LogicalHandler. Can you please suggest what can i do here ???
Also below are some links to jaxws 2 tutorials
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/co...
http://java.sun.com/mailers/techtips/enterprise/2006/TechTips_June06.html#1
http://blogs.sun.com/sdimilla/entry/implementing_handlers_using_jaxws_2
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4184718#4184718
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4184718
17 years, 6 months
[Clustering/JBoss] - Clustering Novice
by mogy
Hi all,
I have been allocated an issue to resolve on JBoss clustering. I'd like to understand what is supposed to happen before I dive into our application issues.
My testing environment.
-----------------------------
Machine (a) WinXP
Virtual Machine (b) VMWare Instance running RedHat 4 (on same machine)
I have successfully managed to get the two JBoss instances clustering after initial startup (no applications installed) and all is happy until I disable the network card in the virtual machine (trying to simulate a network outage).
When I bring it back online they fail to re-establish a cluster, with
"[FD] I was suspected by 192.168.56.130:1123; ignoring the SUSPECT message and sending back a HEARTBEAT_ACK" messages until I restart either of the JBoss instances.
If anyone could shed some light on why this happens, I'd be grateful.
thank you Mogy ...
<UDP mcast_addr="${jboss.partition.udpGroup:228.1.2.3}"
mcast_port="${jboss.hapartition.mcast_port:45566}"
tos="8"
ucast_recv_buf_size="20000000"
ucast_send_buf_size="640000"
mcast_recv_buf_size="25000000"
mcast_send_buf_size="640000"
loopback="true"
discard_incompatible_packets="true"
enable_bundling="false"
max_bundle_size="64000"
max_bundle_timeout="30"
use_incoming_packet_handler="true"
use_outgoing_packet_handler="false"
ip_ttl="${jgroups.udp.ip_ttl:2}"
down_thread="false" up_thread="false"/>
<PING timeout="2000"
down_thread="false" up_thread="false" num_initial_members="3"/>
<MERGE2 max_interval="100000"
down_thread="false" up_thread="false" min_interval="20000"/>
<FD_SOCK down_thread="false" up_thread="false"/>
<FD timeout="5000" max_tries="5" down_thread="false" up_thread="false" shun="false"/>
<VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false"/>
<pbcast.NAKACK max_xmit_size="60000"
use_mcast_xmit="false" gc_lag="0"
retransmit_timeout="300,600,1200,2400,4800"
down_thread="false" up_thread="false"
discard_delivered_msgs="true"/>
<UNICAST timeout="300,600,1200,2400,3600"
down_thread="false" up_thread="false"/>
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
down_thread="false" up_thread="false"
max_bytes="400000"/>
<pbcast.GMS print_local_addr="true" join_timeout="3000"
down_thread="false" up_thread="false"
join_retry_timeout="2000" shun="true"
view_bundling="true"/>
<FRAG2 frag_size="60000" down_thread="false" up_thread="false"/>
<pbcast.STATE_TRANSFER down_thread="false" up_thread="false" use_flush="false"/>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4184717#4184717
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4184717
17 years, 6 months