exasol / exasol-testcontainers

Test container for Exasol on Docker
MIT License
9 stars 2 forks source link

JDBC driver installed via driver manager does not work #228

Closed kaklakariada closed 1 year ago

kaklakariada commented 1 year ago

I tried to use the driver manager in commit exasol/db2-virtual-schema@2c84ce6 (#24) but tests failed to execute queries against the VS:

IllegalState Failed to execute statement 'SELECT * FROM "THE_VS"."SINGLE_COLUMN_TABLE_XML"': ETL-1014: No default DRIVER registered for jdbc:db2://172.17.0.1:32769/test. Please specify DRIVER or add a default via EXAoperation (Session: 1765406743360700416)

See also log at https://github.com/exasol/db2-virtual-schema/actions/runs/4924235581/jobs/8797030243#step:6:1

redcatbear commented 1 year ago

Saving the relevant part of the log:

2023-05-09 09:00:39.942 [INFO   ] Creating container for image: exasol/docker-db:7.1.19 
2023-05-09 09:00:40.400 [INFO   ] Container exasol/docker-db:7.1.19 is starting: 4ce9845a00b02c7cbfe347e5cbfd3906eef12882c9c408277a34068365fcfac9 
2023-05-09 09:00:41.066 [FINE   ] No status cache found for container "4ce9845a00b02c7cbfe347e5cbfd3906eef12882c9c408277a34068365fcfac9". Creating fresh status. 
2023-05-09 09:00:41.074 [FINEST ] Waiting for cluster configuration to become available. 
2023-05-09 09:00:41.971 [FINEST ] Docker container supports docker exec 
2023-05-09 09:01:25.449 [FINEST ] Created log detector that scans for "UNPACK THREAD started$" in "/exa/logs/cored/bucketfsd.*.log" after line 0 with verifier LogEntryPresentPatternVerifier [] 
2023-05-09 09:01:25.450 [FINE   ] Waiting for BucketFS to be ready. 
2023-05-09 09:01:25.790 [FINE   ] BucketFS is ready. 
2023-05-09 09:01:25.791 [FINEST ] Created log detector that scans for "ScriptLanguages.*extracted$" in "/exa/logs/cored/bucketfsd.*.log" after line 0 with verifier LogEntryPresentPatternVerifier [] 
2023-05-09 09:01:25.792 [FINE   ] Waiting for UDF language container to be ready. 
2023-05-09 09:04:28.781 [FINE   ] UDF language container is ready. 
2023-05-09 09:04:28.781 [INFO   ] Exasol container started after waiting for the following services to become available: [BUCKETFS, UDF, JDBC] 
2023-05-09 09:04:28.782 [INFO   ] Container exasol/docker-db:7.1.19 started in PT6M0.635789S 
2023-05-09 09:04:28.863 [INFO   ] Container is started (JDBC URL: jdbc:exa:localhost:32771;validateservercertificate=1;fingerprint=d7815a9a4705ead2f79346ce69c65cb973410df7f4ad02b57e7b62ff1d776a6f;) 
2023-05-09 09:04:28.872 [FINE   ] Writing container status to cache file "/tmp/exasol_testcontainers/4ce9845a00b02c7cbfe347e5cbfd3906eef12882c9c408277a34068365fcfac9.cache". 
2023-05-09 09:04:29.379 [FINE   ] No previous uploads to 'org.jacoco.agent-runtime.jar' recorded in upload history. No upload delay required. 
2023-05-09 09:04:29.420 [FINE   ] Uploading file 'target/jacoco-agent/org.jacoco.agent-runtime.jar' to bucket 'bfsdefault/default' at 'http://localhost:32772/default/org.jacoco.agent-runtime.jar' 
2023-05-09 09:04:29.965 [FINE   ] Successfully uploaded file 'target/jacoco-agent/org.jacoco.agent-runtime.jar' to 'http://localhost:32772/default/org.jacoco.agent-runtime.jar' 
2023-05-09 09:04:29.967 [FINE   ] Recorded upload to 'org.jacoco.agent-runtime.jar' at 2023-05-09T09:04:29.965953Z in upload history 
2023-05-09 09:04:29.981 [FINEST ] Created log detector that scans for "org.jacoco.agent-runtime.jar.*linked" in "/exa/logs/cored/bucketfsd.*.log" after line 0 with verifier TimestampLogEntryPatternVerifier [afterUtc=time 2023-05-09T09:04:29Z, timeZone=Europe/Berlin] 
2023-05-09 09:04:30.085 [FINE   ] Found matching log entry with time 2023-05-09T09:04:29Z (after time 2023-05-09T09:04:29Z): [I 230509 11:04:29 bucketfsd:1608] File 'default/org.jacoco.agent-runtime.jar' linked 
2023-05-09 09:04:30.085 [FINE   ] Recorded upload to 'org.jacoco.agent-runtime.jar' at 2023-05-09T09:04:30.085581Z in upload history 
2023-05-09 09:04:30.108 [INFO   ] test.debug: ✗; test.coverage: ✓; test.jprofiler: ✗; test.udf-logs: ✗

2023-05-09 09:04:31.171 [FINE   ] Installing driver JDBC driver "DB2" (com.ibm.db2.jcc.DB2Driver), source: "target/db2-driver/jcc.jar" 
2023-05-09 09:04:31.174 [FINE   ] No previous uploads to 'drivers/jdbc/jcc.jar' recorded in upload history. No upload delay required. 
2023-05-09 09:04:31.177 [FINE   ] Uploading file 'target/db2-driver/jcc.jar' to bucket 'bfsdefault/default' at 'http://localhost:32772/default/drivers/jdbc/jcc.jar' 
2023-05-09 09:04:31.936 [FINE   ] Successfully uploaded file 'target/db2-driver/jcc.jar' to 'http://localhost:32772/default/drivers/jdbc/jcc.jar' 
2023-05-09 09:04:31.936 [FINE   ] Recorded upload to 'drivers/jdbc/jcc.jar' at 2023-05-09T09:04:31.936451Z in upload history 
2023-05-09 09:04:31.936 [FINEST ] Created log detector that scans for "drivers/jdbc/jcc.jar.*linked" in "/exa/logs/cored/bucketfsd.*.log" after line 0 with verifier TimestampLogEntryPatternVerifier [afterUtc=time 2023-05-09T09:04:31Z, timeZone=Europe/Berlin] 
2023-05-09 09:04:31.984 [FINE   ] Found matching log entry with time 2023-05-09T09:04:31Z (after time 2023-05-09T09:04:31Z): [I 230509 11:04:31 bucketfsd:1608] File 'default/drivers/jdbc/jcc.jar' linked 
2023-05-09 09:04:31.985 [FINE   ] Recorded upload to 'drivers/jdbc/jcc.jar' at 2023-05-09T09:04:31.985188Z in upload history 
2023-05-09 09:04:31.998 [FINE   ] No previous uploads to 'drivers/jdbc/settings.cfg' recorded in upload history. No upload delay required. 
2023-05-09 09:04:32.000 [FINE   ] Uploading string content 'DRIVERNAME=DB2
JAR=j...' to bucket 'bfsdefault/default' at 'http://localhost:32772/default/drivers/jdbc/settings.cfg' 
2023-05-09 09:04:32.942 [FINE   ] Successfully uploaded string content 'DRIVERNAME=DB2
JAR=j...' to 'http://localhost:32772/default/drivers/jdbc/settings.cfg' 
2023-05-09 09:04:32.942 [FINE   ] Recorded upload to 'drivers/jdbc/settings.cfg' at 2023-05-09T09:04:32.942499Z in upload history 
2023-05-09 09:04:32.942 [FINEST ] Created log detector that scans for "drivers/jdbc/settings.cfg.*linked" in "/exa/logs/cored/bucketfsd.*.log" after line 0 with verifier TimestampLogEntryPatternVerifier [afterUtc=time 2023-05-09T09:04:31Z, timeZone=Europe/Berlin] 
2023-05-09 09:04:33.080 [FINE   ] Found matching log entry with time 2023-05-09T09:04:32Z (after time 2023-05-09T09:04:31Z): [I 230509 11:04:32 bucketfsd:1608] File 'default/drivers/jdbc/settings.cfg' linked 
2023-05-09 09:04:33.081 [FINE   ] Recorded upload to 'drivers/jdbc/settings.cfg' at 2023-05-09T09:04:33.081112Z in upload history 
2023-05-09 09:04:33.085 [FINE   ] No previous uploads to 'virtual-schema-dist-10.5.0-db2-2.1.1.jar' recorded in upload history. No upload delay required. 
2023-05-09 09:04:33.085 [FINE   ] Uploading file 'target/virtual-schema-dist-10.5.0-db2-2.1.1.jar' to bucket 'bfsdefault/default' at 'http://localhost:32772/default/virtual-schema-dist-10.5.0-db2-2.1.1.jar' 
2023-05-09 09:04:33.948 [FINE   ] Successfully uploaded file 'target/virtual-schema-dist-10.5.0-db2-2.1.1.jar' to 'http://localhost:32772/default/virtual-schema-dist-10.5.0-db2-2.1.1.jar' 
2023-05-09 09:04:33.948 [FINE   ] Recorded upload to 'virtual-schema-dist-10.5.0-db2-2.1.1.jar' at 2023-05-09T09:04:33.948930Z in upload history 
2023-05-09 09:04:33.949 [FINEST ] Created log detector that scans for "virtual-schema-dist-10.5.0-db2-2.1.1.jar.*linked" in "/exa/logs/cored/bucketfsd.*.log" after line 0 with verifier TimestampLogEntryPatternVerifier [afterUtc=time 2023-05-09T09:04:33Z, timeZone=Europe/Berlin] 
2023-05-09 09:04:34.013 [FINE   ] Found matching log entry with time 2023-05-09T09:04:33Z (after time 2023-05-09T09:04:33Z): [I 230509 11:04:33 bucketfsd:1608] File 'default/virtual-schema-dist-10.5.0-db2-2.1.1.jar' linked 
2023-05-09 09:04:34.013 [FINE   ] Recorded upload to 'virtual-schema-dist-10.5.0-db2-2.1.1.jar' at 2023-05-09T09:04:34.013655Z in upload history 
2023-05-09 09:06:49.936 [INFO   ] Leaving container running since reuse is enabled. Don't forget to stop and remove the container manually using docker rm -f CONTAINER_ID. 
2023-05-09 09:06:49.937 [FINE   ] Skipping support package creation. Exit type is EXIT_SUCCESS, monitoring EXIT_NONE 
Error:  Tests run: 21, Failures: 0, Errors: 21, Skipped: 0, Time elapsed: 730.249 s <<< FAILURE! - in com.exasol.adapter.dialects.db2.DB2SqlDialectIT
Error:  com.exasol.adapter.dialects.db2.DB2SqlDialectIT.testBooleanMapping  Time elapsed: 7.191 s  <<< ERROR!
java.lang.IllegalStateException: Failed to execute statement 'SELECT * FROM "THE_VS"."SINGLE_COLUMN_TABLE_BOOLEAN"': ETL-1014: No default DRIVER registered for jdbc:db2://172.17.0.1:32769/test. Please specify DRIVER or add a default via EXAoperation (Session: 1765406743360700416)
    at com.exasol.adapter.dialects.db2.DB2SqlDialectIT.query(DB2SqlDialectIT.java:338)
    at com.exasol.adapter.dialects.db2.DB2SqlDialectIT.selectAllFrom(DB2SqlDialectIT.java:331)
    at com.exasol.adapter.dialects.db2.DB2SqlDialectIT.selectAllFromCorrespondingVirtualTable(DB2SqlDialectIT.java:323)
    at com.exasol.adapter.dialects.db2.DB2SqlDialectIT.assertVirtualTableContents(DB2SqlDialectIT.java:308)
    at com.exasol.adapter.dialects.db2.DB2SqlDialectIT.testBooleanMapping(DB2SqlDialectIT.java:204)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
    at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
    at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
    at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
    at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)