Bug 1014496 - RTGov breaks cluster invocation in SY
Summary: RTGov breaks cluster invocation in SY
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: RT Governance, SwitchYard
Version: 6.0.0 GA
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER7
: 6.0.0
Assignee: Gary Brown
QA Contact: Jiri Pechanec
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-02 08:48 UTC by Jiri Pechanec
Modified: 2014-07-02 09:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RTGOV-293 0 None None None 2014-08-27 15:23:09 UTC

Description Jiri Pechanec 2013-10-02 08:48:33 UTC
Try following deployment
1 RTGov server
3 SY servers with rtgov client configured to use the server

Use demos/cluster qs. When the dealer invokes remote credit service then on the remote node there is an exception thrown 

10:09:33,717 INFO  [org.jboss.as.server] (management-handler-thread - 1) JBAS018559: Deployed "switchyard-quickstart-demo-cluster-credit.jar" (runtime-name : "switchyard-quickstart-demo-cluster-credit.jar")
10:12:35,325 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/switchyard-remote].[SwitchYardRemotingServlet]] (http-/127.0.0.1:10080-1) JBWEB000236: Servlet.service() for servlet SwitchYardRemotingServlet threw exception: org.codehaus.jackson.map.JsonMappingException: Invalid type id 'org.overlord.rtgov.activity.model.Context$Type' (for id type 'Id.class'): no such class found (through reference chain: org.switchyard.serial.graph.Graph["references"])
        at org.codehaus.jackson.map.JsonMappingException.wrapWithPath(JsonMappingException.java:218) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.JsonMappingException.wrapWithPath(JsonMappingException.java:183) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.deser.BeanDeserializer.wrapAndThrow(BeanDeserializer.java:1472) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:699) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:580) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2732) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1909) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.switchyard.serial.jackson.format.JSONJacksonSerializer.deserialize(JSONJacksonSerializer.java:82) [switchyard-serial-jackson-1.1.0.M3-redhat-2.jar:1.1.0.M3-redhat-2]
        at org.switchyard.serial.graph.GraphSerializer.deserialize(GraphSerializer.java:60) [switchyard-serial-1.1.0.M3-redhat-2.jar:1.1.0.M3-redhat-2]
        at org.switchyard.component.sca.SwitchYardRemotingServlet.doPost(SwitchYardRemotingServlet.java:67) [switchyard-component-sca-1.1.0.M3-redhat-2.jar:1.1.0.M3-redhat-2]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
        at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.event(JBossWebContext.java:91)
        at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.invoke(JBossWebContext.java:72)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
        at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
Caused by: java.lang.IllegalArgumentException: Invalid type id 'org.overlord.rtgov.activity.model.Context$Type' (for id type 'Id.class'): no such class found
        at org.codehaus.jackson.map.jsontype.impl.ClassNameIdResolver.typeFromId(ClassNameIdResolver.java:57) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.jsontype.impl.TypeDeserializerBase._findDeserializer(TypeDeserializerBase.java:113) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.jsontype.impl.AsArrayTypeDeserializer._deserialize(AsArrayTypeDeserializer.java:87) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.jsontype.impl.AsArrayTypeDeserializer.deserializeTypedFromAny(AsArrayTypeDeserializer.java:69) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.deser.std.UntypedObjectDeserializer.deserializeWithType(UntypedObjectDeserializer.java:106) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.deser.std.MapDeserializer._readAndBind(MapDeserializer.java:321) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.deser.std.MapDeserializer.deserialize(MapDeserializer.java:249) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.deser.std.MapDeserializer.deserialize(MapDeserializer.java:33) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.jsontype.impl.AsArrayTypeDeserializer._deserialize(AsArrayTypeDeserializer.java:88) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.jsontype.impl.AsArrayTypeDeserializer.deserializeTypedFromObject(AsArrayTypeDeserializer.java:55) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.deser.std.MapDeserializer.deserializeWithType(MapDeserializer.java:273) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:297) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.deser.SettableBeanProperty$MethodProperty.deserializeAndSet(SettableBeanProperty.java:414) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:697) [jackson-mapper-asl-1.9.9-redhat-2.jar:1.9.9-redhat-2]
        ... 22 more

Comment 1 Gary Brown 2013-10-10 15:46:09 UTC
Hi Keith

Need some switchyard support :)

I believe this is occurring because I store the 'request' activity event in the exchange, so that when the 'response' activity is being processed, it can retrieve the 'request' activity event to initialize the service type - as this is not available when the request is initially being processed.

Is this assumption correct? i.e. that the request activity event is being passed with the exchange between switchyard environments - so the activity event is being serialized as json, but upon deserialization the classes are no longer available?

If so then need a way to postpone deserialization until value is actually required, which in this case will only be within the rtgov event listener.

Comment 2 Keith Babo 2013-10-10 18:31:47 UTC
It is definitely the case that context properties are serialized for cluster invocations unless they are marked with the transient label.  If you just care about keeping the property on the request side of the invocation, then mark it as transient and it will still be there when the invocation returns.  IOW, it stays in the in-memory version of the exchange but it is not propagated to the other instance.

Let me know if that doesn't help.

Comment 3 Gary Brown 2013-10-11 12:54:26 UTC
Was also able reproduce using the remote-invoker quickstart in swyd 1.1.M4.

However when testing fix in swyd 1.1.M4, got the following exception in the client:

[INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ switchyard-quickstart-demo-cluster-client ---
Oops ... something bad happened.  org.switchyard.HandlerException: org.switchyard.SwitchYardException: SWITCHYARD010813: Cannot convert from 'org.switchyard.quickstarts.demo.cluster.Offer' to 'org.switchyard.quickstarts.demo.cluster.Application'.  No registered Transformer available for transforming from 'java:org.switchyard.quickstarts.demo.cluster.Offer' to 'java:org.switchyard.quickstarts.demo.cluster.Application'.  A Transformer must be registered.

Comment 4 Jiri Pechanec 2013-12-16 08:17:58 UTC
Verified in ER7 with remote-invoker

Comment 5 JBoss JIRA Server 2014-07-02 09:18:39 UTC
Gary Brown <gary> updated the status of jira RTGOV-293 to Closed


Note You need to log in before you can comment on or make changes to this bug.