Hi Imesh, Thanks for the link to the source code for 4.0.0-incubating-rc3. I've confirmed the Stratos binaries we're building for 4.0.0-incubating-rc3 has the same source. After much further debugging, I found that our topology listener was packaged with 4.0.0-SNAPSHOT from ~/.m2/ which was produced from compiling Stratos master branch instead of downloading 4.0.0-SNAPSHOT from WSO2 repository.
After I removed the version under ~/.m2 and repackaged the topology listener, the problem went away. I noticed though that on the WSO2 repository where we download the artifacts from, there is only one version of Apache Stratos, which is 4.0.0-SNAPSHOT. I believe this is the code built from the release branch and not master branch. Can we have different versions for different branches of Apache Stratos? For this case, the name 4.0.0-SNAPSHOT makes you think it's an artifact produced from the master branch and not from the release branch. Keeping the artifact ID consistent with ones used in the branch would help avoid any confusion. Just a suggestion. Thanks, -Jeffrey On 5/29/14 11:46 PM, "Imesh Gunaratne (JIRA)" <j...@apache.org> wrote: > > [ >https://issues.apache.org/jira/browse/STRATOS-657?page=com.atlassian.jira. >plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14013361#co >mment-14013361 ] > >Imesh Gunaratne commented on STRATOS-657: >----------------------------------------- > >Hi Jeffrey, > >I'm sorry to hear that. Will you be able to check the following classes >in this code base for portMap member? > >org.apache.stratos.messaging.domain.topology.Member >org.apache.stratos.messaging.domain.topology.Service > >I checked those in 4.0.0-incubating-rc3 tag and they are using the >protocol as the key: >Map<String, Port> portMap; > >https://git-wip-us.apache.org/repos/asf?p=incubator-stratos.git;a=tree;f=c >omponents/org.apache.stratos.messaging/src/main/java/org/apache/stratos/me >ssaging/domain/topology;h=ea9394aaa7f4fd91ae1d418afc386211ca341564;hb=af4f >2c4f29d0735424dcc2804cb46c3b8b046950 > >Thanks >Imesh > >> Topology update events failed to be de-serialized due to incorrect port >>mapping format >> >>------------------------------------------------------------------------- >>------------- >> >> Key: STRATOS-657 >> URL: https://issues.apache.org/jira/browse/STRATOS-657 >> Project: Stratos >> Issue Type: Bug >> Components: Cloud Controller, Stratos Manager >> Affects Versions: 4.0.0, 4.0.0 RC1 >> Environment: Apache Stratos 4.0.0 RC3, openstack havana >> Reporter: Jeffrey Nguyen >> >> We have a topology listener component that listens to topology update >>events in activemq. We're seeing exceptions as one shown below when >>events such as MemberActivatedEvent or CompleteTopologyEvent >> In the exception stacktrace below, >>"portMap":{"http":{"protocol":"http","value":22,"proxy":8280}},"memberIp" >>:"1.2.3.4"} should be something like >>"portMap":{"80":{"protocol":"http","value":22,"proxy":8280}},"memberIp":" >>1.2.3.4"} >> 2014-05-28 15:43:45 | DEBUG | TopologyEventsListener:63: Received >>topology message of type: >>org.apache.stratos.messaging.event.topology.MemberActivatedEvent,payload= >>{"serviceName":"cisco-sample-vm","clusterId":"sample-vm.sample-v","networ >>kPartitionId":"N1","partitionId":"RegionOne","memberId":"sample-vm.sample >>-v1e5e272d-1bbe-4a7b-9c4e-92890363abea","portMap":{"http":{"protocol":"ht >>tp","value":22,"proxy":8280}},"memberIp":"1.2.3.4"} >> Exception in thread "Thread-0" com.google.gson.JsonSyntaxException: >>java.lang.NumberFormatException: For input string: "http" >> at >>com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:241) >> at >>com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:231) >> at >>com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdap >>terRuntimeTypeWrapper.java:40) >> at >>com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeA >>dapterFactory.java:186) >> at >>com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeA >>dapterFactory.java:145) >> at >>com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(Reflect >>iveTypeAdapterFactory.java:93) >> at >>com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(R >>eflectiveTypeAdapterFactory.java:172) >> at com.google.gson.Gson.fromJson(Gson.java:803) >> at com.google.gson.Gson.fromJson(Gson.java:768) >> at com.google.gson.Gson.fromJson(Gson.java:717) >> at com.google.gson.Gson.fromJson(Gson.java:689) >> at >>org.apache.stratos.messaging.message.JsonMessage.<init>(JsonMessage.java: >>38) >> at org.apache.stratos.messaging.util.Util.jsonToObject(Util.java:105) >> at >>com.cisco.apache.stratos.topologylistener.TopologyEventsListener.run(Topo >>logyEventsListener.java:100) >> at java.lang.Thread.run(Thread.java:745) >> Caused by: java.lang.NumberFormatException: For input string: "http" >> at >>sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1241) >> at java.lang.Double.parseDouble(Double.java:540) >> at com.google.gson.stream.JsonReader.nextInt(JsonReader.java:1178) >> at >>com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:239) >> ... 14 more > > > >-- >This message was sent by Atlassian JIRA >(v6.2#6252)