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

Error report to be improved when entity is created and no datasource config is present #14930

Closed
emmanuelbernard opened this issue Feb 9, 2021 · 1 comment · Fixed by #15188
Assignees
Labels
area/hibernate-orm Hibernate ORM kind/enhancement New feature or request
Milestone

Comments

@emmanuelbernard
Copy link
Member

In my usual Todo app, creating anm entity with no datasource configured yet, I receive

io.quarkus.runtime.configuration.ConfigurationException: Model classes are defined for the default persistence unit but no default datasource found: the default EntityManagerFactory will not be created.
	at io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor.handleHibernateORMWithNoPersistenceXml(HibernateOrmProcessor.java:697)
	at io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor.configurationDescriptorBuilding(HibernateOrmProcessor.java:310)
	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.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
	at java.base/java.lang.Thread.run(Thread.java:834)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)

It used to say: Hibernate extension cannt guess the dialect as no JDBC driver is specified by quarkus.datasource.driver

I'm not saying the the former was perfect but the new one is a bit cryptic with "default datasource" and EntityManager not started. It's not actionable what I can to do solve it. Pointing to the quarkus properties to look at would help.

@emmanuelbernard emmanuelbernard added the kind/bug Something isn't working label Feb 9, 2021
@ghost ghost added the triage/needs-triage label Feb 9, 2021
@emmanuelbernard emmanuelbernard added the area/hibernate-orm Hibernate ORM label Feb 9, 2021
@emmanuelbernard
Copy link
Member Author

cc @Sanne @gsmet

@Sanne Sanne added kind/enhancement New feature or request and removed triage/needs-triage kind/bug Something isn't working labels Feb 9, 2021
@yrodiere yrodiere self-assigned this Feb 19, 2021
@quarkus-bot quarkus-bot bot added this to the 1.13 - master milestone Feb 19, 2021
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/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants