users@glassfish.java.net

Re: java.sql.SQLSyntaxErrorException:table 'WEB_BOOKSTORE_BOOKS' does not exist

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Thu, 29 Jan 2009 12:00:41 -0800

You need to have a jdbc resource that corresponds to the connection pool. and it
would be that resource jndi name that the app will be looking up (not the pool,
so you might need to adjust the names).

Admin Console will allow you to add the jdbc resource (and ping it to confirm
that it's accessible to the app server).

Regards,
-marina

glassfish_at_javadesktop.org wrote:
> Hi,
>
> I am deploying on glassfish v2ur2 the [b]books[/b] example
> that comes when you download the [i]JEE 5 tutorial[/i].
>
> Before do it you have to create de DB in NetBeans 6.5 and
> create de connection pool in the app server using the Admin Console.
>
> I have followed the indications in the tutorial, but it does not work.
> The app server gives a runtime exception,
>
> org.apache.jasper.JasperException: javax.el.ELException: com.sun.bookstore.exception.BooksNotFoundException: Could not get books:
> Internal Exception: java.sql.SQLSyntaxErrorException: table/view 'WEB_BOOKSTORE_BOOKS' does not exist.
> Error Code: -1
> Call: SELECT BOOKID, FIRSTNAME, DESCRIPTION, PRICE, ONSALE, SURNAME, CALENDAR_YEAR, TITLE, INVENTORY FROM WEB_BOOKSTORE_BOOKS ORDER BY BOOKID ASC
> Query: ReportQuery(com.sun.bookstore.database.Book)
>
> And I am thinking I have not setup the connection pool well.
>
> I use Derby. I have populated the BookDB (my DB) and I see the tables
> in NetBeans. I think I did not do the step to link the DB to the connection
> pool (jdbc/BookDB).
>
> How do I have to do it?
>
> Regards,
> Jose Alvarez de Lara
> [Message sent by forum member 'josealvarezdelara' (josealvarezdelara)]
>
> http://forums.java.net/jive/thread.jspa?messageID=328951
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>