JPA Console - Missing table: MockSecureEntity


I have spent quiet some time now trying to get the JPA console working on my IDEA 12 installation. At first i struggled with classpath issues but i think that is resolved now. What happens now is that whatever i try to query i get a Hibernate exception stating I am missing the table MockSecurityEntity. The only relevant topic i can find on this is a post on this forum, . The asker of that question came to the conclusion that it was a classpath issue for him. Unfortunately I don’t know if it is for me, since i added jboss-seam.jar which MockSecurityEntity is a part of.

What i cant get my head around is why a Seam unit test would get in the way.

MockSecurityEntity is not referenced from any files in my project. The project also deploys without trouble.


Do anyone know how to solve it? If yes, do you know why a seam unit test would cause this error?

Error log:
java.lang.RuntimeException: org.hibernate.HibernateException: Missing table: MockSecureEntity
at org.hibernate.cfg.Configuration.validateSchema(
at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(
at org.hibernate.impl.SessionFactoryImpl.<init>(
at org.hibernate.cfg.Configuration.buildSessionFactory(
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(
at javax.persistence.Persistence.createEntityManagerFactory(
at javax.persistence.Persistence.createEntityManagerFactory(
in JpaFacadeImpl.createEntityManagerFactory(

1 comment
Comment actions Permalink


Do you have persistence.xml? Can you add the element:
to your persistent unit?



Please sign in to leave a comment.