[arquillian-issues] [JBoss JIRA] (ARQ-1339) hbm2ddl.auto = validate is not validating tables created when using plain SQL and @CreateSchema

Fagner Martins (JIRA) jira-events at lists.jboss.org
Wed Mar 6 11:35:56 EST 2013


Fagner Martins created ARQ-1339:
-----------------------------------

             Summary: hbm2ddl.auto = validate is not validating tables created when using plain SQL and @CreateSchema
                 Key: ARQ-1339
                 URL: https://issues.jboss.org/browse/ARQ-1339
             Project: Arquillian
          Issue Type: Feature Request
      Security Level: Public (Everyone can see)
          Components: Extension - Persistence
    Affects Versions: 1.0.0.Alpha5
         Environment: Using JBoss AS 7.1.1.Final (managed)
            Reporter: Fagner Martins
            Assignee: Bartosz Majsak
            Priority: Minor


When using @CreateSchema and hbm2ddl.auto = validate the CREATE TABLE statement does not work.

It throws:
{code:java}
19:11:38,106 INFO  [java.sql.DatabaseMetaData] (MSC service thread 1-7) HHH000262: Table not found: table_name
19:11:38,108 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.persistenceunit."44fdf497-81e8-42cf-b964-0e5dc9347ffe.war#PersistenceUnit": org.jboss.msc.service.StartException in service jboss.persistenceunit."44fdf497-81e8-42cf-b964-0e5dc9347ffe.war#PersistenceUnit": Failed to start service
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_11]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_11]
    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_11]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: PersistenceUnit] Unable to build EntityManagerFactory
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)
    at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    ... 3 more
Caused by: org.hibernate.HibernateException: Missing table: table_name
    at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1265)
    at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:155)
    at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:460)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737)
    at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
    ... 9 more
{code}

I suppose this could be a bug with the persistence-api, am I right?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the arquillian-issues mailing list