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 balla.nav...@gmail.comwrote:
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();
cfscript
obj = CreateObject(java,DepartmentsObject);
rDepartments = obj.GetAllDepartments();
qDepartments =
CreateObject(java,coldfusion.sql.QueryTable).init(rDepartments);
/cfscript
~|
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