Can Türker (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5aaa756...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZWU4YTNkODFj...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15556?atlOrigin=eyJpIjoiZWU4YT...
) HHH-15556 (
https://hibernate.atlassian.net/browse/HHH-15556?atlOrigin=eyJpIjoiZWU4YT...
) Cannot deploy JakartaEE10 application when using Hibernate Version > 6.0.0 (
https://hibernate.atlassian.net/browse/HHH-15556?atlOrigin=eyJpIjoiZWU4YT...
)
Issue Type: Bug Affects Versions: 6.0.1, 6.1.3 Assignee: Unassigned Attachments:
test_jakarta10_hibernate6.zip Components: hibernate-entitymanager Created: 27/Sep/2022
08:03 AM Environment: Java 11
Hibernate 6.0.1
PostgreSQL 14
Payara 6 Priority: Major Reporter: Can Türker (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5aaa756...
)
I was trying to migration my application to JakartaEE 10 and Hibernate 6.1.3 and got all
the time the following error javax.xml.stream.FactoryConfigurationError: Provider for
javax.xml.stream.XMLInputFactory cannot be found! to find the source of the error, I
created a “small” test case (see attached file) to check whether JakartaEE 10 and
Hibernate 6 works in principle together. I found out that this is the for Hibernate
6.0.0.Final but not for the newer Versions. See below all my settings;
pom.xml
<?xml version="1.0" encoding="UTF-8"?><project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>1.0-SNAPSHOT</version>
<name>demo</name>
<packaging>war</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
</properties>
<dependencies>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
<version>10.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-core</artifactId>
<version>6.0.1.Final</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.2</version>
</plugin>
</plugins>
</build>
</project>
persistence.xml
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><persistence
xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence
https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">
<persistence-unit name="default">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<jta-data-source>jdbc/test</jta-data-source>
<properties>
<property name="jakarta.persistence.jdbc.driver"
value="org.postgresql.Driver"/>
<property name="jakarta.persistence.jdbc.url"
value="jdbc:postgresql://localhost:5432/test"/>
<property name="jakarta.persistence.jdbc.user"
value="test"/>
<property name="jakarta.persistence.jdbc.password"
value="test"/>
<property name="hibernate.transaction.jta.platform"
value="org.hibernate.service.jta.platform.internal.SunOneJtaPlatform" />
<property name="hibernate.hbm2ddl.auto" value="update"
/>
</properties>
</persistence-unit>
</persistence>
beans.xml
<?xml version="1.0" encoding="UTF-8"?><beans
xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
https://jakarta.ee/xml/ns/jakartaee/beans_3_0.xsd" version="3.0"
bean-discovery-mode="all">
</beans>
payara log:
[Payara 6.2022.1.Alpha4] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid:
_ThreadID=163 _ThreadName=admin-thread-pool::admin-listener(2)] [timeMillis:
1664289226779] [levelValue: 1000] [[
Exception during lifecycle processing
javax.xml.stream.FactoryConfigurationError: Provider for javax.xml.stream.XMLInputFactory
cannot be found
at java.xml/javax.xml.stream.FactoryFinder.find(FactoryFinder.java:320)
at java.xml/javax.xml.stream.XMLInputFactory.newFactory(XMLInputFactory.java:323)
at com.fasterxml.jackson.dataformat.xml.XmlFactory.<init>(XmlFactory.java:115)
at com.fasterxml.jackson.dataformat.xml.XmlFactory.<init>(XmlFactory.java:101)
at com.fasterxml.jackson.dataformat.xml.XmlFactory.<init>(XmlFactory.java:85)
at com.fasterxml.jackson.dataformat.xml.XmlMapper.<init>(XmlMapper.java:127)
at org.hibernate.type.JacksonXmlFormatMapper.<init>(JacksonXmlFormatMapper.java:27)
at
org.hibernate.type.JacksonXmlFormatMapper.<clinit>(JacksonXmlFormatMapper.java:22)
at
org.hibernate.boot.internal.SessionFactoryOptionsBuilder.lambda$determineXmlFormatMapper$7(SessionFactoryOptionsBuilder.java:826)
at
org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveStrategy(StrategySelectorImpl.java:221)
at
org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveDefaultableStrategy(StrategySelectorImpl.java:181)
at
org.hibernate.boot.internal.SessionFactoryOptionsBuilder.determineXmlFormatMapper(SessionFactoryOptionsBuilder.java:820)
at
org.hibernate.boot.internal.SessionFactoryOptionsBuilder.<init>(SessionFactoryOptionsBuilder.java:304)
at
org.hibernate.boot.internal.SessionFactoryBuilderImpl.<init>(SessionFactoryBuilderImpl.java:48)
at
org.hibernate.boot.internal.DefaultSessionFactoryBuilderService.createSessionFactoryBuilder(DefaultSessionFactoryBuilderService.java:26)
at
org.hibernate.boot.internal.MetadataImpl.getSessionFactoryBuilder(MetadataImpl.java:151)
at
org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1421)
at
org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:142)
at
org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:207)
at
org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:114)
at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:267)
at
org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:571)
at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:286)
at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:183)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:1191)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.prepare(ApplicationLifecycle.java:505)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:611)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:552)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/javax.security.auth.Subject.doAs(Subject.java:361)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:551)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:582)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:574)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/javax.security.auth.Subject.doAs(Subject.java:361)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:573)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1497)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1879)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1755)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:604)
at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:256)
at
org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:150)
at
com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:520)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:217)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:174)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:153)
at
org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:196)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:88)
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:246)
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:178)
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:118)
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:96)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:51)
at
org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:510)
at
org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:82)
at
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:83)
at
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:101)
at
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:535)
at
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:515)
at java.base/java.lang.Thread.run(Thread.java:834)
]]
[2022-09-27T16:33:46.791+0200] [Payara 6.2022.1.Alpha4] [SEVERE] []
[javax.enterprise.system.core] [tid: _ThreadID=163
_ThreadName=admin-thread-pool::admin-listener(2)] [timeMillis: 1664289226791] [levelValue:
1000] [[
Exception while preparing the app : Provider for javax.xml.stream.XMLInputFactory cannot
be found]]
(
https://hibernate.atlassian.net/browse/HHH-15556#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15556#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100207- sha1:520255c )