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 Search with Envers in dev mode (and so in native mode) #3690

Closed
dcdh opened this issue Aug 25, 2019 · 3 comments
Labels
area/hibernate-orm Hibernate ORM kind/bug Something isn't working triage/out-of-date This issue/PR is no longer valid or relevant

Comments

@dcdh
Copy link
Contributor

dcdh commented Aug 25, 2019

Describe the bug
The application fails to start when using Hibernate Search with Envers in dev mode (and so in native mode)

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

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

01:03:18,352 ERROR [io.qua.dev.DevModeMain] Failed to start quarkus: java.lang.ExceptionInInitializerError
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:126)
        at io.quarkus.dev.DevModeMain.doStart(DevModeMain.java:180)
        at io.quarkus.dev.DevModeMain.start(DevModeMain.java:94)
        at io.quarkus.dev.DevModeMain.main(DevModeMain.java:66)
Caused by: java.lang.RuntimeException: Failed to start quarkus
        at io.quarkus.runner.ApplicationImpl1.<clinit>(ApplicationImpl1.zig:245)
        ... 9 more
Caused by: org.hibernate.MappingException: component class not found: null
        at org.hibernate.mapping.Component.getComponentClass(Component.java:177)
        at org.hibernate.search.mapper.orm.model.impl.HibernateOrmBootstrapIntrospector.collectEmbeddedTypesRecursively(HibernateOrmBootstrapIntrospector.java:105)
        at org.hibernate.search.mapper.orm.model.impl.HibernateOrmBootstrapIntrospector.create(HibernateOrmBootstrapIntrospector.java:63)
        at org.hibernate.search.mapper.orm.mapping.impl.HibernateOrmMappingInitiator.create(HibernateOrmMappingInitiator.java:57)
        at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateOrmIntegrationBooterImpl.doBootFirstPhase(HibernateOrmIntegrationBooterImpl.java:189)
        at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateOrmIntegrationBooterImpl.preBoot(HibernateOrmIntegrationBooterImpl.java:95)
        at io.quarkus.hibernate.search.elasticsearch.runtime.HibernateSearchElasticsearchRecorder$HibernateSearchIntegrationListener.onMetadataInitialized(HibernateSearchElasticsearchRecorder.java:82)
        at io.quarkus.hibernate.orm.runtime.integration.HibernateOrmIntegrations.onMetadataInitialized(HibernateOrmIntegrations.java:29)
        at io.quarkus.hibernate.orm.runtime.boot.FastBootMetadataBuilder.build(FastBootMetadataBuilder.java:327)
        at io.quarkus.hibernate.orm.runtime.PersistenceUnitsHolder.createMetadata(PersistenceUnitsHolder.java:111)
        at io.quarkus.hibernate.orm.runtime.PersistenceUnitsHolder.constructMetadataAdvance(PersistenceUnitsHolder.java:84)
        at io.quarkus.hibernate.orm.runtime.PersistenceUnitsHolder.initializeJpa(PersistenceUnitsHolder.java:47)
        at io.quarkus.hibernate.orm.runtime.HibernateOrmRecorder$4.created(HibernateOrmRecorder.java:70)
        at io.quarkus.arc.runtime.ArcRecorder.initBeanContainer(ArcRecorder.java:92)
        at io.quarkus.deployment.steps.ArcProcessor$generateResources12.deploy_0(ArcProcessor$generateResources12.zig:364)
        at io.quarkus.deployment.steps.ArcProcessor$generateResources12.deploy(ArcProcessor$generateResources12.zig:36)
        at io.quarkus.runner.ApplicationImpl1.<clinit>(ApplicationImpl1.zig:231)
        ... 9 more
Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [null]
        at io.quarkus.hibernate.orm.runtime.service.FlatClassLoaderService.classForName(FlatClassLoaderService.java:39)
        at org.hibernate.mapping.Component.getComponentClass(Component.java:174)
        ... 25 more
Caused by: java.lang.NullPointerException
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at io.quarkus.hibernate.orm.runtime.service.FlatClassLoaderService.classForName(FlatClassLoaderService.java:37)
        ... 26 more

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/dcdh/poc-quarkus-persistence.git
  2. checkout branch search_with_auditing
  3. run the application using the script run_dev.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
(Add any other context about the problem here.)

@dcdh dcdh added the kind/bug Something isn't working label Aug 25, 2019
@dcdh
Copy link
Contributor Author

dcdh commented Aug 26, 2019

Hello, it is an hibernate search issue. I have open a ticket to them.

@Sanne
Copy link
Member

Sanne commented Oct 30, 2019

I guess this issue should have been closed?

@Sanne Sanne added the area/hibernate-orm Hibernate ORM label Oct 30, 2019
@gsmet
Copy link
Member

gsmet commented Nov 18, 2019

Yes, it's fixed.

@gsmet gsmet closed this as completed Nov 18, 2019
@gsmet gsmet added the triage/out-of-date This issue/PR is no longer valid or relevant label Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hibernate-orm Hibernate ORM kind/bug Something isn't working triage/out-of-date This issue/PR is no longer valid or relevant
Projects
None yet
Development

No branches or pull requests

3 participants