db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prashanth Aditya Susarla" <prashanth.susa...@gmail.com>
Subject Re: 'Driver not found' error while trying to run Derby on an Arcom Zeus box
Date Fri, 03 Oct 2008 17:16:06 GMT
> I think I'm missing a JSR169 (CDC 1.1) implementation that works with
> IBM's custom J9 VM, and have found references being made to such a jar
> at various forums online when I turned to Google for help. Unfortunately,
> none of those posts mentions anything other than IBM's WCTME 5.7 as
> a source for that jar, and WCTME is paid software for which I have no other
> use and hence am uninterested in purchasing.

Problem solved! The command which causes everything to run perfectly is as
follows -

# j9 -Djava.specification.name="J2ME" -Djava.specification.version=1.3
-jcl:max -Xbootclasspath/a:jsr169.jar:database_enabler.jar:derby.jar

There were basically 2 problems here.

One was that the embedded (in derby.jar) driver was not being recognized despite
it being available in the classpath. The solution was to add derby.jar
also in the

Secondly, the J9 JVM that is in use in the Arcom Zeus box that I am
working on, is
recognized as a J2SE JVM. So I have to fool derby into thinking it is
running instead
on a J2ME spec JVM instead. This information was clear only after
looking at this
bit of code in JVMInfo.java (please excuse the formatting) -

          try {
               javaSpec = System.getProperty("java.specification.name");
          } catch (SecurityException se) {
               // some vms do not know about this property so they
               // throw a security exception when access is restricted.
               javaSpec = null;

          try {
               javaVersion =
System.getProperty("java.specification.version", "1.4");

          } catch (SecurityException se) {
               // some vms do not know about this property so they
               // throw a security exception when access is restricted.
               javaVersion = "1.4";

          if (javaSpec != null &&
             javaSpec.startsWith("J2ME") || // recognize IBM WCTME
              (javaSpec.indexOf( "Profile" ) > -1) && // recognize phoneME
              (javaSpec.indexOf( "Specification" ) > -1)

So now I've got a working standalone ij. Now I've got to figure out how to call
derby from within my project code, because the project code doesn't require
the JVM to be invoked with these java specification name/version values. I'll
have to test that everything else (in my project) works with these
flags enabled.

Thanks a lot everybody for your time! I hope all of this helps someone else.

Best regards,

Radioactive cats have 18 half-lives.
                                 -- Anonymous

View raw message