Help - Search - Members - Calendar
Full Version: Jdbc On Sl6000's Personal Java?
OESF Forums > Distros, Development, and Model Specific Forums > Everything Development > Personal Java/Jeode/J2ME Personal Profile
Tehas
I have an app that I wrote for my SL5600 that used SQLite and JDBC. When I tried running it on my SL6000, I'm getting error that "java.lang.NoClassDefFoundError: java.sql.SQLException".

I did some searching and stumbled upon a guys page who had documented that the Personal Java didn't support JDBC on his 7** or 8** series? Instead, he had loaded Jeode for his application.

Has anyone gotten JDBC working on the 6000?

Edit: Just found the link about JDBC not working on a SL750: http://www.oesf.org/forums/index.php?showtopic=4410&hl=jdbc
numeric
This is because the required class is not included in J2ME, Personal Profile

This is the work around (a bit dirty), but I can use it to access MySQL on SL-C760

1. locate the personal.jar file (/home/QtPalmtop/j2me/lib)
2. copy this file to PC
3. download jedoe java from caclo feed (http://bryandeluca.com/cacko/feed/jeode_1.10.7-1_arm.ipk)
4. rename the file to jeode_1.10.7-1_arm.ipk.tar.gz so that you can open it with tools like winRAR
5. open the file with a unzip tools, open .\data.tar.gz
6. navigate to "data.tar.gz\.\home\QtPalmtop\lib\"
7. extract core.jar to a temp location
8. open core.jar, locate java\sql
7. extract "sql" folder to a temp folder
8. add the "sql" folder to "personal.jar" (from step 1) under java folder
9. so you get a new lib, backup the orginal one on Zaurus
10. and replace the orginal personal.jar with the new one.
11. try again and see if it is working wink.gif
insomniux
QUOTE(numeric @ Apr 21 2005, 03:27 AM)
This is because the required class is not included in J2ME, Personal Profile

This is the work around (a bit dirty), but I can use it to access MySQL on SL-C760

1. locate the personal.jar file (/home/QtPalmtop/j2me/lib)
....
10. and replace the orginal personal.jar with the new one.
11. try again and see if it is working  wink.gif
*


I've tried this but the error message still comes up. If I open the new personal.jar file on my desktop, it shows the java/sql directory with all files. The personal.jar file in /home/QtPalmtop/j2me/lib is a symlink to /usr/QtPalmtop.rom/j2me/lib, which is a readonly file system. So I removed the symlink and put the new personal.jar on /home/QtPalmtop/j2me/lib.

Might it be that java still looks into /usr/QtPalmtop.rom/j2me/lib, or that the classes in sql are not seen due to version differences? I use the Sharp ROM 1.12.
Is there someone who solved this problem on a sl6000?
Thanks
insomniux
numeric
I'm using CACKO 1.22 on SL-C760.

And download & install the j2me runtime from CACKO feed.

Indeed, the personal.jar is not a symlink.

How about use Jeode instead? It provide sql packages.

http://cacko.biz/cacko/feed/jeode_1.10.7-1_arm.ipk
Tehas
Thanks, that seemed to work plus I had to do a little tweaking to the instructions on Christoph Kecher's page http://www.kecher.de/howtos/SQLite-JDBC-Howto.html.

Placing the modified personal.jar in /home/QtPalmtop/j2me/lib, didn't seem to do the trick. I still got the old error.

Warning: Mounting your ROM in read-write mode can FUBAR your device!

In order to get the personal.jar file to work, I had to mount the ROM as rw and then copied the modified personal.jar file to /usr/QtPalmtop.rom/j2me/lib/. I switched the ROM back to ro mode and tested. This time I got the error "Unable to load sqlite: java.lang.UnsatisfiedLinkError: no sqlite_jni in java.library.path"

I went back to Christoph's page and made some adjustments. When he tells you to copy the jar and libs to .../jdk1.3/lib..., I instead mounted the ROM as rw and then did symlinks from /usr/QtPalmtop.rom/j2me/lib/ to the location where I store my SQLite-JDBC files (on my SD card).

So, my /usr/QtPalmtop.rom/j2me/lib/ directory now has:
The modified personal.jar file
Symlink to {my sqlite base on SD}/libsqlite_jni.so.0.0.0 as libsqlite_jni.so
Symlink to {my sqlite base on SD}/sqlite.jar as sqlite.jar

After making these changes, I can now run evm -jar sqlite.jar mytesdb to edit one of my databases.

Thanks for the help!
insomniux
QUOTE(Tehas @ Apr 26 2005, 05:37 AM)
Placing the modified personal.jar in /home/QtPalmtop/j2me/lib, didn't seem to do the trick.  I still got the old error.

Warning:  Mounting your ROM in read-write mode can FUBAR your device!

In order to get the personal.jar file to work, I had to mount the ROM as rw and then copied the modified personal.jar file to /usr/QtPalmtop.rom/j2me/lib/.  I switched the ROM back to ro mode and tested.

*


This worked for me on a sl6000 with sharp rom 1.12, to connect to mysql!

insomniux
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.