Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

cannot be cast to coldfusion.server.j2ee.sql.JRunConnectionHandle

Guest
Apr 01, 2008 Apr 01, 2008
I searched under all categories in this support forum and did not
get back even one result.

search string used:
"cannot be cast to coldfusion.server.j2ee.sql.JRunConnectionHandle"

Has anyone else encountered this error?

I'm on Windows 2003 and XP, Tomcat 6.0.14 and using JNDI Datasources.
I'm going from CF 8.0 Enterprise hot fix 2 to CF 8.0 Enterprise
hot fix 3. And I'm connecting to Oracle 10.2 RAC.

The full error message reads as follows:
Error casting an object of type org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to coldfusion.server.j2ee.sql.JRunConnectionHandle to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed. org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to coldfusion.server.j2ee.sql.JRunConnectionHandle

Everything was working fine until I applied cumulative hot fix 3.
http://www.adobe.com/go/kb403070


If I un-install the update, I don't get the error.

It seems the issue is related to cumulative hot fix 3 AND the use
of the <cfqueryparam ... /> tag.

Meaning, this works...
<cfquery name="qData" datasource="ds">
SELECT * FROM some_table
WHERE some_column = 'some_value'
</cfquery>

But this does not work...
<cfquery name="qData" datasource="ds">
SELECT * FROM some_table
WHERE some_column = <cfqueryparam value="some_value" cfsqltype="cf_sql_varchar" />
</cfquery>


If you have any thoughts, please let me know. I am really motivated
to get this working.
TOPICS
Database access
728
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 04, 2008 Apr 04, 2008
I just tried it on CF 8.0.1 and the problem still exists.

Just to recap...

<cfquery name="qData" datasource="ds">
SELECT * FROM some_table
WHERE some_column = <cfqueryparam value="some_value" cfsqltype="cf_sql_varchar" />
</cfquery>

This works on 8.0.0 hot fix 2 and older
but fails on 8.0.0 hot fix 3 and newer (8.0.1).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 04, 2008 Apr 04, 2008

This also fails on JBoss 4.2.2.GA but with a slightly different error message...

Error casting an object of type org.jboss.resource.adapter.jdbc.WrappedConnection cannot be cast to coldfusion.server.j2ee.sql.JRunConnectionHandle to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed. org.jboss.resource.adapter.jdbc.WrappedConnection cannot be cast to coldfusion.server.j2ee.sql.JRunConnectionHandle

Also, I have tried using a few different jdbc drivers but still no luck.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 09, 2008 Jun 09, 2008
I have the same problem and I was wondering if anybody found a solution for this?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 13, 2008 Jun 13, 2008
LATEST

I have found a work-around that you can use
until Adobe decides this is something they
want to fix.

1) Download chf8000002.jar and extract
these three files:
coldfusion\sql\Executive.class
coldfusion\sql\Executive$1.class
coldfusion\sql\Executive$ConnectionVerificationFailedException.class

2) Download chf8000003.jar and replace
the same three files with the ones
extracted from chf8000002.jar

Given my very little understanding of java,
the issue seems to be that Adobe is now doing
a java cast whereas before they were not.

It is my opinion that a java cast is not
necessary since both objects implement
java.sql.Connection.

Anyway, I really hope that Adobe makes a statement
as to whether or not this is a bug.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources