java - Error when deploy web-application on JBoss AS 7 -
i use jboss 7.1.1 final , i've 1 problem when try deploy application:
jbas014775: new missing/unsatisfied dependencies: service jboss.naming.context.java."\n\t\t\tjava:jboss".datasources."carsds\n\t\t"
(missing) dependents: [service jboss.persistenceunit."springtest.war#carspu"] 20:33:58,250 error [org.jboss.as.server.deployment.scanner] (deploymentscanner-threads - 1) {"jbas014653: composite operation failed , rolled back. steps failed:" => {"operation step-2" => {"jbas014771: services missing/unavailable dependencies" => ["jboss.persistenceunit.\"springtest.war#carspu\"jboss.naming.context.java.\"\n\t\t\tjava:jboss\".datasources.\"carsds\n\t\t\"missing[jboss.persistenceunit.\"springtest.war#carspu\"jboss.naming.context.java.\"\n\t\t\tjava:jboss\".datasources.\"carsds\n\t\t\"]"]}}}
this standalone.xml file:
<drivers> <driver module="com.h2database.h2" name="h2"> <xa-datasource-class>org.h2.jdbcx.jdbcdatasource</xa-datasource-class> </driver> <driver module="com.mysql" name="com.mysql"> <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.mysqlxadatasource</xa-datasource-class> </driver> </drivers> <datasource enabled="true" jndi-name="java:jboss/datasources/carsds" pool-name="carsds"> <connection-url>jdbc:mysql://localhost:3306</connection-url> <driver>com.mysql</driver> <pool> <min-pool-size>10</min-pool-size> <max-pool-size>100</max-pool-size> <prefill>true</prefill> </pool> <security> <user-name>michal</user-name> <password>michal</password> </security> <statement> <prepared-statement-cache-size>32</prepared-statement-cache-size> <share-prepared-statements /> </statement> </datasource>
and persistence.xml:
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="carspu" transaction-type="jta" > <provider>org.hibernate.ejb.hibernatepersistence</provider> <jta-data-source> java:jboss/datasources/carsds </jta-data-source> <class>pl.springtest.carentity</class> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.mysql5dialect"/> <property name="hibernate.hbm2ddl.auto" value="create-drop" /> </properties> </persistence-unit> </persistence>
please tell me wrong.
service jboss.naming.context.java."\n\t\t\tjava:jboss".datasources."carsds\n\t\t"
this looks suspicious. check if there's whitespace in place inject datasource.
Comments
Post a Comment