• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Glassfish Eclipselink an Hibernate

 
Ranch Hand
Posts: 153
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Glassfish v3 with Apache Derby 10.6.1 (Network Server Mode)
I am trying to deploy a sample web application (Beginnig Java EE 6 platform with Glassfish3, chapter 10) with EJBs and Entities.

persistence.xml:


During deployment I get the exception:

Deployment encountered SQL Exceptions:
Got SQLException executing statement "CREATE TABLE SEQUENCE (SEQ_NAME VA
RCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(15), PRIMARY KEY (SEQ_NAME))": java.sql.SQ
LException: Table/View 'SEQUENCE' ist bereits in Schema 'APP' vorhanden.

(translation of the German part: 'SEQUENCE' exists already in Schema 'App'

the application gets deployed anyway.

after that I cannot connect with ij:
connect 'jdbc:derby://localhost:1527/book'

ij says the database does not exist.

What do I have to do to avoid the SQL command?

And is there a way to find out which databases a present in Derby?



 
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The SEQUENCE table error is just a warning, you can ignore it as you are replacing existing tables.
The reason the SEQUENCE table is not replaced is that there may be other tables using it and we do not want to reset their sequence values.

For the URL note you used books, not book,
use,
jdbc:derby://localhost:1527/books
 
author
Posts: 304
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Weird. I posted an answer, but then James's answer from an hour earlier showed up.
 
Get out of my mind! Look! A tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic