[mule-user] [Mule 2.1.1] Problem starting webservice, failed to invoke lifecycle phase

7 views
Skip to first unread message

Luc De pauw

unread,
Feb 8, 2011, 3:08:44 AM2/8/11
to us...@mule.codehaus.org
Hi,

I'm testing a very basic webservice with the cxf connector in Mule V 2.1.1.

import javax.jws.WebService;

@WebService
public interface HelloServiceMule {
String sayHi(String text);
}

import javax.jws.WebService;

@WebService(endpointInterface = "be.gfdi.intg.server.helloworldservice.HelloServiceMule", serviceName = "HelloServiceMule")
public class HelloServiceMuleImpl implements HelloServiceMule {

public String sayHi(String text) {
return "Hello " + text;
}
}

<spring:bean name="helloServiceMule"
class="xxxx.server.helloworldservice.HelloServiceMuleImpl" scope="singleton">
</spring:bean>

<service name="HelloServiceMule">
<inbound>
<cxf:inbound-endpoint address="http://localhost:8088/services/HelloServiceMule" />
</inbound>
<component>
<spring-object bean="helloServiceMule"/>
</component>
</service>

Everythings seems to start fine until I get this error:

********************************************************************************
Message : Failed to invoke lifecycle phase "start" on object: _cxfServiceComponent{[http://helloworldservice.server.xxxx./]}HelloServiceMule593371998
Type : org.mule.api.lifecycle.LifecycleException
Code : MULE_ERROR-70228
JavaDoc : [http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/lifecycle/LifecycleException.html]
********************************************************************************
Exception stack is:
1. Cannot start an unitialised service. (java.lang.IllegalStateException)
org.mule.service.AbstractService:274 ([http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html])
2. Failed to invoke lifecycle phase "start" on object: _cxfServiceComponent{[http://helloworldservice.server.intg.gfdi.be/]}HelloServiceMule593371998 (org.mule.api.lifecycle.LifecycleException)
org.mule.lifecycle.DefaultLifecyclePhase:278 ([http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/lifecycle/LifecycleException.html])
********************************************************************************
Root Exception stack trace:
java.lang.IllegalStateException: Cannot start an unitialised service.
at org.mule.service.AbstractService.start(AbstractService.java:274)
at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.mule.lifecycle.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:274)
at org.mule.lifecycle.GenericLifecycleManager.applyCompletedPhases(GenericLifecycleManager.java:157)
at org.mule.registry.TransientRegistry.registerObject(TransientRegistry.java:221)
at org.mule.registry.AbstractRegistryBroker.registerObject(AbstractRegistryBroker.java:130)
at org.mule.registry.MuleRegistryHelper.registerService(MuleRegistryHelper.java:505)
at org.mule.transport.cxf.CxfConnector.onNotification(CxfConnector.java:340)
at org.mule.context.notification.Sender.dispatch(Sender.java:40)
at org.mule.context.notification.Policy.dispatch(Policy.java:127)
at org.mule.context.notification.ServerNotificationManager.notifyListeners(ServerNotificationManager.java:211)
at org.mule.context.notification.ServerNotificationManager.fireNotification(ServerNotificationManager.java:164)
at org.mule.DefaultMuleContext.fireNotification(DefaultMuleContext.java:351)
at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:166)
at org.mule.config.builders.MuleXmlBuilderContextListener.initialize(MuleXmlBuilderContextListener.java:81)
at xxxx.IntgMuleXmlBuilderContextListener.initialize(IntgMuleXmlBuilderContextListener.java:68)
at org.mule.config.builders.MuleXmlBuilderContextListener.contextInitialized(MuleXmlBuilderContextListener.java:56)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

---end of stacktrace

Some loggging:

08:28:11,789 INFO CxfConnector:403 - Starting: CxfConnector{this=26022602, started=false, initialised=true, name='connector.cxf.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[cxf, cxf:http, cxf:https, cxf:jms, cxf:vm, cxf:servlet, cxf:jetty|http://forums.mulesoft.org/], serviceOverrides=null}
08:28:11,789 INFO CxfConnector:431 - Started: CxfConnector{this=26022602, started=true, initialised=true, name='connector.cxf.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[cxf, cxf:http, cxf:https, cxf:jms, cxf:vm, cxf:servlet, cxf:jetty|http://forums.mulesoft.org/], serviceOverrides=null}

08:28:13,118 INFO CxfConnector:1062 - Registering listener: HelloServiceMule on endpointUri: [http://localhost:8088/services/HelloServiceMule]
08-Feb-2011 08:28:13 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
INFO: Creating Service {[http://helloworldservice.server.intg.gfdi.be/]}HelloServiceMule from class be.gfdi.intg.server.helloworldservice.HelloServiceMule
08-Feb-2011 08:28:13 org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be [http://localhost:8088/services/HelloServiceMule]
08-Feb-2011 08:28:13 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
INFO: Creating Service {[http://helloworldservice.server.intg.gfdi.be/]}HelloServiceMule from class be.gfdi.intg.server.helloworldservice.HelloServiceMule
08-Feb-2011 08:28:13 org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be [http://localhost:8088/services/HelloServiceMule]
08-Feb-2011 08:28:13 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
INFO: Creating Service {[http://helloworldservice.server.intg.gfdi.be/]}HelloServiceMule from class be.gfdi.intg.server.helloworldservice.HelloServiceMule
08-Feb-2011 08:28:13 org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be [http://localhost:8088/services/HelloServiceMule]

08:28:15,383 INFO JmxAgent:428 - Attempting to register service with name: Mule.b433ae68-3354-11e0-91b1-fb3bc8f8291a:type=org.mule.Endpoint,service="HelloServiceMule",name="endpoint.http.localhost.8088.services.HelloServiceMule"
08:28:15,383 INFO JmxAgent:440 - Registered Endpoint Service with name: Mule.b433ae68-3354-11e0-91b1-fb3bc8f8291a:type=org.mule.Endpoint,service="HelloServiceMule",name="endpoint.http.localhost.8088.services.HelloServiceMule"

In my mule jmx console I can start/stop the service without any error but nothing seems to be working.
No listener on port 8088 for example.

Any idea what can be the cause of this ?

Regards

Luc

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Luc De pauw

unread,
Feb 9, 2011, 10:26:40 AM2/9/11
to us...@mule.codehaus.org
I've put some breakpoints on CxfConnector.registerReceiverWithMuleMessageReceiver, CxfConnector.onNotification and AbstractService.initialise. but I can not see any point where the _cxfServiceComponent gets initialised ?

Any help ?

Luc De pauw

unread,
Feb 16, 2011, 10:15:50 AM2/16/11
to us...@mule.codehaus.org
I took the 2.1.4-snapshot version of the cxf connector and voila my problem is gone.
I did workaround some maven issues with the 2.1.4 snapshot but inital testing seems OK.
Reply all
Reply to author
Forward
0 new messages