title: Hibernate + HSQLDB schema is not exported
body: <p>I have web application based on Spring-MVC. I've integrated it with Hibernate 3.6.0.
  When I'm trying to save entity named User I get :</p>
  
  <blockquote>
    <p>org.hsqldb.HsqlException: user lacks privilege or object not found:
    USER</p>
  </blockquote>
  
  <p>I figured out that there is no table USER in the database but why? 
  My configuration file's fragment for springs ServletDispatcher:</p>
  
  <pre><code>&lt;bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
          &lt;property name="driverClassName" value="org.hsqldb.jdbcDriver"&gt;&lt;/property&gt;
          &lt;property name="url" value="jdbc:hsqldb:file: db/autostop; shutdown=true"&gt;&lt;/property&gt;
          &lt;property name="username" value="SA"&gt;&lt;/property&gt;
          &lt;property name="password" value=""&gt;&lt;/property&gt;
      &lt;/bean&gt;
      &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"&gt;
          &lt;property name="dataSource" ref="dataSource"/&gt;
          &lt;property name="packagesToScan" value="prv.bladositto.autostop.persistance.hibernate.model"/&gt;
          &lt;property name="hibernateProperties"&gt;
              &lt;props&gt;
                  &lt;prop key="dialect"&gt;org.hibernate.dialect.HSQLDialect&lt;/prop&gt;
                  &lt;prop key="show_sql"&gt;true&lt;/prop&gt;
                  &lt;prop key="hbm2ddl.auto"&gt;create-drop&lt;/prop&gt;
              &lt;/props&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>Root exception stack trace:</p>
  
  <pre><code>org.hsqldb.HsqlException: user lacks privilege or object not found: USER
      org.hsqldb.error.Error.error(Unknown Source)
      org.hsqldb.error.Error.error(Unknown Source)
      org.hsqldb.SchemaManager.getTable(Unknown Source)
      org.hsqldb.ParserDQL.readTableName(Unknown Source)
      org.hsqldb.ParserDQL.readSimpleRangeVariable(Unknown Source)
      org.hsqldb.ParserDML.compileInsertStatement(Unknown Source)
      org.hsqldb.ParserCommand.compilePart(Unknown Source)
      org.hsqldb.ParserCommand.compileStatement(Unknown Source)
      org.hsqldb.Session.compileStatement(Unknown Source)
      org.hsqldb.StatementManager.compile(Unknown Source)
      org.hsqldb.Session.execute(Unknown Source)
      org.hsqldb.jdbc.JDBCPreparedStatement.&lt;init&gt;(Unknown Source)
      org.hsqldb.jdbc.JDBCConnection.prepareStatement(Unknown Source)
      org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:524)
      org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:116)
      org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.prepare(IdentityGenerator.java:90)
      org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:54)
      org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2327)
      org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2834)
      org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:71)
      org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
      org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:320)
      org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:203)
      org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:129)
      org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
      org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)
      org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
      org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)
      org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
      org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:713)
      org.hibernate.impl.SessionImpl.save(SessionImpl.java:701)
      org.hibernate.impl.SessionImpl.save(SessionImpl.java:697)
      org.springframework.orm.hibernate3.HibernateTemplate$12.doInHibernate(HibernateTemplate.java:686)
      org.springframework.orm.hibernate3.HibernateTemplate$12.doInHibernate(HibernateTemplate.java:1)
      org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
      org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
      org.springframework.orm.hibernate3.HibernateTemplate.save(HibernateTemplate.java:683)
      prv.bladositto.autostop.persistance.hibernate.UserServiceImpl.save(UserServiceImpl.java:23)
      prv.bladositto.autostop.controllers.UsersController.createUser(UsersController.java:40)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      java.lang.reflect.Method.invoke(Method.java:601)
      org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213)
      org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
      org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
      org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
      org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
      org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
      org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
      org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
      org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:800)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:757)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:74)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>I'm deploying my application to JBoss AS 7. It's located on /usr/share/JBoss..7/ on Ubuntu. Maybe it's important.</p>