Advertisement
Guest User

Wildfly services unavailable persistenceunit mysql

a guest
May 16th, 2016
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.10 KB | None | 0 0
  1. I configured my datasource from the localhost console and I used the driver that is inside the WAR. Tested it and all worked fine. But when I add a persistence unit I get that error. If i remove the persistence unit the error will still be there. Please help me.
  2.  
  3. hibernate.cfg.xml
  4.  
  5. <?xml version="1.0" encoding="UTF-8"?>
  6. <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
  7. <hibernate-configuration>
  8.   <session-factory>
  9.     <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
  10.     <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/booking</property>
  11.     <property name="hibernate.connection.username">radu</property>
  12.     <property name="hibernate.connection.password">*********</property>
  13.     <property name="hibernate.connection.datasource">wad</property>
  14.     <property name="hibernate.jndi.url">java:/wad</property>
  15.     <property name="hibernate.jndi.class">com.mysql.jdbc.Driver</property>
  16.     <mapping resource="Entities/Facilities.hbm.xml"/>
  17.     <mapping resource="Entities/Tags.hbm.xml"/>
  18.     <mapping resource="Entities/Companies.hbm.xml"/>
  19.     <mapping resource="Entities/ResortsRoomtypes.hbm.xml"/>
  20.     <mapping resource="Entities/TagsResorts.hbm.xml"/>
  21.     <mapping resource="Entities/Roomschedules.hbm.xml"/>
  22.     <mapping resource="Entities/Standardroomtypes.hbm.xml"/>
  23.     <mapping resource="Entities/ResortsroomtypesFacilities.hbm.xml"/>
  24.     <mapping resource="Entities/Rooms.hbm.xml"/>
  25.     <mapping resource="Entities/Users.hbm.xml"/>
  26.     <mapping resource="Entities/FeedbackTagsresorts.hbm.xml"/>
  27.     <mapping resource="Entities/Feedbacks.hbm.xml"/>
  28.     <mapping resource="Entities/Locations.hbm.xml"/>
  29.     <mapping resource="Entities/Resorts.hbm.xml"/>
  30.     <mapping resource="Entities/Feedbackratings.hbm.xml"/>
  31.   </session-factory>
  32. </hibernate-configuration>
  33.  
  34.  
  35. persistence.xml
  36.  
  37. <?xml version="1.0" encoding="UTF-8"?>
  38. <persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
  39.   <persistence-unit name="WAD" transaction-type="JTA">
  40.     <provider>org.hibernate.ejb.HibernatePersistence</provider>
  41.     <jta-data-source>java:/wad</jta-data-source>
  42.     <exclude-unlisted-classes>false</exclude-unlisted-classes>
  43.     <properties>
  44.       <property name="javax.persistence.schema-generation.database.action" value="create"/>
  45.     </properties>
  46.   </persistence-unit>
  47. </persistence>
  48.  
  49. error:
  50.  
  51. Deploying F:\wildfly\standalone\deployments\WAD.war
  52. "{\"WFLYCTL0288: One or more services were unable to start due to one or more indirect dependencies not being available.\" => {
  53.     \"Services that were unable to start:\" => [
  54.         \"jboss.deployment.unit.\\\"WAD.war\\\".POST_MODULE\",
  55.         \"jboss.persistenceunit.\\\"WAD.war#WAD\\\".__FIRST_PHASE__\"
  56.     ],
  57.     \"Services that may be the cause:\" => [\"jboss.jdbc-driver.WAD_war_com_mysql_jdbc_Driver_5_1\"]
  58. }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement