-->
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: ...HibernateException: could not read XML from Clob
PostPosted: Fri Jul 15, 2005 7:52 am 
Newbie

Joined: Fri Jul 15, 2005 7:45 am
Posts: 1
I'm trying to extract xml fropm hibernate ..... from the error message, it seems line you can't extract text from a clob.... Ideally I'd extract this text and place it in a CDATA element..... is this possible ?
[/b]

Hibernate version:
3
Mapping documents:
<class name="data.Contentversion" table="contentversion">
<id name="pbid" column="pbid" type="java.lang.Integer" unsaved-value="0">
<generator class="seqhilo"><param name="sequence">s_contentversion_id</param></generator>
</id>
<property name="versionvalue" type="java.lang.String" />
<property name="modifieddatetime" type="java.util.Date" />
<property name="versioncomment" type="java.lang.String" />
<property name="ischeckedout" />
<property name="content" type="java.sql.Clob" />
<property name="isactive" />
<property name="contentpbid" type="java.lang.Integer" />
<property name="stateid" type="java.lang.Integer" />
</class>


Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:
org.hibernate.HibernateException: could not read XML from Clob at org.hibernate.type.ClobType.setToXMLNode(ClobType.java:143) at org.hibernate.property.Dom4jAccessor$ElementSetter.set(Dom4jAccessor.java:307) at org.hibernate.tuple.AbstractTuplizer.setPropertyValues(AbstractTuplizer.java:207) at org.hibernate.persister.entity.BasicEntityPersister.setPropertyValues(BasicEntityPersister.java:2900) at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:113) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:510) at org.hibernate.loader.Loader.doQuery(Loader.java:419) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:210) at org.hibernate.loader.Loader.doList(Loader.java:1562) at org.hibernate.loader.Loader.list(Loader.java:1545) at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:886) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:840) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74) at _hxml_2e_jsp.getxml(hxml.jsp:21) [/hxml.jsp] at _hxml_2e_jsp._jspService(hxml.jsp:42) [/hxml.jsp] at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].http.OrionHttpJspPage.service(OrionHttpJspPage.java:60) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:343) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:543) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:441) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:61) at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:672) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:378) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:869) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].server.http.HttpRequestHandler.run(HttpRequestHandler.java:288) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].server.http.HttpRequestHandler.run(HttpRequestHandler.java:120) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:294) at java.lang.Thread.run(Thread.java:534)Caused by: java.sql.SQLException: Invalid argument(s) in call: getSubString at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175) at oracle.jdbc.driver.DatabaseError.check_error(DatabaseError.java:874) at oracle.sql.CLOB.getSubString(CLOB.java:212) at org.hibernate.lob.SerializableClob.getSubString(SerializableClob.java:37) at org.hibernate.type.ClobType.setToXMLNode(ClobType.java:140) ... 28 more

Name and version of the database you are using:
oracle 10g
The generated SQL (show_sql=true):
select contentver0_.pbid as pbid, contentver0_.versionvalue as versionv2_1_, contentver0_.modifieddatetime as modified3_1_, contentver0_.versioncomment as versionc4_1_, contentver0_.ischeckedout as ischecke5_1_, contentver0_.content as content1_, contentver0_.isactive as isactive1_, contentver0_.contentpbid as contentp8_1_, contentver0_.stateid as stateid1_ from contentversion contentver0_


Debug level Hibernate log excerpt:


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.