Re: coldfusion.sql.QueryTable error in CF8
I've had the exact same issue. you need to put all your jars in the WEB-INF/lib directory and set classpaths to them it in the coldfusion administrator, even if they already have classpaths on the system. coldfusion jvm does not share machine classpaths. even the jdbc drivers you are using need to be in the WEB-INF/lib directory. On Tue, Aug 11, 2009 at 7:39 PM, ritha pull wrote: > > This might help you > > http://forums.adobe.com/message/2136048%3Bjsessionid=AD61965725B7DF6354AF1B7A0CE73145.node0 > > Thanks > Ritha > > > We have been using the code below in cf7 to convert java query > > recordset to a cf query. It is still working in cf7 but fails with: > > > "An exception occurred when instantiating a Java object. The class > > must not be an interface or an abstract class. " > > the code used is > > > init( rs )> > > in this case "rs" is the java recordset. > > > > Any thoughts on what could be wrong? > > Thanks, > > > Frederick > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325362 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Error while using Java ResultSet in Coldfusion
I figured it out, here is the reason.1) All system class paths to the jars NEED to be replicated in the coldfusion JVM class paths. 2) all jars which to with the above coldfusion class paths are created NEED to be located in the wwwroot\WEB-INF\lib directory. coldfusion cannot find them from anywhere else. feels good after pulling my hair out for a couple of days. --Naveen On Mon, Aug 10, 2009 at 4:55 PM, naveen balla wrote: > > I am recently encountering an issue with using Java ResultSets in > Coldfusion. I have a Java class with a method GetAllDepartments() which > connects to an oracle database, runs a query and returns a ResultSet. when i > call this function in CF it throws an error > > 'The system has attempted to use an undefined value, which usually > indicates a programming error, either in your code or some system code. > Null Pointers are another name for undefined values.' > > i am providing the code sample below. > > java method(i hid the DB operations to keep it short and simple), it > returns a resultset. > > public ResultSet GetAllDepartments() > { //create oracle connection object > OracleConnection con = new OracleConnection(); > Connection conobj = con.getOracleConnection(); > > //call Department DAO to get a ResultSet > DEPARTMENTSDao departmentobj = new DEPARTMENTSDao(); > ResultSet rDepartments = null; > try { > rDepartments = departmentobj.loadAll(conobj); > > } catch (SQLException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > > return rDepartments; > > } > > coldfusion code which throws the error. the error occurs while calling the > method GetAllDepartments(); > > > obj = CreateObject("java","DepartmentsObject"); > rDepartments = obj.GetAllDepartments(); > qDepartments = > CreateObject("java","coldfusion.sql.QueryTable").init(rDepartments); > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325327 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Error while using Java ResultSet in Coldfusion
I am recently encountering an issue with using Java ResultSets in Coldfusion. I have a Java class with a method GetAllDepartments() which connects to an oracle database, runs a query and returns a ResultSet. when i call this function in CF it throws an error 'The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code. Null Pointers are another name for undefined values.' i am providing the code sample below. java method(i hid the DB operations to keep it short and simple), it returns a resultset. public ResultSet GetAllDepartments() { //create oracle connection object OracleConnection con = new OracleConnection(); Connection conobj = con.getOracleConnection(); //call Department DAO to get a ResultSet DEPARTMENTSDao departmentobj = new DEPARTMENTSDao(); ResultSet rDepartments = null; try { rDepartments = departmentobj.loadAll(conobj); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return rDepartments; } coldfusion code which throws the error. the error occurs while calling the method GetAllDepartments(); obj = CreateObject("java","DepartmentsObject"); rDepartments = obj.GetAllDepartments(); qDepartments = CreateObject("java","coldfusion.sql.QueryTable").init(rDepartments); ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325323 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4