Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Not able to fetch data from Oracle DB

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using Hibernate 3.0, JPA (spring-orm-3.0.3.RELEASE.jar) and Oracle 11G for our project. Project is running in JBOSS 5.1.0GA.

In Oracle we are having one table ( EP) with one COlumn as XMLTYPE datatype.

In JPA Entity defined as with XMLTYPE column type:



when I am running this code always getting below exception:


Can you please let me know what the problem in mapping. I am not getting the issue and its resolution.

Persistence.xml is having dialect and JPA as below:

<properties>
<!-- Transaction integration -->
<property name="hibernate.transaction.factory_class"
value="org.hibernate.ejb.transaction.JoinableCMTTransactionFactory" />
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup" />
<property name="jboss.entity.manager.factory.jndi.name"
value="persistence-units/JpaPersistence" />
<property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>
<property name="hibernate.hbm2ddl.auto" value="validation" />

</properties>
</persistence-unit>
</persistence>

Thanks
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi Shikha bajpai,

Try this,


if you still haven't lucky, try to convert the column


Cheers!
 
Shikha bajpai
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rafael

Thanks for your reply. But I am using Hibernate3 jar which is not having ColumnTransformer annotation class. I can't use Hibernate 3.6.0 jar as this will impact current Project structure. Is there any other way to resolve this issue. Please help me.

Also first one also I tried, but still in same condition.

Thanks
Shikha
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!