Error to start application (persistence.xml problem)
spiritfox26 Jul 25, 2011 3:05 PMI have this error when the server try to deploy mi app.
[org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "ITIL.war" 15:58:34,883 INFO [org.jboss.jpa] (MSC service thread 1-6) read persistence.xml for itil 15:58:35,971 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "ITIL.war" was rolled back with failure message {"Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"ITIL.war#itil\" missing [ jboss.naming.context.java.java:ds/ItilDS ]"]} 15:58:35,972 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) Service status report New missing/unsatisfied dependencies: service jboss.naming.context.java.java:ds/ItilDS (missing) 15:58:35,973 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"ITIL.war#itil\" missing [ jboss.naming.context.java.java:ds/ItilDS ]"]}}} 15:58:36,032 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) Stopped deployment ITIL.war in 53ms 15:58:36,033 INFO [org.jboss.as.controller] (MSC service thread 1-3) Service status report Newly corrected services: service jboss.naming.context.java.java:ds/ItilDS (no longer required)
persistence.xml (in my app )
<?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> <persistence-unit name="itil" transaction-type="RESOURCE_LOCAL"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <non-jta-data-source>java:ds/ItilDS</non-jta-data-source> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" /> <property name="hibernate.show_sql" value="false"/> </properties> </persistence-unit> </persistence>
itil-ds.xml (in C:\jboss-as-web-7.0.0.Final\standalone\deployments\itil-ds.xml)
<?xml version="1.0" encoding="UTF-8"?> <!-- Base de datos del callcenter factory config --> <datasources> <local-tx-datasource> <!-- The jndi name of the DataSource, it is prefixed with java:/ --> <!-- Datasources are not available outside the virtual machine --> <jndi-name>ds/ItilDS</jndi-name> <connection-url>jdbc:mysql://localhost/itil</connection-url> <!-- The driver class --> <driver-class>com.mysql.jdbc.Driver</driver-class> <!-- The login and password --> <user-name>user</user-name> <password>password</password> <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use --> <min-pool-size>5</min-pool-size> <!-- The maximum connections in a pool/sub-pool --> <max-pool-size>20</max-pool-size> <!-- The time before an unused connection is destroyed --> <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use --> <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections --> <idle-timeout-minutes>10</idle-timeout-minutes> <!-- sql to call when connection is created <new-connection-sql>some arbitrary sql</new-connection-sql> --> <!-- sql to call on an existing pooled connection when it is obtained from pool <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql> --> <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyValidConnectionChecker</valid-connection-checker-class-name> --> <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature that should be turned off in production --> <track-statements/> <!-- Use the getConnection(user, pw) for logins <application-managed-security/> --> </local-tx-datasource> </datasources>
Anyone can help me?
Thanks in advanced!
Regards