Bug in pax-jdbc-config when using oracle thin client with TNS key-value syntax in jdbc url

17 views
Skip to first unread message

Andre Schlegel

unread,
Sep 25, 2019, 9:15:34 AM9/25/19
to OPS4J
Hello,

I can't create an issue in Jira so I do this here. Maybe anyone can open an issue in Jira for this.

I have karaf 4.2.6 with pax-jdbc 1.3.5, pax-jdbc-oracle and using Oracle JDBC Driver Version 6 (ojdbc6.jar; also testet with ojdbc8.jar).

If I create a new datasource and using the TNS key-value syntax for the oracle thin driver I got an NPE.

jdbc:ds-create -p XXXX -u YYYYY -dc oracle.jdbc.OracleDriver -url jdbc:oracle:thin:@(DESCRIPTION_LIST=(LOAD_BALANCE=off)(FAILOVER=off)(DESCRIPTION=(CONNECT_TIMEOUT=5)(TRANSPORT_CONNECT_TIMEOUT=3)(RETRY_COUNT=3)(ADDRESS_LIST=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=dev06.virtimo.net)(PORT=1821)))(CONNECT_DATA=(INSTANCE_NAME=XE)))) testName

08:18:54.762 INFO [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.ops4j.datasource.e0c1cede-46b3-443d-b198-005b5f6248f0)] configurationEvent: org.osgi.service.cm.ConfigurationEvent@69a8b4e5
08:18:54.762 INFO [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.ops4j.datasource.e0c1cede-46b3-443d-b198-005b5f6248f0)] Configuration update event for PID: org.ops4j.datasource.e0c1cede-46b3-443d-b198-005b5f6248f0
08:18:54.763 INFO [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.ops4j.datasource.e0c1cede-46b3-443d-b198-005b5f6248f0)] configurationEvent: org.osgi.service.cm.ConfigurationEvent@5d6dbcd0
08:18:54.763 ERROR [CM Configuration Updater (Update: pid=org.ops4j.datasource.e0c1cede-46b3-443d-b198-005b5f6248f0)] [org.osgi.service.cm.ManagedServiceFactory, id=198, bundle=17/mvn:org.ops4j.pax.jdbc/pax-jdbc-config/1.3.5]: Unexpected problem updating configuration org.ops4j.datasource.e0c1cede-46b3-443d-b198-005b5f6248f0
java.lang.NullPointerException: null
at org.ops4j.pax.jdbc.config.impl.ExternalConfigLoader.resolve(ExternalConfigLoader.java:74) ~[?:?]
at org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.updated(DataSourceConfigManager.java:71) ~[?:?]
at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.updated(ManagedServiceFactoryTracker.java:159) ~[9:org.apache.felix.configadmin:1.9.14]
at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:93) [9:org.apache.felix.configadmin:1.9.14]
at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1400) [9:org.apache.felix.configadmin:1.9.14]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138) [9:org.apache.felix.configadmin:1.9.14]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105) [9:org.apache.felix.configadmin:1.9.14]
at java.lang.Thread.run(Thread.java:748) [?:?]


I have used this syntax in an older version without any problem. So I have checked the history of the class (https://github.com/ops4j/org.ops4j.pax.jdbc/blob/master/pax-jdbc-config/src/main/java/org/ops4j/pax/jdbc/config/impl/DataSourceConfigManager.java). It seems to me, that the change from the issue https://ops4j1.jira.com/browse/PAXJDBC-132 causes the problem.

I have no problems if I'm using the simple syntax.

jdbc:ds-create -p XXXX -u YYYY -dc oracle.jdbc.OracleDriver -url jdbc:oracle:thin:@dev06.virtimo.net:1821:XE testName



Kind regards
Andre

Benjamin Graf

unread,
Sep 26, 2019, 7:07:31 AM9/26/19
to OPS4J
Hi,

yes, please fill a JIRA ticket for this. I think I found the root actually looking for a solution

Regards
Benjamin

Grzegorz Grzybek

unread,
Sep 26, 2019, 7:35:15 AM9/26/19
to op...@googlegroups.com
Thanks Benjamin for taking care of this. I can release pax-jdbc then.

regards
Grzegorz Grzybek

--
--
------------------
OPS4J - http://www.ops4j.org - op...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/6482c9fe-8aca-46d7-a5de-70e3271defc2%40googlegroups.com.

Andre Schlegel

unread,
Sep 26, 2019, 7:36:33 AM9/26/19
to op...@googlegroups.com
Can you add me to jira?

Grzegorz Grzybek

unread,
Sep 26, 2019, 7:41:31 AM9/26/19
to op...@googlegroups.com
Andre - I've sent you an invite from ops4j jira.

regards
Grzegorz Grzybek

czw., 26 wrz 2019 o 13:36 Andre Schlegel <andre.s...@virtimo.de> napisał(a):
Can you add me to jira?

--
--
------------------
OPS4J - http://www.ops4j.org - op...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+un...@googlegroups.com.

Andre Schlegel

unread,
Sep 26, 2019, 8:03:25 AM9/26/19
to op...@googlegroups.com
Thank you. 

I have created the issue https://ops4j1.jira.com/browse/PAXJDBC-147

Regards
Andre

Reply all
Reply to author
Forward
0 new messages