title: createArrayOf AbstractMethodError
body: <p>I am trying to insert an array to postgres using java code , but I always get this error : </p>
  
  <pre><code>SEVERE [http-nio-8080-exec-2]org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service()
   for servlet [] in context with path [/] threw exception 
  [Servlet execution threw an exception] with root cause
   java.lang.AbstractMethodError: 
  com.mchange.v2.c3p0.impl.NewProxyConnection.createArrayOf(Ljava/lang/String;[Ljava/lang/Object;)Ljava/sql/Array;
  </code></pre>
  
  <p>Code Used</p>
  
  <pre><code>pst = getConnection().prepareStatement(INSERT_QUERY,PreparedStatement.RETURN_GENERATED_KEYS);
          pst.setString(1, t.getname());
          pst.setString(2, t.getEmail());
          Array itemIds = conn.createArrayOf("bigint", t.getItemIds());
          pst.setArray(3, itemIds);
  </code></pre>
  
  <p></p>
  
  <p>If I run the function through main class it works fine , but after deploying to tomcat server,  http calls fail with above error . </p>
  
  <ul>
  <li>DB Used -  Postgres</li>
  <li>JDBC Driver postgres-9.1-901-1.jdbc4</li>
  <li>c3p0-0.9.5-pre10</li>
  <li>tomcat-8.0.24</li>
  </ul>
  
  <p>As per research I have done , createArrayOf() supposed to work with jdbc4 and c3p0-0.9.5 . </p>
  
  <p>Using this works fine , but I don't see it as right approach </p>
  
  <pre><code>        if (conn instanceof C3P0ProxyConnection) {
              C3P0ProxyConnection proxy = (C3P0ProxyConnection) conn;
              try {
               Method m = Connection.class.getMethod("createArrayOf", String.class, Object[].class);
               Object[] args = { "bigint", t.getItemIds() };
               itemIds = (Array) proxy.rawConnectionOperation(m, C3P0ProxyConnection.RAW_CONNECTION, args);
              } catch (IllegalArgumentException e) {
                  throw new SQLException(e);
              }
           } else {
                  itemIds = conn.createArrayOf("bigint", t.getItemIds());
           }
  </code></pre>
  
  <p>Need help .
  Thanks</p>