Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » javax.naming.NoInitialContextException using "generate tables from entities"
javax.naming.NoInitialContextException using "generate tables from entities" [message #618712] Mon, 01 February 2010 08:13 Go to next message
MJ is currently offline MJFriend
Messages: 8
Registered: December 2009
Junior Member
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" 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. Any ideas?



<?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.erro rObtainingTransactionManager(TransactionException.java:125)
at org.eclipse.persistence.transaction.JTATransactionController . <init>(JTATransactionController.java:64)
at org.eclipse.persistence.transaction.wls.WebLogicTransactionC ontroller. <init>(WebLogicTransactionController.java:27)


Thanks,
MJ
Re: javax.naming.NoInitialContextException using "generate tables from entities" [message #618713 is a reply to message #618712] Mon, 01 February 2010 15:31 Go to previous messageGo to next message
Paul Fullbright is currently offline Paul FullbrightFriend
Messages: 201
Registered: July 2009
Senior Member
MJ,

This is a question you're going to need to post to the EclipseLink forum. ( http://www.eclipse.org/forums/index.php?t=thread&frm_id= 111&)

Dali is the tooling which enables DDL generation, but we delegate to the implementation to do the actual generation, which is where you're hitting the problem.

- Paul
Re: javax.naming.NoInitialContextException using "generate tables from entities" [message #618856 is a reply to message #618713] Tue, 02 February 2010 12:18 Go to previous message
MJ is currently offline MJFriend
Messages: 8
Registered: December 2009
Junior Member
Thanks Paul, I'll ask there...

( http://www.eclipse.org/forums/index.php?t=msg&goto=51165 2&#msg_511652)
Previous Topic:Activate 'Java Persistence' and 'JPA Development' Perspective in Eclipse 3.3
Next Topic:Mapping file "META-INF/orm.xml" does not have ORM content
Goto Forum:
  


Current Time: Thu Apr 25 22:18:56 GMT 2024

Powered by FUDForum. Page generated in 0.02508 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top