1 Reply Latest reply on Mar 12, 2013 2:07 PM by Carl Von Stetten

    CF 10 failed to get a connection from the poll - MSSQL

    joiz.net

      Hi,

       

      I'm migrating an application from CF CF 8 to 10, but I have a problem that is stopping me

       

      The following code is correct and works in CF 8

      <cdscript>

      .

      .

      .

      DataSourceFactory = CreateObject("java","coldfusion.sql.DataSourceFactory");

      DataSourceFactory.getInstance().getDataSource(Attributes.datasource).getConnection();

      .

      .

      </cfscrip>

       

      But in CF 10 marks the next error.

       

      struct

      Detail           Either there are no methods with the specified method name and argument types or the getDataSource method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity.

       

      Message           The getDataSource method was not found.

       

      MethodName           getDataSource

       

      StackTrace           coldfusion.runtime.java.MethodSelectionException: The getDataSource method was not found. at coldfusion.runtime.java.ObjectHandler.findMethodUsingCFMLRules(ObjectHandler.java:383) at coldfusion.runtime.StructBean.invoke(StructBean.java:524) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2465) at cfjdbcquery_open2ecfm1678258463.runPage(C:\ColdFusion10\cfusion\wwwroot\sif\TagsSIF\jdbcq uery_open.cfm:64) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244) at coldfusion.filter.CFVariablesScopeFilter.invoke(CFVariablesScopeFilter.java:56) at coldfusion.tagext.lang.ModuleTag.doAfterBody(ModuleTag.java:377) at

       

      Any Idea?