Hey when IBM buys Sun, can someone fix the glassfish and sun docs?
Posted in 2009
Seriously what a friggin pain! Here's the layout: On SuSE , IDS 10.x database. On windows: Netbeans IDE 6.5 Glassfish prelude 3 app server Setting up a connection pool and jdbc resources on the app server. Test web app, a *.jsp page using JSTL 1.1 Problem: When I try to run the app (really just a single page that makes a query for a list of names to put in a pull down list...) I kept getting a java exception where the exception string is null and can't be converted in to an exception. The royal pain is that since I'm using JSTL , I really can't step through the java code and have to try and get creative on the debugging. Since I could create an url and get a connection, I knew that my database was ok and that I could connect via JDBC. Since I got a mysterious exception, I knew that the JDBC jars were in the path and that the app could see them. It took a long while and I finally figured it out.... Java doc: 'JDBC Drivers Known to Work With Sun Java System Web Server' indicated that the properties files should include 'portNumber', 'databaseName', 'IfxIFXHOST','serverName', 'user', 'password'. Now that's all fine and dandy. Since the jdbc drivers support the proper bean interfaces. Except for one small thing. In a bean, you are supposed to have getter and setter methods. so if you have a class variable foo, you'd have getfoo() and setfoo(). It follows the rule of get<variable_name_here> and set<variable_name_here>. But there's a catch... Informix has getter and setter methods. Only its setPortNumber() not setportNumber() as indicated by the java docs. So if you plan on using glassfish or Sun's webserver you need to use the names in IBM's Informix JDBC docs and ignore the docs from Sun. For those who don't do a lot of java programming, you probably didn't care or need to know this. For those of you who are looking at JSTL and dynamic web pages, this can really be a frustrating thing because you have really no way to debug why your app is failing. Of course, I'll wager everyone who *is* doing java/jstl/web development are using Apache/Tomcat and Eclipse... :-P -G