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

The application fails to start when using Hibernate Envers in native mode. #3627

Closed
dcdh opened this issue Aug 21, 2019 · 2 comments
Closed
Labels
area/persistence OBSOLETE, DO NOT USE kind/enhancement New feature or request triage/duplicate This issue or pull request already exists

Comments

@dcdh
Copy link
Contributor

dcdh commented Aug 21, 2019

[EDIT] I have created a poc to focus on this issue.

Describe the bug
The application fails to start when using Hibernate Envers in native mode.

Expected behavior
The application starts and expected entities are audited using Hibernate Envers.

Actual behavior
The application fails to start by throwing an exception at startup:

javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
        at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.persistenceException(FastBootEntityManagerFactoryBuilder.java:113)
        at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.build(FastBootEntityManagerFactoryBuilder.java:67)
        at io.quarkus.hibernate.orm.runtime.FastBootHibernatePersistenceProvider.createEntityManagerFactory(FastBootHibernatePersistenceProvider.java:54)
        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
        at io.quarkus.hibernate.orm.runtime.JPAConfig$LazyPersistenceUnit.get(JPAConfig.java:109)
        at io.quarkus.hibernate.orm.runtime.JPAConfig.startAll(JPAConfig.java:57)
        at io.quarkus.hibernate.orm.runtime.HibernateOrmRecorder.startAllPersistenceUnits(HibernateOrmRecorder.java:77)
        at io.quarkus.deployment.steps.HibernateOrmProcessor$startPersistenceUnits11.deploy_0(HibernateOrmProcessor$startPersistenceUnits11.zig:51)
        at io.quarkus.deployment.steps.HibernateOrmProcessor$startPersistenceUnits11.deploy(HibernateOrmProcessor$startPersistenceUnits11.zig:70)
        at io.quarkus.runner.ApplicationImpl1.doStart(ApplicationImpl1.zig:155)
        at io.quarkus.runtime.Application.start(Application.java:84)
        at io.quarkus.runtime.Application.run(Application.java:196)
        at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:34)
Caused by: org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.component.DynamicMapComponentTuplizer]
        at org.hibernate.tuple.component.ComponentTuplizerFactory.constructTuplizer(ComponentTuplizerFactory.java:107)
        at org.hibernate.tuple.component.ComponentTuplizerFactory.constructDefaultTuplizer(ComponentTuplizerFactory.java:128)
        at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:77)
        at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:52)
        at org.hibernate.mapping.Component.getType(Component.java:227)
        at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:455)
        at org.hibernate.mapping.RootClass.validate(RootClass.java:268)
        at org.hibernate.boot.internal.MetadataImpl.validate(MetadataImpl.java:343)
        at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:461)
        at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.build(FastBootEntityManagerFactoryBuilder.java:65)
        ... 12 more
Caused by: java.lang.NullPointerException
        at org.hibernate.tuple.component.ComponentTuplizerFactory.constructTuplizer(ComponentTuplizerFactory.java:104)
        ... 21 more
Exception in thread "main" java.lang.RuntimeException: Failed to start quarkus
        at io.quarkus.runner.ApplicationImpl1.doStart(ApplicationImpl1.zig:191)
        at io.quarkus.runtime.Application.start(Application.java:84)
        at io.quarkus.runtime.Application.run(Application.java:196)
        at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:34)
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
        at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.persistenceException(FastBootEntityManagerFactoryBuilder.java:113)
        at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.build(FastBootEntityManagerFactoryBuilder.java:67)
        at io.quarkus.hibernate.orm.runtime.FastBootHibernatePersistenceProvider.createEntityManagerFactory(FastBootHibernatePersistenceProvider.java:54)
        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
        at io.quarkus.hibernate.orm.runtime.JPAConfig$LazyPersistenceUnit.get(JPAConfig.java:109)
        at io.quarkus.hibernate.orm.runtime.JPAConfig.startAll(JPAConfig.java:57)
        at io.quarkus.hibernate.orm.runtime.HibernateOrmRecorder.startAllPersistenceUnits(HibernateOrmRecorder.java:77)
        at io.quarkus.deployment.steps.HibernateOrmProcessor$startPersistenceUnits11.deploy_0(HibernateOrmProcessor$startPersistenceUnits11.zig:51)
        at io.quarkus.deployment.steps.HibernateOrmProcessor$startPersistenceUnits11.deploy(HibernateOrmProcessor$startPersistenceUnits11.zig:70)
        at io.quarkus.runner.ApplicationImpl1.doStart(ApplicationImpl1.zig:155)
        ... 3 more
Caused by: org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.component.DynamicMapComponentTuplizer]
        at org.hibernate.tuple.component.ComponentTuplizerFactory.constructTuplizer(ComponentTuplizerFactory.java:107)
        at org.hibernate.tuple.component.ComponentTuplizerFactory.constructDefaultTuplizer(ComponentTuplizerFactory.java:128)
        at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:77)
        at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:52)
        at org.hibernate.mapping.Component.getType(Component.java:227)
        at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:455)
        at org.hibernate.mapping.RootClass.validate(RootClass.java:268)
        at org.hibernate.boot.internal.MetadataImpl.validate(MetadataImpl.java:343)
        at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:461)
        at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.build(FastBootEntityManagerFactoryBuilder.java:65)
        ... 12 more
Caused by: java.lang.NullPointerException
        at org.hibernate.tuple.component.ComponentTuplizerFactory.constructTuplizer(ComponentTuplizerFactory.java:104)
        ... 21 more

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/dcdh/poc-quarkus-persistence.git
  2. checkout branch envers
  3. in a shell build the native application by:
    3.1. editing the file build_native.sh to export variables to the expected graalvm installation
    3.2. run the script build_native.sh
  4. execute the application by running the script run_native.sh

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 or ver: Linux arch-anywhere 5.1.6-arch1-1-ARCH Switch to the Maven distributed copy of the SubstrateVM annotations #1 SMP PREEMPT Fri May 31 15:17:53 UTC 2019 x86_64 GNU/Linux
  • Output of java -version: openjdk version "1.8.0_222"
  • GraalVM version (if different from Java): GraalVM CE 19.2.0 (build 25.222-b08-jvmci-19.2-b02, mixed mode)
  • Quarkus version or git rev: 0.21.1

Additional context

linked with #3120 and #3250

@dcdh dcdh added the kind/bug Something isn't working label Aug 21, 2019
@dcdh dcdh changed the title The application fails to start when using Hibernate Envers in **native** mode. The application fails to start when using Hibernate Envers in native mode. Aug 21, 2019
@gsmet gsmet added the area/persistence OBSOLETE, DO NOT USE label Aug 22, 2019
@Sanne
Copy link
Member

Sanne commented Aug 28, 2019

I'd classify this as a feature request rather than a bug: we didn't create an Envers extension yet.

@Sanne Sanne added kind/enhancement New feature or request and removed kind/bug Something isn't working labels Aug 28, 2019
@Sanne
Copy link
Member

Sanne commented Aug 28, 2019

Actually, since the feature request already exists ( #3120 ) I'll close this.

@Sanne Sanne closed this as completed Aug 28, 2019
@gsmet gsmet added the triage/duplicate This issue or pull request already exists label Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/persistence OBSOLETE, DO NOT USE kind/enhancement New feature or request triage/duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants