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.

Similar Messages

  • The image came up on my screen saying that I need to connect my iPod to iTunes, but I have a passcode, so it won't allow me to. And I want to try and turn it off, but my touch screen doesn't seem to be working either. HELP!

    The image came up on my screen saying that I need to connect my iPod to iTunes, but I have a passcode, so it won't allow me to. And I want to try and turn it off, but my touch screen doesn't seem to be working either, so I can't even turn it off since you need to "slide to power off." HELP! I'm leaving on Thursday morning for six and a half weeks, and I absolutely need my iPod with me. I was just at the Apple store today for problems I was having with ANOTHER product, and I don't really want to drive all the way out to where my nearest store is (which is not very near) if I can figure this out at home. My iPod was working totally fine earlier today and last night, so I don't know what happened! Please, please, PLEASE HELP!

    Now it's allowing me to reboot (hold down power button and home button and restart), but every time it just comes up to the same thing: the connect to iTunes page. Which is not possible. And I refuse to restore my iPod. PLEASE HELP.

  • TS1363 i have a new iphone 5 and although I had a little trouble downloading all my apps and music, i did this successfully but now when I connect to my itunes, itunes doesn't see it and also bluetooth doesn't seem to be working.Can  Anyone help

    I have a new iphone 5 and although I had a little trouble downloading all my apps and music, I did this successfully but now when I connect to my itunes, itunes doesn't see it and also bluetooth doesn't seem to be working.Can  Anyone help?

    Hey leafxxx,
    Thanks for the question, and welcome to Apple Support Communities.
    The following resource provides troubleshooting steps if your iPhone is not displayed in iTunes when connected:
    Apple - Support - iPhone - iTunes Troubleshooting Assistant
    http://www.apple.com/support/iphone/assistant/itunes/
    For more detailed instructions, see this article:
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538
    Enjoy your new iPhone 5!
    Matt M.

  • After copying a movie to the harddisk of my MacBook I wanted to also copy it to my iPad, but for this you first have to copy it to the library in iTunes, but this doesn't seem to be working. So how can I get this movie to the library ? And to the iPad ?

    After copying a movie to the harddisk of my MacBook I wanted to also copy it to my iPad, but for this you first have to copy it to the library in iTunes, but this doesn't seem to be working. So how can I get this movie to the library ? And to the iPad ?

    How is it not working?  And how are you doing it?  Drag the movie onto the iTunes icon on the Dock...  what happens?

  • The scaling selection using SHIFT doesn't seem to be working for me all of a sudden.......how can I resolve ?

    The scaling selection using SHIFT doesn't seem to be working for me all of a sudden.......how can I resolve ?
    Specifically, when I select and object I used to be able to hold SHIFT while re-sizing the object and keeping it in scale.
    All of a sudden, I don't have that option as my SHIFT key doesn't seem to activate within AI
    B.Marks

    B,
    You may have something disturbing Illy so she gets confused, see Item 7 in 5) below for usual suspects, or you may have what appears to be a preference corruption, see 1) - 4) and 6) below.
    The following is a general list of things you may try when the issue is not in a specific file (you may have tried/done some of them already); 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to 3 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • How do I import a web page as PDF? The import feature in my file dropdown menu doesn't seem to be working.

    If I remember correctly, firefox for linux previously had an option to import a web page as PDF. Now it doesn't seem to be working that way anymore. I am using Ubuntu 10.04 Lucid Lynx with the most recent Firefox program.

    That's just the standard notice when you install an addon from the AMO web site.
    Wasn't the '''Install Now''' button active?
    Sometimes you have to wait for up to 4 seconds for that button to be active - IOW, not greyed-out.

  • We tried the window.ResizeTo and window.MoveTo methods using the javascript. It doesn't seem to be working in the version 9.0.1. Please suggest any alternative .

    Hi,
    We tried the window.ResizeTo and window.MoveTo methods using the javascript. It doesn't seem to be working in the version 9.0.1. Please suggest any alternative .
    Thanks,
    Avinash

    This is no longer allowed for security reasons (bug 565541).<br>
    See https://support.mozilla.org/nl/questions/880032<br>
    https://developer.mozilla.org/en/DOM/window.moveTo<br>

  • I bought Photoshop 12/premier package but all I get from premier is the Read Me bit on my computer. The download doesn't seemed to have worked

    I bought PS Elements 12 and Premier as a package but the Premier does not seem to have downloaded...All I have is the "READ ME" pages and no programme

    Noel elliot
    What is your computer operating system, and is it 32 or 64 bit?
    At this time, is Premiere Elements 12 listed in Control Panel/Programs as an installation product?
    Where did you purchase this Photoshop Elements 12/Premiere Elements 12 bundle - from Adobe as an online download or from an authorized reseller offering the box packing with installation discs? From your "The download doesn't seemed to have worked", I am assuming that this was an online download from Adobe.
    On your computer, you should have started with 4 installation files
    Photoshop Elements 12. An .exe file and .7z file specific for Photoshop Elements 12...and file targeted appropriately for 32 or 64 bit computer.
    Premiere Elements 12. An .exe file and .7z file specific for Premiere Elements 12...and file targeted appropriately for 32 or 64 bit computer.
    You double click the .exe first and afterward as indicated .7z.
    Each of these products will have its own serial number.
    Do you now have those components. If not, then you need to start again with the download to get those files on your computer in order to start the product installation.
    Please review and consider. Any questions or need further clarification, please do not hesitate to ask.
    Thank you.
    ATR

  • The sound on my Mac Pro doesn't seem to be working since installing OS X Yosemite - help!

    The sound on my Mac Pro doesn't seem to be working since installing OS X Yosemite - help!

    I had a smilier issue... If you're using external speakers (as opposed to the ones on the display), you may need to re-select them in System Preferences. Some preference choices seem to reset with the Yosemite install.

  • I recently bought a iPhone and iMessage just doesn't seem to be working. It won't let me send messages to my friends with emails. Help? Haha

    I Recentl. Bought an iPhone and iMessage just doesn't seem to be working. It won't let me send a message to my friends with emails? Or iPods I don't know

    Read these:
    Using iMessage
    http://support.apple.com/kb/HT3529
    Troubleshooting iMessage activation:
    http://support.apple.com/kb/TS4268

  • What to do when BBC video/iPlayer "This content doesn't seem to be working. Try again later" Firefox 3.6.13, XP

    Videos & iPlayer do not work on BBC site. I get error message "This content doesn't seem to be working. Try again later". Content is viewable on MS Internet Explorer 8.

    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites that cause problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

  • The iTunes "buy" button doesn't seem to be working. I click it and nothing happens. Anyone know why? Thanks.

    The iTunes "buy" button doesn't seem to be working. I click it and nothing happens. Anyone know why? Thanks.

    Apple made some sort of programming change on 12.26.12 to their iTunes system that suddenly made the Buy button non-functional specifically in the directly-out-of-the-box Snow Leopard (10.6.3). [I had Leopard, same as you, 10.5.8, and that was still working then. I installed Snow Leopard a couple of days ago to my MacBook, and discovered the Buy Button didn't work.
    First step: Pull down "Software Update" from the Apple menu (that annoying thing we always ignore.) If you're using Snow Leopard 10.6.3, it'll upgrade you for free to 10.6.8, and that should solve your iTunes problem. (I don't know if there are any upgrades for 10.5.8, but unlike the other ungodly system upgrades, Snow Leopard is only $20. Because Apple is growing increasingly stupid, you can't buy it online--you have to call customer care.)
    Hope this helps. Let me know if it does.

  • "Arrange by" doesn't seem to be working properly. What to do?

    "Arrange by" doesn't seem to be working properly. What to do?

    Properly conveys nothing. Details if you want help.

  • My iPod Nano 6th generation doesn't seem to recognize album artwork. I've downloaded the artwork manually, and I've even restored my iPod to defaults several times, but nothing works. Does anyone have a solution?

    My iPod Nano 6th Generation is not picking up album artwork. On several of my tracks, it recognizes the album art, but it doesn't seem to recognize the others. I've tried uploading the artwork onto several albums manually, I've cleared the downloaded artwork to download them again, I've even restored the iPod to its default settings...nothing seems to work.
    Does anyone have a solution to this

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on anoterh computer to help determine if you have an iPod or computer problem.
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar

  • My iPod doesn't seem like enjoy working, could someone help me out?

    This is my second iPod (I had to send the first one back to get it replaced) and it's getting ridiculous. About three months ago it stopped working again (the new one) and I got a box to send it back, but I tried installing new software and updating it and all, which fixed it, or so I thought. Now it's not working again. I can't even get it connected to my computer without the computer freezing completely. iTunes refuses to load when the iPod is connected, and "My Computer" (I have a win laptop) quits responding when I connect it too. If I could get it connected I would reset it completely, which I don't midn doing, but it doesn't seem to be able to do that. Has anyone else had this problem? I'd really appreciate help with this problem because Apple says I can't send it back... even though it's my second one. Any help would be appreciated greatly. Thanks in advance.
    -FF
    the ipod was bought for christmas last year (04), and is a click wheel, but not a color photo, or vid ipod.

    This is my second iPod (I had to send the first one back to get it replaced) and it's getting ridiculous. About three months ago it stopped working again (the new one) and I got a box to send it back, but I tried installing new software and updating it and all, which fixed it, or so I thought. Now it's not working again. I can't even get it connected to my computer without the computer freezing completely. iTunes refuses to load when the iPod is connected, and "My Computer" (I have a win laptop) quits responding when I connect it too. If I could get it connected I would reset it completely, which I don't midn doing, but it doesn't seem to be able to do that. Has anyone else had this problem? I'd really appreciate help with this problem because Apple says I can't send it back... even though it's my second one. Any help would be appreciated greatly. Thanks in advance.
    -FF
    the ipod was bought for christmas last year (04), and is a click wheel, but not a color photo, or vid ipod.

Maybe you are looking for

  • Why do I get an error when trying to use a link in the forum?

    I just tried to use the link that Varad offered in Redirect certain users with login procedure and I got an error: The specified thread [0] was not found. I got the same thing when trying to use a similar link a couple of days ago. They sound like so

  • Dynamic path in the communication channel

    Hi, Is it possible to provide the path into the receiver file communication channel via the mapping program or any other means? In short, we want the path in the channel to be dynamic. Is it possible?, if so, how? Thanks, John

  • I want to clean out my macBrook pro for my daughter to use in college

    I have a macBook pro I want to clean out, would it be better to take it to the apple counter or do it myself?  If doing it myself, simple simple pls, how do I go about it?

  • Need to disable account on PC which no longer exists

    I built my own PC and had some problems with networking about 3 months ago so I F-disked it and reinstalled my Windows XP on it. Unfortunately I forgot to deactivate my account before doing so and now my PC is double registered. I do have other PC's

  • Hiding Document versions from End user

    Hi I am in EP6 SP2 Patch 4 Hotfix 7 and CM Patch 4 Hotfix 4. We are utilising the "Version Management" feature within Content Management. After enabling "versioning" feature for the folder, I am able to upload multiple versions of the same document a