Closed GoogleCodeExporter closed 9 years ago
I am having the same problems, with CF7 and Apache. Everything works as
expexted, but
as soon as I click generate, the Error Executing Database Query pops up. I am
also
using MySQL 5.0.
Original comment by ejjaq...@gmail.com
on 29 Apr 2007 at 8:13
I haven't gotten around to updating the test code with this, but I have made a
codeshare available. Basically, if either of you could change the code in
/com/cf/mode/test.cfm to what is available at
http://codeshare.everfro.com/apr92236
it should give me an idea of what the specifics of the error are on the
ColdFusion
side. Please report the error message here so that I can resolve this issue
ASAP.
Original comment by brian.ri...@gmail.com
on 30 Apr 2007 at 2:52
This is the error I am getting. 2003 server fully patched. IIS - Mysql 5.0.33
Error Executing Database Query.
Cannot convert class java.lang.String to SQL type requested
The error occurred in D:\dev\cfcgenerator\com\cf\model\datasource\mysql.cfc:
line 311
Called from D:\dev\cfcgenerator\com\cf\model\datasource\mysql.cfc: line 287
Called from D:\dev\cfcgenerator\com\cf\model\datasource\mysql.cfc: line 110
Called from D:\dev\cfcgenerator\com\cf\model\generatorService.cfc: line 66
Called from D:\dev\cfcgenerator\com\cf\model\test.cfm: line 8
Called from D:\dev\cfcgenerator\com\cf\model\datasource\mysql.cfc: line 311
Called from D:\dev\cfcgenerator\com\cf\model\datasource\mysql.cfc: line 287
Called from D:\dev\cfcgenerator\com\cf\model\datasource\mysql.cfc: line 110
Called from D:\dev\cfcgenerator\com\cf\model\generatorService.cfc: line 66
Called from D:\dev\cfcgenerator\com\cf\model\test.cfm: line 8
309 : END as identity
310 : FROM information_schema.COLUMNS
311 : WHERE TABLE_SCHEMA = Database() AND TABLE_NAME = <cfqueryparam
cfsqltype="cf_sql_varchar" scale="128" value="#variables.table#" />
312 : </cfquery>
313 : <cfset variables.tableMetadata = qTable />
SQL SELECT COLUMN_NAME, CASE WHEN IS_NULLABLE = 'Yes' AND COLUMN_DEFAULT IS
NULL
THEN 'true' /* a column is defined as nullable only if it doesn't have a
default */
ELSE 'false' END as nullable, DATA_TYPE as type_name, CASE WHEN
CHARACTER_MAXIMUM_LENGTH IS NULL THEN 0 ELSE CHARACTER_MAXIMUM_LENGTH END as
length,
CASE WHEN EXTRA = 'auto_increment' THEN 'true' ELSE 'false' END as identity FROM
information_schema.COLUMNS WHERE TABLE_SCHEMA = Database() AND TABLE_NAME =
(param 1)
DATASOURCE RssFeeds
SQLSTATE S1000
Resources:
* Check the ColdFusion documentation to verify that you are using the correct syntax.
* Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3)
Gecko/20070309
Firefox/2.0.0.3
Remote Address 192.168.0.2
Referrer
Date/Time 05-May-07 02:40 PM
Stack Trace
at
cfmysql2ecfc1875937724$funcSETTABLEMETADATA_5.runFunction(D:\dev\cfcgenerator\co
m\cf\model\datasource\mysql.cfc:311)
at
cfmysql2ecfc1875937724$funcSETTABLEMETADATA.runFunction(D:\dev\cfcgenerator\com\
cf\model\datasource\mysql.cfc:287)
at
cfmysql2ecfc1875937724$funcSETTABLE.runFunction(D:\dev\cfcgenerator\com\cf\model
\datasource\mysql.cfc:110)
at
cfgeneratorService2ecfc1592738584$funcGETGENERATEDCFCS.runFunction(D:\dev\cfcgen
erator\com\cf\model\generatorService.cfc:66)
at cftest2ecfm717338546.runPage(D:\dev\cfcgenerator\com\cf\model\test.cfm:8) at
cfmysql2ecfc1875937724$funcSETTABLEMETADATA_5.runFunction(D:\dev\cfcgenerator\co
m\cf\model\datasource\mysql.cfc:311)
at
cfmysql2ecfc1875937724$funcSETTABLEMETADATA.runFunction(D:\dev\cfcgenerator\com\
cf\model\datasource\mysql.cfc:287)
at
cfmysql2ecfc1875937724$funcSETTABLE.runFunction(D:\dev\cfcgenerator\com\cf\model
\datasource\mysql.cfc:110)
at
cfgeneratorService2ecfc1592738584$funcGETGENERATEDCFCS.runFunction(D:\dev\cfcgen
erator\com\cf\model\generatorService.cfc:66)
at cftest2ecfm717338546.runPage(D:\dev\cfcgenerator\com\cf\model\test.cfm:8)
java.sql.SQLException: Cannot convert class java.lang.String to SQL type
requested
at org.gjt.mm.mysql.PreparedStatement.setObject(Unknown Source)
at org.gjt.mm.mysql.PreparedStatement.setObject(Unknown Source)
at
coldfusion.server.j2ee.sql.JRunPreparedStatement.setObject(JRunPreparedStatement
.java:208)
at coldfusion.sql.InParameter.setStatement(InParameter.java:58)
at coldfusion.sql.ParameterList.setStatement(ParameterList.java:107)
at coldfusion.sql.Executive.executeQuery(Executive.java:755)
at coldfusion.sql.Executive.executeQuery(Executive.java:675)
at coldfusion.sql.Executive.executeQuery(Executive.java:636)
at coldfusion.sql.SqlImpl.execute(SqlImpl.java:236)
at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:500)
at
cfmysql2ecfc1875937724$funcSETTABLEMETADATA_5.runFunction(D:\dev\cfcgenerator\co
m\cf\model\datasource\mysql.cfc:311)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:344)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:290)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:254)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:207)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:169)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:1807)
at
cfmysql2ecfc1875937724$funcSETTABLEMETADATA.runFunction(D:\dev\cfcgenerator\com\
cf\model\datasource\mysql.cfc:287)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:344)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:290)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:254)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:207)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:169)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:1807)
at
cfmysql2ecfc1875937724$funcSETTABLE.runFunction(D:\dev\cfcgenerator\com\cf\model
\datasource\mysql.cfc:110)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:344)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:290)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:254)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:207)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:169)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:194)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:146)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1634)
at
cfgeneratorService2ecfc1592738584$funcGETGENERATEDCFCS.runFunction(D:\dev\cfcgen
erator\com\cf\model\generatorService.cfc:66)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:344)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:290)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:254)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:207)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:169)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:194)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:146)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1634)
at cftest2ecfm717338546.runPage(D:\dev\cfcgenerator\com\cf\model\test.cfm:8)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:349)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:225)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69)
at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52)
at
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilt
er.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:115)
at coldfusion.CfmServlet.service(CfmServlet.java:107)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:318)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:426)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:264)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Original comment by Gerald.G...@gmail.com
on 5 May 2007 at 6:45
Here is the error:
Error Executing Database Query.
Cannot convert class java.lang.String to SQL type requested
The error occurred in
C:\Inetpub\cfcgenerator\com\cf\model\datasource\mysql.cfc: line 311
Called from C:\Inetpub\cfcgenerator\com\cf\model\datasource\mysql.cfc: line 287
Called from C:\Inetpub\cfcgenerator\com\cf\model\datasource\mysql.cfc: line 110
Called from C:\Inetpub\cfcgenerator\com\cf\model\generatorService.cfc: line 66
Called from C:\Inetpub\cfcgenerator\com\cf\model\test.cfm: line 8
Called from C:\Inetpub\cfcgenerator\com\cf\model\datasource\mysql.cfc: line 311
Called from C:\Inetpub\cfcgenerator\com\cf\model\datasource\mysql.cfc: line 287
Called from C:\Inetpub\cfcgenerator\com\cf\model\datasource\mysql.cfc: line 110
Called from C:\Inetpub\cfcgenerator\com\cf\model\generatorService.cfc: line 66
Called from C:\Inetpub\cfcgenerator\com\cf\model\test.cfm: line 8
309 : END as identity
310 : FROM information_schema.COLUMNS
311 : WHERE TABLE_SCHEMA = Database() AND TABLE_NAME = <cfqueryparam
cfsqltype="cf_sql_varchar" scale="128" value="#variables.table#" />
312 : </cfquery>
313 : <cfset variables.tableMetadata = qTable />
SQL SELECT COLUMN_NAME, CASE WHEN IS_NULLABLE = 'Yes' AND COLUMN_DEFAULT IS
NULL
THEN 'true' /* a column is defined as nullable only if it doesn't have a
default */
ELSE 'false' END as nullable, DATA_TYPE as type_name, CASE WHEN
CHARACTER_MAXIMUM_LENGTH IS NULL THEN 0 ELSE CHARACTER_MAXIMUM_LENGTH END as
length,
CASE WHEN EXTRA = 'auto_increment' THEN 'true' ELSE 'false' END as identity FROM
information_schema.COLUMNS WHERE TABLE_SCHEMA = Database() AND TABLE_NAME =
(param 1)
Original comment by iisitede...@gmail.com
on 9 May 2007 at 5:28
Ok. I went through downloading and installing MySQL 5.0.41 (just pulled
whatever the
current install was on their site) on Win XP Pro/IIS 5 and everything worked
for me.
I am running CF8 however, which makes me wonder if this could be a driver
issue? Is
everyone using the MySQL 4/5 drivers and not the MySQL drivers that ship with
CF7 or
prior? I know this is just a shot in the dark.
Original comment by brian.ri...@gmail.com
on 9 May 2007 at 6:59
Original comment by brian.ri...@gmail.com
on 9 May 2007 at 7:07
I installed the MySQL 5 driver in C:\ColdFusion7\wwwroot\WEB-INF\lib\ and then
created a new dsn by selecting other and entering the JDBC path and driver. The
Generator behaves the same as before but I get the following error when I run
the
test page:
Error Executing Database Query.
Parameter index out of range (1 > number of parameters, which is 0).
The error occurred in
C:\Inetpub\cfcgenerator\com\cf\model\datasource\mysql.cfc: line 311
Called from C:\Inetpub\cfcgenerator\com\cf\model\datasource\mysql.cfc: line 287
Called from C:\Inetpub\cfcgenerator\com\cf\model\datasource\mysql.cfc: line 110
Called from C:\Inetpub\cfcgenerator\com\cf\model\generatorService.cfc: line 66
Called from C:\Inetpub\cfcgenerator\com\cf\model\test.cfm: line 8
Called from C:\Inetpub\cfcgenerator\com\cf\model\datasource\mysql.cfc: line 311
Called from C:\Inetpub\cfcgenerator\com\cf\model\datasource\mysql.cfc: line 287
Called from C:\Inetpub\cfcgenerator\com\cf\model\datasource\mysql.cfc: line 110
Called from C:\Inetpub\cfcgenerator\com\cf\model\generatorService.cfc: line 66
Called from C:\Inetpub\cfcgenerator\com\cf\model\test.cfm: line 8
309 : END as identity
310 : FROM information_schema.COLUMNS
311 : WHERE TABLE_SCHEMA = Database() AND TABLE_NAME =
<cfqueryparam cfsqltype="cf_sql_varchar" scale="128"
value="#variables.table#" />
312 : </cfquery>
313 : <cfset variables.tableMetadata = qTable />
SQL SELECT COLUMN_NAME, CASE WHEN IS_NULLABLE = 'Yes' AND
COLUMN_DEFAULT IS NULL THEN 'true' /* a column is defined as nullable
only if it doesn't have a default */ ELSE 'false' END as nullable,
DATA_TYPE as type_name, CASE WHEN CHARACTER_MAXIMUM_LENGTH IS NULL
THEN 0 ELSE CHARACTER_MAXIMUM_LENGTH END as length, CASE WHEN EXTRA =
'auto_increment' THEN 'true' ELSE 'false' END as identity FROM
information_schema.COLUMNS WHERE TABLE_SCHEMA = Database() AND
TABLE_NAME = (param 1)
Original comment by iisitede...@gmail.com
on 9 May 2007 at 10:55
Appears this was indeed a mysql driver issue. Please do not use the MySQL 3
driver
included with CF 7. This issue is being closed, if something along these lines
comes
up again, we can reopen.
Original comment by brian.ri...@gmail.com
on 11 May 2007 at 7:48
Original issue reported on code.google.com by
iisitede...@gmail.com
on 26 Apr 2007 at 3:42