You'll have to wait until the anonymous cvs repository synchs up as the source 
you have is not the latest. There is no code on line 37 than can cause an NPE 
any longer. The PreparedStatementCache needs to match:


  | [EMAIL PROTECTED] jdbc]$ grep -n . PreparedStatementCache.java
  | 2:/*
  | 3: * JBoss, the OpenSource J2EE webOS
  | 4: *
  | 5: * Distributable under LGPL license.
  | 6: * See terms of license at gnu.org.
  | 7: *
  | 8: */
  | 10:package org.jboss.resource.adapter.jdbc;
  | 12:import org.jboss.util.LRUCachePolicy;
  | 13:import org.jboss.logging.Logger;
  | 15:import java.sql.SQLException;
  | 16:import java.sql.PreparedStatement;
  | 18:/**
  | 19: *  LRU cache for PreparedStatements.  When ps ages out, close it.
  | 20: *
  | 21: * Created: Mon Aug 12 21:53:02 2002
  | 22: *
  | 23: * @author <a href="mailto:[EMAIL PROTECTED]">Bill Burke</a>
  | 24: * @version $Revision: 1.1.2.3 $
  | 25: */
  | 26:public class PreparedStatementCache extends LRUCachePolicy
  | 27:{
  | 29:   private final Logger log = Logger.getLogger(getClass());
  | 31:   public PreparedStatementCache(int max)
  | 32:   {
  | 33:      super(2, max);
  | 34:      create();
  | 35:   }
  | 37:   protected void ageOut(LRUCachePolicy.LRUCacheEntry entry)
  | 38:   {
  | 39:      try
  | 40:      {
  | 41:         CachedPreparedStatement ws = (CachedPreparedStatement) 
entry.m_objec
  | t;
  | 42:         ws.agedOut();
  | 43:      }
  | 44:      catch (SQLException e)
  | 45:      {
  | 46:         log.error("Failed closing cached statement", e);
  | 47:      }
  | 48:      finally
  | 49:      {
  | 50:         super.ageOut(entry);
  | 51:      }
  | 52:   }
  | 54:}
  | 


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3857634#3857634

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3857634


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to