db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Schlegel <Marc.Schle...@gmx.de>
Subject Re: How To Run Derby on a PocketPC?
Date Wed, 23 Aug 2006 13:15:16 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
Now that I'm able to call Derby-Methods without getting strange
ErrorMessages I need your help again.<br>
I want to use the EmbeddedSimpleDataSource, which is mostly used by
others, but I'm always getting a NullPointerException:<br>
Thats my Code:<br>
<blockquote>public void startDerby() throws DerbyWrapperException {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; try{<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
EmbeddedSimpleDataSource ds = new
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
ds.setDatabaseName("/mydb");&nbsp; // <i>I also tried (on my
desktop) "c:/test/mydb" but it's the same</i><br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
Connection con = ds.getConnection("sa", "");&nbsp; // the same
with ds.getConnection<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }catch(Exception ex){<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; }<br>
I know that the Database is only build at the next request-call and I
think getConnection is one. The path should be no problem?!?!<br>
Thx again<br>

View raw message