Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
jpf15310
Contributor
Contributor

Web Service works in ESB Studio but not in OSGi

Service works well within Talend ESB studio 5.0.1 but not when deployed to OSGi container. I get the following error:
09:36:55,383 | INFO | qtp913802640-105 | ernal.GenericServiceProviderImpl 69 | - - | Invoke operation '{ http://www.rst1.com/service/}createProduct'
09:36:55,386 | WARN | qtp913802640-105 | ache.cxf.common.logging.LogUtils 372 | - - | Application { http://www.rst1.com/service/}ProductMediationWS#{http://www.rst1.com/service/}createProduct has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Talend job execution error
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:155)
at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:86)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:121)
at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:61)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:206)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:193)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:126)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:517)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:937)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:116)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:72)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
at org.eclipse.jetty.server.Server.handle(Server.java:346)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1065)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: Talend job execution error
at rst_mediation_2.productmediationws_createproduct_0_1.ProductMediationWS_createProduct$ESBProviderCallbackTalendJobWrapper_tESBProviderRequest_1.sendFault(ProductMediationWS_createProduct.java:644)
at rst_mediation_2.productmediationws_createproduct_0_1.ProductMediationWS_createProduct.tESBProviderRequest_1_LoopProcess(ProductMediationWS_createProduct.java:4087)
at rst_mediation_2.productmediationws_createproduct_0_1.ProductMediationWS_createProduct.runJobInTOS(ProductMediationWS_createProduct.java:4280)
at org.talend.esb.job.controller.internal.OperationTask.run(OperationTask.java:47)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
... 1 more
Caused by: java.lang.NoClassDefFoundError: javax/wsdl/WSDLException
at com.salesforce.soap.partner.SforceServiceStub.populateAxisService(SforceServiceStub.java:37)
at com.salesforce.soap.partner.SforceServiceStub.<init>(SforceServiceStub.java:863)
at com.salesforce.soap.partner.SforceServiceStub.<init>(SforceServiceStub.java:854)
at com.salesforce.soap.partner.SforceServiceStub.<init>(SforceServiceStub.java:896)
at org.talend.salesforce.SforceManagementImpl.login(SforceManagementImpl.java:213)
at rst_mediation_2.productmediationws_createproduct_0_1.ProductMediationWS_createProduct.tESBProviderRequest_1_LoopProcess(ProductMediationWS_createProduct.java:3307)
... 5 more
Caused by: java.lang.ClassNotFoundException: javax.wsdl.WSDLException
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 11 more
I checked my classpath and everything seems all right.
Labels (5)
4 Replies
jpf15310
Contributor
Contributor
Author

Hi,
My service is making a call to Salesforce and when I compared the working WSDL running in Talend ESB Studio:
<?xml version='1.0' encoding='UTF-8'?><wsdl:definitions name="ProductMediationWS" targetNamespace="http://www.rst1.com/service/" xmlns:ens="urn:sobject.enterprise.soap.sforce.com" xmlns:glb="http://www.rst1.com/Global" xmlns 0683p000009MAB6.pngrd="http://www.rst1.com/Product" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.rst1.com/service/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

with the one that generate the WSDL exception in the OSGi:
<?xml version='1.0' encoding='UTF-8'?><wsdl:definitions name="ProductMediationWS" targetNamespace="http://www.rst1.com/service/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.rst1.com/service/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
I noticed when it is deployed to the OSGi container it is missing the following reference: xmlns:ens="urn:sobject.enterprise.soap.sforce.com"
Which translate into the following error (cannot find file in classpath):
Caused by: java.lang.NoClassDefFoundError: javax/wsdl/WSDLException
at com.salesforce.soap.partner.SforceServiceStub.populateAxisService(SforceServiceStub.java:37)
at com.salesforce.soap.partner.SforceServiceStub.<init>(SforceServiceStub.java:863)
at com.salesforce.soap.partner.SforceServiceStub.<init>(SforceServiceStub.java:854)
at com.salesforce.soap.partner.SforceServiceStub.<init>(SforceServiceStub.java:896)
at org.talend.salesforce.SforceManagementImpl.login(SforceManagementImpl.java:213)
at rst_mediation_2.productmediationws_createproduct_0_1.ProductMediationWS_createProduct.tESBProviderRequest_1_LoopProcess(ProductMediationWS_createProduct.java:3307)
... 5 more
OK, but when I drilled down within my KAR file in the container deploy folder, I could see the Salesforce jar (salesforceCRMManagement.jar) within the lib folder of my service JAR (ProductMediationWS_createProduct.jar).
What's going on?
Cheers, JP
Anonymous
Not applicable

Looks to me as if the the WSDL4J library was not embedded in the job bundle, which causes the NoClassDefFoundError. To check whether wsdl included in the bundle is broken we need the complete wsdl the incriminated namespace might well have moved down in the xml document. I think this is worth filing an issue. It should include your studio project, the stacktrace and optionally the kar file.
Cheers,
Zsolt
Anonymous
Not applicable

I have similar problem. Service works well within Talend ESB studio 5.1.0 but not when deployed to OSGi container.
SayHelloConsumer created and configured as in Talend ESB Getting Started user guide. Runs pefectly in Talend Studio, but does not run in OSGi container.
Environment: Windows 7, TOS_ESB-V5.1.0, generated language: java
I get the following errors:
SayHelloConsumer Job (fault message received for each name, 3 times total):
{http://schemas.xmlsoap.org/soap/envelope/}Server|org.dom4j.DocumentException: Error on line 1 of document : The prefix "tns" for element "tns 0683p000009M9p6.pngayHelloServiceOperationRequest" is not bound. Nested exception: The prefix "tns" for element "tns 0683p000009M9p6.pngayHelloServiceOperationRequest" is not bound.||||
karaf error:
karaf@trun> java.lang.IllegalArgumentException: Unknown configuration option indent-number
at net.sf.saxon.Configuration.setConfigurationProperty(Configuration.java:3815)
at net.sf.saxon.TransformerFactoryImpl.setAttribute(TransformerFactoryImpl.java:268)
at org.apache.cxf.helpers.XMLUtils.newTransformer(XMLUtils.java:123)
at org.apache.cxf.wsdl11.SchemaSerializer.writeXml(SchemaSerializer.java:57)
at org.apache.cxf.wsdl11.SchemaSerializer.marshall(SchemaSerializer.java:50)
at com.ibm.wsdl.xml.WSDLWriterImpl.printExtensibilityElements(Unknown Source)
at com.ibm.wsdl.xml.WSDLWriterImpl.printTypes(Unknown Source)
at com.ibm.wsdl.xml.WSDLWriterImpl.printDefinition(Unknown Source)
at com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(Unknown Source)
at org.apache.cxf.frontend.WSDLGetUtils.getDocument(WSDLGetUtils.java:222)
at org.apache.cxf.frontend.WSDLGetInterceptor.getDocument(WSDLGetInterceptor.java:158)
at org.apache.cxf.frontend.WSDLGetInterceptor.handleMessage(WSDLGetInterceptor.java:110)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:122)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:211)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:193)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:129)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:187)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:166)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:547)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:480)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:941)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:72)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
at org.eclipse.jetty.server.Server.handle(Server.java:345)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:919)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:582)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
Anonymous
Not applicable

This sounds a bit like the saxon libarary is not compatible with the CXF version. Can you provide us with a small test project that reproduces the behaviour?