-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem with Oracle XMLType handling in Hibernate 3
PostPosted: Tue Aug 03, 2010 11:39 am 
Newbie

Joined: Tue Aug 03, 2010 11:22 am
Posts: 1
Hi,

Enivironment:
Oracle Application Server 10GR3
Hibernate 3
Oracle 10 DB

Problem: We use our own custom type to handle Oracle's XMLType, this works fine when we execute the code in a Eclipe Dev environment with no application Server.
But as soon as we deploy the code in OAS we start getting errors at run time. At first it looked like an issue with some duplicate jar files. But I have cleaned up everything I could think off. we are using the latest oracle drivers as far as I can tell. I know this looks like an Oracle issue, but the code works if we use a normal JDBC resultset code.
Any help would be greatly appreciated.
The stack trace is

Caused by: java.lang.NoSuchFieldError: conversion
at oracle.xdb.XMLType.<init>(XMLType.java:529)
at oracle.xdb.XMLType.createXML(XMLType.java:361)
at mypackage.dss.dao.datatype.HibernateXMLType.nullSafeSet(HibernateXMLType.java:114)
at org.hibernate.type.CustomType.nullSafeSet(CustomType.java:145)
at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:1826)
at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:1803)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2059)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2427)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:51)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:333)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at mypackage.dao.PersistenceLayer.insertIntoErrorLog(PersistenceLayer.java:212)
at mypackage.dss.dao.PersistenceLayer.getData(PersistenceLayer.java:159)
at mypackage.dss.service.DSSGetData.getData(DSSGetData.java:44)
at mypackage.dss.service.DSSQueryServiceImpl.getData(DSSQueryServiceImpl.java:143)



The code for the method is
public void nullSafeSet(PreparedStatement st, Object value, int index)
throws HibernateException, SQLException {
try {
XMLType xmlType = null;
if (value != null) {
xmlType = XMLType.createXML(st.getConnection(),
HibernateXMLType.domToString((Document) value));
}
st.setObject(index, xmlType);
} catch (Exception e) {
throw new SQLException(
"Could not convert Document to String for storage");
}
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.