I am having littlebit idea about java, not in detail. I am having an problm with database connectivity from java class and fetch the table of database.
Please see the below code, i can run the static data but i want convert it in to dynamic so please help me.i am getting an error.I amtrying to implement the below code in ZK framework. And mainPage.zul contains the code. for more clarification you can see the link "http://www.zkoss.org/zkdemo/grid/hierarchy" but here iwant to connect it to the database.
for database connectivity changes, i have tried to modify the above code but i am getting null pointer exception,
I tried to analyze your code, but it seems, its out of my scope.
The error message states
" SEVERE: >>org.zkoss.zel.PropertyNotFoundException: Property '0' not found on type demo.grid.hierarchy.Customer "
I guess, the property '0' is not set in customer class in your code, since you are using it in your mainPage, try replacing this 0 with some property in the Customer class.
Not sure this will helps or not.
i hv just debug the code and got to know my problm but not getting the solution.
please look the below two codes one is from static data which is executing correctly and one is dynamic(i.e from database) having the problm at the last line. if you can try again that will very helpful to me.
see the two code difference i am trying to make it dynamic
dynamic data(i.e from database)
i above my code is executing fine up to while staement . only there is an problm with
if you can correct this line that will solve my problm.
its not executing the above line it directly goes to the
As Wendy suggested, put catch blocks and also put all those close statements in the finally block.
As you said, the code flow is going directly going to s.close, it means the resultset you are getting does not have any results from the sql you have fired. Please do check the table in the database. Also try putting SOP in the code to see where exactly it goes.