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 'Driver not found' error while trying to run Derby on an Arcom Zeus box
Date Fri, 03 Oct 2008 13:06:45 GMT
Hello,

I am Prashanth Susarla and am (very) new to Derby.

A couple of days back I tried running Derby on an Arcom Zeus-based
box (http://www.arcom.com/pxa270-xscale-zeus.htm), which comes
bundled with a version of IBM's J9 JVM (please excuse me for not
snipping off the copyright text) -

<SNIP>
# j9 -jcl:max -version
java version "1.4.2 subset"
IBM J9 2.3 Linux arm-32  (JIT disabled)
J9VM - 20070723_00000_lHdFGR
JIT  - 20070220_1806_r8
GC   - 20070208_AA
JCL  - 20070313_1930,max

Licensed Materials - Property of IBM

J9 - VM for the Java(TM) platform, Version 2.3
(c) Copyright IBM Corp. 1991, 2007  All Rights Reserved
Target: 20070723_00000_lHdFGR (Linux 2.6.16.28-arcom2-1-zeus arm)
JIT  - 20070220_1806_r8

IBM is a registered trademark of IBM Corp.
Java and all Java-based marks and logos are trademarks or registered
trademarks of Sun Microsystems, Inc.
</SNIP>

I followed the documentation and steps outlined to install Derby on such
platforms, here -

http://wiki.apache.org/db-derby/JavaMESupport#j9

FWIW, the link on that page pointing to IBM's own test results of running
Derby on their J9 is broken.

The problem I face is that in spite of setting the CLASSPATH correctly
and using the reference implementation of the JSR169 spec I get an error
saying that the JDBC driver is not found.

