Missing file during deployment.
samwun9988 Sep 2, 2011 1:40 AMHello,
I added Hibernate Persistent in my WAR file and deployed to JBOSS AS7, but JBOSS having a problem finding my persistent unit.
Here is the full log for the deployment:
15:14:23,298 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) Starting deployment of "category-ws-0.0.1-SNAPSHOT.war"
15:14:24,335 INFO [org.jboss.jpa] (MSC service thread 1-7) read persistence.xml for HousewareCategoryPU
15:14:24,335 INFO [org.jboss.jpa] (MSC service thread 1-7) read persistence.xml for HousewareCategoryPU
15:14:24,336 WARN [org.jboss.jpa] (MSC service thread 1-7) duplicate Persistence Unit definition for HousewareCategoryPU in application. One of the duplicate persistence.xml should be removed from the application. Application deployment will continue with the persistence.xml definitions from category-ws-0.0.1-SNAPSHOT.war#HousewareCategoryPU used. The persistence.xml definitions from category-ws-0.0.1-SNAPSHOT.war#HousewareCategoryPU will be ignored.
15:14:24,337 INFO [org.jboss.as.jpa] (MSC service thread 1-4) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to category-ws-0.0.1-SNAPSHOT.war
15:14:24,337 INFO [org.jboss.as.jpa] (MSC service thread 1-4) added (default provider) org.hibernate dependency to application deployment (since 1 PU(s) didn't specify jboss.as.jpa.providerModule)
15:14:24,337 INFO [org.jboss.as.jpa] (MSC service thread 1-4) added org.hibernate dependency to application deployment
15:14:24,368 INFO [org.jboss.wsf.stack.cxf.deployment.aspect.DescriptorDeploymentAspect] (MSC service thread 1-3) Spring not available, skipping check for user provided jbossws-cxf.xml / cxf.xml configuration files.
15:14:24,369 INFO [org.jboss.wsf.stack.cxf.metadata.MetadataBuilder] (MSC service thread 1-3) Add Service
id=CXFCategoryServlet
address=http://localhost:80/category-ws-0.0.1-SNAPSHOT/services
implementor=ix.houseware.category.service.CreateCategoryImpl
invoker=org.jboss.wsf.stack.cxf.JBossWSInvoker
serviceName={http://service.category.houseware.ix/}CreateCategoryImplService
portName={http://service.category.houseware.ix/}CreateCategoryImplPort
wsdlLocation=null
mtomEnabled=false
15:14:24,369 INFO [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-3) register: jboss.ws:context=category-ws-0.0.1-SNAPSHOT,endpoint=CXFCategoryServlet
15:14:24,375 INFO [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-3) Creating Service {http://service.category.houseware.ix/}CreateCategoryImplService from class ix.houseware.category.service.CreateCategory
15:14:24,401 INFO [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-3) Setting the server's publish address to be http://localhost:80/category-ws-0.0.1-SNAPSHOT/services
15:14:24,403 WARN [org.jboss.wsf.stack.cxf.resolver.JBossWSResourceResolver] (MSC service thread 1-3) Cannot resolve resource: cxf
15:14:24,410 INFO [org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher] (MSC service thread 1-3) WSDL published to: file:/usr/local/users/jboss/jboss71A/standalone/data/wsdl/category-ws-0.0.1-SNAPSHOT.war/CreateCategoryImplService.wsdl
15:14:24,416 INFO [org.jboss.as.jpa] (MSC service thread 1-3) Deployment has its own Persistence Provider class org.hibernate.ejb.HibernatePersistence
15:14:24,427 INFO [org.jboss.as.webservices.service.EndpointService] (MSC service thread 1-5) Starting service jboss.ws.endpoint."category-ws-0.0.1-SNAPSHOT".CXFCategoryServlet
15:14:24,632 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 1) Deployment of "category-ws-0.0.1-SNAPSHOT.war" was rolled back with failure message {"Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"category-ws-0.0.1-SNAPSHOT.war#HousewareCategoryPU\" missing [ jboss.naming.context.java.Houseware ]"]}
15:14:24,635 INFO [org.jboss.as.webservices.service.EndpointService] (MSC service thread 1-1) Stopping service jboss.ws.endpoint."category-ws-0.0.1-SNAPSHOT".CXFCategoryServlet
15:14:24,639 WARN [org.jboss.wsf.stack.cxf.resolver.JBossWSResourceResolver] (MSC service thread 1-2) Cannot resolve resource: org.apache.cxf.ws.rm.RMManager/bus
15:14:24,642 INFO [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-2) remove: jboss.ws:context=category-ws-0.0.1-SNAPSHOT,endpoint=CXFCategoryServlet
15:14:24,654 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) Stopped deployment category-ws-0.0.1-SNAPSHOT.war in 22ms
15:14:24,655 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 2) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"category-ws-0.0.1-SNAPSHOT.war#HousewareCategoryPU\" missing [ jboss.naming.context.java.Houseware ]"]}}}
My src/main/resources/META-INF/persistent.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" 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">
<persistence-unit name="HousewareCategoryPU" transaction-type="JTA">
<jta-data-source>java:/Houseware</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties/>
</persistence-unit>
<persistence-unit name="HousewareCategoryPU" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/Houseware</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="hibernate.hbm2ddl.auto" value="update"/>
</properties>
</persistence-unit>
</persistence>
web.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<display-name>CreateCategory</display-name>
<servlet>
<servlet-name>CXFCategoryServlet</servlet-name>
<servlet-class>
ix.houseware.category.service.CreateCategoryImpl
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CXFCategoryServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
</web-app>
What have I scewed up in my configuration?
Very appreciate for any suggestion/
Thanks
Sam