title: Create schema in HSQL database(in memory) using Hibernate(Annotation method)
body: <p>Was creating JUNIT cases for hibernate project(based on annotations) using hsqldb(in memory).But the tables are not getting created.
  The error(<em>org.hsqldb.HsqlException: invalid schema name: TEST</em>) is happening because of the <strong>catalog</strong> property for <strong>entity</strong>. If it is removed i dont have any issue while trying to persist.   </p>
  
  <p>But i need the schema to be present.Please let me know your comments/suggestions. 
  Please find below more details:-</p>
  
  <p><strong>PFB the entity class deatils</strong></p>
  
  <pre><code>@Entity
  @Table(name="CITY" ,catalog="TEST")
   public class City {
  </code></pre>
  
  <p><strong>PFB the hibernate xml file:-</strong></p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
      xmlns:tx="http://www.springframework.org/schema/tx"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
              http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
              http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
      "&gt;    
  
  
  &lt;bean id="dataSource"
              class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
              &lt;property name="driverClassName" value="org.hsqldb.jdbcDriver" /&gt;
              &lt;property name="url" value="jdbc:hsqldb:TEST" /&gt;
              &lt;property name="username" value="sa" /&gt;
              &lt;property name="password" value="" /&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="entity" /&gt;
              &lt;property name="hibernateProperties"&gt;
                  &lt;props&gt;
                      &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.HSQLDialect&lt;/prop&gt;
                      &lt;prop key="hibernate.hbm2ddl.auto"&gt;create-drop&lt;/prop&gt;
                      &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;
                  &lt;/props&gt;
              &lt;/property&gt;
          &lt;/bean&gt;
  
          &lt;bean id="transactionManager"
              class="org.springframework.orm.hibernate3.HibernateTransactionManager"&gt;
              &lt;property name="sessionFactory" ref="sessionFactory" /&gt;
          &lt;/bean&gt;
          &lt;tx:annotation-driven transaction-manager="transactionManager" /&gt;
  
  
      &lt;/beans&gt;
  </code></pre>
  
  <p><strong>PFB the error message:-</strong></p>
  
  <p>o</p>
  
  <pre><code>rg.hibernate.exception.GenericJDBCException: could not insert: [entity.UserInfo]
      at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
      at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:64)
      at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2345)
      at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2852)
      at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:71)
      at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
      at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:320)
      at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:203)
      at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:129)
      at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:179)
      at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:135)
      at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:61)
      at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:808)
      at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:782)
      at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:786)
      at sample.Tester.shouldBeAbleToPersistAnObject(Tester.java:45)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
      at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
      at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
      at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
      at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
  Caused by: java.sql.SQLException: invalid schema name: TEST
      at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
      at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
      at org.hsqldb.jdbc.JDBCPreparedStatement.&lt;init&gt;(Unknown Source)
      at org.hsqldb.jdbc.JDBCConnection.prepareStatement(Unknown Source)
      at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:524)
      at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:116)
      at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.prepare(IdentityGenerator.java:90)
      at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:54)
      ... 43 more
  Caused by: org.hsqldb.HsqlException: invalid schema name: TEST
      at org.hsqldb.error.Error.error(Unknown Source)
      at org.hsqldb.error.Error.error(Unknown Source)
      at org.hsqldb.SchemaManager.getSchemaHsqlName(Unknown Source)
      at org.hsqldb.SchemaManager.getSchemaName(Unknown Source)
      at org.hsqldb.Session.getSchemaName(Unknown Source)
      at org.hsqldb.SchemaManager.getTable(Unknown Source)
      at org.hsqldb.ParserDQL.readTableName(Unknown Source)
      at org.hsqldb.ParserDQL.readRangeVariableForDataChange(Unknown Source)
      at org.hsqldb.ParserDML.compileInsertStatement(Unknown Source)
      at org.hsqldb.ParserCommand.compilePart(Unknown Source)
      at org.hsqldb.ParserCommand.compileStatement(Unknown Source)
      at org.hsqldb.Session.compileStatement(Unknown Source)
      at org.hsqldb.StatementManager.compile(Unknown Source)
      at org.hsqldb.Session.execute(Unknown Source)
      ... 49 more
  </code></pre>