-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Getting NullPointerException while using hibernate reactive with any associations (@OneToMany, @ManyToMany, etc.) #16939
Comments
/cc @DavideD, @Sanne, @gavinking |
We are aware of this bug. It happens when setting the log to debug for
hibernate:
hibernate/hibernate-reactive#726
In your application.properties:
```
quarkus.log.category."org.hibernate".level=DEBUG
```
Change the log to info and the null pointer will disappear. Sorry about it.
It will be fixed as soon as we update the dependency in quarkus.
quarkus.log.category."org.hibernate".level=DEBUG
quarkus.log.category."org.hibernate".level=DEBUG
…On Sun, 2 May 2021, 20:11 quarkus-bot[bot], ***@***.***> wrote:
/cc @DavideD <https://github.com/DavideD>, @Sanne
<https://github.com/Sanne>, @gavinking <https://github.com/gavinking>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16939 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEIQ5LYAVFQVX5SCYAGCK3TLWPUZANCNFSM437VW2KQ>
.
|
This issue is a duplicate of
#16712
…On Sun, 2 May 2021, 21:00 Davide D'Alto, ***@***.***> wrote:
We are aware of this bug. It happens when setting the log to debug for
hibernate:
hibernate/hibernate-reactive#726
In your application.properties:
```
quarkus.log.category."org.hibernate".level=DEBUG
```
Change the log to info and the null pointer will disappear. Sorry about
it.
It will be fixed as soon as we update the dependency in quarkus.
quarkus.log.category."org.hibernate".level=DEBUG
quarkus.log.category."org.hibernate".level=DEBUG
On Sun, 2 May 2021, 20:11 quarkus-bot[bot], ***@***.***>
wrote:
> /cc @DavideD <https://github.com/DavideD>, @Sanne
> <https://github.com/Sanne>, @gavinking <https://github.com/gavinking>
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#16939 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAEIQ5LYAVFQVX5SCYAGCK3TLWPUZANCNFSM437VW2KQ>
> .
>
|
Thanks for the feedback!
…On Sun, 2 May 2021, 21:01 Davide D'Alto, ***@***.***> wrote:
This issue is a duplicate of
#16712
On Sun, 2 May 2021, 21:00 Davide D'Alto, ***@***.***> wrote:
> We are aware of this bug. It happens when setting the log to debug for
> hibernate:
> hibernate/hibernate-reactive#726
>
> In your application.properties:
> ```
> quarkus.log.category."org.hibernate".level=DEBUG
> ```
>
>
> Change the log to info and the null pointer will disappear. Sorry about
> it.
> It will be fixed as soon as we update the dependency in quarkus.
>
> quarkus.log.category."org.hibernate".level=DEBUG
>
> quarkus.log.category."org.hibernate".level=DEBUG
>
>
> On Sun, 2 May 2021, 20:11 quarkus-bot[bot], ***@***.***>
> wrote:
>
>> /cc @DavideD <https://github.com/DavideD>, @Sanne
>> <https://github.com/Sanne>, @gavinking <https://github.com/gavinking>
>>
>> —
>> You are receiving this because you were mentioned.
>> Reply to this email directly, view it on GitHub
>> <#16939 (comment)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AAEIQ5LYAVFQVX5SCYAGCK3TLWPUZANCNFSM437VW2KQ>
>> .
>>
>
|
@DavideD Thank you for the workaround. It works after setting log level to "INFO". Can you please let me know when this would get fixed, as sometimes "DEBUG" log is important for debugging? |
As soon as the hibernate reactive library will be upgraded. We haven't done
it yet because of some other issues with the upgrade that we are trying to
fix. Hopefully, soon
…On Mon, 3 May 2021, 10:55 KULDEEP R SRIVASTAVA, ***@***.***> wrote:
@DavideD <https://github.com/DavideD> Thank you for the workaround. It
works after setting log level to "INFO". Can you please let me know when
this would get fixed, as sometimes "DEBUG" log is important for debugging?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16939 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEIQ5PXKC7KVKQ2QZ35KULTLZXJHANCNFSM437VW2KQ>
.
|
There is a partial workaround for this bug:
I am not sure about the exact package that needs to log at |
I'll close it as it's a duplicate of #16712 Thanks! |
Describe the bug
Quarkus Application (version 1.13.3.Final) does not start, and gives NullPointerException when we use hibernate reactive with any hibernate associations.
Expected behavior
The application must start and should be able to create schema.
Actual behavior
2021-05-02 18:49:54,543 ERROR [io.qu.ru.Application] (Quarkus Main Thread) Failed to start application (with profile dev): java.lang.NullPointerException
at org.hibernate.reactive.persister.collection.impl.ReactiveOneToManyPersister.getSQLInsertRowString(ReactiveOneToManyPersister.java:144)
at org.hibernate.persister.collection.AbstractCollectionPersister.logStaticSQL(AbstractCollectionPersister.java:693)
at org.hibernate.persister.collection.AbstractCollectionPersister.(AbstractCollectionPersister.java:529)
at org.hibernate.persister.collection.OneToManyPersister.(OneToManyPersister.java:69)
at org.hibernate.reactive.persister.collection.impl.ReactiveOneToManyPersister.(ReactiveOneToManyPersister.java:52)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.hibernate.persister.internal.PersisterFactoryImpl.createCollectionPersister(PersisterFactoryImpl.java:152)
at org.hibernate.persister.internal.PersisterFactoryImpl.createCollectionPersister(PersisterFactoryImpl.java:140)
at org.hibernate.metamodel.internal.MetamodelImpl.initialize(MetamodelImpl.java:225)
at org.hibernate.internal.SessionFactoryImpl.(SessionFactoryImpl.java:303)
at org.hibernate.reactive.session.impl.ReactiveSessionFactoryImpl.(ReactiveSessionFactoryImpl.java:33)
at io.quarkus.hibernate.reactive.runtime.boot.FastBootReactiveEntityManagerFactoryBuilder.build(FastBootReactiveEntityManagerFactoryBuilder.java:34)
at io.quarkus.hibernate.reactive.runtime.FastBootHibernateReactivePersistenceProvider.createEntityManagerFactory(FastBootHibernateReactivePersistenceProvider.java:83)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:80)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
at io.quarkus.hibernate.orm.runtime.JPAConfig$LazyPersistenceUnit.get(JPAConfig.java:118)
at io.quarkus.hibernate.orm.runtime.JPAConfig.startAll(JPAConfig.java:42)
at io.quarkus.hibernate.orm.runtime.JPAConfig_Subclass.startAll$$superaccessor5(JPAConfig_Subclass.zig:763)
at io.quarkus.hibernate.orm.runtime.JPAConfig_Subclass$$function$$5.apply(JPAConfig_Subclass$$function$$5.zig:29)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.proceed(InvocationInterceptor.java:63)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.monitor(InvocationInterceptor.java:51)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor_Bean.intercept(InvocationInterceptor_Bean.zig:521)
at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41)
at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32)
at io.quarkus.hibernate.orm.runtime.JPAConfig_Subclass.startAll(JPAConfig_Subclass.zig:721)
at io.quarkus.hibernate.orm.runtime.HibernateOrmRecorder.startAllPersistenceUnits(HibernateOrmRecorder.java:88)
at io.quarkus.deployment.steps.HibernateOrmProcessor$startPersistenceUnits951856026.deploy_0(HibernateOrmProcessor$startPersistenceUnits951856026.zig:74)
at io.quarkus.deployment.steps.HibernateOrmProcessor$startPersistenceUnits951856026.deploy(HibernateOrmProcessor$startPersistenceUnits951856026.zig:40)
at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:762)
at io.quarkus.runtime.Application.start(Application.java:90)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:100)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:66)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:42)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:119)
at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
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 io.quarkus.runner.bootstrap.StartupActionImpl$3.run(StartupActionImpl.java:134)
at java.base/java.lang.Thread.run(Thread.java:834)
To Reproduce
sample-quarkus.zip
Configuration
# Add your application.properties here, if applicable.
Screenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
Output of
uname -a
orver
Output of
java -version
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment GraalVM CE 21.0.0.2 (build 11.0.10+8-jvmci-21.0-b06)
OpenJDK 64-Bit Server VM GraalVM CE 21.0.0.2 (build 11.0.10+8-jvmci-21.0-b06, mixed mode, sharing)
GraalVM version (if different from Java)
GraalVM CE 21.0.0.2 (build 11.0.10+8-jvmci-21.0-b06)
Quarkus version or git rev
Build tool (ie. output of
mvnw --version
orgradlew --version
)Additional context
If we use quarkus version 1.12.2.Final, atleast the application gets started and is able to create schema. But it fails in version 1.13 onwards.
The text was updated successfully, but these errors were encountered: