Forums Register Login

Can we oracle view in Hibernate?

+Pie Number of slices to send: Send
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>
+Pie Number of slices to send: Send
balakumar balakumar please check your private messages.
Honk if you love justice! And honk twice for tiny ads!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 3300 times.
Similar Threads
StaleStateException
Named Query not found
Error reading resource Hibernate
Classcast exception
InvalidMappingException
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 02:04:06.