Error messages when trying to open Derby databases

User e05b1833aa

23-01-2012 11:48:29

Hi,


I suddenly get the following error messag when trying to open any Derby database:


java.lang.NullPointerException
    at com.im.df.impl.db.sprovider.PropsReadState.proceedToNextState(PropsReadState.java:131)
    at com.im.df.impl.db.sprovider.SchemaProviderImpl.proceedToNextState(SchemaProviderImpl.java:116)
    at com.im.ijc.core.api.util.SchemaInitManager.startInit(SchemaInitManager.java:227)
    at com.im.ijc.core.api.util.SchemaInitManager.access$000(SchemaInitManager.java:53)
    at com.im.ijc.core.api.util.SchemaInitManager$1.run(SchemaInitManager.java:86)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)


I'm not aware of any changes that I made to the system (Ubuntu 10.04) lately that could explain this.


Please advice!

ChemAxon 37bb34e128

23-01-2012 13:06:41

Hi, what version of IJC are you using? Thanks.


-vita

User e05b1833aa

23-01-2012 13:08:42

IJC 5.7.1 (build: 201112231056-164252).


 


Evert

ChemAxon 37bb34e128

23-01-2012 13:44:06

Could you please send me the IJC log file, eg. <ijc-userdir>/var/log/messages.log, from the crashed IJC session? Either attach it here or send it directly to vstejskal _at_ chemaxon.com. It looks like connecting to your DB failed for some reason, which is then obscured by the NullPointerException. Hopefully the log file will reveal the real culprit.


Thanks,
-vita

ChemAxon 37bb34e128

27-01-2012 12:32:10

As per Evert's email the problem vanished with upgrading to IJC 5.8.


Thanks,
-vita

User e05b1833aa

30-01-2012 11:54:56

Looks like we were cheering too fast (I actually was suspicious when the upgrade went so smoothly - they always cause some problem or the other). Now I get the following error for all my Derby databases, when trying to open them (again: this is on Ubuntu Linux 10.04 64-bits):


Connecting to database failed:
Could not get JDBC Connection; nested exception is java.sql.SQLException: No suitable driver found for jdbc:derby:/mnt/compchem/evehom/Projects/IJCProjects/Prototype/.config/localdb/db;upgrade=false


I upgraded Java to version 6 Update 30 but this doesn't make a difference as is seems.


Please advice!

ChemAxon 37bb34e128

30-01-2012 13:09:31

Hi Evert, could you please send me the log file from that IJC session again? It should contain the complete exception, which will tell us more.


Thanks,
-vita

ChemAxon 37bb34e128

31-01-2012 11:52:08

Hi Evert,


looking at the log file I can confirm that this is the same problem as you originally reported with IJC 5.7.1. I'm sorry, but I'm not sure what the problem is. I filed a new JIRA ticket and we will investigate it further.


Thanks,
-vita

User e05b1833aa

01-02-2012 06:08:51

Hi,


I tested what happens if I create a new Derby-type database. This doesn't work either, in the bottom of the I get the attached error.


I have the impression this is a Java issue. How can I test this?

ChemAxon 37bb34e128

01-02-2012 08:44:04

Hi Evert,


I noticed in your log files that IJC is using the original userdir from IJC 5.6 (eg. /mnt/compchem/evehom/.instantjchem/ijc_5_6). This should be ok and is exactly what happens if you keep upgrading IJC via autoupdate (plugin manager).


However, could you please try running IJC with a completely new and empty userdir? You can do that by passing the following commandline parameter when starting IJC: --userdir /tmp/whatever


That will start IJC with an empty userdir and all its settings reset to their defaults. Try creating a new 'IJC Project (local database with demo data). If this works, make a backup copy of the IJC project that's causing you problems and try opening it in this fresh instance of IJC 5.8. IJC may ask you to upgrade the derby database that is in this project. If you upgrade it, you will no longer be able to open this project in IJC 5.7.x. But even if you reach this confirmation dialog it means that IJC is able to open the database. And that would mean that something is wrong with your upgraded .../ijc_5_6 userdir.


Please let me know the results, thanks.
-vita

User e05b1833aa

01-02-2012 12:11:33

Hi again,


Creating a new demo database in a new user dir works fine, but I cannot open an existing database in the fresh 5.8 instance, I get the same error message as previously. IJC does not attempt to upgrade the database either...

ChemAxon 37bb34e128

01-02-2012 14:35:44

Ok, thanks.


Could you try opening your database in Derby's ij commandline tool? The steps would be similar to these:


1. Start the tool from commandline by - $JAVA_HOME/db/bin/ij
3. You should see the 'ij>' prompt.
2. Connect to your database. The command is called 'connect' and accepts the database URL as if you were connecting via JDBC from IJC. On my Ubuntu the commad was:


connect 'jdbc:derby:/home/vita/IJCProjects/ijc-project-59/.config/localdb/db/;upgrade=false';


At this point ij tool will either connect or print an error message. On my machine it prints the error saying that the DB was created by Derby 10.8 engine and can't be opened by this version of ij, which is 10.6. This is correct, because IJC bundles Derby engine 10.8.1.2.


If ij does not connect to the database, please, send me the error message. If it does connect, then please run the following SQL select statement and send me the results. You can simply copy-paste the SQL to ij tool and press enter. You can of course as well post the error/results here.


select syscs_util.syscs_get_database_property(p) from (values 'DataDictionaryVersion') props(p);


Thanks a lot,
-vita

ChemAxon 587f88acea

08-06-2012 11:47:11

I filed a new JIRA ticket and we will investigate it further.


 


______________________________


Kia Health Team