- Can you send the stack trace for the NullPointerException? I'd be curious to see if it's happening inside Derby or if it's happening in your code because ds.getConnection() returned null

- If you're running Derby 10.2, you can go to the lib directory and say 'java -jar derbyrun.jar sysinfo'. If you're running 10.1 then you can go do 'java -cp derbytools.jar org.apache.derby.tools.sysinfo'

David

Marl Atkins wrote:
Yea, it's tough for me to pin down.
The actual error I'm getting is nullPointerException.
I get it when I try to create the connection object:

-------------------
public java.sql.Connection openDBase() throws Exception
    {
        ds = new EmbeddedDataSource();
        ds.setDatabaseName("CTMCDBase");
try {
            oCn = ds.getConnection();
            return oCn;
} catch (Exception exp) {
            throw new Exception("Error in CliDBaseConn.openDBase: " +
exp.getMessage()); }
        finally
        {
            oCn = null;
        }
    }
-----------------------

I don't know how to run sysinfo.
If you can tell me where to get the signed derby.jar that you're using that
might help.
I had to sign this one myself so I'm not 100% confident with it.
Again, this app has been working fine and now out of the blue, it throws
that nullPointerException.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of David Van Couvering
Sent: Tuesday, November 28, 2006 1:04 PM
To: Derby Discussion
Subject: Re: Help! Can't connect to DBase

It would be very helpful to provide further information around "can't
connect."  What's the error message and the stack trace?

Also, please run sysinfo and provide that information, knowing which version
is key.  I have been running Derby in an applet for a sample app I am using,
and it's never had a problem.

David

Marl Atkins wrote:
Hi:

I've got an Applet based application that I've been working on for about 3 months.
It creates a Derby database from a MySql database.
It's been working fine.

Today, for no apparent reason, the Applet can't connect to the Derby database. If I use an application with a main proc. in the NetBeans IDE, it still works fine.

I've tried deleting and recreating the database, rebooting . . . The Applet *seems* to be creating the database but then it won't connect to it in the next session.
I connected to it successfully with Squirrel but it didn't see any tables.

Again, this worked and as far as I recall, I didn't change any code.
It still works in the IDE. With the Applet it's apparantly returning null when I try to create a connection object.

I'm running Windows 2000 Pro; my browser is IE 6

Is there an error I could trap besides Exception?
I'm just looking for some ideas, hoping maybe you've run into something like this.
Right now I'm lost. I have no idea how to solve it.

Marl K. Atkins
Microsoft Certified Professional
SoftLink Systems, Inc.
(407) 388-1886




Reply via email to