-
-
Notifications
You must be signed in to change notification settings - Fork 101
Integration with H2 #1336
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
Integration with H2 #1336
Conversation
ae5a255
to
7b4f29a
Compare
We had this error on CI (I need to have a look at it later):
Gradle Test Executor 1 > org.hibernate.reactive.CacheTest > testCacheWithNativeSQL FAILED
java.util.concurrent.CompletionException: javax.persistence.PersistenceException: org.hibernate.HibernateException: java.util.concurrent.CompletionException: java.lang.NullPointerException
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:932)
at java.base/java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:946)
at java.base/java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2266)
at java.base/java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:143)
at org.hibernate.reactive.session.impl.ReactiveSessionImpl.firePersist(ReactiveSessionImpl.java:678)
at org.hibernate.reactive.session.impl.ReactiveSessionImpl.reactivePersist(ReactiveSessionImpl.java:662)
at org.hibernate.reactive.util.impl.CompletionStages.lambda$loop2ドル(CompletionStages.java:177)
at org.hibernate.reactive.util.impl.CompletionStages$ArrayLoop.next(CompletionStages.java:396)
at org.hibernate.reactive.util.async.impl.AsyncTrampoline.lambda$asyncWhile1ドル(AsyncTrampoline.java:215)
at org.hibernate.reactive.util.async.impl.AsyncTrampoline$TrampolineInternal.unroll(AsyncTrampoline.java:121)
at org.hibernate.reactive.util.async.impl.AsyncTrampoline$TrampolineInternal.trampoline(AsyncTrampoline.java:102)
at org.hibernate.reactive.util.async.impl.AsyncTrampoline.asyncWhile(AsyncTrampoline.java:197)
at org.hibernate.reactive.util.async.impl.AsyncTrampoline.asyncWhile(AsyncTrampoline.java:215)
at org.hibernate.reactive.util.impl.CompletionStages.loop(CompletionStages.java:356)
at org.hibernate.reactive.util.impl.CompletionStages.loop(CompletionStages.java:340)
at org.hibernate.reactive.util.impl.CompletionStages.loop(CompletionStages.java:177)
at org.hibernate.reactive.util.impl.CompletionStages.applyToAll(CompletionStages.java:419)
at org.hibernate.reactive.stage.impl.StageSessionImpl.persist(StageSessionImpl.java:137)
at org.hibernate.reactive.CacheTest.lambda$testCacheWithNativeSQL32ドル(CacheTest.java:135)
Caused by:
javax.persistence.PersistenceException: org.hibernate.HibernateException: java.util.concurrent.CompletionException: java.lang.NullPointerException
at app//org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)
at app//org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181)
at app//org.hibernate.reactive.session.impl.ReactiveExceptionConverter.convert(ReactiveExceptionConverter.java:31)
at app//org.hibernate.reactive.session.impl.ReactiveSessionImpl.lambda$firePersist18ドル(ReactiveSessionImpl.java:685)
at java.base@11.0.15/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:930)
... 18 more
Caused by:
org.hibernate.HibernateException: java.util.concurrent.CompletionException: java.lang.NullPointerException
at app//org.hibernate.reactive.session.impl.ReactiveExceptionConverter.convert(ReactiveExceptionConverter.java:31)
... 20 more
Caused by:
java.util.concurrent.CompletionException: java.lang.NullPointerException
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:683)
at java.base/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:658)
at java.base/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:2094)
at java.base/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:143)
at org.hibernate.reactive.id.impl.SequenceReactiveIdentifierGenerator.nextHiValue(SequenceReactiveIdentifierGenerator.java:45)
at org.hibernate.reactive.id.impl.BlockingIdentifierGenerator.generate(BlockingIdentifierGenerator.java:59)
at org.hibernate.reactive.id.impl.ReactiveGeneratorWrapper.generate(ReactiveGeneratorWrapper.java:38)
at org.hibernate.reactive.id.impl.IdentifierGeneration.generateId(IdentifierGeneration.java:140)
at org.hibernate.reactive.event.impl.AbstractReactiveSaveEventListener.reactiveSaveWithGeneratedId(AbstractReactiveSaveEventListener.java:122)
at org.hibernate.reactive.event.impl.DefaultReactivePersistEventListener.entityIsTransient(DefaultReactivePersistEventListener.java:179)
at org.hibernate.reactive.event.impl.DefaultReactivePersistEventListener.reactiveOnPersist(DefaultReactivePersistEventListener.java:128)
at org.hibernate.reactive.event.impl.DefaultReactivePersistEventListener.reactiveOnPersist(DefaultReactivePersistEventListener.java:58)
at org.hibernate.event.service.internal.EventListenerGroupImpl.lambda$fireEventOnEachListener0ドル(EventListenerGroupImpl.java:133)
at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1106)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2235)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:143)
at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:133)
at org.hibernate.reactive.session.impl.ReactiveSessionImpl.firePersist(ReactiveSessionImpl.java:676)
... 14 more
Caused by:
java.lang.NullPointerException
at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:680)
MySQL always returns an id of type Long. This commit changes an hack that was affecting all dbs and preventing H2 to read identity id of type Integer or Short
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will use an H2 instance baked by a file in the home directory. Could we use an in-memory instance instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I will change it
Uh oh!
There was an error while loading. Please reload this page.
Fix #929
It's a draft because I need to review it