Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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.
- hibernate.cfg.xml
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
- <hibernate-configuration>
- <session-factory>
- <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
- <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/booking</property>
- <property name="hibernate.connection.username">radu</property>
- <property name="hibernate.connection.password">*********</property>
- <property name="hibernate.connection.datasource">wad</property>
- <property name="hibernate.jndi.url">java:/wad</property>
- <property name="hibernate.jndi.class">com.mysql.jdbc.Driver</property>
- <mapping resource="Entities/Facilities.hbm.xml"/>
- <mapping resource="Entities/Tags.hbm.xml"/>
- <mapping resource="Entities/Companies.hbm.xml"/>
- <mapping resource="Entities/ResortsRoomtypes.hbm.xml"/>
- <mapping resource="Entities/TagsResorts.hbm.xml"/>
- <mapping resource="Entities/Roomschedules.hbm.xml"/>
- <mapping resource="Entities/Standardroomtypes.hbm.xml"/>
- <mapping resource="Entities/ResortsroomtypesFacilities.hbm.xml"/>
- <mapping resource="Entities/Rooms.hbm.xml"/>
- <mapping resource="Entities/Users.hbm.xml"/>
- <mapping resource="Entities/FeedbackTagsresorts.hbm.xml"/>
- <mapping resource="Entities/Feedbacks.hbm.xml"/>
- <mapping resource="Entities/Locations.hbm.xml"/>
- <mapping resource="Entities/Resorts.hbm.xml"/>
- <mapping resource="Entities/Feedbackratings.hbm.xml"/>
- </session-factory>
- </hibernate-configuration>
- persistence.xml
- <?xml version="1.0" encoding="UTF-8"?>
- <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">
- <persistence-unit name="WAD" transaction-type="JTA">
- <provider>org.hibernate.ejb.HibernatePersistence</provider>
- <jta-data-source>java:/wad</jta-data-source>
- <exclude-unlisted-classes>false</exclude-unlisted-classes>
- <properties>
- <property name="javax.persistence.schema-generation.database.action" value="create"/>
- </properties>
- </persistence-unit>
- </persistence>
- error:
- Deploying F:\wildfly\standalone\deployments\WAD.war
- "{\"WFLYCTL0288: One or more services were unable to start due to one or more indirect dependencies not being available.\" => {
- \"Services that were unable to start:\" => [
- \"jboss.deployment.unit.\\\"WAD.war\\\".POST_MODULE\",
- \"jboss.persistenceunit.\\\"WAD.war#WAD\\\".__FIRST_PHASE__\"
- ],
- \"Services that may be the cause:\" => [\"jboss.jdbc-driver.WAD_war_com_mysql_jdbc_Driver_5_1\"]
- }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement