-
15. Re: AS7 CR1
prasad.deshpande Jul 1, 2011 5:57 AM (in response to smarlow)Hi Scott, Jaikiran,
I tried to deploy just one entity in ear & it failed giving following error.
10:48:11,125 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.naming.context.java.comp.efp.efprocess.ActionPersister.\"env/com.banctec.caseware.server.actionpersister.ActionPersisterFacade/em\".jboss.deployment.subunit.\"efp.ear\".\"efprocess.jar\".component.ActionPersister.8","jboss.persistenceunit.\"efp.ear#efp\"","jboss.deployment.subunit.\"efp.ear\".\"efprocess.jar\".jndiDependencyService","jboss.deployment.subunit.\"efp.ear\".\"efprocess.jar\".component.ActionPersister.START"]}}}
I've attached source-code of the bean & in efp.zip, you have directory based deployment of efp.ear. In lib directory you'll find, efpentities.jar which contains persistence.xml. additionally you'll need to create datasource required.
Could you please have a look at it & whether you get same error?
@Scott, I tried enabling TRACE, wasn't of much help...
Thanks,
Prasad
-
efp.zip 432.2 KB
-
ActionPersisterPK.java.zip 642 bytes
-
ActionPersisterLocal.java.zip 437 bytes
-
ActionPersisterFacade.java.zip 793 bytes
-
ActionPersisterBean.java.zip 915 bytes
-
-
16. Re: AS7 CR1
prasad.deshpande Jul 1, 2011 6:53 AM (in response to prasad.deshpande)Something seems to be not correct with persistence unit. Now, I have just EntityBean & a PU definition in a ejb.jar in ear & I get
11:50:34,125 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.\"efp.ear/efprocess.jar#efp\""]}}}
-
17. Re: AS7 CR1
smarlow Jul 1, 2011 7:31 AM (in response to prasad.deshpande)I am seeing the following error in server.log, will have to debug to see why "java" is getting doubled...
New missing/unsatisfied dependencies:
service jboss.naming.context.java.java:jdbc/eFpDataSource (missing)
-
18. Re: AS7 CR1
smarlow Jul 1, 2011 7:41 AM (in response to smarlow)looks like the double "java" isn't the issue.
Instead, lets try changing the datasource name to something like "java:jboss/datasources/eFpDataSource"
-
19. Re: AS7 CR1
jaikiran Jul 1, 2011 7:43 AM (in response to smarlow)There's a bug in the PersistenceUnitDeploymentProcessor. It isn't handling the jta-data-source value properly while translating it into a ServiceName. As a workaround, I changed the jta-data-source value in persistence.xml to remove the java: prefix:
<jta-data-source>jdbc/eFpDataSource</jta-data-source>
It still doesn't deploy due to (different) missing dependencies. I am not sure what it's missing yet.
P.S: Something appears to have changed just before CR1 with respect to error reporting. The errors weren't this complex earlier.
-
20. Re: AS7 CR1
smarlow Jul 1, 2011 7:49 AM (in response to jaikiran)Changing the datasource to "java:jboss/datasources/eFpDataSource" worked for me.
-
21. Re: AS7 CR1
smarlow Jul 1, 2011 9:09 AM (in response to smarlow)I added a jira (https://issues.jboss.org/browse/AS7-1171) for this problem.
-
22. Re: AS7 CR1
prasad.deshpande Jul 1, 2011 9:28 AM (in response to smarlow)Scott, I want to try with your workaround here, just to clarify, in DS definition I have :
<xa-datasource jndi-name="java:jdbc/eFpDataSource" pool-name="eFpXADS" enabled="true" use-java-context="true" use-ccm="true">
& in persistence.xml
<jta-data-source>java:jdbc/eFpDataSource</jta-data-source>
What changes should I make to make it work?
-
23. Re: AS7 CR1
smarlow Jul 1, 2011 9:37 AM (in response to prasad.deshpande)1 of 1 people found this helpfulChange from the above to:
updated DS definition:
<xa-datasource jndi-name="java:jboss/datasources/eFpDataSource" pool-name="eFpXADS" enabled="true" use-java-context="true" use-ccm="true">
updated persistence.xml:
<jta-data-source>java:jboss/datasources/eFpDataSource</jta-data-source>
-
24. Re: AS7 CR1
prasad.deshpande Jul 1, 2011 10:05 AM (in response to smarlow)Thanks a lot Scott & Jaikiran!! Scott's solution worked for me too.
I hope, I'll get issue fixed soon & would try again in may be nightly builds..
-
25. Re: AS7 CR1
bcn Jul 14, 2011 4:37 AM (in response to prasad.deshpande)Hi,
I am trying to migrate from AS 6 to AS 7.0.0 Final and get a similar problem, although I changed the datasource like above suggested by Scott.
09:51:15,845 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "myapp.war" was rolled back with failure message {"Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"myapp.war\".component.SearchHome.START missing [
jboss.naming.context.java.module.myapp.myapp.\"env/com.myapp.persistence.generated.SearchHome/entityManager\" ]"
The class looks like
@Stateless
public class SearchHome {
@PersistenceContext
protected EntityManager entityManager;
In AS 6 it deployed without problems.
Any help would be greatly appreciated
-
26. Re: AS7 CR1
jaikiran Jul 14, 2011 4:46 AM (in response to bcn)Have you configured the datasource in standalone.xml? What does it look like? Also what are the contents of your persistence.xml file?
-
27. Re: AS7 CR1
bcn Jul 14, 2011 4:55 AM (in response to jaikiran)yes, datasource is in standalone.xml:
<datasource jndi-name="java:jboss/datasources/MyAppDS" pool-name="MyAppDS_Pool" enabled="true" jta="true" use-java-context="true" use-ccm="true">
persistence.xml (relevant parts):
<persistence-unit name="myapp">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/datasources/MyAppDS</jta-data-source>
Thanks for the quick reply!
-
28. Re: AS7 CR1
jaikiran Jul 14, 2011 5:12 AM (in response to bcn)Does using:
@PersistenceContext(unitName="myapp")
make a difference? If not, can you please attach the application which reproduces this issue?
-
29. Re: AS7 CR1
bcn Jul 14, 2011 6:39 AM (in response to jaikiran)No, it doesn't make a difference. I thought it could be the location of the persistence.xml file (WEB-INF/classes/META-INF and not META-INF), but doesn't help neither.
Attached a slim version of the war archive to reproduce the problem. I will delete it after a while.
Thanks