dstrack / Document-AI-Scanner

Oracle APEX App for OCI Document Understanding AI
BSD 2-Clause "Simplified" License
3 stars 1 forks source link

ORA-20004: Credential "WKSP_Al" "APEX_OCI_CREDENTIAL" does not exist #1

Closed techwork2040 closed 8 months ago

techwork2040 commented 8 months ago

Hello, Received the following error when I tried to upload an invoice: ORA-20004: Credential "WKSP_Al" "APEX_OCI_CREDENTIAL" does not exist Thanks for your assistance in advance.

dstrack commented 8 months ago

Please read Page 26-27 of the 'Document AI Scanner App - Application Guide.pdf'. You have to add Web Credentials with Credential Static ID: APEX_OCI_CREDENTIAL in you APEX workspace.

techwork2040 commented 8 months ago

I already added the web creational to the workspace. Please see screenshot.

Screenshot 2024-02-02 at 2 38 30 PM
techwork2040 commented 8 months ago

Looking at the configuration screen, there are two fields: Wo Credential Id = APEX_OCI_CREDENTIAL Cloud Credential Id = APEX_OCL CRED

Screenshot 2024-02-02 at 2 46 16 PM

\

dstrack commented 8 months ago

Wc_Credential_Id = 'APEX_OCI_CREDENTIAL' -- Static Name of the Web-Credentials in APEX Workspace cloud_credential_id = 'APEX_OCI_CRED' -- Credential name for DBMS_CLOUD Object Store access

dstrack commented 8 months ago

Follow the Example OCI configuration on page 26. You need as IAM User with API Key (for the APEX_OCI_CREDENTIAL) and an Auth token to allow APEX ( using APEX_OCI_CRED for) the web storage access.

techwork2040 commented 8 months ago

Wc_Credential_Id = 'APEX_OCI_CREDENTIAL' -- Static Name of the Web-Credentials in APEX Workspace cloud_credential_id = 'APEX_OCI_CRED' -- Credential name for DBMS_CLOUD Object Store access

Where the "Credential name for DBMS_CLOUD Object Store access" should be created?

dstrack commented 8 months ago

When you run the app, open the config page, enter the password in field Cloud Password, and then press 'Save Credentials' the procedure Document_Scan_Ai_Pkg.set_cloud_credentials will be called. this procedure calls DBMS_CLOUD.CREATE_CREDENTIAL or DBMS_CLOUD.UPDATE_CREDENTIAL. search in the app for DBMS_CLOUD.CREATE_CREDENTIAL to learn more.

The file Document_Scan_Ai_Config.sql has example calls commented out at the bottom. You can execute the code in the SQL Console in APEX with the proper parameters.

dstrack commented 8 months ago

Thank you for helping me to improve the documentation. Please let me know if your installation is running or not. Is the issue solved for you?

Regards, Dirk Strack

techwork2040 commented 8 months ago

thank you for following up. Adding the password in the Configuration worked, however, got a different error after loading the document. "Error during rendering of page item P4_CONTEXT_ID.

Technical Info (only available for developers)

is_internal_error: true apex_error_code: WWV_FLOW_FORM.UNHANDLED_ERROR ora_sqlcode: -942 ora_sqlerrm: ORA-00942: table or view does not exist"

Think I still missing some configuration steps. I assume I need to change the Workspace ID in the following: "SELECT DISPLAY_VALUE, ID FROM Weco_Tower1.VADRESSEN_LOV WHERE WORKSPACE$_ID = 124 ORDER BY 1" Also, do you have a demo or available to provide a demo, and possibly consultation service?

dstrack commented 8 months ago

The connection to an accounting system is not part of the code that I have provided for free. The schema objects in the example configuration are not part of the provided software but have to be implemented by you. The file in source that begin with Accounting_ shows an example of how to implement the connection, but it will not compile without all the schema objects that are not provided in the example.

My intention was to enable other users to execute the example app without a context from an accounting database.

Im glad to help you if you get in contact via email Strack.Software@t-online.de

dstrack commented 8 months ago

In the Configuration page remove the entries for 'Context Id Query', 'Context Fields Query', 'Address Id Query', 'Find Address Function', 'Invoice Export View' and 'Invoice Export Procedure'. to avoid ORA-00942: table or view does not exist".

dstrack commented 8 months ago

A new version of the application has been released to fix your problem with the default parameter. Please get in contact via email if you need a link to a demo. I can not publish this link to the public because it is a paid service. Thank you for your patience.

Please let me known if the issue is fixed.