db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Martin <j...@reportmill.com>
Subject Embedded Server *and* client
Date Fri, 10 Jul 2009 22:15:30 GMT
I've written an app that embeds Derby and kicks off the network server  
programatically in a thread using new  
NetworkServerControl().start(null).

This app lets you build and populate a database, then generates an  
applet to view the database. So I'd like to get a local JDBC  
connection to the database as well as allow another process to get a  
remote connection (the applet).

Currently I'm using DriverManager.getConnection() locally. This works,  
but dumps about half a meg of messages to the DriverManager log. I  
worry that it's trying to use the ClientDriver, then failing back to  
this AutoloadedDriver. Any ideas on the best way to get a connection  
to a local server instance?

Thanks!

jeff


Error log: http://reportmill.com/DerbyClientAndServer.txt

Starting Java DB Server in /Users/jeff/Library/Application Support/ 
DataBox/JavaDB
java.sql.SQLException: java.lang.ClassNotFoundException is caught when  
initializing EncryptionManager 'IBMJCE'
	at org.apache.derby.impl.drda.DecryptionManager.<init>(Unknown Source)
	at  
org.apache.derby.impl.drda.NetworkServerControlImpl.<clinit>(Unknown  
Source)
	at org.apache.derby.drda.NetworkServerControl.<init>(Unknown Source)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native  
Method)
	at  
sun 
.reflect 
.NativeConstructorAccessorImpl 
.newInstance(NativeConstructorAccessorImpl.java:39)
	at  
sun 
.reflect 
.DelegatingConstructorAccessorImpl 
.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at java.lang.Class.newInstance0(Class.java:355)
registerDriver:  
driver[className=com.mysql.jdbc.Driver,com.mysql.jdbc.Driver@56466f1d]
DriverManager.initialize: jdbc.drivers = null
JDBC DriverManager initialized
registerDriver:  
driver 
[className 
= 
org 
.apache 
.derby 
.jdbc.AutoloadedDriver,org.apache.derby.jdbc.AutoloadedDriver@2a29052b]
DriverManager.getDriver("jdbc:derby:")
DriverManager.getDriver("jdbc:derby:")
     trying  
driver[className=com.mysql.jdbc.Driver,com.mysql.jdbc.Driver@56466f1d]
     trying  
driver[className=com.mysql.jdbc.Driver,com.mysql.jdbc.Driver@56466f1d]
     trying  
driver 
[className 
= 
org 
.apache 
.derby 
.jdbc.AutoloadedDriver,org.apache.derby.jdbc.AutoloadedDriver@2a29052b]
     trying  
driver 
[className 
= 
org 
.apache 
.derby 
.jdbc.AutoloadedDriver,org.apache.derby.jdbc.AutoloadedDriver@2a29052b]
<< Deleted more...>

Mime
View raw message