Adding a persistence.xml file from another package
eabohorquezs Jul 25, 2011 7:41 PMHello Guys,
Hope you are doing quite well.
I am new with Arquillian. I will try to be clear to get some help
I have 3 modules into 3 different packages.
A ---|
|----B
|----C
The package A is just a container for the other 2 packages.
B is a package of EJBs.
C is a package which contains POJOS and its persistence.xml file.
Im creating my test cases into
B ---|
|---src
---|
|---test
---|
|---java
---|
|---RequestBrokerTestCase.java
My persistence.xml file is into:
C---|
|---src
---|
|---META-INF
---|
|---persistence.xml
Having run my test case I obtained this error:
-------------------------------------------------------------------------------
Test set: test.java.RequestBrokerTestCase
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 8.265 sec <<< FAILURE!
test.java.RequestBrokerTestCase Time elapsed: 0 sec <<< ERROR!
org.jboss.arquillian.spi.client.container.DeploymentException: Failed to deploy test.war
at org.jboss.arquillian.container.jbossas.remote_6.JBossASRemoteContainer.deploy(JBossASRemoteContainer.java:169)
.
.
.
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
Caused by: java.lang.RuntimeException: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
*** DEPLOYMENTS IN ERROR: Name -> Error
vfs:///C:/jboss-6.0.0.Final/server/default/deploy/test.war -> org.jboss.deployers.spi.DeploymentException: Error deploying test.war: Exception while processing container metadata for EJB: CardsControlNoRefManager in unit: test.war
DEPLOYMENTS IN ERROR:
Deployment "vfs:///C:/jboss-6.0.0.Final/server/default/deploy/test.war" is in error due to the following reason(s): java.lang.IllegalArgumentException: Can't find a persistence unit named 'TransactionalCorePersistancePU' in AbstractVFSDeploymentContext@3691798{vfs:///C:/jboss-6.0.0.Final/server/default/deploy/test.war}
TransactionalCorePersistancePU is defined into the persitence.xml file as follows:
.
.
.
<persistence-unit name="TransactionalCorePersistancePU" transaction-type="JTA">
.
.
.
How can I add this persistence.xml file to my test case deployment run into B?
or what package should I place my test cases in?
Thanks in advance for your help.