I have database_enabler.jar with me, and additionally I compiled the
JSR169 (for CDC 1.0) sources
(http://java.sun.com/products/jdbc/download.html#cdcfp) into a jar
(that's the jsr169.jar you will see in the command snippets below).

http://wiki.apache.org/db-derby/JavaMESupport#requirements says that
the latest releases of Derby require CDC 1.1, but I thought I'll give the
CDC 1.0 sources a try.

I have only tried using the embedded JDBC driver, and not the client JDBC
driver. I think that the client-server model doesn't make sense (from a
resource usage standpoint) for the way I want to use Derby with my project.

First of all, I got hold of Derby 10.4.2.0 as that's the latest version. Then I
tried running sysinfo and ij, with the following results -

Derby 10.4 sysinfo with database_enabler.jar
============================================
<SNIP>
# j9 -jcl:max -Xbootclasspath/a:$DERBY_INSTALL/lib/database_enabler.jar
org.apache.derby.tools.sysinfo
------------------ Java Information ------------------
Java Version:    1.4.2 subset
Java Vendor:     IBM Corporation
Java home:       /opt/wece6.1
Java classpath:
/opt/Apache/db-derby-10.4.2.0-lib/lib/derby.jar:/opt/Apache/db-derby-10.4.2.0-lib/lib/derbytools.jar:.
OS name:         Linux
OS architecture: arm
OS version:      2.6.16.28-arcom2-1-zeus
Java user name:  root
Java user home:  /root
Java user dir:   /opt/Apache
java.specification.name: Java Platform API Specification
java.specification.version: 1.4
--------- Derby Information --------
JRE - JDBC: J2SE 1.4.2 - JDBC 3.0
[/opt/Apache/db-derby-10.4.2.0-lib/lib/derby.jar] 10.4.2.0 - (689064)
[/opt/Apache/db-derby-10.4.2.0-lib/lib/derbytools.jar] 10.4.2.0 - (689064)
------------------------------------------------------
</SNIP>

Derby 10.4 ij with database_enabler.jar
=======================================
<SNIP>
# j9 -jcl:max -Xbootclasspath/a:$DERBY_INSTALL/lib/database_enabler.jar
org.apache.derby.tools.ij
ij> version 10.4
ij> connect 'jdbc:derby:MyDbTest;create=true';
ERROR (no SQLState): Driver not found: jdbc:derby:MyDbTest;create=true
</SNIP>

Derby 10.4 sysinfo with jsr169.jar
==================================
Same as above.

Derby 10.4 ij with jsr169.jar
=============================
<SNIP>
# j9 -jcl:max -Xbootclasspath/a:$DERBY_INSTALL/lib/jsr169.jar
org.apache.derby.tools.ij
ij> version 10.4
ij> connect 'jdbc:derby:MyDbTest;create=true';
JAVA ERROR: java.lang.NoClassDefFoundError: java.sql.Driver
</SNIP>

Derby 10.4 sysinfo with both jars
=================================
Same as above.

Derby 10.4 ij with both jars
============================
<SNIP>
# j9 -jcl:max -Xbootclasspath/a:$DERBY_INSTALL/lib/jsr169.jar:$DERBY_INSTALL/lib/database_enabler.jar
org.apache.derby.tools.ij
ij> version 10.4
ij> connect 'jdbc:derby:MyDbTest;create=true';
ERROR (no SQLState): Driver not found: jdbc:derby:MyDbTest;create=true
</SNIP>

As I wasn't able to create a DB with derby 10.4 using either jsr169.jar or
database_enabler.jar, I decided to try out derby 10.2 (from the requirements
section you can make out that derby 10.2 should work with JSR169
sources for CDC 1.0 -

Derby 10.2 sysinfo with database_enabler.jar
============================================
<SNIP>
# j9 -jcl:max -Xbootclasspath/a:$DERBY_INSTALL/lib/database_enabler.jar
org.apache.derby.tools.sysinfo
------------------ Java Information ------------------
Java Version:    1.4.2 subset
Java Vendor:     IBM Corporation
Java home:       /opt/wece6.1
Java classpath:
/opt/Apache/db-derby-10.2.2.0-lib/lib/derby.jar:/opt/Apache/db-derby-10.2.2.0-lib/lib/derbytools.jar:.
OS name:         Linux
OS architecture: arm
OS version:      2.6.16.28-arcom2-1-zeus
Java user name:  root
Java user home:  /root
Java user dir:   /opt/Apache
java.specification.name: Java Platform API Specification
java.specification.version: 1.4
--------- Derby Information --------
JRE - JDBC: J2SE 1.4.2 - JDBC 3.0
[/opt/Apache/db-derby-10.2.2.0-lib/lib/derby.jar] 10.2.2.0 - (485682)
[/opt/Apache/db-derby-10.2.2.0-lib/lib/derbytools.jar] 10.2.2.0 - (485682)
------------------------------------------------------
</SNIP>

Derby 10.2 ij with database_enabler.jar
=======================================
<SNIP>
# j9 -jcl:max -Xbootclasspath/a:$DERBY_INSTALL/lib/database_enabler.jar
org.apache.derby.tools.ij
ij> version 10.2
ij> connect 'jdbc:derby:MyDbTest;create=true';
JAVA ERROR: java.lang.NoClassDefFoundError: java.sql.Savepoint
</SNIP>

Derby 10.2 sysinfo with jsr169.jar
==================================
Same as above.

Derby 10.2 ij with jsr169.jar
=============================
<SNIP>
# j9 -jcl:max -Xbootclasspath/a:$DERBY_INSTALL/lib/jsr169.jar
org.apache.derby.tools.ij
ij> version 10.2
ij> connect 'jdbc:derby:MyDbTest;create=true';
JAVA ERROR: java.lang.NoClassDefFoundError: java.sql.Driver
</SNIP>

Derby 10.2 sysinfo with both jars
=================================
Same as above.

Derby 10.2 ij with both jars
============================
<SNIP>
# j9 -jcl:max -Xbootclasspath/a:$DERBY_INSTALL/lib/jsr169.jar:$DERBY_INSTALL/lib/database_enabler.jar
org.apache.derby.tools.ij
ij> version 10.2
ij> connect 'jdbc:derby:MyDbTest;create=true';
ERROR (no SQLState): Driver not found: jdbc:derby:MyDbTest;create=true
</SNIP>

Here are the contents of 'derby.log' from two of the few situations
outlined above -

derby.log with 10.4.2.0 and database_enabler.jar
=========================================
<SNIP>
2000-04-10 23:39:09.590 GMT Thread[main,5,main] Class
org.apache.derby.jdbc.Driver30 java.lang.NoClassDefFoundError:
javax.naming.Referenceable, module ignored.
2000-04-10 23:39:09.600 GMT Thread[main,5,main]
2000-04-10 23:39:09.683 GMT Thread[main,5,main] Cleanup action starting
ERROR XBM02: Startup failed due to missing functionality for
org.apache.derby.jdbc.InternalDriver. Please ensure your classpath
includes the correct Derby software.
	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
	at org.apache.derby.iapi.services.monitor.Monitor.missingImplementation(Unknown
Source)
	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
	at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown
Source)
	at org.apache.derby.impl.services.monitor.BaseMonitor.startServices(Unknown
Source)
	at org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(Unknown
Source)
	at org.apache.derby.impl.services.monitor.FileMonitor.<init>(Unknown Source)
	at org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Unknown Source)
	at org.apache.derby.iapi.jdbc.JDBCBoot.boot(Unknown Source)
	at org.apache.derby.jdbc.EmbeddedDriver.boot(Unknown Source)
	at org.apache.derby.jdbc.EmbeddedDriver.<clinit>(Unknown Source)
	at java.lang.J9VMInternals.initializeImpl(Native Method)
	at java.lang.J9VMInternals.initialize(J9VMInternals.java:187)
	at java.lang.Class.forNameImpl(Native Method)
	at java.lang.Class.forName(Class.java:114)
	at org.apache.derby.impl.tools.ij.util.loadDriver(Unknown Source)
	at org.apache.derby.impl.tools.ij.util.loadDriverIfKnown(Unknown Source)
	at org.apache.derby.impl.tools.ij.ij.dynamicConnection(Unknown Source)
	at org.apache.derby.impl.tools.ij.ij.ConnectStatement(Unknown Source)
	at org.apache.derby.impl.tools.ij.ij.ijStatement(Unknown Source)
	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
	at org.apache.derby.tools.ij.main(Unknown Source)
