Null ID with IJC database

User 369425e3ae

23-09-2009 15:39:27

I am trying to use the IJC database to handle user namses and passwords.  Since doing this when I try to create a view I get an error:


ORA-01400: cannot insert NULL into ("user","IJC_VIEWS","ID").


I am guessing that the ID field is NULL.  What did I miss in setting this up?  I was able to get the grid view with the default schema security settings.  So I am guessing that it is something I am missing in using the IJC database.


I tried deleting the old tables created with the default security to see if they needed to be created with the new security settings, but that did not work.


Derek


 

ChemAxon fa971619eb

23-09-2009 16:04:26

Its not really clear what is wrong from just that information. Could you send more info about the error. It should be found in the log file which can be shown by using View -> Instant JChem Log File.


There should be no problem with using items that were created before you applied the security. If all else fails delete all the IJC_* tables from schema and then create the IJC database again, and then set up the security and add the users.


Tim

User 369425e3ae

23-09-2009 16:11:54

Tim,


Attached is the log file.  Thank you for the help.


Derek

ChemAxon fa971619eb

23-09-2009 17:01:19

Thanks for the log file.


I think the problem is caused by an error that happens earlier. In the log file you will see an error like this:


org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 1 in XML document from resource loaded from byte array is invalid; nested exception is org.xml.sax.SAXParseException: Content is not allowed in prolog.


This looks be be happening because the XML file containing the security configuration is invalid. Maybe some invalid characters were entered.


I would suggest setting up the security again, using a fresh template and hopefully that will fix it.


If you still have problems please send the XML for the security definition (remove any sensitive info liek passwords first).


 


Tim


 

User 369425e3ae

23-09-2009 17:49:51

Tim,


Unfortunately I no longer seem to be able to change the security settings.  When I change the settings to use the IJC databaseand then try to discionnect/reconnect to edit the users/passwords  it doesn't allow me to log in with the username/password of the schema creator.


Where is the security xml located?


Derek


 

ChemAxon fa971619eb

23-09-2009 18:05:15

The security config is stored in the database table IJC_SECURITY_INFO. You should find just one row in this table. If you delete that row then you will revert back to default security.


 


Tim

User 369425e3ae

23-09-2009 19:27:42

Tim,


OK, I am back to the orioginal error.  I will figure out how to export that table and send it to you.


Derek

User 369425e3ae

23-09-2009 21:15:05

Tim,


Here is an export of the table.  I added 3 users, but do not see their names in the output


Derek

ChemAxon fa971619eb

26-09-2009 07:14:18

This topic was followed up via email and now seems to be resolved.


This was done by using an IJC instance running on the same machine as the Oracle DB and deleting the IJC_* meta data tables and starting from fresh. Its not 100% clear what the cause was as creating an IJC in an Oracle DB from IJC usually goes without any problems.


Tim