[jboss-jira] [JBoss JIRA] Commented: (JBJPA-5) There is no default persistence unit in this deployment.
Alex McCarrier (JIRA)
jira-events at lists.jboss.org
Mon Aug 31 01:20:23 EDT 2009
[ https://jira.jboss.org/jira/browse/JBJPA-5?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12483611#action_12483611 ]
Alex McCarrier commented on JBJPA-5:
------------------------------------
I find that this happens when you try to use a persistence archive with it's own persistence.xml file. Moving the persistence.xml to the META-INF of the EJB.jar file fixes it. You can still have your entity beans in a separate .jar file, you just need to make sure the EJB jar file with your session beans contains the persistence.xml file.
> There is no default persistence unit in this deployment.
> ---------------------------------------------------------
>
> Key: JBJPA-5
> URL: https://jira.jboss.org/jira/browse/JBJPA-5
> Project: JBoss JPA
> Issue Type: Bug
> Affects Versions: 1.0.0-Beta6
> Environment: JBoss 4.2.2
> Reporter: David Jitendranath
> Assignee: Andrew Lee Rubinger
> Attachments: MXIntegrationEAR.ear
>
>
> I get the following exception when my JBoss server starts up.
> java.lang.RuntimeException: Illegal @PersistenceUnit on private javax.persistence.EntityManager gov.usbr.data.cdw.BurdenRateHome.entityManager :There is no default persistence unit in this deployment.
> at org.jboss.injection.PersistenceContextHandler.handleFieldAnnotations(PersistenceContextHandler.java:182)
> Here's my persistence.xml file. Is there any idea what I'm missing?
> <persistence xmlns="http://java.sun.com/xml/ns/persistence"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
> version="1.0">
> <persistence-unit name="integrations">
> <jta-data-source>java:/cdwDB</jta-data-source>
> <properties>
> <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
> <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
> </properties>
> </persistence-unit>
> </persistence>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list