Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » @PostConstruct method breaks DDL generation(GlassFish Server 3.1)
@PostConstruct method breaks DDL generation [message #718236] Tue, 23 August 2011 17:09 Go to next message
Andy is currently offline AndyFriend
Messages: 1
Registered: August 2011
Location: UK
Junior Member
Hi all,

I have a very simple web application using eclipselink to generate and populate one table. It's populated with a @PostConstruct method. All works fine while I have the one property defined in my persistence.xml:

<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />

The moment I add the following properties, the table is not created let alone populated:

<property name="eclipselink.ddl-generation.output-mode" value="both" />
<property name="eclipselink.application-location" value="/home/andy/scripts/musson-generated" />
<property name="eclipselink.create-ddl-jdbc-file-name" value="create.sql" />
<property name="eclipselink.drop-ddl-jdbc-file-name" value="drop.sql" />

It appears to fail at the @PostConstruct method saying the table does not exist. However, the create and drop DDL scripts are created just fine.

Any ideas on the subject? It's taken me ages to realise that this was the problem.


[Updated on: Thu, 25 August 2011 13:31]

Report message to a moderator

Re: @PostConstruct method breaks DDL generation [message #720503 is a reply to message #718236] Tue, 30 August 2011 18:04 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Enable logging to see if the tables are being created, or if any errors occur.

'both' should cause both to occur.

Are you using an app server such as Glassfish?

James : Wiki : Book : Blog : Twitter
Previous Topic:(no subject)
Next Topic:Duplicate key error only if classes are woven
Goto Forum:

Current Time: Sat Apr 17 15:00:38 GMT 2021

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

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

Back to the top