WildFly 27 Beta1 Hibernate

383 views
Skip to first unread message

Wing Mak

unread,
Oct 12, 2022, 11:20:09 PM10/12/22
to WildFly
Hello,

          We are using WildFly 27.0.0.Alpha5, Jakarta EE 10 and hibernate-core-jakarta (5.6.7.Final). It seems ok. 

         When I upgrade to WildFly 27 Beta1, the war cannot be deloyed, you said that the Hibernate is upgrade to 6.1. But I find this url mvnrepository, Hibernate ORM Hibernate Core Jakarta, the latest version is still 5.6.12.Final.


Only Hibernate Core Relocation is 6.1.4.Final (The latest one). 

How to do so? Many thanks.





Scott Marlow

unread,
Oct 13, 2022, 8:30:46 AM10/13/22
to Wing Mak, WildFly

Hello,

I see Hibernate ORM 6.1.4.Final via link https://mvnrepository.com/artifact/org.hibernate/hibernate-core/6.1.4.Final which you can use instead of Hibernate ORM 5.6.7.Final (be sure that you change application source imports of javax.persistence package, to instead use jakarta.persistence package and rebuild).

Scott

--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/e502301f-8b3e-4f04-abd7-bda38d3fc2f5n%40googlegroups.com.

Wing Mak

unread,
Oct 13, 2022, 11:50:25 PM10/13/22
to WildFly
Hello,

          We choose to use hibernate-core-jakarta (5.6.7.Final) because we would like to use Jakarta JPA 3.0 API. If we change the artifacts back to hivernate-core, does it mean that we have to downgrade the version back to JPA 2.2 ? Seem that JPA 2.2 does not support Jakarta EE 10.

Many thanks
sma...@redhat.com 在 2022年10月13日 星期四晚上8:30:46 [UTC+8] 的信中寫道:

Scott Marlow

unread,
Oct 14, 2022, 10:33:17 AM10/14/22
to Wing Mak, WildFly


On 10/13/22 11:50 PM, Wing Mak wrote:
Hello,

          We choose to use hibernate-core-jakarta (5.6.7.Final) because we would like to use Jakarta JPA 3.0 API. If we change the artifacts back to hivernate-core, does it mean that we have to downgrade the version back to JPA 2.2 ? Seem that JPA 2.2 does not support Jakarta EE 10.

Is there a reason why you are not using Hibernate ORM 6 that is included with WildFly? 

Scott


Many thanks
sma...@redhat.com 在 2022年10月13日 星期四晚上8:30:46 [UTC+8] 的信中寫道:

Hello,

I see Hibernate ORM 6.1.4.Final via link https://mvnrepository.com/artifact/org.hibernate/hibernate-core/6.1.4.Final which you can use instead of Hibernate ORM 5.6.7.Final (be sure that you change application source imports of javax.persistence package, to instead use jakarta.persistence package and rebuild).

Scott

On 10/12/22 11:20 PM, Wing Mak wrote:
Hello,

          We are using WildFly 27.0.0.Alpha5, Jakarta EE 10 and hibernate-core-jakarta (5.6.7.Final). It seems ok. 

         When I upgrade to WildFly 27 Beta1, the war cannot be deloyed, you said that the Hibernate is upgrade to 6.1. But I find this url mvnrepository, Hibernate ORM Hibernate Core Jakarta, the latest version is still 5.6.12.Final.


Only Hibernate Core Relocation is 6.1.4.Final (The latest one). 

How to do so? Many thanks.





--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/e502301f-8b3e-4f04-abd7-bda38d3fc2f5n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
Message has been deleted

Scott Marlow

unread,
Oct 17, 2022, 10:39:16 AM10/17/22
to Wing Mak, WildFly

I believe this problem is fixed for Hibernate ORM 6.1.4 which should be in the https://ci.wildfly.org/repository/download/WF_Nightly/330619:id/wildfly-latest-SNAPSHOT.zip build.  Could you please try again with that.

Scott

