OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Jdbc On Sl6000's Personal Java?, anyone have any luck
Tehas
post Feb 21 2005, 09:04 PM
Post #1





Group: Members
Posts: 157
Joined: 6-November 03
From: Harrisburg PA
Member No.: 867



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
Go to the top of the page
 
+Quote Post
numeric
post Apr 20 2005, 06:27 PM
Post #2





Group: Members
Posts: 9
Joined: 17-April 05
Member No.: 6,906



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
Go to the top of the page
 
+Quote Post
insomniux
post Apr 24 2005, 02:34 AM
Post #3





Group: Members
Posts: 15
Joined: 24-January 05
Member No.: 6,298



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
Go to the top of the page
 
+Quote Post
numeric
post Apr 25 2005, 05:38 PM
Post #4





Group: Members
Posts: 9
Joined: 17-April 05
Member No.: 6,906



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
Go to the top of the page
 
+Quote Post
Tehas
post Apr 25 2005, 08:37 PM
Post #5





Group: Members
Posts: 157
Joined: 6-November 03
From: Harrisburg PA
Member No.: 867



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!
Go to the top of the page
 
+Quote Post
insomniux
post Apr 26 2005, 12:13 PM
Post #6





Group: Members
Posts: 15
Joined: 24-January 05
Member No.: 6,298



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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 2nd September 2014 - 08:46 AM