Subject Problem with jbird?
Author Torsten Terp
Hi,

Im facing a problem that seems to be caused by a bug in the firebird
JCA driver, i may wrong though, so im posting here to see if any body
else have experienced this, or have some idea about whats happening....

I am using Firebird 1.5 final (superserver on windows) and jaybird 1.5-beta3
in a j2ee app running on jBoss.

Now sometimes the login verification sql query will result in a null
pointer in org.firebirdsql.jgds.GDS_Impl.isc_start_transaction(GDS_Impl.java:539)
When this happens subsequent attemps to use the datasource will all fail.
The only fix is to restart the ManagedConnectionFactory in jboss.jca domain.

What am i missing here? Any help is greatly appreciated...

Stacktrace:
2004-03-02 15:03:28,898 WARN [com.shouse.app.servlet.security.LoginServlet] LoginException : java.lang.NullPointerException
at org.firebirdsql.jgds.GDS_Impl.isc_start_transaction(GDS_Impl.java:539)
at org.firebirdsql.jca.FBManagedConnectionFactory.getCurrentIscTrHandle(FBManagedConnectionFactory.java:485)
at org.firebirdsql.jca.FBManagedConnection.findIscTrHandle(FBManagedConnection.java:1094)
at org.firebirdsql.jca.FBManagedConnection.internalStart(FBManagedConnection.java:655)
at org.firebirdsql.jca.FBLocalTransaction.internalBegin(FBLocalTransaction.java:107)
at org.firebirdsql.jca.FBLocalTransaction.begin(FBLocalTransaction.java:94)
at org.firebirdsql.jdbc.AbstractConnection.ensureInTransaction(AbstractConnection.java:814)
at org.firebirdsql.jdbc.AbstractPreparedStatement.<init>(AbstractPreparedStatement.java:85)
at org.firebirdsql.jdbc.FBPreparedStatement.<init>(FBPreparedStatement.java:34)
at org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.java:682)
at org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.java:232)
at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:98)
at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:675)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607)
at javax.security.auth.login.LoginContext.login(LoginContext.java:534)
at com.shouse.app.servlet.security.LoginServlet.doPost(LoginServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:356)
at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342)
at com.shouse.app.servlet.security.LoggedInFilter.doFilter(LoggedInFilter.java:71)
at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
at com.shouse.app.servlet.security.SecurityContextFilter.doFilter(SecurityContextFilter.java:143)
at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:286)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1776)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:514)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1726)
at org.mortbay.http.HttpServer.service(HttpServer.java:879)
at org.jboss.jetty.Jetty.service(Jetty.java:456)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:952)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:196)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:487)