On 10/17/22 3:11 AM, Wing Mak wrote:
15:03:57,734 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 81) MSC000001: Failed to start service jboss.persistenceunit."DPAS_TR_WEB.war#DPAS": org.jboss.msc.service.StartException in service jboss.persistenceunit."DPAS_TR_WEB.war#DPAS": java.lang.ExceptionInInitializerError
    at org.jbos...@27.0.0.Beta1//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:199)
    at org.jbos...@27.0.0.Beta1//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:129)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at org.wildfly.secu...@2.0.0.Final//org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:664)
    at org.jbos...@27.0.0.Beta1//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:214)
    at org.jbos...@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
    at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.base/java.lang.Thread.run(Thread.java:833)
    at org.jbos...@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
Caused by: java.lang.ExceptionInInitializerError
    at org.hi...@6.1.3.Final//org.hibernate.dialect.OracleDialect.contributeTypes(OracleDialect.java:723)
    at org.hi...@6.1.3.Final//org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:386)
    at org.hi...@6.1.3.Final//org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:143)
    at org.hi...@6.1.3.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1350)
    at org.hi...@6.1.3.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1421)
    at org.hibernate.ji...@27.0.0.Beta1//org.jboss.as.jpa.hibernate.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:45)
    at org.jbos...@27.0.0.Beta1//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:171)
    ... 10 more
Caused by: java.lang.RuntimeException: Couldn't initialize OracleArrayJdbcType
    at org.hi...@6.1.3.Final//org.hibernate.dialect.OracleArrayJdbcType.<clinit>(OracleArrayJdbcType.java:62)
    ... 17 more
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleConnection from [Module "org.hibernate" version 6.1.3.Final from local module loader @466276d8 (finder: local module finder @5ce8d869 (roots: C:\wildfly-27.0.0.Beta1\modules,C:\wildfly-27.0.0.Beta1\modules\system\layers\base))]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:200)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:375)
    at org.hi...@6.1.3.Final//org.hibernate.dialect.OracleArrayJdbcType.<clinit>(OracleArrayJdbcType.java:58)
    ... 17 more

15:03:57,806 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "DPAS_TR_WEB.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"DPAS_TR_WEB.war#DPAS\"" => "java.lang.ExceptionInInitializerError
    Caused by: java.lang.ExceptionInInitializerError
    Caused by: java.lang.RuntimeException: Couldn't initialize OracleArrayJdbcType
    Caused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleConnection from [Module \"org.hibernate\" version 6.1.3.Final from local module loader @466276d8 (finder: local module finder @5ce8d869 (roots: C:\\wildfly-27.0.0.Beta1\\modules,C:\\wildfly-27.0.0.Beta1\\modules\\system\\layers\\base))]"}}
15:03:57,841 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 46) WFLYSRV0010: Deployed "DPAS_TR_WEB.war" (runtime-name : "DPAS_TR_WEB.war")
15:03:57,845 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.persistenceunit."DPAS_TR_WEB.war#DPAS": java.lang.ExceptionInInitializerError
WFLYCTL0448: 188 additional services are down due to their dependencies being missing or failed
15:03:57,914 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
15:03:57,919 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 27.0.0.Beta1 (WildFly Core 19.0.0.Beta18) started (with errors) in 19408ms - Started 493 of 916 services (192 services failed or missing dependencies, 363 services are lazy, passive or on-demand) - Server configuration file in use: standalone.xml
15:03:57,925 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
15:03:57,926 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990

 ==============================================================================================================================================================    

I use this url to connect Oracle database 12c  -->  https://www.adam-bien.com/roller/abien/entry/installing_oracle_jdbc_driver_on

My project requirement needs to use Wildfly-27.0.0.Final and Jakarta EE10.

Here attached the pom.xml and persistence.xml.

Many thanks

sma...@redhat.com 在 2022年10月14日 星期五晚上10:33:17 [UTC+8] 的信中寫道:


Wing Mak

unread,
Oct 18, 2022, 2:51:50 AM10/18/22
to WildFly
Great !! It is fine. The problem is solved. Many thanks !! 


sma...@redhat.com 在 2022年10月17日 星期一晚上10:39:16 [UTC+8] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages