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
persistence.xml
beans.xml
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]] |