https://bz.apache.org/bugzilla/show_bug.cgi?id=63778
Bug ID: 63778
Summary: Jre7Compat cannot find getPseudoColumns with zero
parameters
Product: Tomcat 7
Version: 7.0.94
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
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.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]