Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3243042
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:23:11+00:00 2026-05-17T18:23:11+00:00

I’m using hibernate as my jpa provider and want it to create a in-memory

  • 0

I’m using hibernate as my jpa provider and want it to create a
in-memory hsqldb on startup using:
hibernate.hbm2ddl.auto=create

But for some reason I get exceptions like below in my logs.
Things seems to work otherwise. Is it a hibernate or hsqldb problem?

I’m limited to using jpa 1 so I’m using
hsqldb 1.8.0.10 and hibernate 3.3.0.SP1

This is similar to:
Internal HSQL database complains about privileges

ERROR - 4. Statement.executeUpdate(drop sequence DDS_EMAIL_STATUS_SEQ) FAILED! drop sequence DDS_EMAIL_STATUS_SEQ {FAILED after 0 msec}
java.sql.SQLException: Sequence not found in statement [drop sequence DDS_EMAIL_STATUS_SEQ]
    at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
    at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
    at org.hsqldb.jdbc.jdbcStatement.executeUpdate(Unknown Source)
    at net.sf.log4jdbc.StatementSpy.executeUpdate(StatementSpy.java:694)
    at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
    at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
    at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:383)
    at org.hibernate.tool.hbm2ddl.SchemaExport.drop(SchemaExport.java:358)
    at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:258)
    at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:211)
    at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:343)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)
    at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
    at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)
    at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:184)
    at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:490)
    at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:450)
    at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:368)
    at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:280)
    at org.apache.openejb.OpenEJB$Instance.(OpenEJB.java:125)
    at org.apache.openejb.OpenEJB$Instance.(OpenEJB.java:60)
    at org.apache.openejb.OpenEJB.init(OpenEJB.java:271)
    at org.apache.openejb.OpenEJB.init(OpenEJB.java:250)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
    at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
    at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
    at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.(InitialContext.java:197)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T18:23:11+00:00Added an answer on May 17, 2026 at 6:23 pm

    Since you’re using an in-memory database, it’s not surprising that a sequence, like any other database object, is not there at export time. But I don’t know why you get a full stacktrace like this. I just tried with a basic test case and here is what I get:

    16:27:07.708 [main] DEBUG o.h.tool.hbm2ddl.SchemaExport - Unsuccessful: drop sequence MY_ENTITY_SEQ
    16:27:07.709 [main] DEBUG o.h.tool.hbm2ddl.SchemaExport - Sequence not found in statement [drop sequence MY_ENTITY_SEQ]
    

    In other words, it “fails” silently.

    Maybe you could try to extend the HSQLDialect and override the following method:

    protected String getDropSequenceString(String sequenceName) {
        return "drop sequence " + sequenceName;
    }
    

    into:

    protected String getDropSequenceString(String sequenceName) {
        return "drop sequence " + sequenceName + " if exists";
    }
    

    Not tested though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a French site that I want to parse, but am running into
I want to construct a data frame in an Rcpp function, but when I
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.