synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "P Vikas Roonwal (JIRA)" <j...@apache.org>
Subject [jira] Created: (SYNAPSE-6) Problem while making consecutive hits!
Date Thu, 05 Jan 2006 05:39:01 GMT
Problem while making consecutive hits!
--------------------------------------

         Key: SYNAPSE-6
         URL: http://issues.apache.org/jira/browse/SYNAPSE-6
     Project: Synapse
        Type: Bug
  Components: Core  
 Environment: Windows Xp, JDK1.4.2_08, Axis2.094 snapshot
    Reporter: P Vikas Roonwal
 Assigned to: Saminda Wishwajith Abeyruwan 


When the first request hits Synapse - things go fine, but on the second hit, the following
exception is shown:

org.apache.axis2.AxisFault: org.apache.synapse.SynapseException: org.apache.axis2.AxisFault:
Two services can not have same name, a service with ANONYMOUS_SERVICE already exists in the
system
        at org.apache.synapse.axis2.Axis2Sender.sendOn(Axis2Sender.java:134)
        at org.apache.synapse.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:72)
        at org.apache.synapse.processors.builtin.SendProcessor.process(SendProcessor.java:40)
        at org.apache.synapse.processors.ListProcessor.process(ListProcessor.java:53)
        at org.apache.synapse.processors.ListProcessor.process(ListProcessor.java:53)
        at org.apache.synapse.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:57)
        at org.apache.synapse.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:51)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:322)
        at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:277)
        at org.apache.axis2.transport.http.HTTPWorker.processRequest(HTTPWorker.java:182)
        at org.apache.axis2.transport.http.server.SimpleConnectionThread.run(SimpleConnectionThread.java:95)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668)
        at java.lang.Thread.run(Thread.java:534)
Caused by: org.apache.axis2.AxisFault: Two services can not have same name, a service with
ANONYMOUS_SERVICE already exists in the system
        at org.apache.axis2.engine.AxisConfiguration.addServiceGroup(AxisConfiguration.java:200)
        at org.apache.axis2.engine.AxisConfiguration.addService(AxisConfiguration.java:186)
        at org.apache.synapse.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:80)
        at org.apache.synapse.axis2.Axis2Sender.sendOn(Axis2Sender.java:63)
        ... 13 more
; nested exception is: 
        java.lang.Exception: org.apache.synapse.SynapseException: org.apache.axis2.AxisFault:
Two services can not have same name, a service with ANONYMOUS_SERVICE already exists in the
system
        at org.apache.synapse.axis2.Axis2Sender.sendOn(Axis2Sender.java:134)
        at org.apache.synapse.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:72)
        at org.apache.synapse.processors.builtin.SendProcessor.process(SendProcessor.java:40)
        at org.apache.synapse.processors.ListProcessor.process(ListProcessor.java:53)
        at org.apache.synapse.processors.ListProcessor.process(ListProcessor.java:53)
        at org.apache.synapse.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:57)
        at org.apache.synapse.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:51)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:322)
        at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:277)
        at org.apache.axis2.transport.http.HTTPWorker.processRequest(HTTPWorker.java:182)
        at org.apache.axis2.transport.http.server.SimpleConnectionThread.run(SimpleConnectionThread.java:95)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668)
        at java.lang.Thread.run(Thread.java:534)
Caused by: org.apache.axis2.AxisFault: Two services can not have same name, a service with
ANONYMOUS_SERVICE already exists in the system
        at org.apache.axis2.engine.AxisConfiguration.addServiceGroup(AxisConfiguration.java:200)
        at org.apache.axis2.engine.AxisConfiguration.addService(AxisConfiguration.java:186)
        at org.apache.synapse.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:80)
        at org.apache.synapse.axis2.Axis2Sender.sendOn(Axis2Sender.java:63)
        ... 13 more

        at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:259)
        at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:397)
        at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:326)
        at samples.userguide.StockQuoteClient.main(StockQuoteClient.java:88)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:86)
Caused by: java.lang.Exception: org.apache.synapse.SynapseException: org.apache.axis2.AxisFault:
Two services can not have same name, a service with ANONYMOUS_SERVICE already exists in the
system
        at org.apache.synapse.axis2.Axis2Sender.sendOn(Axis2Sender.java:134)
        at org.apache.synapse.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:72)
        at org.apache.synapse.processors.builtin.SendProcessor.process(SendProcessor.java:40)
        at org.apache.synapse.processors.ListProcessor.process(ListProcessor.java:53)
        at org.apache.synapse.processors.ListProcessor.process(ListProcessor.java:53)
        at org.apache.synapse.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:57)
        at org.apache.synapse.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:51)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:322)
        at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:277)
        at org.apache.axis2.transport.http.HTTPWorker.processRequest(HTTPWorker.java:182)
        at org.apache.axis2.transport.http.server.SimpleConnectionThread.run(SimpleConnectionThread.java:95)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668)
        at java.lang.Thread.run(Thread.java:534)
Caused by: org.apache.axis2.AxisFault: Two services can not have same name, a service with
ANONYMOUS_SERVICE already exists in the system
        at org.apache.axis2.engine.AxisConfiguration.addServiceGroup(AxisConfiguration.java:200)
        at org.apache.axis2.engine.AxisConfiguration.addService(AxisConfiguration.java:186)
        at org.apache.synapse.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:80)
        at org.apache.synapse.axis2.Axis2Sender.sendOn(Axis2Sender.java:63)
        ... 13 more

        at org.apache.axis2.soap.impl.llom.SOAPFaultImpl.getException(SOAPFaultImpl.java:149)
        at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:253)
        ... 8 more

The problem is in the Axis2FlexibleMEPClient's "send(MessageContext smc)" method.
Line 80 - ac.addService(axisAnonymousService);

Shouldn't we remove the service with the same name before introducing the new service.
I suggest a simple hack, for the time being.

        if(ac.getService(axisAnonymousService.getName())!=null)
                  ac.removeService(axisAnonymousService.getName());
        
        ac.addService(axisAnonymousService);

Some other better way is also welcome!


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Mime
View raw message