Subject | bug in PreparedStatement.setString () method |
---|---|
Author | wsaschakiss |
Post date | 2002-06-07T14:23:27Z |
Hi folks,
I'm using firebird 1.0 with the interclient 1.02 in a tomcat 4.0.3
environment. In the tomcat configuration I specified a JDBC realm as
follows:
<Realm className="org.apache.catalina.realm.JDBCRealm"
debug="99"
driverName="interbase.interclient.Driver"
connectionURL="jdbc:interbase://localhost/mydatabase"
connectionName="myuser"
connectionPassword="mypassword"
userTable="prs_personen" userNameCol="person"
userCredCol="passwort"
userRoleTable="prs_rollen" roleNameCol="rolle" />
After starting firebird, the interserver and then tomcat and then
typng the url of my web application in the browser, the catalina
conatiner of Tomcat creates the following message:
java.lang.NullPointerException
at
interbase.interclient.PreparedStatement.setString
(PreparedStatement.java:979
)
at org.apache.catalina.realm.JDBCRealm.credentials
(JDBCRealm.java:484)
at org.apache.catalina.realm.JDBCRealm.authenticate
(JDBCRealm.java:376)
<...>
I already checked my complete environment and all settings are
correct. I already have been using mysql with the mm.mysql driver
with the same configuration and with this driver the connection works
fine.
Now I looked at the interbase.interclient.PreparedStatement.setString
() code and compared it to the equivalent of the mm.mysql driver. The
difference is that the mm.mysql driver checks the input string for
null value while the interclient driver doesn't do that. Could it be
that for some reason the catalina container passes a null value to
the setString () method of the PreparedStatement class?!?! I know,
you will not answer this to me, but anyway, this could be possible ;o)
Does anybody know a workaround for this problem? Could the driver
developers have a look at the code and enhance the setString ()
method accurately?
Bye the way, the Tomcat developers seem to know about this problem
and fix it in a future version, but I would be grateful if this could
also be "fixed" in the interclient.
Thanx,
Jeremy.....*>
I'm using firebird 1.0 with the interclient 1.02 in a tomcat 4.0.3
environment. In the tomcat configuration I specified a JDBC realm as
follows:
<Realm className="org.apache.catalina.realm.JDBCRealm"
debug="99"
driverName="interbase.interclient.Driver"
connectionURL="jdbc:interbase://localhost/mydatabase"
connectionName="myuser"
connectionPassword="mypassword"
userTable="prs_personen" userNameCol="person"
userCredCol="passwort"
userRoleTable="prs_rollen" roleNameCol="rolle" />
After starting firebird, the interserver and then tomcat and then
typng the url of my web application in the browser, the catalina
conatiner of Tomcat creates the following message:
java.lang.NullPointerException
at
interbase.interclient.PreparedStatement.setString
(PreparedStatement.java:979
)
at org.apache.catalina.realm.JDBCRealm.credentials
(JDBCRealm.java:484)
at org.apache.catalina.realm.JDBCRealm.authenticate
(JDBCRealm.java:376)
<...>
I already checked my complete environment and all settings are
correct. I already have been using mysql with the mm.mysql driver
with the same configuration and with this driver the connection works
fine.
Now I looked at the interbase.interclient.PreparedStatement.setString
() code and compared it to the equivalent of the mm.mysql driver. The
difference is that the mm.mysql driver checks the input string for
null value while the interclient driver doesn't do that. Could it be
that for some reason the catalina container passes a null value to
the setString () method of the PreparedStatement class?!?! I know,
you will not answer this to me, but anyway, this could be possible ;o)
Does anybody know a workaround for this problem? Could the driver
developers have a look at the code and enhance the setString ()
method accurately?
Bye the way, the Tomcat developers seem to know about this problem
and fix it in a future version, but I would be grateful if this could
also be "fixed" in the interclient.
Thanx,
Jeremy.....*>