Cleanup action completed
2000-04-10 23:39:09.728 GMT Thread[main,5,main] 2000-04-10
23:39:09.724 GMT Thread[main,5,main] Startup failed due to missing
functionality for org.apache.derby.jdbc.InternalDriver. Please ensure
your classpath includes the correct Derby software.
ERROR XBM02: Startup failed due to missing functionality for
org.apache.derby.jdbc.InternalDriver. Please ensure your classpath
includes the correct Derby software.
	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
	at org.apache.derby.iapi.services.monitor.Monitor.missingImplementation(Unknown
Source)
	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
	at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown
Source)
	at org.apache.derby.impl.services.monitor.BaseMonitor.startServices(Unknown
Source)
	at org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(Unknown
Source)
	at org.apache.derby.impl.services.monitor.FileMonitor.<init>(Unknown Source)
	at org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Unknown Source)
	at org.apache.derby.iapi.jdbc.JDBCBoot.boot(Unknown Source)
	at org.apache.derby.jdbc.EmbeddedDriver.boot(Unknown Source)
	at org.apache.derby.jdbc.EmbeddedDriver.<clinit>(Unknown Source)
	at java.lang.J9VMInternals.initializeImpl(Native Method)
	at java.lang.J9VMInternals.initialize(J9VMInternals.java:187)
	at java.lang.Class.forNameImpl(Native Method)
	at java.lang.Class.forName(Class.java:114)
	at org.apache.derby.impl.tools.ij.util.loadDriver(Unknown Source)
	at org.apache.derby.impl.tools.ij.util.loadDriverIfKnown(Unknown Source)
	at org.apache.derby.impl.tools.ij.ij.dynamicConnection(Unknown Source)
	at org.apache.derby.impl.tools.ij.ij.ConnectStatement(Unknown Source)
	at org.apache.derby.impl.tools.ij.ij.ijStatement(Unknown Source)
	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
	at org.apache.derby.tools.ij.main(Unknown Source)
</SNIP>

derby.log with 10.2.2.0 with both database_enabler.jar and jsr169.jar
==========================================================
<SNIP>
2000-04-11 00:51:08.216 GMT:
Shutting down instance c013800d-00de-7320-c6fa-000000846580
----------------------------------------------------------------
2000-04-11 00:51:08.291 GMT Thread[main,5,main] Cleanup action starting
ERROR XBM01: Startup failed due to an exception. See next exception
for details.
	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
	at org.apache.derby.iapi.services.monitor.Monitor.exceptionStartingModule(Unknown
Source)
	at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown
Source)
	at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(Unknown
Source)
	at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Unknown
Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
	at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown Source)
	at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
	at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
	at java.sql.DriverManager.getConnection(DriverManager.java:124)
	at java.sql.DriverManager.getConnection(DriverManager.java:57)
	at org.apache.derby.impl.tools.ij.ij.dynamicConnection(Unknown Source)
	at org.apache.derby.impl.tools.ij.ij.ConnectStatement(Unknown Source)
	at org.apache.derby.impl.tools.ij.ij.ijStatement(Unknown Source)
	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
	at org.apache.derby.impl.tools.ij.Main14.main(Unknown Source)
	at org.apache.derby.tools.ij.main(Unknown Source)
============= begin nested exception, level (1) ===========
java.lang.NoClassDefFoundError: java.nio.channels.ClosedChannelException
	at java.lang.J9VMInternals.verifyImpl(Native Method)
	at java.lang.J9VMInternals.verify(J9VMInternals.java:63)
	at java.lang.J9VMInternals.initialize(J9VMInternals.java:124)
	at org.apache.derby.impl.io.DirFile4.getRandomAccessFile(Unknown Source)
	at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.privGetJBMSLockOnDB(Unknown
Source)
	at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.run(Unknown Source)
	at java.security.AccessController.doPrivileged(AccessController.java:242)
	at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.getJBMSLockOnDB(Unknown
Source)
	at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.boot(Unknown
Source)
	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown
Source)
	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown
Source)
	at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown
Source)
	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown
Source)
	at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Source)
	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown
Source)
	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown
Source)
	at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
	at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
	at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown
Source)
	at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(Unknown
Source)
	at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Unknown
Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
	at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown Source)
	at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
	at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
	at java.sql.DriverManager.getConnection(DriverManager.java:124)
	at java.sql.DriverManager.getConnection(DriverManager.java:57)
	at org.apache.derby.impl.tools.ij.ij.dynamicConnection(Unknown Source)
	at org.apache.derby.impl.tools.ij.ij.ConnectStatement(Unknown Source)
	at org.apache.derby.impl.tools.ij.ij.ijStatement(Unknown Source)
	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
	at org.apache.derby.impl.tools.ij.Main14.main(Unknown Source)
	at org.apache.derby.tools.ij.main(Unknown Source)
============= end nested exception, level (1) ===========
Cleanup action completed
</SNIP>

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.

Does any one here have any idea -
a.) where I may find JSR169 implementation that meets my needs,
assuming that *is* my problem, and
b.) in case that is not my problem, where should I be looking instead?

Thanks a lot for your time (and patience, this was a really long mail!).

Best regards,
Prashanth

-- 
Radioactive cats have 18 half-lives.
                            -- Anonymous
http://padbyappu.blogspot.com
http://www.flickr.com/photos/spadix
http://notaweblog.blogspot.com

Mime
View raw message