tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Conrad" <andrewcon...@attbi.com>
Subject RE: NullPointerException in JDBCStore
Date Wed, 04 Sep 2002 03:09:55 GMT
Your best bet is to create a bug report, and post the patch.

- Andrew

> -----Original Message-----
> From: Ronald Klop [mailto:ronald@klop.yi.org] 
> Sent: Tuesday, September 03, 2002 8:26 PM
> To: tomcat-user@jakarta.apache.org
> Subject: NullPointerException in JDBCStore
> 
> 
> Hello,
> 
> I get a NullPointerException in 
> org.apache.catalina.session.JDBCStore. 
> (Tomcat 4.0.4 and 4.1.9)
> I think it can be solved with the following patch.
> Is there a possibility for this to be committed?
> 
> 
> --- JDBCStore-old.java  Wed Sep  4 02:13:53 2002
> +++ 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) {
>                   ;
>               }
> 
> 
> -- 
>   Ronald Klop
>   Amsterdam, The Netherlands
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
> 
> 


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


Mime
View raw message