Uploaded image for project: 'Railo'
  1. Railo
  2. RAILO-3097

ORACLE BLOB Error (railo.runtime.type.sql.BlobImpl cannot be cast to oracle.sql.BLOB)

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.1.2.005
    • Fix Version/s: 4.3.0.000, 4.2.1.002
    • Labels:
      None
    • Environment:

      Win2008/Win7, JRE 1.7, Railo Express 4.1.2.005; Same Error with Railo WAR/JARs 4.1.2.005 deployed in Tomcat 6; Both environments uses the ORACLE driver ojdbc6.jar; Not odbc14.jar! Tested databases are ORACLE 11g XE and ORACLE 11g Enterprise.

      Description

      Writing binary content to an oracle DB column of type BLOB throws the error: java.lang.ClassCastException
      railo.runtime.type.sql.BlobImpl cannot be cast to oracle.sql.BLOB

      With Railo 3.3.1.000, same environment and driver, everythings works fine. We have to stop our rollout of Railo 4 unless a simple workaround or solution is found.

      Simple example:

      <cffile action="readBinary" file="C:\image.gif" variable="binFileContent">
      <cfquery name="InsToTab" datasource="myDatasource">
      INSERT INTO scheme.table ( blobcolumn )
      VALUES ( <cfqueryparam value="#binFileContent#" cfsqltype="cf_sql_blob"> )
      </cfquery>

      Railo throws following error:

      Error: java.lang.ClassCastException
      Message: railo.runtime.type.sql.BlobImpl cannot be cast to oracle.sql.BLOB

      Stacktrace:
      railo.runtime.type.sql.BlobImpl cannot be cast to oracle.sql.BLOB at oracle.jdbc.driver.OraclePreparedStatement.setBlob(OraclePreparedStatement.java:6634):6634 at oracle.jdbc.driver.OraclePreparedStatementWrapper.setBlob(OraclePreparedStatementWrapper.java:126):126 at railo.runtime.db.driver.PreparedStatementProxy.setBlob(PreparedStatementProxy.java:133):133 at railo.runtime.db.SQLCaster.setValue(SQLCaster.java:155):155 at railo.runtime.type.QueryImpl.setItems(QueryImpl.java:333):333 at railo.runtime.type.QueryImpl.<init>(QueryImpl.java:232):232 at railo.runtime.tag.Query.executeDatasoure(Query.java:656):656 at railo.runtime.tag.Query.doEndTag(Query.java:502):502 at workspace_utf8.osdb_app225._507_osdb.faktura.cfc.mod_aes3_anforderung_cfc$cf.udfCall2_000033(D:\Projekte\workspace_utf8\OSDB-APP\507_OSDB\faktura\cfc\mod_aes3_anforderung.cfc:2154):2154 at workspace_utf8.osdb_app225._507_osdb.faktura.cfc.mod_aes3_anforderung_cfc$cf.udfCall2(D:\Projekte\workspace_utf8\OSDB-APP\507_OSDB\faktura\cfc\mod_aes3_anforderung.cfc:2133):2133 at workspace_utf8.osdb_app225._507_osdb.faktura.cfc.mod_aes3_anforderung_cfc$cf.udfCall(D:\Projekte\workspace_utf8\OSDB-APP\507_OSDB\faktura\cfc\mod_aes3_anforderung.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:95):95 at railo.runtime.type.UDFImpl._call(UDFImpl.java:308):308 at railo.runtime.type.UDFImpl.call(UDFImpl.java:212):212 at railo.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:704):704 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:713):713 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1471):1471 at workspace_utf8.osdb_app225._507_osdb.faktura.cfc.mod_aes3_anforderung_cfc$cf.udfCall2_000030(D:\Projekte\workspace_utf8\OSDB-APP\507_OSDB\faktura\cfc\mod_aes3_anforderung.cfc:2071):2071 at workspace_utf8.osdb_app225._507_osdb.faktura.cfc.mod_aes3_anforderung_cfc$cf.udfCall2(D:\Projekte\workspace_utf8\OSDB-APP\507_OSDB\faktura\cfc\mod_aes3_anforderung.cfc:1994):1994 at workspace_utf8.osdb_app225._507_osdb.faktura.cfc.mod_aes3_anforderung_cfc$cf.udfCall(D:\Projekte\workspace_utf8\OSDB-APP\507_OSDB\faktura\cfc\mod_aes3_anforderung.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:95):95 at railo.runtime.type.UDFImpl._call(UDFImpl.java:308):308 at railo.runtime.type.UDFImpl.call(UDFImpl.java:212):212 at railo.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:704):704 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:713):713 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1471):1471 at workspace_utf8.osdb_app225._507_osdb.faktura.cfc.mod_aes3_anforderung_cfc$cf.udfCall2_000025(D:\Projekte\workspace_utf8\OSDB-APP\507_OSDB\faktura\cfc\mod_aes3_anforderung.cfc:1650):1650 at workspace_utf8.osdb_app225._507_osdb.faktura.cfc.mod_aes3_anforderung_cfc$cf.udfCall2(D:\Projekte\workspace_utf8\OSDB-APP\507_OSDB\faktura\cfc\mod_aes3_anforderung.cfc:1598):1598 at workspace_utf8.osdb_app225._507_osdb.faktura.cfc.mod_aes3_anforderung_cfc$cf.udfCall(D:\Projekte\workspace_utf8\OSDB-APP\507_OSDB\faktura\cfc\mod_aes3_anforderung.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:95):95 at railo.runtime.type.UDFImpl._call(UDFImpl.java:308):308 at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:199):199 at railo.runtime.ComponentImpl._call(ComponentImpl.java:624):624 at railo.runtime.ComponentImpl._call(ComponentImpl.java:506):506 at railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1745):1745 at railo.runtime.tag.Invoke.doComponent(Invoke.java:203):203 at railo.runtime.tag.Invoke.doEndTag(Invoke.java:176):176 at workspace_utf8.osdb_app225._507_osdb.faktura.aes3_anforderung_01exe_cfm$cf.call(D:\Projekte\workspace_utf8\OSDB-APP\507_OSDB\faktura\aes3_anforderung_01exe.cfm:262):262 at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:838):838 at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:785):785 at workspace_utf8.osdb_app225._507_osdb.faktura.application_cfc$cf.udfCall(D:\Projekte\workspace_utf8\OSDB-APP\507_OSDB\faktura\Application.cfc:284):284 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:95):95 at railo.runtime.type.UDFImpl._call(UDFImpl.java:308):308 at railo.runtime.type.UDFImpl.call(UDFImpl.java:212):212 at railo.runtime.ComponentImpl._call(ComponentImpl.java:623):623 at railo.runtime.ComponentImpl._call(ComponentImpl.java:506):506 at railo.runtime.ComponentImpl.call(ComponentImpl.java:1732):1732 at railo.runtime.listener.ModernAppListener.call(ModernAppListener.java:387):387 at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:203):203 at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:18):18 at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2135):2135 at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2102):2102 at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:332):332 at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:29):29 at javax.servlet.http.HttpServlet.service(HttpServlet.java:848):848 at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686):686 at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501):501 at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137):137 at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557):557 at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231):231 at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086):1086 at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428):428 at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193):193 at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020):1020 at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135):135 at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255):255 at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154):154 at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116):116 at org.eclipse.jetty.server.Server.handle(Server.java:370):370 at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489):489 at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960):960 at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021):1021 at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865):865 at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240):240 at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82):82 at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668):668 at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52):52 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608):608 at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543):543 at java.lang.Thread.run(Unknown Source):-1

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                micstriit Michael Offner
                Reporter:
                ckolbenschlag Clemens Kolbenschlag
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: