You are not logged in.

#1 2012-06-15 15:14:29

treimy
Member
8 posts

tRESTRequest Service not started after exporting and deploying

Hello,

I have problems with deploying tRESTRequest Services Job to karaf. In Open Studio it works fine, but deployed to the server the port is not opened and I cannot call it. Neither a simple example works for me.

I am using the newest version of Talend Open Studio for ESB Version 5.1.1. I have created a simple tRESTRequest -> tLogRow.

The Endpoint is: "http://localhost:6088/Test"
URI pattern is: "/{test}" .

I have created the variable in the schema editor and are putting it to the tLogRow component.

As I said, it works fine in Talend Open Studio. Deploying to Karaf does not start the service. The port is not opened. I have checked the open ports with "netstat". I do not have any problems with cCXF Components in Routes. The services there are working fine deployed on karaf.



The Log output of karaf after deploying the TestJob is:



16:10:29,627 | INFO  | container/deploy | ultOsgiApplicationContextCreator   67 | 91 - org.springframework.osgi.extender - 1.2.1 | Discovered configurations {osgibundle:/META-INF/spring/*.xml} in bundle [TestJob (masterarbeit.TestJob)]
16:10:29,635 | INFO  | ExtenderThread-7 | pport.AbstractApplicationContext  456 | 86 - org.springframework.context - 3.0.7.RELEASE | Refreshing OsgiBundleXmlApplicationContext(bundle=masterarbeit.TestJob, config=osgibundle:/META-INF/spring/*.xml): startup date [Fri Jun 15 16:10:29 CEST 2012]; root of context hierarchy
16:10:29,638 | INFO  | ExtenderThread-7 | ractOsgiBundleApplicationContext  365 | 86 - org.springframework.context - 3.0.7.RELEASE | Application Context service already unpublished
16:10:29,640 | INFO  | ExtenderThread-7 | tory.xml.XmlBeanDefinitionReader  315 | 84 - org.springframework.beans - 3.0.7.RELEASE | Loading XML bean definitions from URL [bundleentry://248.fwk28336193/META-INF/spring/beans.xml]
16:10:29,665 | INFO  | ExtenderThread-7 | tory.xml.XmlBeanDefinitionReader  315 | 84 - org.springframework.beans - 3.0.7.RELEASE | Loading XML bean definitions from OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=248|bnd.sym=masterarbeit.TestJob]
16:10:29,709 | INFO  | ExtenderThread-7 | WaiterApplicationContextExecutor  243 | 91 - org.springframework.osgi.extender - 1.2.1 | No outstanding OSGi service dependencies, completing initialization for OsgiBundleXmlApplicationContext(bundle=masterarbeit.TestJob, config=osgibundle:/META-INF/spring/*.xml)
16:10:29,724 | INFO  | ExtenderThread-8 | pport.DefaultListableBeanFactory  557 | 84 - org.springframework.beans - 3.0.7.RELEASE | Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@b600ec: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,service,serviceBean,wrongCallHandler,dom4jProvider,jsonProvider,job,org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean#0,org.apache.cxf.management.counters.CounterRepository#0]; root of factory hierarchy
16:10:29,739 | INFO  | ExtenderThread-8 | t.jmx.InstrumentationManagerImpl  329 |  -  -  | registering MBean org.apache.cxf:bus.id=masterarbeit.TestJob-cxf5841812,type=Bus: org.apache.cxf.bus.ManagedBus@29bdff
16:10:29,740 | INFO  | ExtenderThread-8 | t.jmx.InstrumentationManagerImpl  329 |  -  -  | registering MBean org.apache.cxf:bus.id=masterarbeit.TestJob-cxf5841812,type=Bus: javax.management.modelmbean.RequiredModelMBean@78d55c
16:10:29,741 | INFO  | ExtenderThread-8 | t.jmx.InstrumentationManagerImpl  195 |  -  -  | registered org.apache.cxf:bus.id=masterarbeit.TestJob-cxf5841812,type=Bus
16:10:29,741 | INFO  | ExtenderThread-8 | t.jmx.InstrumentationManagerImpl  329 |  -  -  | registering MBean org.apache.cxf:bus.id=masterarbeit.TestJob-cxf5841812,WorkQueueManager=Bus.WorkQueueManager,type=WorkQueueManager: org.apache.cxf.bus.managers.WorkQueueManagerImplMBeanWrapper@ffa1d3
16:10:29,742 | INFO  | ExtenderThread-8 | t.jmx.InstrumentationManagerImpl  329 |  -  -  | registering MBean org.apache.cxf:bus.id=masterarbeit.TestJob-cxf5841812,WorkQueueManager=Bus.WorkQueueManager,type=WorkQueueManager: javax.management.modelmbean.RequiredModelMBean@d93cc6
16:10:29,905 | INFO  | ExtenderThread-8 | g.apache.cxf.endpoint.ServerImpl   94 |  -  -  | Setting the server's publish address to be /Test
16:10:29,907 | INFO  | ExtenderThread-8 | t.jmx.InstrumentationManagerImpl  329 |  -  -  | registering MBean org.apache.cxf:bus.id=masterarbeit.TestJob-cxf5841812,type=Bus.Service.Endpoint,service="{http://testjob_0_1.masterarbeit/}RestServiceProviderImpl4TalendJob",port="RestServiceProviderImpl4TalendJob": org.apache.cxf.endpoint.ManagedEndpoint@19703d5
16:10:29,911 | INFO  | ExtenderThread-8 | t.jmx.InstrumentationManagerImpl  329 |  -  -  | registering MBean org.apache.cxf:bus.id=masterarbeit.TestJob-cxf5841812,type=Bus.Service.Endpoint,service="{http://testjob_0_1.masterarbeit/}RestServiceProviderImpl4TalendJob",port="RestServiceProviderImpl4TalendJob": javax.management.modelmbean.RequiredModelMBean@cd2814
16:10:29,946 | INFO  | ExtenderThread-8 | r.support.OsgiServiceFactoryBean  301 | 90 - org.springframework.osgi.core - 1.2.1 | Publishing service under classes [{routines.system.api.TalendJob}]
16:10:29,947 | INFO  | ExtenderThread-8 | r.internal.JobTracker$Customizer  106 |  -  -  | Service with reference {routines.system.api.TalendJob}={org.springframework.osgi.bean.name=job, Bundle-SymbolicName=masterarbeit.TestJob, Bundle-Version=0.1, name=TestJob, type=job, service.id=331} added
16:10:29,947 | INFO  | ExtenderThread-8 | troller.internal.JobLauncherImpl  144 |  -  -  | Adding job TestJob.
16:10:29,950 | INFO  | pool-9-thread-1  | internal.SimpleJobTask$JobRunner   68 |  -  -  | Starting job TestJob
16:10:29,960 | INFO  | ExtenderThread-8 | ractOsgiBundleApplicationContext  327 | 86 - org.springframework.context - 3.0.7.RELEASE | Publishing application context as OSGi service with properties {org.springframework.context.service.name=masterarbeit.TestJob, Bundle-SymbolicName=masterarbeit.TestJob, Bundle-Version=0.1.0}
16:10:29,961 | INFO  | ExtenderThread-8 | BundleApplicationContextListener   45 | 91 - org.springframework.osgi.extender - 1.2.1 | Application context successfully refreshed (OsgiBundleXmlApplicationContext(bundle=masterarbeit.TestJob, config=osgibundle:/META-INF/spring/*.xml))



What is wrong there?

Offline

#2 2012-06-21 20:34:20

minchi
Member
43 posts

Re: tRESTRequest Service not started after exporting and deploying

have you tried http://localhost:8040/services to access your service description ?

Offline

#3 2012-06-25 10:55:09

treimy
Member
8 posts

Re: tRESTRequest Service not started after exporting and deploying

you are right, with this URL I can reach my service. but now I get the following exception:

Exception in component tESBConsumer_1
java.lang.ClassCastException: org.dom4j.tree.DefaultDocument cannot be cast to org.dom4j.Document
        at org.talend.esb.job.controller.internal.RuntimeESBConsumer.invoke(RuntimeESBConsumer.java:206)
        at masterarbeit.edinotify2xml_0_1.EDINotify2XML.tEDIFACTtoXML_1Process(EDINotify2XML.java:2220)
        at masterarbeit.edinotify2xml_0_1.EDINotify2XML.tRESTRequest_1_LoopProcess(EDINotify2XML.java:3599)
        at masterarbeit.edinotify2xml_0_1.EDINotify2XML$RestServiceProviderImpl4TalendJob.processRequest(EDINotify2XML.java:448)
        at masterarbeit.edinotify2xml_0_1.EDINotify2XML$RestServiceProviderImpl4TalendJob.out(EDINotify2XML.java:496)
        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.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
        at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
        at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:167)
        at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:94)
        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: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:154)
        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.doPost(AbstractHTTPServlet.java:110)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
        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:349)
        at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
        at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:936)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:801)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:224)
        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)
        at java.lang.Thread.run(Thread.java:662)

So it seems to be that the tEDIFACT or the tXMLMap component creates a "org.dom4j.tree.DefaultDocument" but the tESBConsume needs a "org.dom4j.Document"

The werid thing is, that it is working on Talend Studio

Offline

#4 2012-06-26 09:37:23

yashwanth_n
Member
10 posts

Re: tRESTRequest Service not started after exporting and deploying

I am facing the same issue. Were you able to deploy and test successfully?

Offline

#5 2012-06-26 13:15:27

eost
Talend Team


Re: tRESTRequest Service not started after exporting and deploying

can you post a picture of your route using the tESBconsumer.  Is this a SOAP or a REST service?

Offline

#6 2013-11-22 15:39:44

Dukeguru
Member
24 posts

Re: tRESTRequest Service not started after exporting and deploying

Hi
check with the version once

Last edited by Dukeguru (2013-11-25 11:36:53)

Offline

#7 2013-11-25 17:51:21

sberyozkin
Talend Team


Re: tRESTRequest Service not started after exporting and deploying

It appears to be a class loading issue. Multiple versions of DOM4J are loaded by different bundle loaders,

Perhaps you can trace it by "headers | grep org.dom4j"

Cheers. Sergey

Offline

Board footer