Four Stars

Not able to build talend Routes as Spring-Boot Micro-services.

I have made a simple talend Route which exposes a GET endpoint to get the list of customers. 

I am following https://help.talend.com/reader/lOdTKH~QuvYom1PHUXq4Qg/FDXkFcEIKhexHJxgC_eV6g link. I am able to get the output till step 10 ( as shown in tutorial).

When i try to export the Route as a spring-boot microservice , i am getting an exception : 

`Detail Message: The type org.springframework.context.ApplicationContextAware cannot be resolved. It is indirectly referenced from required .class files` 

 

I tried importing different versions of spring-context, but no luck so far.

Any help is highly appreciated.

 

Tags (1)
10 REPLIES
Employee

Re: Not able to build talend Routes as Spring-Boot Micro-services.

Which version of studio are you using?

Four Stars

Re: Not able to build talend Routes as Spring-Boot Micro-services.

I am using Talend Data Fabric 6.4.1

Employee

Re: Not able to build talend Routes as Spring-Boot Micro-services.

I see that Tutorial operates with old "camel-jaxb-2.16.3.jar" and "camel-jackson-alldep-2.16.3.jar" dependencies (have a look to cConfig configuration from Tutorial) but Studio 6.4.1 is based on Camel 2.17.6 . In this case generated MS package contains multiple versions of the same Camel libraries and corresponding Third-Party dependencies. Dublicated libraries (with different versions)  become "visible" by the same class loader. This is why we have described issue (and potentionally can have a lot of similar problems).

 

I have followed this tutorial with correct camel dependencies - "camel-jaxb-2.17.6.jar" and "camel-jackson-alldep-2.17.6.jar" ( https://talend-update.talend.com/nexus/content/repositories/libraries/org/talend/libraries/camel-jac... ) - it works fine (MS package was built and executed correctly).

Four Stars

Re: Not able to build talend Routes as Spring-Boot Micro-services.

Hi apoltavtsev,

I have used the same dependencies as you mentioned : camel-jaxb-2.17.6.jar and  camel-jackson-alldep-2.17.6.jar. 

But still the same problem.

Employee

Re: Not able to build talend Routes as Spring-Boot Micro-services.

Try please this Route which is based on current Tutorial (created using Talend Studio 6.4.1 with "Fabric" license).

Four Stars

Re: Not able to build talend Routes as Spring-Boot Micro-services.

Hi apoltavtsev,

  Can you please send me the link to the latest tutorial which you tried ?

Four Stars

Re: Not able to build talend Routes as Spring-Boot Micro-services.

Hi apoltavtsev,

 I downloaded the zip file that you sent , but on building route i am getting errors like:

  1.  Detail Message: The type org.springframework.beans.factory.DisposableBean cannot be resolved.

OR

  2.  Detail Message: org.apache.camel.spring.boot cannot be resolved to a type.

Employee

Re: Not able to build talend Routes as Spring-Boot Micro-services.

Link is the same

Employee

Re: Not able to build talend Routes as Spring-Boot Micro-services.

You can try to switch to empty project (File -> Switch Project or workspace ). And import / build this Route (I have added missing beans which was not included to previous *.zip). 

Employee

Re: Not able to build talend Routes as Spring-Boot Micro-services.

Besides, it is necessary to simplify and mimimize path to Studio installation (to avoid issues with Windows file name limitations).