Glassfish + mysql + jsc2 table problems
I'm trying to deploy my app to a glassfish server and having some problems with tables and rowsets.
Situation:
Everything works fine under the development settings on my winxp machine with mysql and the 5.0 beta jdbc driver.
I managed to get jdk1.5 + glassfish + mysql + 5.0jdbc driver installed on my debian system with 2.6.16 kernel.Non-DB test apps deployed by exporting to a j2ee1.4 war file and then importing through the glassfish admin page work fine. DB apps that I've manually added the db access code to in the prerender() section of the page work fine. I can even get tables to work IF I put the code in the prerender section:
publicvoid prerender(){
try{
usersRowSet.setDataSourceName("java:comp/env/jdbc/testcgcbt");
usersRowSet.setCommand("SELECT * FROM users");
usersRowSet.setTableName("users");
usersDataProvider1.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue("#{Page1.usersRowSet}"));
}catch(Exception e){
error("Error "+e.getMessage());
}
}
But the table displays 'No items found.' with the default db access code in the _init() section:
privatevoid _init()throws Exception{
usersRowSet.setDataSourceName("java:comp/env/jdbc/testcgcbt");
usersRowSet.setCommand("SELECT * FROM users");
usersRowSet.setTableName("users");
usersDataProvider1.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue("#{Page1.usersRowSet}"));
}
Has anyone run into this before? I don't know if there are some settings in the .xml files to change to make the exported war work properly. I would love to have my app work without having to cut and paste the code into the prerender() sections, I haven't looked through all my pages and I'm not sure that would work for each one.
Thanks in advance.

