NPE on oracle thin client with TNS key-value syntax in jdbc url

Description

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.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 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 causes the problem.

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

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

See also: https://docs.oracle.com/cd/B28359_01/java.111/b31224/jdbcthin.htm

Environment

Karaf 4.2.6

Status

Assignee

Benjamin Graf

Reporter

Andre Schlegel

Labels

None

Fix versions

Affects versions

1.3.5
1.3.2
1.3.3
1.3.1
1.3.4

Priority

Major
Configure