Skip to content
Advertisement

Failed to start service jboss.persistenceunit: org.hibernate.service.UnknownServiceException

I would like to ask if somebody could help to resolve this problem because I’m stuck with it and I don’t know where the problem could be. Until now I developed my application under Glassfish Server 4. Now I deceided to change my server for WildFly and I edited some configs to be able to run it on Wild Fly.

Project is created using maven, and I run it using mvn install wildfly:deploy command from terminal.

Here is server log:

JavaScript

My standalone.xml config (included only parts I have added or edited):

JavaScript

then default datasource:

JavaScript

and under security domains (because I use JAAS)

JavaScript

My persistence.xml:

JavaScript

hibernate.cfg.xml:

JavaScript

jboss-web.xml:

JavaScript

This is part of code where I produce EntityManager:

JavaScript

Connection to Postgres database works fine I have tested it from wildfly console, because the datasource jBossJaasPostgres was successfully created.

I found answers to this questions but no answer worked for me.

Thank you very much for your answers.

Advertisement

Answer

I deleted the hibernate.cfg.xml and moved the configuration from this file to persistence.xml. Then I also removed all hibernate files from WEB-INF/lib folder, because WildFly has its own ones and this situation also possibly made a conflict. More details on this problem in this link : JBoss Community Forum

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement