Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » javax.naming.NoInitialContextException using "generate tables from entities"("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")
javax.naming.NoInitialContextException using "generate tables from entities" [message #511299] Mon, 01 February 2010 03:13 Go to next message
MJ is currently offline MJ
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.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
Re: javax.naming.NoInitialContextException using "generate tables from entities" [message #511430 is a reply to message #511299] Mon, 01 February 2010 10:31 Go to previous messageGo to next message
Paul Fullbright is currently offline Paul Fullbright
Messages: 199
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 #511653 is a reply to message #511430] Tue, 02 February 2010 07:18 Go to previous message
MJ is currently offline MJ
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:javax.naming.NoInitialContextException using "generate tables from entities"
Goto Forum:
  


Current Time: Sun Apr 20 04:26:54 EDT 2014

Powered by FUDForum. Page generated in 0.04497 seconds