[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3416) Validation schema not work with sequence throws synonym
Libor Tvrdík (JIRA)
noreply at atlassian.com
Wed Aug 6 07:14:31 EDT 2008
Validation schema not work with sequence throws synonym
-------------------------------------------------------
Key: HHH-3416
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3416
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.2.6
Environment: Oracle 10g
Reporter: Libor Tvrdík
I use entity bean without schema with sequence generator.
@Entity
@SequenceGenerator(name = "SEQ_B_ID", sequenceName = "SEQ_B_ID")
class B {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_B_ID")
int id;
}
I need two user, one for insert, and next for select (only select, is for web). In Oracle I have INS schema with table B and WEB schema with synonym B for table B from INS schema.
When I set "hbm2ddl.auto=validate" and run with WEB user catch org.hibernate.HibernateException: Missing sequence or table: SEQ_B_ID
Full Stack:
Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing sequence or table: SEQ_B_ID:
org.hibernate.HibernateException: Missing sequence or table: SEQ_B_ID
at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1100)
at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:317)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1368)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
and more ...
It is important that, without hbm2ddl.auto (no presence, default) everything works.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list