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"); } }
|