Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » SQL generation fails - Resource '/<project-root>/createDDL.sql' does not exist.
icon5.gif  SQL generation fails - Resource '/<project-root>/createDDL.sql' does not exist. [message #1622595] Wed, 18 February 2015 16:10 Go to next message
Andrea Bru is currently offline Andrea BruFriend
Messages: 1
Registered: February 2015
Junior Member
Hi there,

I am trying to generate sql. I have managed to have the database updated directly, but now I want to have an sql file instead. This is what I do:

Right click -> JPA Tools -> Generate Tables from Entities -> Generation Output Mode: Sql-script -> Finish

It seems to do some work but then tries to display the generated file and fails with the message:
Resource '/TheProjectName/createDDL.sql' does not exist.

This is my persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="..."
xmlns:xsi="..."
xsi:schemaLocation="..."
version="2.0">

<persistence-unit name="local">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.archive.autodetection" value="class" />
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
<property name="hibernate.connection.driver_class" value="org.postgresql.Driver" />
<property name="hibernate.connection.url" value="jdbc:postgresql://localhost:55641/test2" />
<property name="hibernate.connection.username" value="..." />
<property name="hibernate.connection.password" value="..." />
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.flushMode" value="FLUSH_AUTO" />
<property name="hibernate.hbm2ddl.auto" value="update" />
</properties>
</persistence-unit>
</persistence>

If I choose to directly update the database, that works, but not the sql generation to a file. Do you have an idea what I am doing wrong?

Thanks for any help.
Andrea
Re: SQL generation fails - Resource '/<project-root>/createDDL.sql' does not exist. [message #1633205 is a reply to message #1622595] Tue, 24 February 2015 18:49 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
Those are a lot of Hibernate specific properties related to database connections when you are commenting on an EclipseLink JPA forum. Did you mean to post this in a Dali forum, a tool within the Eclipse IDE? Does Hibernate even support writing to a file?
Previous Topic:Manage Bi-temporal Data
Next Topic:Long cursored query and concurrent updates leads to out-of-date reads from long query
Goto Forum:
  


Current Time: Tue Mar 19 08:21:58 GMT 2024

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

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

Back to the top