Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can we oracle view in Hibernate?

 
balakumar sg
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i use the oracle view in Hibernate, I got the following error like

org.hibernate.HibernateException: Missing table: VW_TITLE_INFO

at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:962)

at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116)

at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:297)

at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)

at com.cengage.hibernate.SessionManager.currentSession(SessionManager.java:49)

at com.cengage.hibernate.TitleServiceImpl.getAllEBookClass(TitleServiceImpl.java:69)

at Check.getAllEBookClass(Check.java:74)

at Check.main(Check.java:26)

Exception in thread "main" java.lang.NullPointerException

at com.cengage.hibernate.SessionManager.currentSession(SessionManager.java:56)

at com.cengage.hibernate.TitleServiceImpl.getAllEBookClass(TitleServiceImpl.java:69)

at Check.getAllEBookClass(Check.java:74)

at Check.main(Check.java:26)




And I have done the configuration for corresponding view in XMl mapping.



<class name="com.cengage.pojos.TitleInfoViewBean" table="VW_TITLE_INFO" mutable="true">
<cache usage="read-only"/>
<id name="titleId" column="TITLE_ID" type="java.lang.Long" unsaved-value="null">
<generator class="assigned" />
</id>
<property name="eisbn" type="java.lang.String" column="EISBN"/>
<property name="eisbn13" type="java.lang.String" column="EISBN13"/>
<property name="productNumber" type="java.lang.String" column="PRODUCT_NUMBER"/>
<property name="ebookClassName" type="java.lang.String" column="EBOOK_NAME"/>
<property name="shortTitle" type="java.lang.String" column="SHORT_TITLE"/>
<property name="userInfoId" type="java.lang.Long" column="USER_INFO_ID"/>
<property name="myFavoriteTitle" type="java.lang.Boolean" column="MYFAVORITE_TITLE"/>
</class>
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
balakumar balakumar please check your private messages.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic