problems with the apache ij tool, encoding error?

Hello

I try running a method in the ij.class from within my application. I always receive an error, which I believe is to do with encoding.

int i = org.apache.derby.tools.ij.runScript(getDatabase("test").getConnection(),

in,"ASCII", System.out,"UTF8");

gives me:

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: org.apache.derby.iapi.tools.i18n.LocalizedResource.getNewEncodedOutput(Ljava/io/OutputStream;Ljava/lang/String;)Lorg/apache/derby/iapi/tools/i18n/LocalizedOutput;

at org.apache.derby.tools.ij.runScript(Unknown Source)

The method getNewEncodedOutput() is not in the class specified, as indicated by the exception. However, I was hoping the problem was me not using the encoding correct. I have tried different comb. of "ASCII" and "UTF8".

Regard

Fluid

[954 byte] By [Fluida] at [2007-10-3 10:30:56]
# 1
Appears to be a miss-match between the runtime library association and the compiler-associated library method versions.Plain English: The version of the method call you use is different than that being called when the program is run.
watertownjordana at 2007-7-15 5:53:40 > top of Java-index,Java Essentials,Java Programming...
# 2

> Hello

> I try running a method in the ij.class from within my

> application. I always receive an error, which I

> believe is to do with encoding.

> > int i =

> org.apache.derby.tools.ij.runScript(getDatabase("test"

> ).getConnection(),

> in,"ASCII", System.out, "UTF8");

> gives me:

> Exception in thread "AWT-EventQueue-0"

> java.lang.NoSuchMethodError:

> org.apache.derby.iapi.tools.i18n.LocalizedResource.get

> NewEncodedOutput(Ljava/io/OutputStream;Ljava/lang/Stri

> ng;)Lorg/apache/derby/iapi/tools/i18n/LocalizedOutput;

>

> at

> org.apache.derby.tools.ij.runScript(Unknown Source)

>

> The method getNewEncodedOutput() is not in the class

> specified, as indicated by the exception. However, I

> was hoping the problem was me not using the encoding

> correct. I have tried different comb. of "ASCII" and

> "UTF8".

Yeah, mismatch.

Alternatively, you could do away with ij if you are simply running a script. For example, if you had a script that looked like this:

CREATE TABLE HOCKEY_TEAMS(

TEAM_NAME VARCHAR(30) NOT NULL,

CITYVARCHAR(50)

)

You could simply read this file, build a query and perform a statement.executeQuery(String query);

good luck.

filestreama at 2007-7-15 5:53:40 > top of Java-index,Java Essentials,Java Programming...