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

ResultSet to QueryTable in ColdFusion 8

Guest
Jan 08, 2008 Jan 08, 2008
I'm trying to take a resultset that is returned by a java call and convert it into a query object in my CFC so that the cffunction has 'query' as its returntype. I've found the page by Pete Freitag describing how to do this but when I use this technique in ColdFusion 8 I get an object instantiation exception with the following message;
<message>
An exception occurred when instantiating a Java object. The class must not be an interface or an abstract class. Error: ''.
</message>

I'm wondering if something changed in this version of ColdFusion that makes this code behave this way. Any suggestions?

Thanks, Joris.
TOPICS
Advanced techniques
1.0K
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

correct answers 1 Correct answer

Valorous Hero , Jan 08, 2008 Jan 08, 2008
Can you post the code and stack trace error message? The method works with CF8, so I suspect it is a problem with your code.

<cfscript>
cfQuery = createObject("java", "coldfusion.sql.QueryTable").init(myJavaResultSet);
...
</cfscript>
Translate
Valorous Hero ,
Jan 08, 2008 Jan 08, 2008
Can you post the code and stack trace error message? The method works with CF8, so I suspect it is a problem with your code.

<cfscript>
cfQuery = createObject("java", "coldfusion.sql.QueryTable").init(myJavaResultSet);
...
</cfscript>
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
Jan 08, 2008 Jan 08, 2008
LATEST
When copying he stack trace I looked at the bottom of the trace and found the problem myself (doh!). It's the ResultSet implementation (Progress) that is causing the problem.

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at coldfusion.runtime.java.JavaProxy.CreateObject(JavaProxy.java:156)
at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:63)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2260)
at cfaiproxy_uh2ecfc1150355287$funcGETACCOUNTLIST.runFunction(C:\ColdFusion8\wwwroot\cfai\extensions\components\aiproxy_uh.cfc:29)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:360)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:463)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:453)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:320)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2210)
at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:358)
at coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:2645)
at cfindex2ecfm1927664645.runPage(C:\ColdFusion8\wwwroot\cfai\webroot\index.cfm:32)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:192)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:366)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:273)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.CfmServlet.service(CfmServlet.java:175)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:284)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Caused by: com.progress.open4gl.ProSQLException: A not supported result set method. (7182)
at com.progress.open4gl.dynamicapi.ResultSet.getProSQLException(ResultSet.java:1119)
at com.progress.open4gl.dynamicapi.ResultSet.getProSQLException(ResultSet.java:1160)
at com.progress.open4gl.dynamicapi.ResultSetMetaData.getColumnLabel(ResultSetMetaData.java:608)
at coldfusion.sql.QueryTableMetaData.<init>(QueryTableMetaData.java:88)
at coldfusion.sql.QueryTable.populate(QueryTable.java:281)
at coldfusion.sql.QueryTable.populate(QueryTable.java:217)
at coldfusion.sql.QueryTable.<init>(QueryTable.java:58)
... 50 more
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