Skip site navigation (1) Skip section navigation (2)

java.lang.NoSuchMethodError: org.postgresql.copy.CopyManager.copyIn(Ljava/lang/String;Ljava/io/InputStream;)J

From: John Abraham <jabraham(at)ucalgary(dot)ca>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: java.lang.NoSuchMethodError: org.postgresql.copy.CopyManager.copyIn(Ljava/lang/String;Ljava/io/InputStream;)J
Date: 2010-02-25 20:33:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Hmm this is strange.  I compile against postgresql-8.4-701.jdbc4.jar
and call the method copyIn

            CopyManager copyManager = new CopyManager((BaseConnection)
            FileInputStream devEventStream = new
            copyManager.copyIn("copy development_events from stdin CSV
HEADER", devEventStream);

and it all compiles nicely, but when I try to run it I get


In my experience, usually a NoSuchMethodError means that I'm running
against a different .jar file then the one I compiled against.  So I
ran it within eclipse, and got the same error.

pgsql-jdbc by date

Next:From: John AbrahamDate: 2010-02-25 21:21:35
Subject: NoSuchMethodError org.postgresql.core.QueryExecutor.startCopy(String)
Previous:From: shilpa rDate: 2010-02-25 08:11:57
Subject: path and classpath settings

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group