Toplink DDL-generation has no delimiter

Toplink creates DDL scripts without terminating the SQL statements with a delimiter. In the case when you are using, say, a maven sql plugin that relies on the ANT SQL task that expects at least a default delimiter of ';' what can we do with those generated scripts? Was this a conscious choice? If not, anyone have an idea how we might at least define a default delimiter for these generated files? Parsing fthe files after generation to add a delimiter is a PITA. :)
Thanks!

Toplink creates DDL scripts without terminating the SQL statements with a delimiter. In the case when you are using, say, a maven sql plugin that relies on the ANT SQL task that expects at least a default delimiter of ';' what can we do with those generated scripts? Was this a conscious choice? If not, anyone have an idea how we might at least define a default delimiter for these generated files? Parsing fthe files after generation to add a delimiter is a PITA. :)
Thanks!

Similar Messages

  • Toplink.ddl-generation doesn't seem to be working

    I can't get my project to persist. Why is this?
    I have a skeleton project using JSF2, EJB3, Glassfish3, JPA/toplink, Helios. When I run the deployed project, I get this error:
    +Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException+
    Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'test.bar' doesn't exist
    Error Code: 1146
    A blank DB called test exists on mySQL
    I have a connection pool in glassfish with a URL=jdbc:mysql://localhost:3306/test
    user=root, pass=root
    A mySQL connector jar exists in $glassfishHome/glassfish/lib
    My code is as follows:
    newBook.xhtml
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
         xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
         <title>Creates a new book</title>
    </h:head>
    <h:body>
         <h1>Create a new book</h1>
         <hr />
         <h:form>
              <h:panelGrid columns="2">
                   <h:outputLabel value="ISBN : " />
                   <h:inputText value="#{bookController.book.isbn}" />
                   <h:outputLabel value="Title :" />
                   <h:inputText value="#{bookController.book.title}" />
                   <h:outputLabel value="Price : " />
                   <h:inputText value="#{bookController.book.price}" />
                   <h:outputLabel value="Description : " />
                   <h:inputTextarea value="#{bookController.book.description}" cols="20"
                        rows="5" />
                   <h:outputLabel value="Number of pages : " />
                   <h:inputText value="#{bookController.book.nbOfPage}" />
                   <h:outputLabel value="Illustrations : " />
                   <h:selectBooleanCheckbox value="#{bookController.book.illustrations}" />
              </h:panelGrid>
              <h:commandButton value="Create a book"
                   action="#{bookController.doCreateBook}" />
         </h:form>
         <hr />
         <i>APress - Beginning Java EE 6</i>
    </h:body>
    </html>
    BookController.java
    package controllers;
    import java.util.ArrayList;
    import java.util.List;
    import javax.ejb.EJB;
    import javax.faces.bean.ManagedBean;
    import javax.faces.bean.RequestScoped;
    import ejb.BookEJB;
    import entities.Book;
    @ManagedBean
    @RequestScoped
    public class BookController {
         @EJB
         private BookEJB bookEJB;
         private Book book = new Book();
         private List<Book> bookList = new ArrayList<Book>();
         public String doCreateBook() {
              book = bookEJB.createBook(book);
              bookList = bookEJB.findBooks();
              return "listBooks.xhtml";
         public BookController() {
         public BookEJB getBookEJB() {
              return bookEJB;
         public void setBookEJB(BookEJB bookEJB) {
              this.bookEJB = bookEJB;
         public Book getBook() {
              return book;
         public void setBook(Book book) {
              this.book = book;
         public List<Book> getBookList() {
              return bookList;
         public void setBookList(List<Book> bookList) {
              this.bookList = bookList;
    BookEJB.java
    package ejb;
    import java.util.List;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    import javax.persistence.TypedQuery;
    import entities.Book;
    @Stateless
    public class BookEJB {
         @PersistenceContext(unitName = "jdbc/test") //java:comp/env/jdbc/
         private EntityManager em;
         public List<Book> findBooks() {
              TypedQuery<Book> query = em
                        .createNamedQuery("findAllBooks", Book.class);
              return query.getResultList();
         public Book createBook(Book book) {
              em.persist(book);
              return book;
    Book.java
    package entities;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.NamedQuery;
    import javax.persistence.Table;
    @Table(name="bar")
    @Entity
    @NamedQuery(name = "findAllBooks", query = "SELECT b FROM Book b")
    public class Book {
         @Id
         @GeneratedValue(strategy=GenerationType.IDENTITY)
         private Long id;
         @Column(nullable = false)
         private String title;
         private Float price;
         @Column(length = 2000)
         private String description;
         private String isbn;
         private Integer nbOfPage;
         private Boolean illustrations;
         public Book() {
         public Long getId() {
              return id;
         public void setId(Long id) {
              this.id = id;
         public String getTitle() {
              return title;
         public void setTitle(String title) {
              this.title = title;
         public Float getPrice() {
              return price;
         public void setPrice(Float price) {
              this.price = price;
         public String getDescription() {
              return description;
         public void setDescription(String description) {
              this.description = description;
         public String getIsbn() {
              return isbn;
         public void setIsbn(String isbn) {
              this.isbn = isbn;
         public Integer getNbOfPage() {
              return nbOfPage;
         public void setNbOfPage(Integer nbOfPage) {
              this.nbOfPage = nbOfPage;
         public Boolean getIllustrations() {
              return illustrations;
         public void setIllustrations(Boolean illustrations) {
              this.illustrations = illustrations;
    persistence.xml (located under src/META-INF)
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="2.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_2_0.xsd">
         <persistence-unit name="jdbc/test">
              <jta-data-source>jdbc/test</jta-data-source>
              <class>entities.Book</class>
              <properties>
                   <property name="toplink.ddl-generation" value="drop-and-create-tables"></property>
                   <property name="toplink.ddl-generation.output-mode" value="database"></property>
                   <property name="toplink.logging.level" value="finest"/>
                   <property name="toplink.logging.logger" value="DefaultLogger"/>
                   <property name="toplink.jdbc.user" value="root"/>
                   <property name="toplink.jdbc.password" value="root"/>
              </properties>
         </persistence-unit>
    </persistence>

    It seems that Glassfish 3 uses eclipseLink as a default and not TopLink. I've reconfigured using eclipseLink.

  • DDL Generation not working

    Hi all,
    for some strange reason the DDL generation has stopped working. See below. The physical model is definitely selected and also all the objects in it.
    Any suggestions?
    Thanks and regards, Garry
    -- Generated by Oracle SQL Developer Data Modeler 3.1.0.687
    -- at: 2012-05-02 16:00:12 CDT
    -- site: Oracle Database 11g
    -- type: Oracle Database 11g
    -- Oracle SQL Developer Data Modeler Summary Report:
    -- CREATE TABLE 0
    -- CREATE INDEX 0
    -- ALTER TABLE 0
    -- CREATE VIEW 0
    -- CREATE PACKAGE 0
    -- CREATE PACKAGE BODY 0
    -- CREATE PROCEDURE 0
    -- CREATE FUNCTION 0
    -- CREATE TRIGGER 0
    -- ALTER TRIGGER 0
    -- CREATE STRUCTURED TYPE 0
    -- CREATE COLLECTION TYPE 0
    -- CREATE CLUSTER 0
    -- CREATE CONTEXT 0
    -- CREATE DATABASE 0
    -- CREATE DIMENSION 0
    -- CREATE DIRECTORY 0
    -- CREATE DISK GROUP 0
    -- CREATE ROLE 0
    -- CREATE ROLLBACK SEGMENT 0
    -- CREATE SEQUENCE 0
    -- CREATE MATERIALIZED VIEW 0
    -- CREATE SYNONYM 0
    -- CREATE TABLESPACE 0
    -- CREATE USER 0
    -- DROP TABLESPACE 0
    -- DROP DATABASE 0
    -- ERRORS 0
    -- WARNINGS 0

    Hi Garry,
    This could be because you asked it not to generate objects on a previous DDL Generation. When you do your DDL Generation, a "DDL Generation Options" panel is displayed. This has various tabs (Tables, PK and UK Constraints, etc.). I suggest you open these tabs and check that the "Selected" tick-boxes for the relevant objects are set.
    If this doesn't help, please can you check whether there are any relevant error messages in your log file (this is normally the file datamodeler.log in the folder datamodeler\datamodeler\log).
    David

  • DDL generation - sequence of views

    Hello,
    I'm using several cascading database views. After DDL generation the sequence of the views in the script is not correct for database creation, so the script has to be adjusted before running.
    Is there are way to define dependencies between views as a hint for DDL generation?
    Regards Dirk

    Hi David,
    my Datamodeler version is 3.1.2.704.
    In a simple test with 1 table and 3 cascading views it worked for an Oracle generation, but I use SQLServer and SQLServer (2000 and 2005) DDL generation uses alphabetical order of view names.
    It is the same with the new 3.3.0.734 version.
    On the other hand some of the SQLServer views loaded into the model from data dictionary are too complex to be opened by the query editor, so dependencies may not be recognized.
    So I hoped a manual hint would be possible.
    Regards Dirk

  • Ddl-generation error

    Hello, i'm having a very strange error during ddl-generation, i'm using Netbeans 5.5, Glassfish V2 and Mysql 5.0.26. Toplink bug?
    JDO76609: Got SQLException executing statement "ALTER TABLE ana_ute DROP FOREIGN KEY UNQ_ana_ute_0": java.sql.SQLException: Error on rename of './lbdb_test/ana_ute' to './lbdb_test/#sql2-11af-1e' (errno: 152)

    probably i found the problem...
    Toplink generate this:
    ALTER TABLE ana_ute DROP FOREIGN KEY UNQ_ana_ute_0;
    but with Mysql the correct command is:
    ALTER TABLE ana_ute DROP KEY UNQ_ana_ute_0;
    This problem is only for the Unique Key.

  • My iPod 6th Generation has just a white screen

    My iPod 6th Generation has just a white screen and I can't do anything with it. What do I do to fix this, and what happened?

    Never mind, I fixed it

  • P2P Replication Not working after DDL Chage has been replicated

    Hi Guru,
    I am using SQL Server 2008. And I have configured the DC DR P2P replication for High availability.
    In DC i  had dropped one column. after that my replication is not working i am getting "A DDL change has been replicated error" in replication monitor.
    In order to resolve this issue i had tried to drop the same column in DR. But still the replication didn't work.
    Please help me to resolve this issue. 

    Hi,
    You have two options to make schema changes to the replicated database.
    1. Drop the replication, make the changes, and recreate the replication.
    2. Make the changes and let P2P replication take care of the changes.
    If you drop the column from the table at the Publisher by using
    ALTER TABLE <Table> DROP <Column>, the column will also be dropped from the table at all Subscribers.
    In this case, the column was dropped in application. I have not tested this situation. I agree with Ashwin. You may recreate the replication to resolve the issue.
    Reference:
    Making Schema Changes on Publication Databases
    http://msdn.microsoft.com/en-us/library/ms151870(v=sql.100).aspx
    Thanks.
    Tracy Cai
    TechNet Community Support

  • DDL Generation/Conversion Tools

    I am looking for a DDL generation tool, preferably command line, that can convert DDL of one RDBMS to another - say DDL of Oracle schema/table to MySQL/SQL Server & vice-versa. I have reviewed Oracle's SQL Developer - its DDL generation is one way MySQL to Oracle, SQL Server to Oracle etc.
    I would prefer a general-purpose DDL conversion tool/utility if one exists! Also, is there a way to use GGs DDLGEN for this ? I have explored this a bit but it seems all conversions are from Tandem DDL to DDL of various RDBMS.
    Thanks,
    Satish

    Satish,
    You can use DDLGEN to perform some basic DDL between systems but you'll likely need to make modifications to the .tpl file. Otherwise you may want to look into some other paid tools on the market.
    Good luck,
    -joe

  • PDF thumbnail generation has stopped working

    Hello Together,
    formerly I was using Adobe Reader X at an actual Patch Level on a 64 Bit Windows 7 system. At that time PDF thumbnails were no subject for me. Now I've upgraded to Adobe Acrobat X Pro and uninstalled Adobe Reader X. Then I wanted to use the thumbnails. That was no problem as I found a link to a tool which fixed my issue: http://forums.adobe.com/thread/305220
    Everything worked fine for me, until I noticed that one of my applications needed an installed Adobe Reader to work properly. So I reinstalled the Adobe Reader on my system again. This caused to stop the thumbnail generation: PDF files which existed prior to the Adobe Reader installation still have a thumbmail icon preview, but those who were generated after the installation still appear as a PDF icon.
    Before installation the fix from thread 305220 my workaround was to open Acrobat X, the navigate to the open dialog, moving to the folder with the PDFs within and wait that Acrobat finished the thumbnail generation. But this workaround now is out of service, too. So my assumption is, that reinstalling Adobe Reader screwed up something in my Adobe installation which I cannot find at the moment which has nothing to do with the initial problem with displaying thumbnails.
    Performing some repair installation didn't help:
       (1) repair Adobe Reader, then repair Adobe Acrobat --> no change
       (2) repair Adobe Acrobat, then repair Adobe Reader --> no change
       (3) repair Adobe Reader only --> no change
       (4) repair Adobe Acrobat only --> no change
       (1), then apply fix from thread 305220 --> no change
       (2), then apply fix from thread 305220 --> no change
       (3), then apply fix from thread 305220 --> no change
       (4), then apply fix from thread 305220 --> no change
       apply fix from thread 305220, then (1) --> no change
       apply fix from thread 305220, then (2) --> no change
       apply fix from thread 305220, then (3) --> no change
       apply fix from thread 305220, then (4) --> no change
    I hope, that I'm not the only one who got this problem and, hopefully, someone found a solution for this.
    Regards
       TheCuriousOne

    Loreto María wrote:
    My IPod nano 2nd Generation, has stopped working, it gets frozen and I get a message telling to go to "www.apple.com/support" but I cannot get any support there, anyone knows if It can be repaied. Thanks a lot in advance. Regards. Loreto
    Why not?
    Did you at least download & read the user manual?
    You can always call Apple Care if you are still under warranty.  Otherwise, take your iPod to an Apple Store or an AASP.

  • Problem with materialized views DDL generation

    Hi, there is no check box in the *'Drop' Selection* tab for materialized views so no option to drop this objet type. It does drop the corresponding table but not the MV. Is there another way to automatically drop this type of object when generating DDL ??? More on, I have created a primary key for the same MV, based on two fields , checked the Generate check box but the command is not included in the DDL. Is this a known issue ???
    Thanks.
    Edited by: Gordrien on 2011-06-21 10:04

    Hi Gordrien,
    More on, I have created a primary key for the same MV, based on two fields , checked the Generate check box but the command is not included in the DDLCan you elaborate on that. It's not clear what you are doing and what you are expecting as result in DDL generation.
    Philip

  • My iPad 1st generation, has been charging for days......

    My iPad 1st generation, has been charging for days and still shows dead battery... Tried to restore (which I was able to do in the past and was successful)  and received an error saying something went wrong can not restore and went back to showing dead battery again.    The battery is not dead... Any suggestions?

    "The battery is not dead"
    How did you ascertin that?

  • My daughters Ipod touch 2nd generation has been freezing today.  We have updated, restored etc and will not play any music as in no sound coming from it. It is almost fully charged and played ok 2 days ago. Any suggestions?

    My Ipod touch 2nd generation has been freezing today.  We have updated, restored etc and now it will not play any music - as in no sound coming from it.  It looks as if it is playing, but no sound comes out. It played ok 2 days ago. Any suggestions?

    So, here is an update to my original question, in case anyone else has this issue. I spoke with a senior adviser at apple, who had me use the "devmgmt.msc" command in the search line of Windows 7; after expanding the USB controllers menu, she had me uninstall/delete the "apple mobile device driver" and then open "control panel" and "uninstall programs." Once the menu of programs was open, she had me highlight the program "apple mobile device controller", then repair it, and restart the computer. This fixed the issue and the iPod synced.
    However, just one day ago, when I plugged in both the iPod, then the iPad (not at the same time), I get the message that "this library has already been synced to another iPod/iPad or other IOS device." It then asked if I wanted to set up as a new device or from restore of previous. That is wher I am right now; I am trying to get the same apple adviser again to discuss the case number. More to follow.

  • Is the ipad first generation has a wifi ?

    My ipad first generation has no wifi , is these for real ? If not , plss help me to open my WIFI in ipad so that I can download my games to my ipad . my ipad model is MC497LL. thank you , I hope apple communities help me to my problem .

    Wi-Fi button greyed
    http://support.apple.com/kb/ts1559
    Try reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • My iPod 5th generation has been stolen.

    My iPod 5th generation has been stolen and I don't have my box. Can I get the imei number without using itunes? In itunes, it's showing only the serial number. And they say that iDevices cannot be tracked with serial number.

    - If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up.
    - You can also wipe/erase the iPod and have the iPod play a sound via iCloud.
    - If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
    - Change the passwords for all accounts used on the iPod and report to police
    - There is no way to prevent someone from restoring the iPod (it erases it) using it unless you had iOS 7 on the device. With iOS 7, one has to enter the Apple ID and password to restore the device.
    - Apple will do nothing without a court order                                                        
    Reporting a lost or stolen Apple product                                               
    - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

  • How do I know if my ipad fourth generation has retina display?

    How do I know if my ipad fourth generation has retina display, before I open the box?
    Thanks!

    Check iPad model with the Serial Number
    https://selfsolve.apple.com/agreementWarrantyDynamic.do

Maybe you are looking for

  • How can I use PowerPivot tables like Excel tables -- printing, etc.?

    I can't seem to find any information on this anywhere, and even more surprisingly, no one else seems to have even asked this question... How can I use tables I create in the Excel PowerPivot window in the same ways I use tables that are in ordinary E

  • No 24-bit 96 kHz audio in media pla

    I have a vista premium HTPC and a Audigy 2 NX USB sound card connected to a NAD analogue stereo used mainly for TV and music listening with a 2. focal system. Vista is fully updated. I checked 24 bit 96-kHz audio in Vista when i installed it in march

  • Help with Dreamweaver CS4

    I am trying to update my website using Dreamweaver CS4 and it keeps telling me there is an FTP error and my login or password are incorrect - how can this be if I haven't changed anything?  Admittedly I haven't updated the site for about 4 months, bu

  • I am unable to sign Adobe Reader 9 signature fields.

    Hi, I received a PDF  that I need to sign digitally. However, when I try to sign the signature field, nothing happens. Specifically, when I click the field with my mouse, nothing happens. In more detail: 1. I move my mouse over the field, and a dialo

  • Why haven't I received my new Ipod Nano from the 1st generation recall

    I have yet to receive my replacement, after they announced a NANO 1st Generation recall from a battery fault. I sent a request, received the packing details, sent my Nano off in Novemeber 2011. I have not received anything yet. Has this happened to a