Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
qdrousie59
Contributor
Contributor

Error while deploying a route on Karaf using the camel-google-storage library (TOS 8.0.1.20211109_1610)

Hello everyone,

Today, I'm reaching out to the community regarding a deployment issue on Karaf of a route using the camel-google-storage library.

For your information, I'm developing on version TOS 8.0.1.20211109_1610 and deploying on Talend Runtime (Karaf 3.11.1) provided with it.

My route is very simple, it consists of :
- Receiving an HTTP call (PUT http://0.0.0.0:8051/put), with a simple JSON in the body ({"test": "test"})
- Pushing the message as a JSON file into a Google Storage bucket

I have defined three contexts:
- work_gcs_serviceAccountKey: path to the service key
- work_gcs_bucketName: Google Storage bucket name
- work_gcs_bucketFolderPath: folder name inside the Google Storage bucket

To store the message in the Google Storage bucket, I'm using two components :
- A cSetHeader component, where I've defined a CamelGoogleCloudStorageObjectName header with Simple language and value context.work_gcs_bucketFolderPath + "test_${date:now:yyyyMMdd'T'HHmmssSSS}.json".
- A cMessaging Endpoint component with URI "google-storage://"+context.work_gcs_bucketName+"?serviceAccountKey=file:"+context.work_gcs_serviceAccountKey

Finally, in the cConfig component, I've imported two main libraries :
- guava-30.0-jre.jar
- camel-google-storage-3.11.1.jar

In the Studio, the route works without any issue.
But I can't deploy it on the Talend Runtime (Karaf) provided with the Studio.

I get this error during deployment (placing the kar file in the deploy folder after startup):

Unable to install Kar feature template_google_storage_simple-feature/0.1.0
org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=template_google_storage_simple-feature; type=karaf.feature; version="[0.1.0,0.1.0]"; filter:="(&(osgi.identity=template_google_storage_simple-feature)(type=karaf.feature)(version>=0.1.0)(version<=0.1.0))" [caused by: Unable to resolve template_google_storage_simple-feature/0.1.0: missing requirement [template_google_storage_simple-feature/0.1.0] osgi.identity; osgi.identity=camel-google-storage; type=karaf.feature]
at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343) ~[org.eclipse.osgi-3.13.300.jar:?]
at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:392) ~[org.eclipse.osgi-3.13.300.jar:?]
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:378) ~[org.eclipse.osgi-3.13.300.jar:?]
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:332) ~[org.eclipse.osgi-3.13.300.jar:?]
at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:257) ~[?:?]
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:401) ~[?:?]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1063) ~[?:?]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:834) ~[?:?]
Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve template_google_storage_simple-feature/0.1.0: missing requirement [template_google_storage_simple-feature/0.1.0] osgi.identity; osgi.identity=camel-google-storage; type=karaf.feature
at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343) ~[org.eclipse.osgi-3.13.300.jar:?]
... 12 more

The route seems unable to resolve the camel-google-storage feature.
I've tried several fixes, including on the pom.xml file by manually adding dependencies but it doesn't work.
And I can't directly install the camel-google-storage feature on Karaf.

Do you have any suggestions for me?
I'm attaching the export of the route elements.

Thanks in advance and have a great day!

Best regards,

Labels (4)
0 Replies