views:

389

answers:

2

Every time I try to run a small application that uses a Derby DB I get this error message:

Message: Database at /path/to/db/TheDB has an incompatible format with the current version of the software. The database was created by or upgraded by version 10.4.

I've added the library from Netbeans, and still have the same problem.
I'm not sure what to do here.

A: 

Hmmm, all I have to do was to add the proper derby.jar manually to the project.
A simple copy command operation:

cp /opt/Apache/derbyinstall/lib/derby.jar /path/to/project/dist/lib/

...did the job. The problem was that: I did this operation from Netbeans, and I don't know why, Netbeans didn't update the jar file. Weird, but fixed. :)

ramayac
A: 

The version included with Netbeans might be old (Derby 10.2 as of NB 6.0). If you added Derby via the project properties and added the "Library", then you probably had the old version.

You can update the library by going to Tool -> Libraries. Select "Java DB Driver". Delete the jar references and update them to point at your 10.4 version.

If you added the JAR file to the project properties AND had the library added, then NB may have grabbed the first/last JAR it found in the list...

James Schek
Excelent, thanks!
ramayac