First of all I want to thank for the instructions and patch. I managed
to patch Derby (revision 154375) by using using patch commands -l switch
(patch -p0 -l experimental_jsr_169.patch).

Some testing results:

1) Environment: Windows XP, IBM J9 (Foundation Frofile)
   - SimpleAppJSR169 example seems to work fine.
   - No significant problems with other simple test applications.

2) Environment: Linux (Fedora Core 3), J2ME CDC and Foundation Profile reference implementation (
   - SimpleAppJSR169 example failes in database creation. The last output lines on console I got were:
WARNING - Experimental J2ME/CDC/Foundation/JSR 169 Derby implementation
Process #16135 received signal 11
Process #16135 being suspended
   - Used CVM command line arguments with root access:
     bin/cvm -Xms64m -Xss4m -Xbootclasspath/a:/CDC/derby/lib/jdbc-cdc10.jar:/CDC/derby/lib/jce1_2_2.jar -Djava.class.path=derby.jar:SimpleAppJSR169.jar SimpleAppJSR169
   - I realized that Derby created a log file called derby.log. According to log files content, there might be some problems with derby.database.classpath ?

<log file>
2005-03-15 09:11:58.929 GMT:
 Booting Derby version The Apache Software Foundation - Apache Derby - alpha - (???): instance c013800d-0102-a57b-d263-000000326b8c
on database directory /CDC/cdcfoundation/build/linux-i686/bin/derbyDB

Database Class Loader started - derby.database.classpath=''
</log file>

   - Also, the derbyDB directory was created after runnig the SimpleAppJSR169 example.
     The content of derbyDB:
       derbyDB/db.lck             (size 38 bytes)
       derbyDB/dbex.lck           (size 0 bytes)
       derbyDB/log/log.ctrl       (size 48 bytes)
       derbyDB/log/log1.dat       (size 492 bytes)
       derbyDB/log/logmirror.ctrl (size 48 bytes)
       derbyDB/seg0/c10.dat       (size 4096 bytes)
       derbyDB/seg0/c20.dat       (size 4096 bytes)
       derbyDB/seg0/c31.dat       (size 4096 bytes)
   - After debuging for awhile, I'm rather sure the problem occurs on createDatabase method
     on class EmbedConnection. Probably class loading failes on BaseMonitor...

<EmbedConnection class>
        private Database createDatabase(String dbname, Properties info)
                throws SQLException {
                info = filterProperties(info);

                try {
                        if (Monitor.createPersistentService(Property.DATABASE_MODULE, dbname, info) == null)
                                // service already exists, create a warning
                                addWarning(EmbedSQLWarning.newEmbedSQLWarning(SQLState.DATABASE_EXISTS, dbname));
                } catch (StandardException mse) {
</EmbedConnection class>

Is there's any ideas what can done to solve the problem above?

-- Jouni

>I've managed to get Derby running with a simple test in
>J2ME/CDC/Foundation/JSR 169. As promised here are the instructions and
>patches to allow early testing.
>1) Obtain a J2ME/CDC/Foundation environment with JSR 169 libraries.
>   I used IBM's WCTME 5.7 (I'm employeed by IBM).
>   I also found through google another J2ME CDC environment by Emsertec.
>   I have no experience with it.