[jboss-jira] [JBoss JIRA] Reopened: (JBAS-8036) create EntityManager error
Jason Greene (JIRA)
jira-events at lists.jboss.org
Thu Apr 21 14:27:09 EDT 2011
[ https://issues.jboss.org/browse/JBAS-8036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason Greene reopened JBAS-8036:
--------------------------------
Due to feedback from the community, I have split the AS7 and AS6 projects and reopened all unscheduled AS6 issues that are a year or less old. This will make it easier community members to find and work on them.
Future releases beyond 6.1 can be done provided a community member steps up to coordinate them.
> create EntityManager error
> --------------------------
>
> Key: JBAS-8036
> URL: https://issues.jboss.org/browse/JBAS-8036
> Project: Legacy JBoss Application Server 6
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Environment: JBoss 5.1.0 GA
> Reporter: Dave Chen
> Fix For: No Release
>
>
> create a new persistence unit programmatically and map it to a new datasource without redeploy or server restart.
> We tried the following in a stateless session bean:
> Map configOverrides = new HashMap();
> EntityManagerFacotry emf = Persistence.createEntityManagerFactory("unit1", configOverrides);
> But got exception:
> javax.persistence.PersistenceException: [PersistenceUnit: unit1] Unable to build EntityManagerFactory
> <persistence-unit name="unit1">
> <jta-data-source>java:/dataSource1</jta-data-source>
>
> <properties>
> <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
> <property name="hibernate.hbm2ddl.auto" value="update"/>
> <property name="hibernate.show_sql" value="false"/>
> </properties>
> </persistence-unit>
> 08:17:58,204 ERROR [STDERR] javax.persistence.PersistenceException: [PersistenceUnit: defaultDataSource] Unable to build EntityManagerFactory
> 08:17:58,205 ERROR [STDERR] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
> 08:17:58,205 ERROR [STDERR] at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126)
> 08:17:58,205 ERROR [STDERR] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list