Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Teneo] using C3P0: $Proxy10 cannot be cast to oracle.sql.CLOB
[Teneo] using C3P0: $Proxy10 cannot be cast to oracle.sql.CLOB [message #1065054] Mon, 24 June 2013 07:37 Go to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
Hi,

I'm trying to use the C3P0 connection pool, but I'm receiving this error when trying to load an object holding a Clob (Oracle database):

- $Proxy10 cannot be cast to oracle.sql.CLOB

Does anyone know how to solve this?
Re: [Teneo] using C3P0: $Proxy10 cannot be cast to oracle.sql.CLOB [message #1065117 is a reply to message #1065054] Mon, 24 June 2013 12:30 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5339
Registered: July 2009
Senior Member
Hi Ricky,
I found this one:
https://hibernate.atlassian.net/browse/HHH-5659

but not sure if related, depends on the hb version.

Can you print the complete stack trace?

gr. Martin

On 06/24/2013 09:37 AM, Ricky de Klerck wrote:
> Hi,
>
> I'm trying to use the C3P0 connection pool, but I'm receiving this error when trying to load an object holding a Clob
> (Oracle database):
>
> - $Proxy10 cannot be cast to oracle.sql.CLOB
>
> Does anyone know how to solve this?


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Teneo] using C3P0: $Proxy10 cannot be cast to oracle.sql.CLOB [message #1065149 is a reply to message #1065117] Mon, 24 June 2013 13:55 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
This is the complete stack trace:

org.hibernate.exception.GenericJDBCException: An SQLException was provoked by the following failure: java.lang.ClassCastException: $Proxy10 cannot be cast to oracle.sql.CLOB
	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
	at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:129)
	at org.hibernate.engine.jdbc.internal.proxy.CallableStatementProxyHandler.continueInvocation(CallableStatementProxyHandler.java:49)
	at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
	at $Proxy5.setClob(Unknown Source)
	at smartapps.docgen4o.controller.LinkVariablesController$1.execute(LinkVariablesController.java:77)
	at org.hibernate.jdbc.WorkExecutor.executeWork(WorkExecutor.java:54)
	at org.hibernate.internal.SessionImpl$1.accept(SessionImpl.java:1850)
	at org.hibernate.internal.SessionImpl$1.accept(SessionImpl.java:1847)
	at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:211)
	at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:1868)
	at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:1854)
	at smartapps.docgen4o.controller.LinkVariablesController.getColumnsForSqlStatement(LinkVariablesController.java:70)
	at smartapps.docgen4o.controller.DocumentSqlStatementController.getLinkVariablesForSqlStatement(DocumentSqlStatementController.java:205)
	at smartapps.docgen4o.controller.DocumentSqlStatementController.getAllLinkVariables(DocumentSqlStatementController.java:197)
	at smartapps.docgen4o.developerperspective.workbench.widgets.edit.SQLEditComposite.initLinkedVariables(SQLEditComposite.java:612)
	at smartapps.docgen4o.developerperspective.workbench.widgets.edit.SQLEditComposite.<init>(SQLEditComposite.java:403)
	at smartapps.docgen4o.developerperspective.document.DocumentEditPage.createStatementComposite(DocumentEditPage.java:592)
	at smartapps.docgen4o.developerperspective.document.DocumentEditPage$6.doubleClick(DocumentEditPage.java:533)
	at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:845)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:843)
	at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1462)
	at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1246)
	at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:249)
	at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:246)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:307)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at smartapps.docgen4o.application.Application.start(Application.java:20)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.ClassCastException: $Proxy10 cannot be cast to oracle.sql.CLOB
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:62)
	at com.mchange.v2.c3p0.impl.NewPooledConnection.handleThrowable(NewPooledConnection.java:369)
	at com.mchange.v2.c3p0.impl.NewProxyCallableStatement.setClob(NewProxyCallableStatement.java:2590)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122)
	... 52 more
Caused by: java.lang.ClassCastException: $Proxy10 cannot be cast to oracle.sql.CLOB
	at oracle.jdbc.driver.OraclePreparedStatement.setClobInternal(OraclePreparedStatement.java:6749)
	at oracle.jdbc.driver.OracleCallableStatement.setClob(OracleCallableStatement.java:4869)
	at oracle.jdbc.driver.OraclePreparedStatementWrapper.setClob(OraclePreparedStatementWrapper.java:160)
	at com.mchange.v2.c3p0.impl.NewProxyCallableStatement.setClob(NewProxyCallableStatement.java:2576)
	... 57 more

