Re: NoSuchMethodError org.postgresql.core.QueryExecutor.startCopy(String) - Mailing list pgsql-jdbc

From John Abraham
Subject Re: NoSuchMethodError org.postgresql.core.QueryExecutor.startCopy(String)
Date
Msg-id AB9889F3-C063-4AE5-941A-3277567B120D@ucalgary.ca
Whole thread Raw
In response to NoSuchMethodError org.postgresql.core.QueryExecutor.startCopy(String)  (John Abraham <jea@hbaspecto.com>)
List pgsql-jdbc
Ok I figured it out.  It's an extensions thing.  Maybe it's an OS X specific thing.

Java on OS X loads certain .jar files in /Library/Java/Extensions .   And these seem to get loaded in regardless of
whetheryou tell eclipse specifically NOT to load them in.   AND they seem to take precedence over anything in the class
path. So the .jar file I was compiling against matched the .jar file on my class path, but the .jar file that was
actuallybeing used was completely different. 

I deleted everything in /Library/Java/Extensions and now it works.

--
John


On 2010-02-25, at 2:21 PM, John Abraham wrote:

> This is strange.  I'm trying to use CopyManager.copyIn and I'm getting the following error:
>
> Exception in thread "main" java.lang.NoSuchMethodError:
org.postgresql.core.QueryExecutor.startCopy(Ljava/lang/String;Z)Lorg/postgresql/copy/CopyOperation;
>     at org.postgresql.copy.CopyManager.copyIn(CopyManager.java:54)
>     at org.postgresql.copy.CopyManager.copyIn(CopyManager.java:178)
>     at org.postgresql.copy.CopyManager.copyIn(CopyManager.java:163)
>     at com.hbaspecto.pecas.land.PostgreSQLLandInventory.applyDevelopmentChanges(PostgreSQLLandInventory.java:120)
>     at com.hbaspecto.pecas.sd.SDModel.runSD(SDModel.java:80)
>     at com.hbaspecto.pecas.sd.StandardSDModel.main(StandardSDModel.java:73)
>
> I downloaded the source and I see two implementations of org.postgresql.core.QueryExecutor, the
org.postgres.core.v3.QueryExecutorImpland the org.postgres.core.v2.QueryExecutor.  Both have this method, although the
v2one just throws an error. 
>
> Using the debugger I've confirmed that my QueryExecutor is the v3 one.    So why wouldn't CopyManater.copyIn be able
tocall the method? 
>
> --
> John
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>
>


pgsql-jdbc by date:

Previous
From: John Abraham
Date:
Subject: NoSuchMethodError org.postgresql.core.QueryExecutor.startCopy(String)
Next
From: Lew
Date:
Subject: Re: path and classpath settings