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">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi<br>
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>
<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
EmbeddedSimpleDataSource();<br>
&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;
ds.setCreateDatabase("create");<br>
&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;
ex.printStackTrace();<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; }<br>
</blockquote>
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>
<br>
Thx again<br>
--Marc<br>
</body>
</html>

Mime
View raw message