Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » how to create tables using persistence.xml (glassfish, oracle xe)
how to create tables using persistence.xml (glassfish, oracle xe) [message #607414] Fri, 07 March 2008 12:18
Eclipse UserFriend
Originally posted by:


I'm quite new to Eclipse in JEE applications, but I've been using Netbeans
for some time. My problem is that I can't make Eclipse create tables
depending on my entities. I would like to have creating database schema
automated as it was in Netbeans. It seems to me, that it's possible in
Eclipse with Dali too.

I'm using Oracle 10g XE and the newest Eclipse Europe. My application server
is Glassfish v2.

I have created and tested connection pool and JDBS resource in glassfish.
There is one enabled on JNDI adress: "TEST".

In Elipse I have defined the connetion. I have tested it using ping. In Data
Source Explorer I can view database elements.

I am using JPA implementation provided by server and the generic platform.

I have created such a persistence.xml file:
<?xml version="1.0" encoding="UTF-8"?>

<persistence version="1.0" xmlns=""

<persistence-unit name="TEST" transaction-type="JTA">




<property name="toplink.ddl-generation" value="create-tables"/>

<property name="toplink.logging.level" value="ALL"/>




My test.ejb.JPATest java class looks like this:

import javax.persistence.Entity;
import javax.persistence.Id;
public class JPATest {

Long id;


In the problems box i can see errors:
table JPATest doesn't exist
collumn Id doesn't exist

I have tried running my module on server, publishing it, restarting the
server in order to create this table on my database, but it didn't work..
There are no exceptions in Glassfish logs, I couldn't find any error in
Eclipse log either. It seems just like properties in persistence.xml were

I cannot use Generate DDL as I'm using generic platform.

Can you help me please and give any suggestions, what am I doing wrong? Is
there any way I have to force interpreting the persistence.xml configuration
during deploy?

Thanks a lot for any help!

Sorry for my english.

Best wishes

Mateusz B
Previous Topic:Microsoft Sql Server 2005 datatype mapping issues
Next Topic:Generate Entities Problem w/ MySQL
Goto Forum:

Current Time: Sun May 27 23:47:18 GMT 2018

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

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

Back to the top