javax.naming.NoInitialContextException using "generate tables from entities" [message #511652] |
Tue, 02 February 2010 07:17  |
Eclipse User |
|
|
|
Hello,
Presently I have a working persistence.xml file - I can deploy my project and it runs correctly, storing entities in the database using container managed transactions. Unfortunately when I run "generate tables from entities" using Dali I get the exception listed below. Changing transaction-type to resource_local to bypass the app server works fine, but container managed doesn't seem to work. From what the guys in the Dali forum tell me, the table create is delegated to eclipselink. Any ideas what's going wrong?
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" 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">
<persistence-unit name="SCBCDEntities" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>DBConn1</jta-data-source>
<class>examples.persistence.User</class>
<class>examples.persistence.Item</class>
<class>examples.persistence.Bid</class>
<properties>
<property name="eclipselink.target-server" value="WebLogic_10"/>
<property name="eclipselink.logging.level" value="FINEST"/>
<property name="eclipselink.ddl-generation" value="create-tables"/>
<property name="eclipselink.ddl-generation.output-mode" value="database"/>
</properties>
</persistence-unit>
</persistence>
Exception [EclipseLink-23004] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.TransactionException
Exception Description: Error obtaining the Transaction Manager
Internal Exception: Exception [EclipseLink-23001] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.TransactionException
Exception Description: Error looking up external Transaction resource under JNDI name [weblogic.transaction.TransactionManager]
Internal Exception: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at org.eclipse.persistence.exceptions.TransactionException.errorObtainingTransactionManager(TransactionException.java:125)
at org.eclipse.persistence.transaction.JTATransactionController.<init>(JTATransactionController.java:64)
at org.eclipse.persistence.transaction.wls.WebLogicTransactionController.<init>(WebLogicTransactionController.java:27)
Thanks,
MJ
|
|
|
|
Powered by
FUDForum. Page generated in 0.03424 seconds