Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception deploying datasource for Hibernate  RSS feed

 
Brian Jones Jr.
Ranch Hand
Posts: 39
2
Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Wildfly 10 quickstart for hibernate5 throws an exception relating to the datasource. hibernate5 deploys, but an error message is displayed when the app tries to submit information to the database. I think it's related to the another app that I'm trying to build. I copied some of the information from from the quickstart hibernate5 to my application which is called WebApp. I see the string WebApp in the exception for the hibernate5 app. I commented out the datasource information from WebApp. Then I did a clean on the project and tried to run the app again, but I still have the same problem.

Then I tried another suggestion. I went into the standalone.xml filed and deleted the <deployment> tag as recommended here: http://stackoverflow.com/questions/28509729/wildfly-duplicateserviceexception

Does anyone know why this is happening, and how I can fix it? I'll include the pom file for both apps, and the standalone.xml just in case that's useful. Thanks.

console output when I run start hibernate5



hibernate5-quickstart-ds.xml


hibernate-ds.xml this is the file I use in WebApp


hibernate5 pom


WebApp pom


standalone.xml
 
Brian Jones Jr.
Ranch Hand
Posts: 39
2
Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I deleted WebApp, and it still doesn't work. The exception looks a little different. Now it's throwing a org.jboss.msc.service.DuplicateServiceException. There's no reference to WebApp anymore in the stacktrace. I'm posting the new stack trace and the persistence.xml for the hibernate5 app. I think it might be related to the persistence.xml and the datasource file now.

I was rereading the comments in the *-ds.xml file, and it say's that the file has been deprecated in wildfly.
 
Brian Jones Jr.
Ranch Hand
Posts: 39
2
Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I deleted WebApp, and it still doesn't work. The exception looks a little different. Now it's throwing a org.jboss.msc.service.DuplicateServiceException. There's no reference to WebApp anymore in the stacktrace. I'm posting the new stack trace and the persistence.xml for the hibernate5 app. I think it might be related to the persistence.xml and the datasource file now.

I was rereading the comments in the wildfly logs, and it said that the *-ds.xml file are deprecated. Here is the output from the wildfly logs. I'm am also getting the same results when I run a backup copy of the hibernate5 quickstart from the CLI. I replaced the standalone.xml with the original version.

 
Brian Jones Jr.
Ranch Hand
Posts: 39
2
Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
persistence.xml

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!