database-plugin icon indicating copy to clipboard operation
database-plugin copied to clipboard

Unable to connect on Oracle ADW

Open mut opened this issue 3 years ago • 13 comments

Hello, it is unable to connect the plugin to the Oracle Autonomous Data Warehouse using mTLS connection: the TNS listener is correctly configured and working using other jdbc connections.

Opening the jar, it seems that the plugin lacks some needed libraries like ucp.jar

I'm available for testing, thank you in advance for your help! Andrea

ArchiConfigAndLog.zip

mut avatar Jan 17 '22 07:01 mut

Hi,

Thanks for raising this. I do not have Oracle Autonomous Data Warehouse so cannot test it on my own. I just sent a test release in which I added the ucp.jar library file as you suggested. If your tests show that this library solves your issue, then I'll add it to the main branch.

You may access the test release by selecting the "add_Oracle_ucp_jr" branch: image

Best regards Hervé

herve91 avatar Jan 17 '22 10:01 herve91

By the way, reading a bit Oracle's documentation ... Did you try to set javax.net.ssl.trustStore parameter in Archi's ini file ?

herve91 avatar Jan 17 '22 10:01 herve91

just in case, I also released a version with Oracle's oraclepki.jar, osdt_core.jar and osdt_cert.jar.

Hope this helps. Hervé

herve91 avatar Jan 17 '22 10:01 herve91

Hi, Did you check the version with the libraries you requested ? Did it fix your issue ?

Thanks

herve91 avatar Jan 21 '22 08:01 herve91

Hi, Did you have time to check if adding the libraries solves your issue ?

Thanks

herve91 avatar Jan 27 '22 10:01 herve91

Hi @herve91, sorry for late, I will test in these days,

Thanks!

mut avatar Feb 01 '22 09:02 mut

Hi I tried both the plugin versions you provided with our Oracle ADW deployment. Here are the results:

  • org.archicontribs.database_4.9.4.test-ucp.archiplugin not working
  • org.archicontribs.database_4.9.4.test-orapki.archiplugin:
    • DB Check and table structure creation working:
      • SSL connection is established correctly without the need to set javax.net.ssl.trustStore in the INI file
      • ADW Wallet location has been set using TNS_ADMIN environment variable
    • Model export to DB not working (error popup screenshot follows): the Italian part of the error in the popup can be translated as ORA-01400: cannot insert NULL into ("ODS_ARCHI"."PROFILES_IN_MODEL"."PIM_ID") where ODS_ARCHI is the schema used in our DB immagine

Thanks Giovanni

gcoriasco avatar Feb 01 '22 10:02 gcoriasco

Hi,

Happy that you can now connect to your database. I will add the Oracle libraries in the plugin mainstream.

Regarding your error message, it is due to a NULL constraint added on columns that cannot be NULL (obviously). Of course, this situation should never happen. More specificallyn the PIM_ID column is a purely technical ID that is generated by Oracle during the insert, using a trigger.

How did you initialize the database ? Has it been initialized by the plugin or did you export/import a model from another database ?

Best regards Hervé

herve91 avatar Feb 02 '22 13:02 herve91

Hi Hervé, Actually the database had just been initialized by the plugin and that was the first attempt to export an archimate model.

Regards Giovanni

gcoriasco avatar Feb 02 '22 16:02 gcoriasco

Hi Giovanni,

I just realised that I did not answer your last post. I've conducted few tests and I believe I've found the reason why you're experiencing this error message.

I should be able to send you a corrected version in the coming days.

Best regards Hervé

herve91 avatar Feb 08 '22 16:02 herve91

Hi Hervé,

No problem. On the contrary, thank you. I will test new version as soon as I can.

By the way, I take this opportunity for going a bit off thread (my apologies) with another question: is there a way to make the plug-in use the database as just output overwriting any existing data related to the current model and avoiding two-way syncing?

Thanks in advance

Giovanni

gcoriasco avatar Feb 09 '22 18:02 gcoriasco

Hi Hervé, we disabled the table constraints to make the db export working (of course actually the PIM_ID column is always NULL). In the meantime have you identified the error?

Thank you in advance, Andrea

mut avatar Mar 10 '22 09:03 mut

Hi Andrea, Yes I have identified the issue but I lack time to release a new version of my plugin. Cancelling the constraint may have impacts on the plugin as the column is supposed to be not null as it is the primary key.

As the plugin is retro-compatible with older versions of Oracle that do not implement auto-increment columns. So the plugin is supposed to create triggers that auto-increments the PIM_ID column and the anomaly concerns the creation of this trigger.

You may manually create this trigger using the following SQL request after b eing connected to the schema where you created the plugin tables: CREATE OR REPLACE TRIGGER seq_profiles_in_model BEFORE INSERT ON profiles_in_model FOR EACH ROW BEGIN SELECT seq_profiles_in_model.NEXTVAL INTO :NEW.pim_id FROM DUAL;END;

Please let me know it solves your issue or if you need further assistance.

Best regards Hervé

herve91 avatar Mar 10 '22 10:03 herve91

closed as no answer

herve91 avatar Sep 07 '22 09:09 herve91