Uploaded image for project: 'ZZZ-WSO2 ESB'
  1. ZZZ-WSO2 ESB
  2. ESBJAVA-1651

Server restart failed and server hangs when synapse configuration has a Spring mediator config which refer a registry resource which is not exist

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Highest
    • Resolution: Fixed
    • Affects Version/s: 4.5.1
    • Fix Version/s: 4.6.0
    • Component/s: None
    • Labels:
      None
    • Severity:
      Major
    • Estimated Complexity:
      Moderate
    • Test cases added:
      Yes

      Description

      if conf:/spring/springbean.xml is not exist, server restart failed and serve hangs. Server does not response any more

      1). add springbean.xml to regisrty(refer attached springbean.xml )
      2). copy above synapse configuration and update.
      3). remove springbean.xml from registry
      4). then restart server to reproduced the error

      <definitions xmlns="http://ws.apache.org/ns/synapse">
      <registry provider="org.wso2.carbon.mediation.registry.WSO2Registry">
      <parameter name="cachableDuration">15000</parameter>
      </registry>
      <sequence name="fault">
      <log level="full">
      <property name="MESSAGE" value="Executing default "fault" sequence"/>
      <property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
      <property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
      </log>
      <drop/>
      </sequence>
      <sequence name="main">
      <in>
      <spring:spring xmlns:spring="http://ws.apache.org/ns/synapse" bean="springtest" key="conf:/spring/springbean.xml"/>
      <send/>
      </in>
      <out>
      <log level="full"/>
      <send/>
      </out>
      </sequence>
      </definitions>

      Server log:
      INFO - Axis2SynapseController Deploying EventSources...
      [2012-10-11 14:52:26,366] ERROR - SpringMediator Cannot look up Spring configuration conf:/spring/springbean.xml
      [2012-10-11 14:52:26,367] FATAL - ServiceBusInitializer Couldn't initialize the ESB...
      org.apache.synapse.SynapseException: Cannot look up Spring configuration conf:/spring/springbean.xml
      at org.apache.synapse.mediators.spring.SpringMediator.buildAppContext(SpringMediator.java:125)
      at org.apache.synapse.mediators.spring.SpringMediator.init(SpringMediator.java:164)
      at org.apache.synapse.mediators.AbstractListMediator.init(AbstractListMediator.java:106)
      at org.apache.synapse.mediators.AbstractListMediator.init(AbstractListMediator.java:106)
      at org.apache.synapse.mediators.base.SequenceMediator.init(SequenceMediator.java:189)
      at org.apache.synapse.config.SynapseConfiguration.init(SynapseConfiguration.java:1374)
      at org.apache.synapse.Axis2SynapseController.createSynapseEnvironment(Axis2SynapseController.java:403)
      at org.apache.synapse.ServerManager.start(ServerManager.java:181)
      at org.wso2.carbon.mediation.initializer.ServiceBusInitializer.initESB(ServiceBusInitializer.java:412)
      at org.wso2.carbon.mediation.initializer.ServiceBusInitializer.activate(ServiceBusInitializer.java:172)
      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:597)
      at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:252)
      at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
      at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:346)
      at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:588)
      at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:196)
      at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:328)
      at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:221)
      at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
      at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
      at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
      at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
      at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
      at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
      at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
      at org.wso2.carbon.event.core.internal.builder.EventBrokerHandler.startEventBroker(EventBrokerHandler.java:57)
      at org.wso2.carbon.event.core.internal.builder.EventBrokerBuilderDS.activate(EventBrokerBuilderDS.java:72)
      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:597)
      at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:252)
      at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
      at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:346)
      at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:588)
      at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:196)
      at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:328)
      at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:221)
      at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
      at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
      at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
      at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
      at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
      at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
      at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
      at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:513)
      at org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServerManager.java:290)
      at org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2ConfigItemListener.java:118)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847)
      at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
      at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
      [2012-10-11 14:52:26,373] INFO - RuleEngineConfigDS Successfully registered the Rule Config service

        Attachments

          Activity

            People

            • Assignee:
              kasun@wso2.com Kasun Indrasiri
              Reporter:
              nuwanw@wso2.com Nuwan Wimalasekara
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: