Hi,
I tried to 1) build the petclinic application from https://github.com/showpune/spring-petclinic/tree/native-support-3.0 using command mvn -Dmaven.test.skip=true -Ppre-native spring-boot:build-image 2) get the image showpune/petclinic-native:3.0.0-SNAPSHOT 3) run the image with "docker run showpune/petclinic-native:3.0.0-SNAPSHOT" and I got the following error
|\ _,,,--,,_
/,`.-'`' ._ \-;;,_
_______ __|,4- ) )_ .;.(__`'-'__ ___ __ _ ___ _______
| | '---''(_/._)-'(_\_) | | | | | | | | |
| _ | ___|_ _| | | | | |_| | | | __ _ _
| |_| | |___ | | | | | | | | | | \ \ \ \
| ___| ___| | | | _| |___| | _ | | _| \ \ \ \
| | | |___ | | | |_| | | | | | | |_ ) ) ) )
|___| |_______| |___| |_______|_______|___|_| |__|___|_______| / / / /
==================================================================/_/_/_/
:: Built with Spring Boot :: 3.0.0-SNAPSHOT
%PARSER_ERROR[d] %PARSER_ERROR[p] 1 --- [%PARSER_ERROR[t]] %PARSER_ERROR[logger] : %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[d] %PARSER_ERROR[p] 1 --- [%PARSER_ERROR[t]] %PARSER_ERROR[logger] : %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[d] %PARSER_ERROR[p] 1 --- [%PARSER_ERROR[t]] %PARSER_ERROR[logger] :
%PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[d] %PARSER_ERROR[p] 1 --- [%PARSER_ERROR[t]] %PARSER_ERROR[logger] : %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[d] %PARSER_ERROR[p] 1 --- [%PARSER_ERROR[t]] %PARSER_ERROR[logger] : %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[d] %PARSER_ERROR[p] 1 --- [%PARSER_
ERROR[t]] %PARSER_ERROR[logger] : %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[d] %PARSER_ERROR[p] 1 --- [%PARSER_ERROR[t]] %PARSER_ERROR[logger] : %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[d] %PARSER_ERROR[p] 1 --- [%PARSER_ERROR[t]] %PARSER_ERROR[logger] : %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[d]
%PARSER_ERROR[p] 1 --- [%PARSER_ERROR[t]] %PARSER_ERROR[logger] : %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[d] %PARSER_ERROR[p] 1 --- [%PARSER_ERROR[t]] %PARSER_ERROR[logger] : %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[d] %PARSER_ERROR[p] 1 --- [%PARSER_ERROR[t]] %PARSER_ERROR[logger] : %PARSER_ERROR[m]%PARSER_ERROR[n]
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory': Instantiation of supplied bean failed
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainInstanceFromSupplier(AbstractAutowireCapableBeanFactory.java:1236) ~[org.springframework.samples.petclinic.PetClinicApplication:6.0.0-RC3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1210) ~[org.springframework.samples.petclinic.PetClinicApplication:6.0.0-RC3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1157) ~[org.springframework.samples.petclinic.PetClinicApplication:6.0.0-RC3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:561) ~[org.springframework.samples.petclinic.PetClinicApplication:6.0.0-RC3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[org.springframework.samples.petclinic.PetClinicApplication:6.0.0-RC3]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[org.springframework.samples.petclinic.PetClinicApplication:6.0.0-RC3]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[org.springframework.samples.petclinic.PetClinicApplication:6.0.0-RC3]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[org.springframework.samples.petclinic.PetClinicApplication:6.0.0-RC3]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[org.springframework.samples.petclinic.PetClinicApplication:6.0.0-RC3]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1131) ~[org.springframework.samples.petclinic.PetClinicApplication:6.0.0-RC3]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:906) ~[org.springframework.samples.petclinic.PetClinicApplication:6.0.0-RC3]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:584) ~[org.springframework.samples.petclinic.PetClinicApplication:6.0.0-RC3]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[org.springframework.samples.petclinic.PetClinicApplication:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) ~[org.springframework.samples.petclinic.PetClinicApplication:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:432) ~[org.springframework.samples.petclinic.PetClinicApplication:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[org.springframework.samples.petclinic.PetClinicApplication:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302) ~[org.springframework.samples.petclinic.PetClinicApplication:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1291) ~[org.springframework.samples.petclinic.PetClinicApplication:3.0.0-SNAPSHOT]
at org.springframework.samples.petclinic.PetClinicApplication.main(PetClinicApplication.java:32) ~[org.springframework.samples.petclinic.PetClinicApplication:na]
Caused by: java.lang.IllegalStateException: No available JtaPlatform candidates amongst [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform, org.hibernate.service.jta.platform.internal.NoJtaPlatform]
at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration.getNoJtaPlatformManager(HibernateJpaConfiguration.java:213) ~[org.springframework.samples.petclinic.PetClinicApplication:na]
at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration.configureJtaPlatform(HibernateJpaConfiguration.java:150) ~[org.springframework.samples.petclinic.PetClinicApplication:na]
at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration.customizeVendorProperties(HibernateJpaConfiguration.java:139) ~[org.springframework.samples.petclinic.PetClinicApplication:na]
at org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.entityManagerFactory(JpaBaseConfiguration.java:132) ~[org.springframework.samples.petclinic.PetClinicApplication:na]
at org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration__BeanDefinitions.lambda$getEntityManagerFactoryInstanceSupplier$3(JpaBaseConfiguration__BeanDefinitions.java:84) ~[na:na]
at org.springframework.util.function.ThrowingBiFunction.apply(ThrowingBiFunction.java:68) ~[org.springframework.samples.petclinic.PetClinicApplication:6.0.0-RC3]
at org.springframework.util.function.ThrowingBiFunction.apply(ThrowingBiFunction.java:54) ~[org.springframework.samples.petclinic.PetClinicApplication:6.0.0-RC3]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.lambda$get$2(BeanInstanceSupplier.java:212) ~[na:na]
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:59) ~[org.springframework.samples.petclinic.PetClinicApplication:6.0.0-RC3]
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:47) ~[org.springframework.samples.petclinic.PetClinicApplication:6.0.0-RC3]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.invokeBeanSupplier(BeanInstanceSupplier.java:224) ~[na:na]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.get(BeanInstanceSupplier.java:211) ~[na:na]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainInstanceFromSupplier(AbstractAutowireCapableBeanFactory.java:1225) ~[org.springframework.samples.petclinic.PetClinicApplication:6.0.0-RC3]
... 18 common frames omitted
I seems a bug of JPA doesn't work for spring 3.0 native
Comment From: wilkinsona
Your fork doesn't contain all of the necessary changes. Please use https://github.com/spring-projects/spring-petclinic/tree/springboot3 to try PetClinic with Spring Boot 3's native support.