Re: [Teneo] using C3P0: $Proxy10 cannot be cast to oracle.sql.CLOB [message #1065273 is a reply to message #1065149] Tue, 25 June 2013 08:17 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5339
Registered: July 2009
Senior Member
Hi Ricky,
And which version of Hb are you on?

gr. Martin

On 06/24/2013 03:55 PM, Ricky de Klerck wrote:
> This is the complete stack trace:
>
> org.hibernate.exception.GenericJDBCException: An SQLException was provoked by the following failure:
> java.lang.ClassCastException: $Proxy10 cannot be cast to oracle.sql.CLOB
> at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)
> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
> at
> org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:129)
>
> at
> org.hibernate.engine.jdbc.internal.proxy.CallableStatementProxyHandler.continueInvocation(CallableStatementProxyHandler.java:49)
>
> at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
> at $Proxy5.setClob(Unknown Source)
> at smartapps.docgen4o.controller.LinkVariablesController$1.execute(LinkVariablesController.java:77)
> at org.hibernate.jdbc.WorkExecutor.executeWork(WorkExecutor.java:54)
> at org.hibernate.internal.SessionImpl$1.accept(SessionImpl.java:1850)
> at org.hibernate.internal.SessionImpl$1.accept(SessionImpl.java:1847)
> at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:211)
> at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:1868)
> at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:1854)
> at smartapps.docgen4o.controller.LinkVariablesController.getColumnsForSqlStatement(LinkVariablesController.java:70)
> at
> smartapps.docgen4o.controller.DocumentSqlStatementController.getLinkVariablesForSqlStatement(DocumentSqlStatementController.java:205)
>
> at
> smartapps.docgen4o.controller.DocumentSqlStatementController.getAllLinkVariables(DocumentSqlStatementController.java:197)
> at
> smartapps.docgen4o.developerperspective.workbench.widgets.edit.SQLEditComposite.initLinkedVariables(SQLEditComposite.java:612)
>
> at smartapps.docgen4o.developerperspective.workbench.widgets.edit.SQLEditComposite.<init>(SQLEditComposite.java:403)
> at
> smartapps.docgen4o.developerperspective.document.DocumentEditPage.createStatementComposite(DocumentEditPage.java:592)
> at smartapps.docgen4o.developerperspective.document.DocumentEditPage$6.doubleClick(DocumentEditPage.java:533)
> at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:845)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
> at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:843)
> at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1462)
> at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1246)
> at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:249)
> at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:246)
> at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:307)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at smartapps.docgen4o.application.Application.start(Application.java:20)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
> Caused by: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.ClassCastException:
> $Proxy10 cannot be cast to oracle.sql.CLOB
> at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
> at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
> at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:62)
> at com.mchange.v2.c3p0.impl.NewPooledConnection.handleThrowable(NewPooledConnection.java:369)
> at com.mchange.v2.c3p0.impl.NewProxyCallableStatement.setClob(NewProxyCallableStatement.java:2590)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122)
>
> ... 52 more
> Caused by: java.lang.ClassCastException: $Proxy10 cannot be cast to oracle.sql.CLOB
> at oracle.jdbc.driver.OraclePreparedStatement.setClobInternal(OraclePreparedStatement.java:6749)
> at oracle.jdbc.driver.OracleCallableStatement.setClob(OracleCallableStatement.java:4869)
> at oracle.jdbc.driver.OraclePreparedStatementWrapper.setClob(OraclePreparedStatementWrapper.java:160)
> at com.mchange.v2.c3p0.impl.NewProxyCallableStatement.setClob(NewProxyCallableStatement.java:2576)
> ... 57 more
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Teneo] using C3P0: $Proxy10 cannot be cast to oracle.sql.CLOB [message #1065281 is a reply to message #1065273] Tue, 25 June 2013 08:38 Go to previous message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
These versions:

Hibernate 4.1.1
Teneo Hibernate 2.0.1
Previous Topic:Containment and eOpposite
Next Topic:EMF Support for xsd:whitespace
Goto Forum:
  


Current Time: Tue Oct 21 21:45:45 GMT 2014

Powered by FUDForum. Page generated in 0.02416 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software