Four Stars

Rest Webservice deployment failure in Karaf

Hi All,RestService.PNG

I have created a REST service in Talend ESB open studio to accept JSON body and it is calling another REST service (using tREST).

This is service is working fine locally. When is build the job and copy the "RestService.jar" file to deploy folder and run trun list command i am getting state failure.

Please help to under the failure and is there a way in which i can see the actual error.

 

Thanks & Regards,

Vikas.

2 REPLIES
Two Stars

Re: Rest Webservice deployment failure in Karaf

I have the same problem and I'm not able to solve it.

I've modelled the process with Talend Open Studio 6.5 on a Windows OS.

In the studio, everything works fine, but I'm facing an issue on Karaf when I'm trying to deploy my process (it includes a tRestRequest component).

The error is caused by: java.lang.ClassNotFoundException: javax.ws.rs.InternalServerErrorException ...

 

In an old thread I've found the following suggestion:

 

Looks like the class loader problem of duplicated JAX-RS api, could you please try this workaround? 
1) check the exported kar file from Studio to see if there is jersey-core-xx.jar or other jar may have JAX-RS api included, if you find it then remove it from the kar file.
2) modify the Manifest of the bundle in the kar file, add package javax.ws.rs.* to the Import-Package section.

 

now there's only one error:
routines.system.api -- Cannot be resolved

 

(to be honest there are other errors like: "Cannot be resolved but is not required", but routines.system.api seems to be "required")

My process is Installed but not Active

 

Can someone help me?

One Star

Re: Rest Webservice deployment failure in Karaf

Hi.

 

I have the same your problem.


I have created a simple REST service in Talend ESB Open Studio 6.5 on a Windows OS (using tREST).

Then, from the Preferences window I set ESB Studio Runtime to use Local Talend Runtime.

When I started the Job, I got the following errors:

 

Execution failed : javax.management.MBeanException: javax.management.MBeanException: org.osgi.framework.BundleException: Could not resolve module: trillion.request_response [192]

Unresolved requirement: Import-Package: com.google.gson; resolution:="optional"

Unresolved requirement: Import-Package: io.swagger.annotations; resolution:="optional"

Unresolved requirement: Import-Package: javassist; resolution:="optional"

Unresolved requirement: Import-Package: javassist.bytecode; resolution:="optional"

Unresolved requirement: Import-Package: javassist.bytecode.annotation; resolution:="optional"

Unresolved requirement: Import-Package: javassist.expr; resolution:="optional"

Unresolved requirement: Import-Package: org.apache.commons.vfs2; resolution:="optional"

Unresolved requirement: Import-Package: sun.security.action; resolution:="optional"

Unresolved requirement: Import-Package: routines.system.api

 

[javax.management.MBeanException: org.osgi.framework.BundleException: Could not resolve module: trillion.request_response [192]

Unresolved requirement: Import-Package: com.google.gson; resolution:="optional"

Unresolved requirement: Import-Package: io.swagger.annotations; resolution:="optional"

Unresolved requirement: Import-Package: javassist; resolution:="optional"

Unresolved requirement: Import-Package: javassist.bytecode; resolution:="optional"

Unresolved requirement: Import-Package: javassist.bytecode.annotation; resolution:="optional"

Unresolved requirement: Import-Package: javassist.expr; resolution:="optional"

Unresolved requirement: Import-Package: org.apache.commons.vfs2; resolution:="optional"

Unresolved requirement: Import-Package: sun.security.action; resolution:="optional"

Unresolved requirement: Import-Package: routines.system.api

]

 

All steps are described in the attached pictures.

 

Can someone help me?
Thanks.