tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12286] New: - NullPointerException in JDBCStore
Date Wed, 04 Sep 2002 08:29:01 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12286>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12286

NullPointerException in JDBCStore

           Summary: NullPointerException in JDBCStore
           Product: Tomcat 4
           Version: 4.0.4 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Catalina:Modules
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: ronald@klop.yi.org


I get a NullPointerException in the cleanup code of org.apache.catalina.session.JDBCStore

using Tomcat 4.0.4.
This happens while reloading the context.
After the exception tomcat 
hangs until you reload the context again.

I think it can be solved with the following 
'patch'.

--- org/apache/catalina/session/JDBCStore-old.java  Wed Sep  4 02:13:53 2002
+++ 
org/apache/catalina/session/JDBCStore.java      Wed Sep  4 02:18:12 2002
@@ -759,37 +759,43 @@
             
}

             try {
-                preparedSizeSql.close();
+                if (preparedSizeSql != null)
+                    
preparedSizeSql.close();
             } catch (SQLException e) {
                 ;
             }

             try {
-                
preparedKeysSql.close();
+                if (preparedKeysSql != null)
+                    preparedKeysSql.close();
             } 
catch (SQLException e) {
                 ;
             }

             try {
-                preparedSaveSql.close();
+                if (preparedSaveSql 
!= null)
+                    preparedSaveSql.close();
             } catch (SQLException e) {
                 ;
             }

             try {
-                
preparedClearSql.close();
+                if (preparedClearSql != null)
+                    
preparedClearSql.close();
             } catch (SQLException e) {
                 ;
             }

             try {
-                
preparedRemoveSql.close();
+                if (preparedRemoveSql != null)
+                    
preparedRemoveSql.close();
             } catch (SQLException e) {
                 ;
             }

             try {
-                
preparedLoadSql.close();
+                if (preparedLoadSql != null)
+                    preparedLoadSql.close();
             } 
catch (SQLException e) {
                 ;
             }

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message