Question

I have a mobile device with an NXP processor running an IBM J9 JVM. System props are telling me that 'JRE Version: J2ME Foundation Specification v1.1' is available.

Do you see any possibility to get a database up and running in such a runtime environment?

I read a few posts regarding J2ME DBMS and gave Apache Derby a try. I took the jar file and threw it on my device. It is loaded correctly but if I try to load the driver i get an

java.lang.NoClassDefFoundError: java.sql.Driver

I'm afraid I'm doing something basically wrong.... Any ideas?

Thanks!

Was it helpful?

Solution 2

Do it yourself #3. ;)

Got the solution.

Regarding to chapter 10.8.2.1 (Using IBM J9) of http://docs.oracle.com/cd/E12095_01/doc.10303/e12548/cjdbc.htm I downloaded the Oracle database Lite 10g and extracted the jdbcjsr169.jar. I added the jar to my classpath, to be more specific as bootclasspath parameter, to avoid a SecurityException...

peace

OTHER TIPS

Ok, I figured out that in my J2ME environment I should use JSR169.

So instead of

Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();

I'll use the

org.apache.derby.jdbc.EmbeddedSimpleDataSource 

class.

As I'm using derby version 10.4.2.0 the manual at http://db.apache.org/derby/docs/10.4/ref/rrefjdbcjsr169.html tells me the subset commands of the original jdbc stuff.

Although I get an

java.lang.NoClassDefFoundError: java.sql.SQLException 

What's the problem now? I don't get it. The libs are added to the classpath correctly....

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top