]
Jesper Pedersen commented on JBAS-9339:
---------------------------------------
There is no DefaultDS in AS 7. It is up to each subsystem to create their own. Of course
if multiple datasources are needed across subsystems they should use the same.
Provide jta-data-source if not specified
----------------------------------------
Key: JBAS-9339
URL:
https://issues.jboss.org/browse/JBAS-9339
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: JPA / Hibernate
Reporter: Shelly McGowan
Assignee: Scott Marlow
Fix For: 7.0.0.CR1
Persistence 2.0 Spec, Chapter 8.2.1.5
In Java EE environments, the jta-data-source and non-jta-data-source elements are used to
specify the global JNDI name of the JTA and/or non-JTA data source to be used by the
persistence provider.
and need to provide one if it is not specified:
If neither is specified, the deployer must specify a JTA data source at deployment or a
JTA data source must be provided by the container, and a JTA EntityManagerFactory will be
created to correspond to it.
Without the jta-data-source element in the persistence.xml, the deployment fails to
start:
08:53:57,004 WARN [org.hibernate.connection.UserSuppliedConnectionProvider] (MSC service
thread 1-6) No connection properties specified - the user must supply JDBC connections
08:53:57,011 INFO [org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider]
(MSC service thread 1-5) Using provided datasource
08:53:57,017 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC00001: Failed
to start service jboss.persistenceunit."my_web.war#MY-EM":
org.jboss.msc.service.StartException in service
jboss.persistenceunit."my_web.war#MY-EM": Failed to start service
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1363)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[:1.6.0_21]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[:1.6.0_21]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: MY-EM] Unable to
build EntityManagerFactory
at
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:911)
at
org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74)
at
org.jboss.as.jpa.service.PersistenceUnitService.createContainerEntityManagerFactory(PersistenceUnitService.java:169)
at
org.jboss.as.jpa.service.PersistenceUnitService.start(PersistenceUnitService.java:78)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: