Closed stataru8 closed 1 month ago
I'm seeing this error in the Karaf container logs:
2024-07-11T21:10:22,657 | INFO | features-3-thread-1 | FeaturesServiceImpl | 19 - org.apache.karaf.features.core - 4.4.6 | Starting bundles:
2024-07-11T21:10:22,659 | INFO | features-3-thread-1 | FeaturesServiceImpl | 19 - org.apache.karaf.features.core - 4.4.6 | org.apache.servicemix.bundles.aopalliance/1.0.0.6
2024-07-11T21:10:22,662 | INFO | features-3-thread-1 | FeaturesServiceImpl | 19 - org.apache.karaf.features.core - 4.4.6 | org.apache.servicemix.bundles.spring-core/6.1.5.1
2024-07-11T21:10:22,664 | INFO | features-3-thread-1 | FeaturesServiceImpl | 19 - org.apache.karaf.features.core - 4.4.6 | org.apache.servicemix.bundles.spring-beans/6.1.5.1
2024-07-11T21:10:22,667 | INFO | features-3-thread-1 | FeaturesServiceImpl | 19 - org.apache.karaf.features.core - 4.4.6 | org.apache.servicemix.bundles.spring-aop/6.1.5.1
2024-07-11T21:10:22,670 | INFO | features-3-thread-1 | FeaturesServiceImpl | 19 - org.apache.karaf.features.core - 4.4.6 | org.apache.servicemix.bundles.spring-expression/6.1.5.1
2024-07-11T21:10:22,673 | INFO | features-3-thread-1 | FeaturesServiceImpl | 19 - org.apache.karaf.features.core - 4.4.6 | org.apache.servicemix.bundles.spring-context/6.1.5.1
2024-07-11T21:10:22,675 | INFO | features-3-thread-1 | FeaturesServiceImpl | 19 - org.apache.karaf.features.core - 4.4.6 | org.apache.servicemix.bundles.spring-tx/6.1.5.1
2024-07-11T21:10:22,678 | INFO | features-3-thread-1 | FeaturesServiceImpl | 19 - org.apache.karaf.features.core - 4.4.6 | org.apache.servicemix.bundles.spring-jdbc/6.1.5.1
2024-07-11T21:10:22,681 | INFO | features-3-thread-1 | FeaturesServiceImpl | 19 - org.apache.karaf.features.core - 4.4.6 | org.apache.servicemix.bundles.spring-context-support/6.1.5.1
2024-07-11T21:10:22,684 | INFO | features-3-thread-1 | FeaturesServiceImpl | 19 - org.apache.karaf.features.core - 4.4.6 | wrap_file__C__Users_stataru_.m2_repository_org_apache_drill_exec_drill-jdbc-all_1.21.1_drill-jdbc-all-1.21.1.jar_Bundle-Version_1.21.1_Export-Package_org.apache.drill.jdbc.__version_1.21.1_SPI-Provider__/1.21.1
2024-07-11T21:10:22,853 | INFO | features-3-thread-1 | FeaturesServiceImpl | 19 - org.apache.karaf.features.core - 4.4.6 | camel-drill/4.6.0.SNAPSHOT
2024-07-11T21:10:22,859 | INFO | features-3-thread-1 | FeaturesServiceImpl | 19 - org.apache.karaf.features.core - 4.4.6 | jakarta.xml.soap-api/3.0.1
2024-07-11T21:10:22,849 | ERROR | FelixDispatchQueue | Framework | 46 - camel-integration-test - 4.6.0.SNAPSHOT | FrameworkEvent ERROR
org.osgi.framework.ServiceException: Service factory exception: javax/ws/rs/core/Application
at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:354) ~[?:?]
at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:249) ~[?:?]
at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:362) ~[?:?]
at org.apache.felix.framework.Felix.getService(Felix.java:3984) ~[?:?]
at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:450) ~[?:?]
at org.apache.karaf.camel.itests.CamelSuppliedRouteLauncher.serviceChanged(CamelSuppliedRouteLauncher.java:108) ~[?:?]
at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990) ~[?:?]
at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838) ~[?:?]
at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545) ~[?:?]
at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4863) ~[?:?]
at org.apache.felix.framework.Felix.registerService(Felix.java:3834) ~[?:?]
at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:328) ~[?:?]
at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:302) ~[?:?]
at org.apache.aries.spifly.ProviderBundleTrackerCustomizer.addingBundle(ProviderBundleTrackerCustomizer.java:163) ~[?:?]
at org.apache.aries.spifly.ProviderBundleTrackerCustomizer.addingBundle(ProviderBundleTrackerCustomizer.java:64) ~[?:?]
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:475) ~[osgi.core-8.0.0.jar:?]
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:420) ~[osgi.core-8.0.0.jar:?]
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) ~[osgi.core-8.0.0.jar:?]
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) ~[osgi.core-8.0.0.jar:?]
at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450) ~[osgi.core-8.0.0.jar:?]
at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915) ~[?:?]
at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834) ~[?:?]
at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516) ~[?:?]
at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4847) ~[?:?]
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2420) ~[?:?]
at org.apache.felix.framework.Felix.startBundle(Felix.java:2335) ~[?:?]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:1006) ~[?:?]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:992) ~[?:?]
at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.startBundle(BundleInstallSupportImpl.java:165) ~[?:?]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1160) ~[?:?]
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1041) ~[?:?]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1069) ~[?:?]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:1004) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.NoClassDefFoundError: javax/ws/rs/core/Application
at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:?]
at java.lang.Class.privateGetDeclaredConstructors(Class.java:3373) ~[?:?]
at java.lang.Class.getConstructor0(Class.java:3578) ~[?:?]
at java.lang.Class.getDeclaredConstructor(Class.java:2754) ~[?:?]
at org.apache.aries.spifly.ProviderServiceFactory.getService(ProviderServiceFactory.java:35) ~[?:?]
at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:349) ~[?:?]
... 36 more
Caused by: java.lang.ClassNotFoundException: javax.ws.rs.core.Application not found by wrap_file__C__Users_stataru_.m2_repository_org_apache_drill_exec_drill-jdbc-all_1.21.1_drill-jdbc-all-1.21.1.jar_Bundle-Version_1.21.1_Export-Package_org.apache.drill.jdbc.__version_1.21.1_SPI-Provider__ [159]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1591) ~[?:?]
at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79) ~[?:?]
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1976) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]
at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:?]
at java.lang.Class.privateGetDeclaredConstructors(Class.java:3373) ~[?:?]
at java.lang.Class.getConstructor0(Class.java:3578) ~[?:?]
at java.lang.Class.getDeclaredConstructor(Class.java:2754) ~[?:?]
at org.apache.aries.spifly.ProviderServiceFactory.getService(ProviderServiceFactory.java:35) ~[?:?]
at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:349) ~[?:?]
... 36 more
2024-07-11T21:10:22,862 | INFO | features-3-thread-1 | FeaturesServiceImpl | 19 - org.apache.karaf.features.core - 4.4.6 | jakarta.annotation-api/2.1.1
2024-07-11T21:10:22,864 | INFO | features-3-thread-1 | FeaturesServiceImpl | 19 - org.apache.karaf.features.core - 4.4.6 | jakarta.xml.ws-api/4.0.2
2024-07-11T21:10:22,867 | INFO | features-3-thread-1 | FeaturesServiceImpl | 19 - org.apache.karaf.features.core - 4.4.6 | Done.
2024-07-11T21:10:22,909 | INFO | RMI TCP Connection(4)-127.0.0.1 | CamelSuppliedRouteLauncher | 46 - camel-integration-test - 4.6.0.SNAPSHOT | CamelRouteSupplier service registered: {service.id=188, service.bundleid=160, objectClass=[Ljava.lang.String;@39e736be, service.scope=bundle, component.name=karaf-camel-drill-test, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), component.id=3} from the class org.apache.karaf.camel.test.CamelDrillRouteSupplier
2024-07-11T21:10:23,163 | INFO | RMI TCP Connection(4)-127.0.0.1 | CamelSuppliedRouteLauncher | 46 - camel-integration-test - 4.6.0.SNAPSHOT | Route(s) created from CamelRouteSupplier service: org.apache.karaf.camel.test.CamelDrillRouteSupplier
2024-07-11T21:10:23,342 | INFO | RMI TCP Connection(4)-127.0.0.1 | DrillProducer | 146 - camel-drill - 4.6.0.SNAPSHOT | connection url: jdbc:drill:drillbit=localhost:50734
2024-07-11T21:10:26,595 | INFO | RMI TCP Connection(4)-127.0.0.1 | producer-camel-drill-test | 39 - camel-core-reifier - 4.6.0.SNAPSHOT | Query Result: [{employee_id=1, full_name=Sheri Nowmer, first_name=Sheri, last_name=Nowmer, position_id=1, position_title=President, store_id=0, department_id=1, birth_date=1961-08-26, hire_date=1994-12-01 00:00:00.0, salary=80000.0, supervisor_id=0, education_level=Graduate Degree, marital_status=S, gender=F, management_role=Senior Management, end_date=null}, {employee_id=2, full_name=Derrick Whelply, first_name=Derrick, last_name=Whelply, position_id=2, position_title=VP Country Manager, store
I assume that this is fine:
org.apache.drill.exec/drill-jdbc-all/1.21.1
is not a regular jar, it contains javax
, com.sun
, google
and oadd
packages inside. javax.ws
is intentionally excluded here: https://github.com/apache/drill/blob/drill-1.21.1/exec/jdbc-all/pom.xml#L706.10:50:53.087 INFO [features-3-thread-1] Starting bundles:
10:50:53.088 INFO [features-3-thread-1] org.apache.servicemix.bundles.spring-core/6.1.5.1
10:50:53.091 INFO [features-3-thread-1] org.apache.servicemix.bundles.spring-beans/6.1.5.1
10:50:53.093 INFO [features-3-thread-1] org.apache.servicemix.bundles.aopalliance/1.0.0.6
10:50:53.096 INFO [features-3-thread-1] org.apache.servicemix.bundles.spring-aop/6.1.5.1
10:50:53.099 INFO [features-3-thread-1] org.apache.servicemix.bundles.spring-expression/6.1.5.1
10:50:53.101 INFO [features-3-thread-1] org.apache.servicemix.bundles.spring-context/6.1.5.1
10:50:53.104 INFO [features-3-thread-1] org.apache.servicemix.bundles.spring-tx/6.1.5.1
10:50:53.106 INFO [features-3-thread-1] org.apache.servicemix.bundles.spring-jdbc/6.1.5.1
10:50:53.109 INFO [features-3-thread-1] org.apache.servicemix.bundles.spring-context-support/6.1.5.1
10:50:53.112 INFO [features-3-thread-1] wrap_file__C__Users_stataru_.m2_repository_org_apache_drill_exec_drill-jdbc-all_1.21.1_drill-jdbc-all-1.21.1.jar_Bundle-Version_1.21
.1_Export-Package_org.apache.drill.jdbc.__version_1.21.1_SPI-Provider__/1.21.1
10:50:53.122 INFO [features-3-thread-1] camel-drill/4.6.0.SNAPSHOT
10:50:53.126 INFO [features-3-thread-1] jakarta.xml.soap-api/3.0.1
10:50:53.128 INFO [features-3-thread-1] jakarta.xml.ws-api/4.0.2
10:50:53.131 INFO [features-3-thread-1] jakarta.annotation-api/2.1.1
10:50:53.133 INFO [features-3-thread-1] Done.
10:51:02.044 INFO [CM Configuration Updater (Update: pid=org.ops4j.pax.logging)] Sending Event Admin notification (configuration successful) to org/ops4j/pax/logging/Configur
ation
10:51:07.257 INFO [fileinstall-C:\Users\stataru\Desktop\SANDBOX\Camel_4_on_Karaf_Project\apache-karaf-4.4.6\apache-karaf-4.4.6/deploy] Installing bundle drill.xml / 0.0.0
10:51:08.170 INFO [fileinstall-C:\Users\stataru\Desktop\SANDBOX\Camel_4_on_Karaf_Project\apache-karaf-4.4.6\apache-karaf-4.4.6/deploy] Blueprint bundle drill.xml/0.0.0 has be
en started
10:51:08.172 INFO [Blueprint Event Dispatcher: 1] Attempting to start CamelContext: camel-1
10:51:08.342 INFO [Blueprint Event Dispatcher: 1] Apache Camel 4.6.0 (camel-1) is starting
10:51:08.484 INFO [Blueprint Event Dispatcher: 1] Routes startup (total:1)
10:51:08.485 INFO [Blueprint Event Dispatcher: 1] Started drillRoute (timer://foo)
10:51:08.486 INFO [Blueprint Event Dispatcher: 1] Apache Camel 4.6.0 (camel-1) started in 142ms (build:0ms init:0ms start:142ms)
10:51:08.490 INFO [fileinstall-C:\Users\stataru\Desktop\SANDBOX\Camel_4_on_Karaf_Project\apache-karaf-4.4.6\apache-karaf-4.4.6/deploy] Started bundle: blueprint:file:/C:/User
s/stataru/Desktop/SANDBOX/Camel_4_on_Karaf_Project/apache-karaf-4.4.6/apache-karaf-4.4.6/deploy/drill.xml
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
10:51:09.630 INFO [Camel (camel-1) thread #1 - timer://foo] connection url: jdbc:drill:drillbit=localhost:31010
10:51:10.626 INFO [Camel (camel-1) thread #1 - timer://foo] Query Result: [{employee_id=1, full_name=Sheri Nowmer, first_name=Sheri, last_name=Nowmer, position_id=1, position
_title=President, store_id=0, department_id=1, birth_date=1961-08-26, hire_date=1994-12-01 00:00:00.0, salary=80000.0, supervisor_id=0, education_level=Graduate Degree, marit
al_status=S, gender=F, management_role=Senior Management, end_date=null}, {employee_id=2, full_name=Derrick Whelply, first_name=Derrick, last_name=Whelply, position_id=2, pos
ition_title=VP Country Manager, store_id=0, department_id=1, birth_date=1915-07-03, hire_date=1994-12-01 00:00:00.0, salary=40000.0, supervisor_id=1, education_level=Graduate
Degree, marital_status=M, gender=M, management_role=Senior Management, end_date=null}, {employee_id=4, full_name=Michael Spence, first_name=Michael, last_name=Spence, positi
on_id=2, position_title=VP Country Manager, store_id=0, department_id=1, birth_date=1969-06-20, hire_date=1998-01-01 00:00:00.0, salary=40000.0, supervisor_id=1, education_le
vel=Graduate Degree, marital_status=S, gender=M, management_role=Senior Management, end_date=null}]
Fixes https://github.com/apache/camel-karaf/issues/421: camel-drill integration test