[
https://issues.jboss.org/browse/WFLY-4096?page=com.atlassian.jira.plugin....
]
shinzey shinzey commented on WFLY-4096:
---------------------------------------
Here's the error message with hibernate.temp.use_jdbc_metadata_defaults set to false:
{quote}
11:09:49,484 ERROR [org.jboss.as.controller.management-operation]
(DeploymentScanner-threads - 2) JBAS014613: Operation ("deploy") failed -
address: ([("deployment" => "wildweb.war")]) - failure description:
("JBAS014771: Services with missing/unavailable dependencies" =>
["jboss.persistenceunit.\"wildweb.war#wwpu\".__FIRST_PHASE__ is missing
[jboss.naming.context.java.app.wildweb.wildweb.test]"])
11:09:49,562 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559:
Deployed "wildweb.war" (runtime-name : "wildweb.war")
11:09:49,562 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774:
Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.naming.context.java.app.wildweb.wildweb.test (missing) dependents:
[service jboss.persistenceunit."wildweb.war#wwpu".__FIRST_PHASE__]
JBAS014776: Newly corrected services:
service jboss.deployment.unit."wildweb.war".beanmanager (no longer
required)
{quote}
An interesting question is since GlassFish can make all of these work together, why
can't WildFly?
Datasource Defined in web.xml Does Not Work with JPA Entity Manager
-------------------------------------------------------------------
Key: WFLY-4096
URL:
https://issues.jboss.org/browse/WFLY-4096
Project: WildFly
Issue Type: Bug
Components: JPA / Hibernate, Web (JBoss Web)
Affects Versions: 8.1.0.Final
Environment: Windows 7
Java 8u25
WildFly 8.1.0.Final
Reporter: shinzey shinzey
Assignee: Scott Marlow
Priority: Critical
Labels: datasource, deployment, jpa, persistence.xml, persistenceUnit
The datasource defined in web.xml:
{quote}
<data-source>
<name>java:/datasources/test</name>
<class-name>org.apache.derby.jdbc.ClientDataSource</class-name>
<database-name>test</database-name>
<url>jdbc:derby://localhost:1527/test</url>
<user>test</user>
<password>test</password>
</data-source>
{quote}
The persistence unit:
{quote}
<persistence-unit name="wtpu" transaction-type="JTA">
<jta-data-source>java:/datasources/test</jta-data-source>
</persistence-unit>
{quote}
The deployment error:
{quote}
17:57:10,813 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876:
Starting deployment of "WebTest.war" (runtime-name: "WebTest.war")
17:57:11,078 INFO [org.jboss.as.jpa] (MSC service thread 1-2) JBAS011401: Read
persistence.xml for wtpu
17:57:11,172 ERROR [org.jboss.as.controller.management-operation]
(DeploymentScanner-threads - 1) JBAS014613: Operation ("deploy") failed -
address: ([("deployment" => "WebTest.war")]) - failure description:
("JBAS014771: Services with missing/unavailable dependencies" =>
["jboss.persistenceunit.\"WebTest.war#wtpu\".__FIRST_PHASE__ is missing
[jboss.naming.context.java.datasources.test]"])
17:57:11,187 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018559:
Deployed "WebTest.war" (runtime-name : "WebTest.war")
17:57:11,187 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774:
Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.naming.context.java.datasources.test (missing) dependents: [service
jboss.persistenceunit."WebTest.war#wtpu".__FIRST_PHASE__]
{quote}
If I remove the persistence unit, the datasource can be successfully bound:
{quote}
17:55:47,851 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread
1-3) JBAS010400: Bound data source [java:/datasources/test]
{quote}
The same code works as expected in GlassFish 4.1, and the @DataSourceDefinition
annotation has the same issue.
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)