3 Replies Latest reply: Jul 12, 2012 3:18 AM by gimbal2 RSS

    Fail to create table

    newbieRyan

      hello,

      I just made a small webpages that enter data into database.
      I have specified that in persistence.xml to drop-create-tables. however, if there is no table, it will generate exception.
      if I coded create-tables, ALSO no table in database, it would be fine. Everything runs smooth. is it a known issue?

      Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
      Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

      Error Code: 942
      Call: INSERT INTO BOOK (ID, DESCRIPTION, ILLUSTRATIONS, ISBN, NBOFPAGE, PRICE, TITLE) VALUES (?, ?, ?, ?, ?, ?, ?)
      bind => [7 parameters bound]
      Query: InsertObjectQuery(com.apress.javaee6.chapter10.Book@11a48bb4)