java.lang.String cannot be cast to java.sql.Clob

1,491 views
Skip to first unread message

Seb Duggan

unread,
Mar 3, 2013, 8:41:57 AM3/3/13
to ra...@googlegroups.com
I've got a new install of Railo 4 (via the installer) on a CentOS VPS.

An ORM app is currently connected to a MS SQL Server 2008 database.

When I try to save via ORM, I get the message:

java.lang.String cannot be cast to java.sql.Clob

This happens whether I use the Microsoft or JDBC driver.

Any ideas?

Seb Duggan

unread,
Mar 3, 2013, 8:45:59 AM3/3/13
to ra...@googlegroups.com
If it helps, the table it's saving to has a column of type VARCHAR(MAX).

A different save (to a table without this) works perfectly.


Seb

Geoff Parkhurst

unread,
Mar 3, 2013, 9:48:48 AM3/3/13
to ra...@googlegroups.com
On 3 March 2013 13:41, Seb Duggan <seb.d...@gmail.com> wrote:
> I've got a new install of Railo 4 (via the installer) on a CentOS VPS.
>
> An ORM app is currently connected to a MS SQL Server 2008 database.
>
> When I try to save via ORM, I get the message:
>
> java.lang.String cannot be cast to java.sql.Clob

Does enabling CLOB fix it? (datasource setting)

(We use Railo4 with sql 2008 and varchar(max) columns and don't need
that setting enabled though - we're not using ORM though)

Best,
Geoff

Seb Duggan

unread,
Mar 3, 2013, 9:50:06 AM3/3/13
to ra...@googlegroups.com
No, tried that...

And the same app works without a problem on ACF10.


Seb

Michael Offner

unread,
Mar 3, 2013, 2:31:37 PM3/3/13
to ra...@googlegroups.com
Do you have a java stack trace for this?

Micha

Von meinem iPad gesendet
--
You received this message because you are subscribed to the Google Groups "Railo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to railo+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Seb Duggan

unread,
Mar 3, 2013, 3:08:45 PM3/3/13
to ra...@googlegroups.com
java.lang.String cannot be cast to java.sql.Clob at org.hibernate.type.ClobType.set(ClobType.java:84):84 at org.hibernate.type.ClobType.nullSafeSet(ClobType.java:62):62 at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2168):2168 at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2542):2542 at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2478):2478 at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2805):2805 at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:114):114 at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:267):267 at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:259):259 at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:179):179 at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321):321 at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51):51 at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206):1206 at railo.runtime.orm.hibernate.HibernateORMTransaction.end(HibernateORMTransaction.java:53):53 at railo.runtime.orm.ORMConnection.setAutoCommit(ORMConnection.java:243):243 at railo.runtime.db.DatasourceManagerImpl.end(DatasourceManagerImpl.java:227):227 at railo.runtime.tag.Transaction.doFinally(Transaction.java:145):145 at model.services.magazine_cfc$cf.udfCall(/srv/www/ipcgiftfinder.zingiber.net/model/services/magazine.cfc:19):19 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:103):103 at railo.runtime.type.UDFImpl._call(UDFImpl.java:371):371 at railo.runtime.type.UDFImpl.call(UDFImpl.java:284):284 at railo.runtime.ComponentImpl._call(ComponentImpl.java:607):607 at railo.runtime.ComponentImpl._call(ComponentImpl.java:490):490 at railo.runtime.ComponentImpl.call(ComponentImpl.java:1781):1781 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:723):723 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1507):1507 at controllers.magazine_cfc$cf.udfCall(/srv/www/ipcgiftfinder.zingiber.net/controllers/magazine.cfc:62):62 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:103):103 at railo.runtime.type.UDFImpl._call(UDFImpl.java:371):371 at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:275):275 at railo.runtime.ComponentImpl._call(ComponentImpl.java:608):608 at railo.runtime.ComponentImpl._call(ComponentImpl.java:490):490 at railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1800):1800 at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:749):749 at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:743):743 at railo.runtime.util.VariableUtilImpl.callFunction(VariableUtilImpl.java:709):709 at railo.runtime.interpreter.ref.func.UDFCall.getValue(UDFCall.java:47):47 at railo.runtime.interpreter.CFMLExpressionInterpreter.interpret(CFMLExpressionInterpreter.java:188):188 at railo.runtime.functions.dynamicEvaluation.Evaluate._call(Evaluate.java:77):77 at railo.runtime.functions.dynamicEvaluation.Evaluate.call(Evaluate.java:70):70 at railo.runtime.functions.dynamicEvaluation.Evaluate.call(Evaluate.java:23):23 at framework_cfc$cf._6(/srv/www/ipcgiftfinder.zingiber.net/framework.cfc:1110):1110 at framework_cfc$cf.udfCall(/srv/www/ipcgiftfinder.zingiber.net/framework.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:103):103 at railo.runtime.type.UDFImpl._call(UDFImpl.java:371):371 at railo.runtime.type.UDFImpl.call(UDFImpl.java:284):284 at railo.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:775):775 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:723):723 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1507):1507 at framework_cfc$cf._4(/srv/www/ipcgiftfinder.zingiber.net/framework.cfc:623):623 at framework_cfc$cf.udfCall(/srv/www/ipcgiftfinder.zingiber.net/framework.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:103):103 at railo.runtime.type.UDFImpl._call(UDFImpl.java:371):371 at railo.runtime.type.UDFImpl.call(UDFImpl.java:284):284 at railo.runtime.ComponentImpl._call(ComponentImpl.java:607):607 at railo.runtime.ComponentImpl._call(ComponentImpl.java:490):490 at railo.runtime.ComponentImpl.call(ComponentImpl.java:1781):1781 at railo.runtime.listener.ModernAppListener.call(ModernAppListener.java:346):346 at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:181):181 at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:18):18 at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2256):2256 at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2223):2223 at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:315):315 at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:29):29 at javax.servlet.http.HttpServlet.service(HttpServlet.java:728):728 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305):305 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210):210 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222):222 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123):123 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472):472 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171):171 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99):99 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118):118 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407):407 at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004):1004 at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589):589 at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310):310 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source):-1 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source):-1 at java.lang.Thread.run(Unknown Source):-1




Michael Offner wrote:
You received this message because you are subscribed to a topic in the Google Groups "Railo" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/railo/ta3qYKoGkjI/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to railo+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages