[jboss-jira] [JBoss JIRA] (WFLY-2727) @DataSourceDefinition defined data source can't be used in persistence.xml with CDI entity listeners
Scott Marlow (JIRA)
issues at jboss.org
Wed Jun 25 12:13:25 EDT 2014
[ https://issues.jboss.org/browse/WFLY-2727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979336#comment-12979336 ]
Scott Marlow commented on WFLY-2727:
------------------------------------
Martin,
Are you deploying an EAR? If yes, is the @DataSourceDefinition in the same subdeployment (e.g. contained EJB jar) as the persistence.xml? I'm not yet sure if that could be part of the issue. Have you enabled [TRACE logging for JPA|https://docs.jboss.org/author/display/WFLY8/JPA+Reference+Guide#JPAReferenceGuide-Troubleshooting]? It might helpful to see the console output (server.log) from deploying with TRACE enabled for JPA.
Could you start a forum thread on [https://community.jboss.org/community/wildfly] that references this jira and also includes the server.log (or parts of it that include the deployment) attached. Feel free to answer my above questions there as well.
Scott
> @DataSourceDefinition defined data source can't be used in persistence.xml with CDI entity listeners
> ----------------------------------------------------------------------------------------------------
>
> Key: WFLY-2727
> URL: https://issues.jboss.org/browse/WFLY-2727
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: EE, JPA / Hibernate
> Affects Versions: 8.0.0.CR1
> Reporter: arjan tijms
> Assignee: Scott Marlow
>
> Defining a data source from within the application using either {{@DataSourceDefinition}} on a class or the {{data-source}} element in {{web.xml}}, and then using this in {{persistence.xml}} will cause a deployment failure.
> E.g.
> {code:xml|title=web.xml}
> <data-source>
> <name>java:app/MyApp/MyDS</name>
> <class-name>org.h2.jdbcx.JdbcDataSource</class-name>
> <url>jdbc:h2:mem:test</url>
> </data-source>
> {code}
> and
> {code:xml|title=persistence.xml}
> <persistence-unit name="testPU">
> <jta-data-source>java:app/MyApp/MyDS</jta-data-source>
> </persistence-unit>
> {code}
> will result in:
> {noformat}
> ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 3) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "dca783dd-b383-4a16-85a4-1331a2f89354.war")]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"dca783dd-b383-4a16-85a4-1331a2f89354.war#testPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.app.dca783dd-b383-4a16-85a4-1331a2f89354.MyApp.MyDS]"]}
> ERROR [org.jboss.as.server] (management-handler-thread - 3) JBAS015870: Deploy of deployment "dca783dd-b383-4a16-85a4-1331a2f89354.war" was rolled back with the following failure message: {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"dca783dd-b383-4a16-85a4-1331a2f89354.war#testPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.app.dca783dd-b383-4a16-85a4-1331a2f89354.MyApp.MyDS]"]}
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
More information about the jboss-jira
mailing list