The class org.apache.tomcat.util.compat.Jre7Compat fails to find the method java.sql.DatabaseMetaData.getPseudoColumns() with zero parameters in it's static initializer which leads to the remaining methods like ResultSet.getObject() not being looked up and referenced at all. This causes NullPointerExceptions which are especially hard to diagnose because exceptions in all the JreCompat classes are just thrown into the nether. The method Jre7Compat is trying to find expects 4 String parameters. The actual call to the looked up method in org.apache.tomcat.util.compat.Jre7Compat.getPseudoColumns(...) is done correctly with all 4 String parameters provided. What I feel should be done about this: 1. Replace m9 = DatabaseMetaData.class.getMethod("getPseudoColumns"); with m9 = DatabaseMetaData.class.getMethod("getPseudoColumns",String.class,String.class,String.class,String.class); 2. Never simply ignore and void exceptions! I understand that there should not be tons of error messages every time you start up tomcat with an older version of Java but there has to be another way. We noticed this problem with 7.0.94 but the code looks identical in the current git branch.
Catching the exception without handling them is not a good habit. It could hide some problem such as this bug. I submit a PR to solve the bug. https://github.com/apache/tomcat/pull/209 Hope it could help.
Thanks for the report. The original issue has been fixed in 7.0.x and I have added some logging to the JreCompat classes that should detect if further bugs like this creep in in the future. The fix will be in 7.0.97 onwards