Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-6086

Hibernate case issues when getting column meta-data in a turkish locale with uppercase english column names

    XMLWordPrintable

Details

    • Release Notes, Interactive Demo/Tutorial, Compatibility/Configuration
    • High
    • Workaround Exists
    • Hide

      to solve this problem, i rewrite the ./connector/src/main/org/jboss/resource/adapter/jdbc/WrappedResultSet.java file.

      i added the below function

      public boolean hasit(ResultSetMetaData rsmd, String columnName) throws SQLException{

      int count = rsmd.getColumnCount();

      for (int i=1;i<(count+1);i++)

      { String cn = rsmd.getColumnName(i); if (cn.trim().equals(columnName.trim())) return true; } return false;- }

      and for each function which gets,finds or updates the a column of ResultSet, where column is represented as a colName or ColumnName function paramter, i rewrite the functions. an example is as below

      the original one:

      2334 public void updateTimestamp(String columnName, Timestamp x) throws SQLException
      2335 {
      2336 checkState();
      2337 try
      2338

      { 2339 resultSet.updateTimestamp(columnName,x); 2340 }

      2341 catch (Throwable t)
      2342

      { 2343 throw checkException(t); 2344 }

      2345 }

      the changed one:

      2334 public void updateTimestamp(String columnName, Timestamp x) throws SQLException
      2335 {
      2336 checkState();
      2337 try
      2338

      { 2339 ResultSetMetaData rsmd = resultSet.getMetaData(); 2340 int count = rsmd.getColumnCount(); 2341 if (hasit(rsmd, columnName)) 2342 resultSet.updateTimestamp(columnName,x); 2343 else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) 2344 resultSet.updateTimestamp(columnName.toUpperCase(java.util.Locale.ENGLISH),x); 2345 else 2346 resultSet.updateTimestamp(columnName.toLowerCase(java.util.Locale.ENGLISH),x); 2347 }

      2348 catch (Throwable t)
      2349

      { 2350 throw checkException(t); 2351 }

      2352 }

      there are lots of functions in this class, so i changed all of them. Here is the all content of new WrappedResultSet.java file.

      /*

      • JBoss, Home of Professional Open Source.
      • Copyright 2006, Red Hat Middleware LLC, and individual contributors
      • as indicated by the @author tags. See the copyright.txt file in the
      • distribution for a full listing of individual contributors.
        *
      • This is free software; you can redistribute it and/or modify it
      • under the terms of the GNU Lesser General Public License as
      • published by the Free Software Foundation; either version 2.1 of
      • the License, or (at your option) any later version.
        *
      • This software is distributed in the hope that it will be useful,
      • but WITHOUT ANY WARRANTY; without even the implied warranty of
      • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
      • Lesser General Public License for more details.
        *
      • You should have received a copy of the GNU Lesser General Public
      • License along with this software; if not, write to the Free
      • Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
      • 02110-1301 USA, or see the FSF site: http://www.fsf.org.
        */
        package org.jboss.resource.adapter.jdbc;

      import java.io.InputStream;
      import java.io.Reader;
      import java.math.BigDecimal;
      import java.net.URL;
      import java.sql.Array;
      import java.sql.Blob;
      import java.sql.Clob;
      import java.sql.Date;
      import java.sql.Ref;
      import java.sql.ResultSet;
      import java.sql.ResultSetMetaData;
      import java.sql.SQLException;
      import java.sql.SQLWarning;
      import java.sql.Statement;
      import java.sql.Time;
      import java.sql.Timestamp;
      import java.util.Calendar;
      import java.util.Map;
      import java.util.concurrent.atomic.AtomicBoolean;

      import java.io.BufferedReader;
      import java.io.BufferedWriter;
      import java.io.File;
      import java.io.FileNotFoundException;
      import java.io.FileReader;
      import java.io.FileWriter;
      import java.io.IOException;
      import java.io.Writer;

      /**

      • A wrapper for a result set
      • @author <a href="mailto:adrian@jboss.com">Adrian Brock</a>
      • @version $Revision: 75426 $
        */
        public abstract class WrappedResultSet extends JBossWrapper implements ResultSet
        {
        /** The wrapped statement */
        private WrappedStatement statement;

      /** The real result set */
      private ResultSet resultSet;

      /** Whether we are closed */
      private AtomicBoolean closed = new AtomicBoolean(false);

      /**

      • Create a new wrapped result set
      • @param statement the wrapped statement
      • @param resultSet the real result set
        */
        public WrappedResultSet(WrappedStatement statement, ResultSet resultSet) { if (statement == null) throw new IllegalArgumentException("Null statement!"); if (resultSet == null) throw new IllegalArgumentException("Null result set!"); this.statement = statement; this.resultSet = resultSet; }

      public boolean equals(Object o)

      { if (o == null) return false; else if (o == this) return true; else if (o instanceof WrappedResultSet) return (resultSet.equals(((WrappedResultSet) o).resultSet)); else if (o instanceof ResultSet) return resultSet.equals(o); return false; }

      public int hashCode()

      { return resultSet.hashCode(); }

      public String toString()

      { return resultSet.toString(); }

      public ResultSet getUnderlyingResultSet() throws SQLException
      {
      statement.lock();
      try

      { checkTransaction(); return resultSet; }

      finally

      { statement.unlock(); }
      }

      public boolean absolute(int row) throws SQLException
      {
      checkState();
      try
      { return resultSet.absolute(row); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void afterLast() throws SQLException
      {
      checkState();
      try
      { resultSet.afterLast(); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void beforeFirst() throws SQLException
      {
      checkState();
      try
      { resultSet.beforeFirst(); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void cancelRowUpdates() throws SQLException
      {
      checkState();
      try
      { resultSet.cancelRowUpdates(); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void clearWarnings() throws SQLException
      {
      checkState();
      try
      { resultSet.clearWarnings(); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void close() throws SQLException
      { if (closed.get()) return; closed.set(true); statement.unregisterResultSet(this); internalClose(); }

      public void deleteRow() throws SQLException
      {
      statement.lock();
      try
      {
      checkTransaction();
      try
      { resultSet.deleteRow(); }
      catch (Throwable t)
      { throw checkException(t); }
      }
      finally
      { statement.unlock(); }

      }

      public int findColumn(String columnName) throws SQLException
      {
      checkState();
      try

      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.findColumn(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.findColumn(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.findColumn(columnName.toLowerCase(java.util.Locale.ENGLISH)); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public boolean first() throws SQLException
      {
      checkState();
      try
      { return resultSet.first(); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public Array getArray(int i) throws SQLException
      {
      checkState();
      try

      { return resultSet.getArray(i); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public Array getArray(String columnName) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getArray(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getArray(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getArray(columnName.toLowerCase(java.util.Locale.ENGLISH)); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public InputStream getAsciiStream(int columnIndex) throws SQLException
      {
      checkState();
      try

      { return resultSet.getAsciiStream(columnIndex); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public InputStream getAsciiStream(String columnName) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getAsciiStream(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getAsciiStream(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getAsciiStream(columnName.toLowerCase(java.util.Locale.ENGLISH)); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public BigDecimal getBigDecimal(int columnIndex) throws SQLException
      {
      checkState();
      try

      { return resultSet.getBigDecimal(columnIndex); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      @Deprecated
      public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
      {
      checkState();
      try
      { return resultSet.getBigDecimal(columnIndex, scale); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public BigDecimal getBigDecimal(String columnName) throws SQLException
      {
      checkState();
      try

      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getBigDecimal(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getBigDecimal(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getBigDecimal(columnName.toLowerCase(java.util.Locale.ENGLISH)); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      @Deprecated
      public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getBigDecimal(columnName,scale); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getBigDecimal(columnName.toUpperCase(java.util.Locale.ENGLISH),scale); else return resultSet.getBigDecimal(columnName.toLowerCase(java.util.Locale.ENGLISH),scale); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public InputStream getBinaryStream(int columnIndex) throws SQLException
      {
      checkState();
      try

      { return resultSet.getBinaryStream(columnIndex); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public InputStream getBinaryStream(String columnName) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getBinaryStream(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getBinaryStream(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getBinaryStream(columnName.toLowerCase(java.util.Locale.ENGLISH)); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public Blob getBlob(int i) throws SQLException
      {
      checkState();
      try

      { return resultSet.getBlob(i); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public Blob getBlob(String columnName) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getBlob(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getBlob(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getBlob(columnName.toLowerCase(java.util.Locale.ENGLISH)); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public boolean getBoolean(int columnIndex) throws SQLException
      {
      checkState();
      try

      { return resultSet.getBoolean(columnIndex); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public boolean getBoolean(String columnName) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getBoolean(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getBoolean(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getBoolean(columnName.toLowerCase(java.util.Locale.ENGLISH)); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public byte getByte(int columnIndex) throws SQLException
      {
      checkState();
      try

      { return resultSet.getByte(columnIndex); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public byte getByte(String columnName) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getByte(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getByte(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getByte(columnName.toLowerCase(java.util.Locale.ENGLISH)); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public byte[] getBytes(int columnIndex) throws SQLException
      {
      checkState();
      try

      { return resultSet.getBytes(columnIndex); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public byte[] getBytes(String columnName) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getBytes(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getBytes(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getBytes(columnName.toLowerCase(java.util.Locale.ENGLISH)); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public Reader getCharacterStream(int columnIndex) throws SQLException
      {
      checkState();
      try

      { return resultSet.getCharacterStream(columnIndex); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public Reader getCharacterStream(String columnName) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getCharacterStream(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getCharacterStream(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getCharacterStream(columnName.toLowerCase(java.util.Locale.ENGLISH)); }

      catch (Throwable t)
      { throw checkException(t); }

      }

      public Clob getClob(int i) throws SQLException
      {
      checkState();
      try

      { return resultSet.getClob(i); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public Clob getClob(String columnName) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getClob(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getClob(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getClob(columnName.toLowerCase(java.util.Locale.ENGLISH)); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public int getConcurrency() throws SQLException
      {
      checkState();
      try

      { return resultSet.getConcurrency(); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public String getCursorName() throws SQLException
      {
      checkState();
      try
      { return resultSet.getCursorName(); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public Date getDate(int columnIndex) throws SQLException
      {
      checkState();
      try

      { return resultSet.getDate(columnIndex); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public Date getDate(int columnIndex, Calendar cal) throws SQLException
      {
      checkState();
      try
      { return resultSet.getDate(columnIndex, cal); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public Date getDate(String columnName) throws SQLException
      {
      checkState();
      try

      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getDate(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getDate(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getDate(columnName.toLowerCase(java.util.Locale.ENGLISH)); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public Date getDate(String columnName, Calendar cal) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getDate(columnName,cal); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getDate(columnName.toUpperCase(java.util.Locale.ENGLISH),cal); else return resultSet.getDate(columnName.toLowerCase(java.util.Locale.ENGLISH),cal); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public double getDouble(int columnIndex) throws SQLException
      {
      checkState();
      try

      { return resultSet.getDouble(columnIndex); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public double getDouble(String columnName) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getDouble(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getDouble(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getDouble(columnName.toLowerCase(java.util.Locale.ENGLISH)); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public int getFetchDirection() throws SQLException
      {
      checkState();
      try

      { return resultSet.getFetchDirection(); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public int getFetchSize() throws SQLException
      {
      checkState();
      try
      { return resultSet.getFetchSize(); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public float getFloat(int columnIndex) throws SQLException
      {
      checkState();
      try

      { return resultSet.getFloat(columnIndex); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public float getFloat(String columnName) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getFloat(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getFloat(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getFloat(columnName.toLowerCase(java.util.Locale.ENGLISH)); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public int getInt(int columnIndex) throws SQLException
      {
      checkState();
      try

      { return resultSet.getInt(columnIndex); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public int getInt(String columnName) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getInt(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getInt(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getInt(columnName.toLowerCase(java.util.Locale.ENGLISH)); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public long getLong(int columnIndex) throws SQLException
      {
      checkState();
      try

      { return resultSet.getLong(columnIndex); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public long getLong(String columnName) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getLong(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getLong(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getLong(columnName.toLowerCase(java.util.Locale.ENGLISH)); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public ResultSetMetaData getMetaData() throws SQLException
      {
      checkState();
      try

      { return resultSet.getMetaData(); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public Object getObject(int columnIndex) throws SQLException
      {
      checkState();
      try
      { return resultSet.getObject(columnIndex); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      @SuppressWarnings("unchecked")
      public Object getObject(int i, Map map) throws SQLException
      {
      checkState();
      try

      { return resultSet.getObject(i, map); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public Object getObject(String columnName) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getObject(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getObject(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getObject(columnName.toLowerCase(java.util.Locale.ENGLISH)); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      @SuppressWarnings("unchecked")
      public Object getObject(String columnName, Map map) throws SQLException
      {
      checkState();
      try

      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getObject(columnName,map); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getObject(columnName.toUpperCase(java.util.Locale.ENGLISH),map); else return resultSet.getObject(columnName.toLowerCase(java.util.Locale.ENGLISH),map); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public Ref getRef(int i) throws SQLException
      {
      checkState();
      try
      { return resultSet.getRef(i); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public Ref getRef(String columnName) throws SQLException
      {
      checkState();
      try

      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getRef(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getRef(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getRef(columnName.toLowerCase(java.util.Locale.ENGLISH)); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public int getRow() throws SQLException
      {
      checkState();
      try
      { return resultSet.getRow(); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public short getShort(int columnIndex) throws SQLException
      {
      checkState();
      try

      { return resultSet.getShort(columnIndex); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public short getShort(String columnName) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getShort(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getShort(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getShort(columnName.toLowerCase(java.util.Locale.ENGLISH)); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public Statement getStatement() throws SQLException

      { checkState(); return statement; }

      public String getString(int columnIndex) throws SQLException
      {
      checkState();
      try

      { return resultSet.getString(columnIndex); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public String getString(String columnName) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getString(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getString(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getString(columnName.toLowerCase(java.util.Locale.ENGLISH)); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public Time getTime(int columnIndex) throws SQLException
      {
      checkState();
      try

      { return resultSet.getTime(columnIndex); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public Time getTime(int columnIndex, Calendar cal) throws SQLException
      {
      checkState();
      try
      { return resultSet.getTime(columnIndex, cal); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public Time getTime(String columnName) throws SQLException
      {
      checkState();
      try

      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getTime(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getTime(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getTime(columnName.toLowerCase(java.util.Locale.ENGLISH)); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public Time getTime(String columnName, Calendar cal) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getTime(columnName,cal); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getTime(columnName.toUpperCase(java.util.Locale.ENGLISH),cal); else return resultSet.getTime(columnName.toLowerCase(java.util.Locale.ENGLISH),cal); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public Timestamp getTimestamp(int columnIndex) throws SQLException
      {
      checkState();
      try

      { return resultSet.getTimestamp(columnIndex); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException
      {
      checkState();
      try
      { return resultSet.getTimestamp(columnIndex, cal); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public Timestamp getTimestamp(String columnName) throws SQLException
      {
      checkState();
      try

      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getTimestamp(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getTimestamp(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getTimestamp(columnName.toLowerCase(java.util.Locale.ENGLISH)); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getTimestamp(columnName,cal); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getTimestamp(columnName.toUpperCase(java.util.Locale.ENGLISH),cal); else return resultSet.getTimestamp(columnName.toLowerCase(java.util.Locale.ENGLISH),cal); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public int getType() throws SQLException
      {
      checkState();
      try

      { return resultSet.getType(); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      @Deprecated
      public InputStream getUnicodeStream(int columnIndex) throws SQLException
      {
      checkState();
      try
      { return resultSet.getUnicodeStream(columnIndex); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      @Deprecated
      public InputStream getUnicodeStream(String columnName) throws SQLException
      {
      try

      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getUnicodeStream(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getUnicodeStream(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getUnicodeStream(columnName.toLowerCase(java.util.Locale.ENGLISH)); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public URL getURL(int columnIndex) throws SQLException
      {
      checkState();
      try
      { return resultSet.getURL(columnIndex); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public URL getURL(String columnName) throws SQLException
      {
      checkState();
      try

      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getURL(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getURL(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getURL(columnName.toLowerCase(java.util.Locale.ENGLISH)); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public SQLWarning getWarnings() throws SQLException
      {
      checkState();
      try
      { return resultSet.getWarnings(); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public void insertRow() throws SQLException
      {
      statement.lock();
      try
      {
      checkTransaction();
      try

      { resultSet.insertRow(); }

      catch (Throwable t)

      { throw checkException(t); }
      }
      finally
      { statement.unlock(); }
      }

      public boolean isAfterLast() throws SQLException
      {
      checkState();
      try
      { return resultSet.isAfterLast(); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public boolean isBeforeFirst() throws SQLException
      {
      checkState();
      try
      { return resultSet.isBeforeFirst(); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public boolean isFirst() throws SQLException
      {
      checkState();
      try
      { return resultSet.isFirst(); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public boolean isLast() throws SQLException
      {
      checkState();
      try
      { return resultSet.isLast(); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public boolean last() throws SQLException
      {
      checkState();
      try
      { return resultSet.last(); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void moveToCurrentRow() throws SQLException
      {
      checkState();
      try
      { resultSet.moveToCurrentRow(); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void moveToInsertRow() throws SQLException
      {
      checkState();
      try
      { resultSet.moveToInsertRow(); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public boolean next() throws SQLException
      {
      checkState();
      try
      { return resultSet.next(); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public boolean previous() throws SQLException
      {
      checkState();
      try
      { return resultSet.previous(); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void refreshRow() throws SQLException
      {
      checkState();
      try
      { resultSet.refreshRow(); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public boolean relative(int rows) throws SQLException
      {
      checkState();
      try
      { return resultSet.relative(rows); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public boolean rowDeleted() throws SQLException
      {
      checkState();
      try
      { return resultSet.rowDeleted(); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public boolean rowInserted() throws SQLException
      {
      checkState();
      try
      { return resultSet.rowInserted(); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public boolean rowUpdated() throws SQLException
      {
      checkState();
      try
      { return resultSet.rowUpdated(); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void setFetchDirection(int direction) throws SQLException
      {
      checkState();
      try
      { resultSet.setFetchDirection(direction); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void setFetchSize(int rows) throws SQLException
      {
      checkState();
      try
      { resultSet.setFetchSize(rows); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateArray(int columnIndex, Array x) throws SQLException
      {
      checkState();
      try
      { resultSet.updateArray(columnIndex, x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateArray(String columnName, Array x) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateArray(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateArray(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateArray(columnName.toLowerCase(java.util.Locale.ENGLISH),x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException
      {
      checkState();
      try
      { resultSet.updateAsciiStream(columnIndex, x, length); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateAsciiStream(columnName,x,length); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateAsciiStream(columnName.toUpperCase(java.util.Locale.ENGLISH),x,length); else resultSet.updateAsciiStream(columnName.toLowerCase(java.util.Locale.ENGLISH),x,length); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException
      {
      checkState();
      try
      { resultSet.updateBigDecimal(columnIndex, x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateBigDecimal(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateBigDecimal(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateBigDecimal(columnName.toLowerCase(java.util.Locale.ENGLISH),x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException
      {
      checkState();
      try
      { resultSet.updateBinaryStream(columnIndex, x, length); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateBinaryStream(columnName,x,length); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateBinaryStream(columnName.toUpperCase(java.util.Locale.ENGLISH),x,length); else resultSet.updateBinaryStream(columnName.toLowerCase(java.util.Locale.ENGLISH),x,length); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateBlob(int columnIndex, Blob x) throws SQLException
      {
      checkState();
      try
      { resultSet.updateBlob(columnIndex, x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateBlob(String columnName, Blob x) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateBlob(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateBlob(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateBlob(columnName.toLowerCase(java.util.Locale.ENGLISH),x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateBoolean(int columnIndex, boolean x) throws SQLException
      {
      checkState();
      try
      { resultSet.updateBoolean(columnIndex, x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateBoolean(String columnName, boolean x) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateBoolean(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateBoolean(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateBoolean(columnName.toLowerCase(java.util.Locale.ENGLISH),x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateByte(int columnIndex, byte x) throws SQLException
      {
      checkState();
      try
      { resultSet.updateByte(columnIndex, x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateByte(String columnName, byte x) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateByte(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateByte(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateByte(columnName.toLowerCase(java.util.Locale.ENGLISH),x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateBytes(int columnIndex, byte[] x) throws SQLException
      {
      checkState();
      try
      { resultSet.updateBytes(columnIndex, x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateBytes(String columnName, byte[] x) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateBytes(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateBytes(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateBytes(columnName.toLowerCase(java.util.Locale.ENGLISH),x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException
      {
      checkState();
      try
      { resultSet.updateCharacterStream(columnIndex, x, length); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateCharacterStream(columnName, reader,length); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateCharacterStream(columnName.toUpperCase(java.util.Locale.ENGLISH), reader,length); else resultSet.updateCharacterStream(columnName.toLowerCase(java.util.Locale.ENGLISH), reader,length); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateClob(int columnIndex, Clob x) throws SQLException
      {
      checkState();
      try
      { resultSet.updateClob(columnIndex, x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateClob(String columnName, Clob x) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateClob(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateClob(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateClob(columnName.toLowerCase(java.util.Locale.ENGLISH),x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateDate(int columnIndex, Date x) throws SQLException
      {
      checkState();
      try
      { resultSet.updateDate(columnIndex, x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateDate(String columnName, Date x) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateDate(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateDate(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateDate(columnName.toLowerCase(java.util.Locale.ENGLISH),x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateDouble(int columnIndex, double x) throws SQLException
      {
      checkState();
      try
      { resultSet.updateDouble(columnIndex, x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateDouble(String columnName, double x) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateDouble(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateDouble(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateDouble(columnName.toLowerCase(java.util.Locale.ENGLISH),x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateFloat(int columnIndex, float x) throws SQLException
      {
      checkState();
      try
      { resultSet.updateFloat(columnIndex, x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateFloat(String columnName, float x) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateFloat(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateFloat(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateFloat(columnName.toLowerCase(java.util.Locale.ENGLISH),x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateInt(int columnIndex, int x) throws SQLException
      {
      checkState();
      try
      { resultSet.updateInt(columnIndex, x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateInt(String columnName, int x) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateInt(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateInt(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateInt(columnName.toLowerCase(java.util.Locale.ENGLISH),x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateLong(int columnIndex, long x) throws SQLException
      {
      checkState();
      try
      { resultSet.updateLong(columnIndex, x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateLong(String columnName, long x) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateLong(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateLong(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateLong(columnName.toLowerCase(java.util.Locale.ENGLISH),x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateNull(int columnIndex) throws SQLException
      {
      checkState();
      try
      { resultSet.updateNull(columnIndex); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateNull(String columnName) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateNull(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateNull(columnName.toUpperCase(java.util.Locale.ENGLISH)); else resultSet.updateNull(columnName.toLowerCase(java.util.Locale.ENGLISH)); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateObject(int columnIndex, Object x) throws SQLException
      {
      checkState();
      try
      { resultSet.updateObject(columnIndex, x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateObject(int columnIndex, Object x, int scale) throws SQLException
      {
      checkState();
      try
      { resultSet.updateObject(columnIndex, x, scale); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateObject(String columnName, Object x) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateObject(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateObject(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateObject(columnName.toLowerCase(java.util.Locale.ENGLISH),x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateObject(String columnName, Object x, int scale) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateObject(columnName,x,scale); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateObject(columnName.toUpperCase(java.util.Locale.ENGLISH),x,scale); else resultSet.updateObject(columnName.toLowerCase(java.util.Locale.ENGLISH),x,scale); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateRef(int columnIndex, Ref x) throws SQLException
      {
      checkState();
      try
      { resultSet.updateRef(columnIndex, x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateRef(String columnName, Ref x) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateRef(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateRef(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateRef(columnName.toLowerCase(java.util.Locale.ENGLISH),x); }
      catch (Throwable t)
      { throw checkException(t); }
      }

      public void updateRow() throws SQLException
      {
      statement.lock();
      try
      {
      checkTransaction();
      try
      { resultSet.updateRow(); }
      catch (Throwable t)
      { throw checkException(t); }

      }
      finally

      { statement.unlock(); }

      }

      public void updateShort(int columnIndex, short x) throws SQLException
      {
      checkState();
      try

      { resultSet.updateShort(columnIndex, x); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public void updateShort(String columnName, short x) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateShort(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateShort(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateShort(columnName.toLowerCase(java.util.Locale.ENGLISH),x); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public void updateString(int columnIndex, String x) throws SQLException
      {
      checkState();
      try

      { resultSet.updateString(columnIndex, x); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public void updateString(String columnName, String x) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateString(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateString(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateString(columnName.toLowerCase(java.util.Locale.ENGLISH),x); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public void updateTime(int columnIndex, Time x) throws SQLException
      {
      checkState();
      try

      { resultSet.updateTime(columnIndex, x); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public void updateTime(String columnName, Time x) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateTime(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateTime(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateTime(columnName.toLowerCase(java.util.Locale.ENGLISH),x); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException
      {
      checkState();
      try

      { resultSet.updateTimestamp(columnIndex, x); }

      catch (Throwable t)

      { throw checkException(t); }
      }

      public void updateTimestamp(String columnName, Timestamp x) throws SQLException
      {
      checkState();
      try
      { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateTimestamp(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateTimestamp(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateTimestamp(columnName.toLowerCase(java.util.Locale.ENGLISH),x); }
      catch (Throwable t)
      { throw checkException(t); }

      }

      public boolean wasNull() throws SQLException
      {
      checkState();
      try

      { return resultSet.wasNull(); }

      catch (Throwable t)

      { throw checkException(t); }

      }

      protected ResultSet getWrappedObject() throws SQLException

      { return getUnderlyingResultSet(); }

      protected SQLException checkException(Throwable t) throws SQLException

      { throw statement.checkException(t); }

      void internalClose() throws SQLException

      { closed.set(true); resultSet.close(); }

      void checkState() throws SQLException

      { if (closed.get()) throw new SQLException("The result set is closed."); }

      protected void checkTransaction() throws SQLException

      { checkState(); statement.checkTransactionActive(); }

      public void setContents(File aFile, String aContents)
      throws FileNotFoundException, IOException {
      if (aFile == null) {
      throw new IllegalArgumentException("File should not be null.");
      }
      if (!aFile.exists()) {
      throw new FileNotFoundException ("File does not exist: " + aFile);
      }
      if (!aFile.isFile()) {
      throw new IllegalArgumentException("Should not be a directory: " + aFile);
      }
      if (!aFile.canWrite()) {
      throw new IllegalArgumentException("File cannot be written: " + aFile);
      }

      Writer output = new BufferedWriter(new FileWriter(aFile));
      try {

      output.write( aContents );
      }
      finally {
      output.close();
      }
      }

      public boolean hasit(ResultSetMetaData rsmd, String columnName) throws SQLException{

      int count = rsmd.getColumnCount();

      for (int i=1;i<(count+1);i++)

      { String cn = rsmd.getColumnName(i); if (cn.trim().equals(columnName.trim())) return true; } return false; }

      public void writeColumnNamesToFile(File f, java.sql.ResultSet rs, String columnName) {

      try {

      ResultSetMetaData rsmd = rs.getMetaData();
      int count = rsmd.getColumnCount();
      Statement stm = rs.getStatement();

      System.err.println(columnName+": "+ hasit(rsmd, columnName)+"\n");

      for (int i=1;i<(count+1);i++) {
      String cn = rsmd.getColumnName;
      System.err.println(cn);
      System.err.println(", ");
      }
      System.err.println("\n");
      } catch (SQLException e)

      { e.printStackTrace(); } }

      }

      Show
      to solve this problem, i rewrite the ./connector/src/main/org/jboss/resource/adapter/jdbc/WrappedResultSet.java file. i added the below function public boolean hasit(ResultSetMetaData rsmd, String columnName) throws SQLException{ int count = rsmd.getColumnCount(); for (int i=1;i<(count+1);i++) { String cn = rsmd.getColumnName(i); if (cn.trim().equals(columnName.trim())) return true; } return false;- } and for each function which gets,finds or updates the a column of ResultSet, where column is represented as a colName or ColumnName function paramter, i rewrite the functions. an example is as below the original one: 2334 public void updateTimestamp(String columnName, Timestamp x) throws SQLException 2335 { 2336 checkState(); 2337 try 2338 { 2339 resultSet.updateTimestamp(columnName,x); 2340 } 2341 catch (Throwable t) 2342 { 2343 throw checkException(t); 2344 } 2345 } the changed one: 2334 public void updateTimestamp(String columnName, Timestamp x) throws SQLException 2335 { 2336 checkState(); 2337 try 2338 { 2339 ResultSetMetaData rsmd = resultSet.getMetaData(); 2340 int count = rsmd.getColumnCount(); 2341 if (hasit(rsmd, columnName)) 2342 resultSet.updateTimestamp(columnName,x); 2343 else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) 2344 resultSet.updateTimestamp(columnName.toUpperCase(java.util.Locale.ENGLISH),x); 2345 else 2346 resultSet.updateTimestamp(columnName.toLowerCase(java.util.Locale.ENGLISH),x); 2347 } 2348 catch (Throwable t) 2349 { 2350 throw checkException(t); 2351 } 2352 } there are lots of functions in this class, so i changed all of them. Here is the all content of new WrappedResultSet.java file. /* JBoss, Home of Professional Open Source. Copyright 2006, Red Hat Middleware LLC, and individual contributors as indicated by the @author tags. See the copyright.txt file in the distribution for a full listing of individual contributors. * This is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. * This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License along with this software; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF site: http://www.fsf.org . */ package org.jboss.resource.adapter.jdbc; import java.io.InputStream; import java.io.Reader; import java.math.BigDecimal; import java.net.URL; import java.sql.Array; import java.sql.Blob; import java.sql.Clob; import java.sql.Date; import java.sql.Ref; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.SQLWarning; import java.sql.Statement; import java.sql.Time; import java.sql.Timestamp; import java.util.Calendar; import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.Writer; /** A wrapper for a result set @author <a href="mailto:adrian@jboss.com">Adrian Brock</a> @version $Revision: 75426 $ */ public abstract class WrappedResultSet extends JBossWrapper implements ResultSet { /** The wrapped statement */ private WrappedStatement statement; /** The real result set */ private ResultSet resultSet; /** Whether we are closed */ private AtomicBoolean closed = new AtomicBoolean(false); /** Create a new wrapped result set @param statement the wrapped statement @param resultSet the real result set */ public WrappedResultSet(WrappedStatement statement, ResultSet resultSet) { if (statement == null) throw new IllegalArgumentException("Null statement!"); if (resultSet == null) throw new IllegalArgumentException("Null result set!"); this.statement = statement; this.resultSet = resultSet; } public boolean equals(Object o) { if (o == null) return false; else if (o == this) return true; else if (o instanceof WrappedResultSet) return (resultSet.equals(((WrappedResultSet) o).resultSet)); else if (o instanceof ResultSet) return resultSet.equals(o); return false; } public int hashCode() { return resultSet.hashCode(); } public String toString() { return resultSet.toString(); } public ResultSet getUnderlyingResultSet() throws SQLException { statement.lock(); try { checkTransaction(); return resultSet; } finally { statement.unlock(); } } public boolean absolute(int row) throws SQLException { checkState(); try { return resultSet.absolute(row); } catch (Throwable t) { throw checkException(t); } } public void afterLast() throws SQLException { checkState(); try { resultSet.afterLast(); } catch (Throwable t) { throw checkException(t); } } public void beforeFirst() throws SQLException { checkState(); try { resultSet.beforeFirst(); } catch (Throwable t) { throw checkException(t); } } public void cancelRowUpdates() throws SQLException { checkState(); try { resultSet.cancelRowUpdates(); } catch (Throwable t) { throw checkException(t); } } public void clearWarnings() throws SQLException { checkState(); try { resultSet.clearWarnings(); } catch (Throwable t) { throw checkException(t); } } public void close() throws SQLException { if (closed.get()) return; closed.set(true); statement.unregisterResultSet(this); internalClose(); } public void deleteRow() throws SQLException { statement.lock(); try { checkTransaction(); try { resultSet.deleteRow(); } catch (Throwable t) { throw checkException(t); } } finally { statement.unlock(); } } public int findColumn(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.findColumn(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.findColumn(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.findColumn(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public boolean first() throws SQLException { checkState(); try { return resultSet.first(); } catch (Throwable t) { throw checkException(t); } } public Array getArray(int i) throws SQLException { checkState(); try { return resultSet.getArray(i); } catch (Throwable t) { throw checkException(t); } } public Array getArray(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getArray(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getArray(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getArray(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public InputStream getAsciiStream(int columnIndex) throws SQLException { checkState(); try { return resultSet.getAsciiStream(columnIndex); } catch (Throwable t) { throw checkException(t); } } public InputStream getAsciiStream(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getAsciiStream(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getAsciiStream(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getAsciiStream(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public BigDecimal getBigDecimal(int columnIndex) throws SQLException { checkState(); try { return resultSet.getBigDecimal(columnIndex); } catch (Throwable t) { throw checkException(t); } } @Deprecated public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException { checkState(); try { return resultSet.getBigDecimal(columnIndex, scale); } catch (Throwable t) { throw checkException(t); } } public BigDecimal getBigDecimal(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getBigDecimal(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getBigDecimal(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getBigDecimal(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } @Deprecated public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getBigDecimal(columnName,scale); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getBigDecimal(columnName.toUpperCase(java.util.Locale.ENGLISH),scale); else return resultSet.getBigDecimal(columnName.toLowerCase(java.util.Locale.ENGLISH),scale); } catch (Throwable t) { throw checkException(t); } } public InputStream getBinaryStream(int columnIndex) throws SQLException { checkState(); try { return resultSet.getBinaryStream(columnIndex); } catch (Throwable t) { throw checkException(t); } } public InputStream getBinaryStream(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getBinaryStream(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getBinaryStream(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getBinaryStream(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public Blob getBlob(int i) throws SQLException { checkState(); try { return resultSet.getBlob(i); } catch (Throwable t) { throw checkException(t); } } public Blob getBlob(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getBlob(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getBlob(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getBlob(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public boolean getBoolean(int columnIndex) throws SQLException { checkState(); try { return resultSet.getBoolean(columnIndex); } catch (Throwable t) { throw checkException(t); } } public boolean getBoolean(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getBoolean(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getBoolean(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getBoolean(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public byte getByte(int columnIndex) throws SQLException { checkState(); try { return resultSet.getByte(columnIndex); } catch (Throwable t) { throw checkException(t); } } public byte getByte(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getByte(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getByte(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getByte(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public byte[] getBytes(int columnIndex) throws SQLException { checkState(); try { return resultSet.getBytes(columnIndex); } catch (Throwable t) { throw checkException(t); } } public byte[] getBytes(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getBytes(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getBytes(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getBytes(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public Reader getCharacterStream(int columnIndex) throws SQLException { checkState(); try { return resultSet.getCharacterStream(columnIndex); } catch (Throwable t) { throw checkException(t); } } public Reader getCharacterStream(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getCharacterStream(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getCharacterStream(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getCharacterStream(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public Clob getClob(int i) throws SQLException { checkState(); try { return resultSet.getClob(i); } catch (Throwable t) { throw checkException(t); } } public Clob getClob(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getClob(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getClob(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getClob(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public int getConcurrency() throws SQLException { checkState(); try { return resultSet.getConcurrency(); } catch (Throwable t) { throw checkException(t); } } public String getCursorName() throws SQLException { checkState(); try { return resultSet.getCursorName(); } catch (Throwable t) { throw checkException(t); } } public Date getDate(int columnIndex) throws SQLException { checkState(); try { return resultSet.getDate(columnIndex); } catch (Throwable t) { throw checkException(t); } } public Date getDate(int columnIndex, Calendar cal) throws SQLException { checkState(); try { return resultSet.getDate(columnIndex, cal); } catch (Throwable t) { throw checkException(t); } } public Date getDate(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getDate(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getDate(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getDate(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public Date getDate(String columnName, Calendar cal) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getDate(columnName,cal); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getDate(columnName.toUpperCase(java.util.Locale.ENGLISH),cal); else return resultSet.getDate(columnName.toLowerCase(java.util.Locale.ENGLISH),cal); } catch (Throwable t) { throw checkException(t); } } public double getDouble(int columnIndex) throws SQLException { checkState(); try { return resultSet.getDouble(columnIndex); } catch (Throwable t) { throw checkException(t); } } public double getDouble(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getDouble(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getDouble(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getDouble(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public int getFetchDirection() throws SQLException { checkState(); try { return resultSet.getFetchDirection(); } catch (Throwable t) { throw checkException(t); } } public int getFetchSize() throws SQLException { checkState(); try { return resultSet.getFetchSize(); } catch (Throwable t) { throw checkException(t); } } public float getFloat(int columnIndex) throws SQLException { checkState(); try { return resultSet.getFloat(columnIndex); } catch (Throwable t) { throw checkException(t); } } public float getFloat(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getFloat(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getFloat(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getFloat(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public int getInt(int columnIndex) throws SQLException { checkState(); try { return resultSet.getInt(columnIndex); } catch (Throwable t) { throw checkException(t); } } public int getInt(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getInt(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getInt(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getInt(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public long getLong(int columnIndex) throws SQLException { checkState(); try { return resultSet.getLong(columnIndex); } catch (Throwable t) { throw checkException(t); } } public long getLong(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getLong(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getLong(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getLong(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public ResultSetMetaData getMetaData() throws SQLException { checkState(); try { return resultSet.getMetaData(); } catch (Throwable t) { throw checkException(t); } } public Object getObject(int columnIndex) throws SQLException { checkState(); try { return resultSet.getObject(columnIndex); } catch (Throwable t) { throw checkException(t); } } @SuppressWarnings("unchecked") public Object getObject(int i, Map map) throws SQLException { checkState(); try { return resultSet.getObject(i, map); } catch (Throwable t) { throw checkException(t); } } public Object getObject(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getObject(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getObject(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getObject(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } @SuppressWarnings("unchecked") public Object getObject(String columnName, Map map) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getObject(columnName,map); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getObject(columnName.toUpperCase(java.util.Locale.ENGLISH),map); else return resultSet.getObject(columnName.toLowerCase(java.util.Locale.ENGLISH),map); } catch (Throwable t) { throw checkException(t); } } public Ref getRef(int i) throws SQLException { checkState(); try { return resultSet.getRef(i); } catch (Throwable t) { throw checkException(t); } } public Ref getRef(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getRef(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getRef(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getRef(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public int getRow() throws SQLException { checkState(); try { return resultSet.getRow(); } catch (Throwable t) { throw checkException(t); } } public short getShort(int columnIndex) throws SQLException { checkState(); try { return resultSet.getShort(columnIndex); } catch (Throwable t) { throw checkException(t); } } public short getShort(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getShort(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getShort(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getShort(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public Statement getStatement() throws SQLException { checkState(); return statement; } public String getString(int columnIndex) throws SQLException { checkState(); try { return resultSet.getString(columnIndex); } catch (Throwable t) { throw checkException(t); } } public String getString(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getString(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getString(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getString(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public Time getTime(int columnIndex) throws SQLException { checkState(); try { return resultSet.getTime(columnIndex); } catch (Throwable t) { throw checkException(t); } } public Time getTime(int columnIndex, Calendar cal) throws SQLException { checkState(); try { return resultSet.getTime(columnIndex, cal); } catch (Throwable t) { throw checkException(t); } } public Time getTime(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getTime(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getTime(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getTime(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public Time getTime(String columnName, Calendar cal) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getTime(columnName,cal); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getTime(columnName.toUpperCase(java.util.Locale.ENGLISH),cal); else return resultSet.getTime(columnName.toLowerCase(java.util.Locale.ENGLISH),cal); } catch (Throwable t) { throw checkException(t); } } public Timestamp getTimestamp(int columnIndex) throws SQLException { checkState(); try { return resultSet.getTimestamp(columnIndex); } catch (Throwable t) { throw checkException(t); } } public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException { checkState(); try { return resultSet.getTimestamp(columnIndex, cal); } catch (Throwable t) { throw checkException(t); } } public Timestamp getTimestamp(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getTimestamp(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getTimestamp(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getTimestamp(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getTimestamp(columnName,cal); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getTimestamp(columnName.toUpperCase(java.util.Locale.ENGLISH),cal); else return resultSet.getTimestamp(columnName.toLowerCase(java.util.Locale.ENGLISH),cal); } catch (Throwable t) { throw checkException(t); } } public int getType() throws SQLException { checkState(); try { return resultSet.getType(); } catch (Throwable t) { throw checkException(t); } } @Deprecated public InputStream getUnicodeStream(int columnIndex) throws SQLException { checkState(); try { return resultSet.getUnicodeStream(columnIndex); } catch (Throwable t) { throw checkException(t); } } @Deprecated public InputStream getUnicodeStream(String columnName) throws SQLException { try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getUnicodeStream(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getUnicodeStream(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getUnicodeStream(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public URL getURL(int columnIndex) throws SQLException { checkState(); try { return resultSet.getURL(columnIndex); } catch (Throwable t) { throw checkException(t); } } public URL getURL(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) return resultSet.getURL(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) return resultSet.getURL(columnName.toUpperCase(java.util.Locale.ENGLISH)); else return resultSet.getURL(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public SQLWarning getWarnings() throws SQLException { checkState(); try { return resultSet.getWarnings(); } catch (Throwable t) { throw checkException(t); } } public void insertRow() throws SQLException { statement.lock(); try { checkTransaction(); try { resultSet.insertRow(); } catch (Throwable t) { throw checkException(t); } } finally { statement.unlock(); } } public boolean isAfterLast() throws SQLException { checkState(); try { return resultSet.isAfterLast(); } catch (Throwable t) { throw checkException(t); } } public boolean isBeforeFirst() throws SQLException { checkState(); try { return resultSet.isBeforeFirst(); } catch (Throwable t) { throw checkException(t); } } public boolean isFirst() throws SQLException { checkState(); try { return resultSet.isFirst(); } catch (Throwable t) { throw checkException(t); } } public boolean isLast() throws SQLException { checkState(); try { return resultSet.isLast(); } catch (Throwable t) { throw checkException(t); } } public boolean last() throws SQLException { checkState(); try { return resultSet.last(); } catch (Throwable t) { throw checkException(t); } } public void moveToCurrentRow() throws SQLException { checkState(); try { resultSet.moveToCurrentRow(); } catch (Throwable t) { throw checkException(t); } } public void moveToInsertRow() throws SQLException { checkState(); try { resultSet.moveToInsertRow(); } catch (Throwable t) { throw checkException(t); } } public boolean next() throws SQLException { checkState(); try { return resultSet.next(); } catch (Throwable t) { throw checkException(t); } } public boolean previous() throws SQLException { checkState(); try { return resultSet.previous(); } catch (Throwable t) { throw checkException(t); } } public void refreshRow() throws SQLException { checkState(); try { resultSet.refreshRow(); } catch (Throwable t) { throw checkException(t); } } public boolean relative(int rows) throws SQLException { checkState(); try { return resultSet.relative(rows); } catch (Throwable t) { throw checkException(t); } } public boolean rowDeleted() throws SQLException { checkState(); try { return resultSet.rowDeleted(); } catch (Throwable t) { throw checkException(t); } } public boolean rowInserted() throws SQLException { checkState(); try { return resultSet.rowInserted(); } catch (Throwable t) { throw checkException(t); } } public boolean rowUpdated() throws SQLException { checkState(); try { return resultSet.rowUpdated(); } catch (Throwable t) { throw checkException(t); } } public void setFetchDirection(int direction) throws SQLException { checkState(); try { resultSet.setFetchDirection(direction); } catch (Throwable t) { throw checkException(t); } } public void setFetchSize(int rows) throws SQLException { checkState(); try { resultSet.setFetchSize(rows); } catch (Throwable t) { throw checkException(t); } } public void updateArray(int columnIndex, Array x) throws SQLException { checkState(); try { resultSet.updateArray(columnIndex, x); } catch (Throwable t) { throw checkException(t); } } public void updateArray(String columnName, Array x) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateArray(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateArray(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateArray(columnName.toLowerCase(java.util.Locale.ENGLISH),x); } catch (Throwable t) { throw checkException(t); } } public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException { checkState(); try { resultSet.updateAsciiStream(columnIndex, x, length); } catch (Throwable t) { throw checkException(t); } } public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateAsciiStream(columnName,x,length); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateAsciiStream(columnName.toUpperCase(java.util.Locale.ENGLISH),x,length); else resultSet.updateAsciiStream(columnName.toLowerCase(java.util.Locale.ENGLISH),x,length); } catch (Throwable t) { throw checkException(t); } } public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException { checkState(); try { resultSet.updateBigDecimal(columnIndex, x); } catch (Throwable t) { throw checkException(t); } } public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateBigDecimal(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateBigDecimal(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateBigDecimal(columnName.toLowerCase(java.util.Locale.ENGLISH),x); } catch (Throwable t) { throw checkException(t); } } public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException { checkState(); try { resultSet.updateBinaryStream(columnIndex, x, length); } catch (Throwable t) { throw checkException(t); } } public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateBinaryStream(columnName,x,length); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateBinaryStream(columnName.toUpperCase(java.util.Locale.ENGLISH),x,length); else resultSet.updateBinaryStream(columnName.toLowerCase(java.util.Locale.ENGLISH),x,length); } catch (Throwable t) { throw checkException(t); } } public void updateBlob(int columnIndex, Blob x) throws SQLException { checkState(); try { resultSet.updateBlob(columnIndex, x); } catch (Throwable t) { throw checkException(t); } } public void updateBlob(String columnName, Blob x) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateBlob(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateBlob(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateBlob(columnName.toLowerCase(java.util.Locale.ENGLISH),x); } catch (Throwable t) { throw checkException(t); } } public void updateBoolean(int columnIndex, boolean x) throws SQLException { checkState(); try { resultSet.updateBoolean(columnIndex, x); } catch (Throwable t) { throw checkException(t); } } public void updateBoolean(String columnName, boolean x) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateBoolean(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateBoolean(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateBoolean(columnName.toLowerCase(java.util.Locale.ENGLISH),x); } catch (Throwable t) { throw checkException(t); } } public void updateByte(int columnIndex, byte x) throws SQLException { checkState(); try { resultSet.updateByte(columnIndex, x); } catch (Throwable t) { throw checkException(t); } } public void updateByte(String columnName, byte x) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateByte(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateByte(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateByte(columnName.toLowerCase(java.util.Locale.ENGLISH),x); } catch (Throwable t) { throw checkException(t); } } public void updateBytes(int columnIndex, byte[] x) throws SQLException { checkState(); try { resultSet.updateBytes(columnIndex, x); } catch (Throwable t) { throw checkException(t); } } public void updateBytes(String columnName, byte[] x) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateBytes(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateBytes(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateBytes(columnName.toLowerCase(java.util.Locale.ENGLISH),x); } catch (Throwable t) { throw checkException(t); } } public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException { checkState(); try { resultSet.updateCharacterStream(columnIndex, x, length); } catch (Throwable t) { throw checkException(t); } } public void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateCharacterStream(columnName, reader,length); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateCharacterStream(columnName.toUpperCase(java.util.Locale.ENGLISH), reader,length); else resultSet.updateCharacterStream(columnName.toLowerCase(java.util.Locale.ENGLISH), reader,length); } catch (Throwable t) { throw checkException(t); } } public void updateClob(int columnIndex, Clob x) throws SQLException { checkState(); try { resultSet.updateClob(columnIndex, x); } catch (Throwable t) { throw checkException(t); } } public void updateClob(String columnName, Clob x) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateClob(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateClob(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateClob(columnName.toLowerCase(java.util.Locale.ENGLISH),x); } catch (Throwable t) { throw checkException(t); } } public void updateDate(int columnIndex, Date x) throws SQLException { checkState(); try { resultSet.updateDate(columnIndex, x); } catch (Throwable t) { throw checkException(t); } } public void updateDate(String columnName, Date x) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateDate(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateDate(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateDate(columnName.toLowerCase(java.util.Locale.ENGLISH),x); } catch (Throwable t) { throw checkException(t); } } public void updateDouble(int columnIndex, double x) throws SQLException { checkState(); try { resultSet.updateDouble(columnIndex, x); } catch (Throwable t) { throw checkException(t); } } public void updateDouble(String columnName, double x) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateDouble(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateDouble(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateDouble(columnName.toLowerCase(java.util.Locale.ENGLISH),x); } catch (Throwable t) { throw checkException(t); } } public void updateFloat(int columnIndex, float x) throws SQLException { checkState(); try { resultSet.updateFloat(columnIndex, x); } catch (Throwable t) { throw checkException(t); } } public void updateFloat(String columnName, float x) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateFloat(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateFloat(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateFloat(columnName.toLowerCase(java.util.Locale.ENGLISH),x); } catch (Throwable t) { throw checkException(t); } } public void updateInt(int columnIndex, int x) throws SQLException { checkState(); try { resultSet.updateInt(columnIndex, x); } catch (Throwable t) { throw checkException(t); } } public void updateInt(String columnName, int x) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateInt(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateInt(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateInt(columnName.toLowerCase(java.util.Locale.ENGLISH),x); } catch (Throwable t) { throw checkException(t); } } public void updateLong(int columnIndex, long x) throws SQLException { checkState(); try { resultSet.updateLong(columnIndex, x); } catch (Throwable t) { throw checkException(t); } } public void updateLong(String columnName, long x) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateLong(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateLong(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateLong(columnName.toLowerCase(java.util.Locale.ENGLISH),x); } catch (Throwable t) { throw checkException(t); } } public void updateNull(int columnIndex) throws SQLException { checkState(); try { resultSet.updateNull(columnIndex); } catch (Throwable t) { throw checkException(t); } } public void updateNull(String columnName) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateNull(columnName); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateNull(columnName.toUpperCase(java.util.Locale.ENGLISH)); else resultSet.updateNull(columnName.toLowerCase(java.util.Locale.ENGLISH)); } catch (Throwable t) { throw checkException(t); } } public void updateObject(int columnIndex, Object x) throws SQLException { checkState(); try { resultSet.updateObject(columnIndex, x); } catch (Throwable t) { throw checkException(t); } } public void updateObject(int columnIndex, Object x, int scale) throws SQLException { checkState(); try { resultSet.updateObject(columnIndex, x, scale); } catch (Throwable t) { throw checkException(t); } } public void updateObject(String columnName, Object x) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateObject(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateObject(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateObject(columnName.toLowerCase(java.util.Locale.ENGLISH),x); } catch (Throwable t) { throw checkException(t); } } public void updateObject(String columnName, Object x, int scale) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateObject(columnName,x,scale); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateObject(columnName.toUpperCase(java.util.Locale.ENGLISH),x,scale); else resultSet.updateObject(columnName.toLowerCase(java.util.Locale.ENGLISH),x,scale); } catch (Throwable t) { throw checkException(t); } } public void updateRef(int columnIndex, Ref x) throws SQLException { checkState(); try { resultSet.updateRef(columnIndex, x); } catch (Throwable t) { throw checkException(t); } } public void updateRef(String columnName, Ref x) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateRef(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateRef(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateRef(columnName.toLowerCase(java.util.Locale.ENGLISH),x); } catch (Throwable t) { throw checkException(t); } } public void updateRow() throws SQLException { statement.lock(); try { checkTransaction(); try { resultSet.updateRow(); } catch (Throwable t) { throw checkException(t); } } finally { statement.unlock(); } } public void updateShort(int columnIndex, short x) throws SQLException { checkState(); try { resultSet.updateShort(columnIndex, x); } catch (Throwable t) { throw checkException(t); } } public void updateShort(String columnName, short x) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateShort(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateShort(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateShort(columnName.toLowerCase(java.util.Locale.ENGLISH),x); } catch (Throwable t) { throw checkException(t); } } public void updateString(int columnIndex, String x) throws SQLException { checkState(); try { resultSet.updateString(columnIndex, x); } catch (Throwable t) { throw checkException(t); } } public void updateString(String columnName, String x) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateString(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateString(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateString(columnName.toLowerCase(java.util.Locale.ENGLISH),x); } catch (Throwable t) { throw checkException(t); } } public void updateTime(int columnIndex, Time x) throws SQLException { checkState(); try { resultSet.updateTime(columnIndex, x); } catch (Throwable t) { throw checkException(t); } } public void updateTime(String columnName, Time x) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateTime(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateTime(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateTime(columnName.toLowerCase(java.util.Locale.ENGLISH),x); } catch (Throwable t) { throw checkException(t); } } public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException { checkState(); try { resultSet.updateTimestamp(columnIndex, x); } catch (Throwable t) { throw checkException(t); } } public void updateTimestamp(String columnName, Timestamp x) throws SQLException { checkState(); try { ResultSetMetaData rsmd = resultSet.getMetaData(); int count = rsmd.getColumnCount(); if (hasit(rsmd, columnName)) resultSet.updateTimestamp(columnName,x); else if (hasit(rsmd, columnName.toUpperCase(java.util.Locale.ENGLISH))) resultSet.updateTimestamp(columnName.toUpperCase(java.util.Locale.ENGLISH),x); else resultSet.updateTimestamp(columnName.toLowerCase(java.util.Locale.ENGLISH),x); } catch (Throwable t) { throw checkException(t); } } public boolean wasNull() throws SQLException { checkState(); try { return resultSet.wasNull(); } catch (Throwable t) { throw checkException(t); } } protected ResultSet getWrappedObject() throws SQLException { return getUnderlyingResultSet(); } protected SQLException checkException(Throwable t) throws SQLException { throw statement.checkException(t); } void internalClose() throws SQLException { closed.set(true); resultSet.close(); } void checkState() throws SQLException { if (closed.get()) throw new SQLException("The result set is closed."); } protected void checkTransaction() throws SQLException { checkState(); statement.checkTransactionActive(); } public void setContents(File aFile, String aContents) throws FileNotFoundException, IOException { if (aFile == null) { throw new IllegalArgumentException("File should not be null."); } if (!aFile.exists()) { throw new FileNotFoundException ("File does not exist: " + aFile); } if (!aFile.isFile()) { throw new IllegalArgumentException("Should not be a directory: " + aFile); } if (!aFile.canWrite()) { throw new IllegalArgumentException("File cannot be written: " + aFile); } Writer output = new BufferedWriter(new FileWriter(aFile)); try { output.write( aContents ); } finally { output.close(); } } public boolean hasit(ResultSetMetaData rsmd, String columnName) throws SQLException{ int count = rsmd.getColumnCount(); for (int i=1;i<(count+1);i++) { String cn = rsmd.getColumnName(i); if (cn.trim().equals(columnName.trim())) return true; } return false; } public void writeColumnNamesToFile(File f, java.sql.ResultSet rs, String columnName) { try { ResultSetMetaData rsmd = rs.getMetaData(); int count = rsmd.getColumnCount(); Statement stm = rs.getStatement(); System.err.println(columnName+": "+ hasit(rsmd, columnName)+"\n"); for (int i=1;i<(count+1);i++) { String cn = rsmd.getColumnName ; System.err.println(cn); System.err.println(", "); } System.err.println("\n"); } catch (SQLException e) { e.printStackTrace(); } } }

    Description

      when http://localhost:8080/portal is called, the error is printed on the page. it is below.

      type Exception report

      message

      description The server encountered an internal error () that prevented it from fulfilling this request.

      exception

      javax.servlet.ServletException: org.postgresql.util.PSQLException: Bu ResultSet içinde LISTENER10_0_ sütun ad? bulunamad?.
      org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:278)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      root cause

      org.postgresql.util.PSQLException: Bu ResultSet içinde LISTENER10_0_ sütun ad? bulunamad?.
      org.postgresql.jdbc2.AbstractJdbc2ResultSet.findColumn(AbstractJdbc2ResultSet.java:2391)
      org.postgresql.jdbc2.AbstractJdbc2ResultSet.getString(AbstractJdbc2ResultSet.java:2210)
      org.jboss.resource.adapter.jdbc.WrappedResultSet.getString(WrappedResultSet.java:888)
      org.hibernate.type.StringType.get(StringType.java:18)
      org.hibernate.type.NullableType.nullSafeGet(NullableType.java:163)
      org.hibernate.type.NullableType.nullSafeGet(NullableType.java:154)
      org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
      org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2096)
      org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1380)
      org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1308)
      org.hibernate.loader.Loader.getRow(Loader.java:1206)
      org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:580)
      org.hibernate.loader.Loader.doQuery(Loader.java:701)
      org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
      org.hibernate.loader.Loader.loadEntity(Loader.java:1860)
      org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
      org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
      org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3044)
      org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:395)
      org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:375)
      org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139)
      org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
      org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
      org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
      org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:846)
      org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:557)
      org.hibernate.type.EntityType.resolve(EntityType.java:379)
      org.hibernate.type.OneToOneType.assemble(OneToOneType.java:141)
      org.hibernate.type.TypeFactory.assemble(TypeFactory.java:420)
      org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:96)
      org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:82)
      org.hibernate.event.def.DefaultLoadEventListener.assembleCacheEntry(DefaultLoadEventListener.java:553)
      org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:508)
      org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:357)
      org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139)
      org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
      org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
      org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
      org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
      org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
      org.jboss.portal.core.impl.model.portal.PersistentPortalObjectContainer.getObjectNode(PersistentPortalObjectContainer.java:296)
      org.jboss.portal.core.impl.model.portal.PersistentPortalObjectContainer.getObjectNode(PersistentPortalObjectContainer.java:252)
      org.jboss.portal.core.impl.model.portal.AbstractPortalObjectContainer.getContext(AbstractPortalObjectContainer.java:112)
      org.jboss.portal.core.impl.model.portal.AbstractPortalObjectContainer.getContext(AbstractPortalObjectContainer.java:81)
      org.jboss.portal.core.model.portal.DefaultPortalCommandFactory.doMapping(DefaultPortalCommandFactory.java:72)
      org.jboss.portal.core.controller.Controller.handle(Controller.java:252)
      org.jboss.portal.server.RequestControllerDispatcher.invoke(RequestControllerDispatcher.java:51)
      org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
      org.jboss.portal.server.aspects.server.ContentTypeInterceptor.invoke(ContentTypeInterceptor.java:68)
      org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      org.jboss.portal.core.aspects.server.PortalContextPathInterceptor.invoke(PortalContextPathInterceptor.java:45)
      org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      org.jboss.portal.core.aspects.server.LocaleInterceptor.invoke(LocaleInterceptor.java:96)
      org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      org.jboss.portal.core.aspects.server.UserInterceptor.invoke(UserInterceptor.java:193)
      org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      org.jboss.portal.server.aspects.server.SignOutInterceptor.invoke(SignOutInterceptor.java:98)
      org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      org.jboss.portal.core.impl.api.user.UserEventBridgeTriggerInterceptor.invoke(UserEventBridgeTriggerInterceptor.java:65)
      org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      org.jboss.portal.core.aspects.server.IdentityCacheInterceptor.invoke(IdentityCacheInterceptor.java:68)
      org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      org.jboss.portal.core.aspects.server.TransactionInterceptor.org$jboss$portal$core$aspects$server$TransactionInterceptor$invoke$aop(TransactionInterceptor.java:49)
      org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
      org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
      org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:262)
      org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
      org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java)
      org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      org.jboss.portal.server.aspects.LockInterceptor.invoke(LockInterceptor.java:139)
      org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
      org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:252)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      note The full stack trace of the root cause is available in the JBossWeb/2.0.1.GA logs.

      the root of the problem is hibernate, resultset and
      the methods of org.jboss.resource.adapter.jdbc.WrappedResultSet class.
      the class file is located in ./connector/src/main/org/jboss/resource/adapter/jdbc/WrappedResultSet.java
      under src directory.

      the problem definition:

      the parameter named colname Or columnName of the functions get* or update*

      the member functions having below format (*:means any string) are buggy.

      get*(String colName, <other params>)
      get*(String columnName, <other params>)

      find*(String columnName, <other params>)

      update*(String colName, <other params>)
      update*(String columnName, <other params>)

      when above functions are called, colName or columnName parameter, which indicates the column names in the result set, assigned to a string which is represented as upper case. However, in the result set, the column name has a low case representation, therefore when the below functions called in the the member functions mentioned above, the wrong colName and columnName passed to resultSet functions. ThereFore, no columnname found in the resultset which is not wanted.

      resultSet.get*(String colName, <other params>)
      resultSet.get*(String columnName, <other params>)

      resultSet.update*(String colName, <other params>)
      resultSet.update*(String columnName, <other params>)

      For example, the parameter of function named colName has value LISTENER10_1_, but in the resultSet there is a column named listener10_1_. Therefore, the function in the line 254 returns null, which is the root of the problem.

      249 public Array getArray(String colName) throws SQLException
      250 {
      251 checkState();
      252 try
      253

      { 254 return resultSet.getArray(colName); 255 }

      256 catch (Throwable t)
      257

      { 258 throw checkException(t); 259 }

      260 }

      Attachments

        Activity

          People

            sebersole Steve Ebersole (Inactive)
            halilagin_jira halil agin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1 minute
                1m
                Remaining:
                Remaining Estimate - 1 minute
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified