This appears not to be a Struts problem, just a coincidence as it clearly
states the problem is a null pointer exception, but I will point you to an
partial answer anyway.

When closing a database connection like that you should always check that
it is not null before closing it. Why it is null I could not tell you. You
should step through your code and make sure it is doing every it should be
before you call the close. If yuo are not obtaining a valid connection I
suggest starting there. You should probably be closing your database
within a finaly block as well.

Chris

> Of course. Here it comes
>
> 75203 [http-80-Processor24] ERROR
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/hb].[jsp]
> -
> Servlet.service() for servlet jsp threw exception
> java.lang.NullPointerException
>       at
> nc.persistence.PersistenceFacade.closeConnection(PersistenceFacade.java:69)
>>

>>     public void closeConnection(Connection conn) {
>>
>>     try {
>>
>>       if(!conn.isClosed()) {
>>
>>         conn.close();
>>
>>       }
>>
>>     } catch (SQLException ex) {
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to