-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Labels
info: workaround availableA workaround is available for the issueA workaround is available for the issuetype: bugSomething isn't workingSomething isn't working
Description
Expected Behavior
No exception on starting up a default Micronaut Data + Hibernate JPA app.
Actual Behaviour
The application fails to start with the following error:
ERROR io.micronaut.runtime.Micronaut - Error starting Micronaut server: Bean definition [org.hibernate.SessionFactory] could not be loaded: Error instantiating bean of type [io.micronaut.configuration.hibernate.jpa.conf.sessionfactory.configure.internal.ValidatorFactoryConfigurer]
Message: Multiple possible bean candidates found: [DefaultInternalConstraintValidatorFactory, DefaultConstraintValidatorFactory]
Path Taken: SessionFactoryPerDataSourceFactory.buildHibernateSessionFactoryBuilder(SessionFactoryBuilder sessionFactoryBuilder) --> new SessionFactoryPerDataSourceFactory(Environment environment,[List configures],StandardServiceRegistryBuilderCreator serviceRegistryBuilderSupplier,List standardServiceRegistryBuilderConfigurers,JpaConfiguration jpaConfiguration,ApplicationContext applicationContext,Integrator integrator) --> new ValidatorFactoryConfigurer([ValidatorFactory validatorFactory])
io.micronaut.context.exceptions.BeanInstantiationException: Bean definition [org.hibernate.SessionFactory] could not be loaded: Error instantiating bean of type [io.micronaut.configuration.hibernate.jpa.conf.sessionfactory.configure.internal.ValidatorFactoryConfigurer]
Steps To Reproduce
- Create a Micronaut Data + Hibernate JPA project using Micronaut 4.3.1:
mn create-app -b gradle -l groovy -t spock --features=h2,jdbc-tomcat,data-jpa,hibernate-jpa,hibernate-validator mn-hibernate-playground. - Run the app:
./gradlew run. - The app fails to start.
Environment Information
- Ubuntu 22.04
- Java 17
Example Application
No response
Version
4.3.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
info: workaround availableA workaround is available for the issueA workaround is available for the issuetype: bugSomething isn't workingSomething isn't working