On 6/13/07, Daniel John Debrunner <[EMAIL PROTECTED]> wrote:

Mike Jarmy wrote:
> I'm getting a NoSuchMethodError when I try to run derby under a J9 JVM.
> I built derby from source, using the jsr169compile.classpath property,
> which I believe means that the resulting derby.jar should be J2ME
> compliant.  However, when I run my little test app, I get an exception
> saying that the method DirRandomAccessFile4.getChannel() is not found.
> Since this method returns a java.nio.FileChannel, which is clearly not
> part of J2ME, it seems that I must have somehow included non-J2ME stuff
> when I did the build (even though I carefully followed the directions in
> BUILDING.txt).  Can someone tell me what I'm doing wrong?
>
> It is my understanding that all I have to do to build J2ME is put
> jsr169compile.classpath in my ant.properties file.  So here is my
> ant.properties file:
>
>     j14lib=d:/niagara/r3dev/tools/jdk14/jre/lib
>     j13lib=d:/niagara/r3dev/tools/jdk13/jre/lib
>     proceed=false
>     sane=false
>
>
jsr169compile.classpath=D:/niagara/r3dev/dist/x86-qnx-j9/ive/lib/jclMax/classes.zip
> ;D:/apps/java/jsr169/sun/sql.jar

jsr169compile.classpath is expected to be set to a classpath with the
J2ME/CDC/Foundation 1.0/1.1 and the JSR libraries. jclMax is not
J2ME/CDC/Foundation, I think it's JDK 1.3.

Here's the value I use (for trunk, where foundation 1.1 is used):


jsr169compile.classpath=C:/IBM/WEME/runtimes/61/win-x86-ppro11/weme-win-x86-ppro

11_6.1.1.20061110-161633/lib/jclFoundation11/classes.zip;C:/_work/p4n/djdcs/wctm
e5.7/ive/lib/jdbc.jar

jdbc.jar in mine should be the same as your sql.jar.

HTH,
Dan.


Well, its true that we are using jclMax, not J2ME.  So I recompiled derby
against jclFoundation10/classes.zip (*not* jclFoundation11, because we don't
have it.)  Unfortunately I'm still getting the same error.  Are the ant
build.xml files looking for the magic string 'jclFoundation11'?  Based on
grepping through them they do not appear to be.

It seems as if somehow my environment is not set up so that the ant build
process will decide to exclude java.nio.* (which I believe is a java
1.4thing).  Does anyone have any other suggestions?  I'd be happy to
modify the
build.xml files, but they are quite complex and I'm having some trouble
figuring out what to do.

-- Mike

FYI -- For anyone else reading this thread, JclMax is a superset of J2ME
which includes quite a few more classes, but sadly java.sql.* is not among
them.

Reply via email to