Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H2 upgrade from 1.4.197 to 1.4.199 makes Agroal DefaultDataSourceConfigTest test fail #1522

Closed
rsvoboda opened this issue Mar 15, 2019 · 5 comments
Labels
triage/wontfix This will not be worked on

Comments

@rsvoboda
Copy link
Member

H2 upgrade from 1.4.197 to 1.4.199 makes Agroal DefaultDataSourceConfigTest test fail

The main trouble seems to be Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: Database "mem:default" not found, and IFEXISTS=true, so we cant auto-create it [90146-199]

[INFO] Running io.quarkus.agroal.test.DefaultDataSourceConfigTest
[INFO] H2 database started in TCP server mode
2019-03-15 19:02:37,948 INFO  [io.qua.dep.QuarkusAugmentor] (main) Beginning quarkus augmentation
2019-03-15 19:02:39,306 INFO  [io.qua.dep.QuarkusAugmentor] (main) Quarkus augmentation completed in 1358ms
2019-03-15 19:02:39,510 INFO  [io.quarkus] (main) Quarkus 999-SNAPSHOT started in 0.206s.
2019-03-15 19:02:39,510 INFO  [io.quarkus] (main) Installed features: [agroal, cdi, narayana-jta]
2019-03-15 19:02:39,619 INFO  [io.quarkus] (main) Quarkus stopped in 0.003s
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.244 s <<< FAILURE! - in io.quarkus.agroal.test.DefaultDataSourceConfigTest
[ERROR] testDefaultDataSourceInjection  Time elapsed: 0.047 s  <<< ERROR!
java.sql.SQLException: Exception while creating new connection
        at io.agroal.pool.ConnectionPool.handlerFromSharedCache(ConnectionPool.java:225)
        at io.agroal.pool.ConnectionPool.getConnection(ConnectionPool.java:146)
        at io.agroal.pool.DataSource.getConnection(DataSource.java:61)
        at io.quarkus.agroal.test.DefaultDataSourceConfigTest.testDataSource(DefaultDataSourceConfigTest.java:52)
        at io.quarkus.agroal.test.DefaultDataSourceConfigTest.testDefaultDataSourceInjection(DefaultDataSourceConfigTest.java:33)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at io.quarkus.test.QuarkusUnitTest$1.invoke(QuarkusUnitTest.java:123)
        at io.quarkus.agroal.test.DefaultDataSourceConfigTest$$QuarkusUnitTestProxy.testDefaultDataSourceInjection(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:532)
        at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:115)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:171)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:167)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:114)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:59)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:108)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
        at java.util.ArrayList.forEach(ArrayList.java:1257)
        at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:112)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
        at java.util.ArrayList.forEach(ArrayList.java:1257)
        at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:112)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
        at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
        at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
        at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
        at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:170)
        at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:154)
        at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:90)
        at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:142)
        at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:117)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:383)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:344)
        at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:417)
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Exception while creating new connection
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at io.agroal.pool.ConnectionPool.handlerFromSharedCache(ConnectionPool.java:193)
        ... 49 more
Caused by: java.lang.RuntimeException: Exception while creating new connection
        at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:357)
        at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:337)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at io.agroal.pool.util.PriorityScheduledExecutor.beforeExecute(PriorityScheduledExecutor.java:63)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: Database "mem:default" not found, and IFEXISTS=true, so we cant auto-create it [90146-199]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:617)
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
        at org.h2.message.DbException.get(DbException.java:205)
        at org.h2.message.DbException.get(DbException.java:181)
        at org.h2.engine.Engine.openSession(Engine.java:67)
        at org.h2.engine.Engine.openSession(Engine.java:201)
        at org.h2.engine.Engine.createSessionAndValidate(Engine.java:178)
        at org.h2.engine.Engine.createSession(Engine.java:161)
        at org.h2.server.TcpServerThread.run(TcpServerThread.java:160)
        at java.lang.Thread.run(Thread.java:748)

        at org.h2.message.DbException.getJdbcSQLException(DbException.java:617)
        at org.h2.engine.SessionRemote.done(SessionRemote.java:607)
        at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:143)
        at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:431)
        at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:317)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:169)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:148)
        at org.h2.Driver.connect(Driver.java:69)
        at io.agroal.pool.ConnectionFactory.createConnection(ConnectionFactory.java:178)
        at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:348)
        ... 6 more


@rsvoboda
Copy link
Member Author

http://www.h2database.com/html/features.html#database_only_if_exists - Opening a Database Only if it Already Exists

@Sanne
Copy link
Member

Sanne commented Mar 15, 2019

hi @rsvoboda, it's really not the intention of extensions to allow people to override the platform versions.

It's a bit sad but that's how it is. I'm not planning to upgrade to 1.4.199 as it has some severe regressions...

So what is this issue about?

@rsvoboda
Copy link
Member Author

1.4.198 has some issues too, we have to stay with 1.4.197

@Sanne, so in end the issue is not on our side as you pointed out, H2 is the trouble. I think I will close the issue.

Should we add a comment to bom so people don't waste their time trying to update H2 version ?
Or comments in this issues is sufficient note for users ?

@Sanne
Copy link
Member

Sanne commented Mar 15, 2019

Adding a comment to the BOM is probably a good start 👍

I'm thinking we should also make it very clear in other docs / guides that version overrides aren't allowed; let's check what others think at the next design meeting?

gsmet added a commit that referenced this issue Mar 15, 2019
#1522 Warning to keep H2 version as is
@Sanne
Copy link
Member

Sanne commented Mar 16, 2019

should we close this?

vorburger added a commit to vorburger/quarkus that referenced this issue Mar 18, 2019
* master: (167 commits)
  Allow for usage of @ConfigProperty on fields without the need for @Inject. Fixes quarkusio#1315.
  Expose all flavors (core, axle, rx) of Vert.x EventBus
  RestClient - passing incoming JAX-RS headers, fixes quarkusio#1017
  JAX-RS body writers for Vert.x JsonObject and JsonArray
  Increase CI memory
  PathTestHelper should accept default Gradle build paths now + make sure we run the test in gradle-it
  Change to use ./mvnw
  Update opentracing guide to describe using application.properties as alternative to env vars
  fix npe in dev mode when source is missing in recompilation diagnostic
  Add the quarkus-elytron-security component in the BOM
  Moves the logic that handles the registration of schema class for serialization in smallrye-openapi-extension
  Add Maven Wrapper to generated projects
  [security extension] - AuthConfig only configured if IdentityManager is produced
  quarkusio#1522 Warning to keep H2 version as is
  Minor corrections to mx and git repo clone instructions.
  programmatic client generation for MP Rest Client, fixes quarkusio#1317
  Hibernate ORM - Fix config property name in error message
  Camel - Use a constant for Camel root package directory
  Micro version updates
  JAX-RS Generate reflection declaration from MP OpenAPI schema definition
  ...
@gsmet gsmet added the triage/wontfix This will not be worked on label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants