Troubleshooting

Checking the connection to AME Server

Testing from a command prompt

curl -X POST -H 'Content-Type: application/json' -d @test.json http://api.apexmediaextension.com/ > test.jpg

Note, if you are in windows environment you can download curl from https://curl.haxx.se/download.html#Win64)

Testing from a REST client

Instead of using curl you can also use a RESTClient like Postman. You will have to add the header 'Content-Type: application/json' and give the data from the test.json into the body section.

Testing from PL/SQL

select apex_web_service.make_rest_request('http://api.apexmediaextension.com/', 'GET') from dual

Testing from Oracle APEX

Go into APEX > SQL Workshop, and try to connect to the AME server

select apex_web_service.make_rest_request('http://api.apexmediaextension.com/', 'GET') from dual

Error ORA-29273: HTTP request failed

If you receive error ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP", line 1130 ORA-24247: network access denied by access control list (ACL) it means that your APEX_XXXXXX schema has not the rights to connect to the APEX Media Extension server (http(s)://api.apexmediaextension.com for the Cloud version or your local URL in case of the on-premise version). The script to correct the issue can be found under the ACL issue section in the Oracle APEX documentation. E.g. for APEX 18.1, APEX 18.2, APEX 19.1.

Error ORA-29024: Certificate validation failure

If you receive error ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP", line 1130 ORA-29024: Certificate validation failure, you need to take into account the certificates. There're two ways to get around this:

  • Option 1: You can load our certificates in your Oracle wallet (the Oracle DB is doing the call to our server).
  • Option 2: You can add an entry in your webserver so a local entry is called by the database (which doesn't need a certificate) and the webserver is doing the redirect to handle the https call.

Here's an example when in the plug-in you would specify a local address: http://apexrnd.localdomain/ame/

<VirtualHost *:80>
ServerName  apexrnd.localdomain
ServerAlias apexrnd.localdomain
RewriteEngine On
ProxyVia On
ProxyRequests Off
SSLProxyEngine On
ProxyPass        /ame/   https://api.apexmediaextension.com/
ProxyPassReverse /ame/   https://api.apexmediaextension.com/
</VirtualHost>

ORA-29273: HTTP request failed ORA-12535: TNS:operation timed out

Please check your firewall if it allows outgoing connection from the database to the AME server. If you added the AME port to the firewall rules, make sure to restart the daemon.

If you're using a proxy, make sure to specify the proxy in Shared Components > Application Definition Attributes > Proxy Server or specify the global variable in the AME_API_PKG.g_proxy_override.

Error occurred while acquiring license or out of credits error

You receive: "Error occurred while acquiring license. Please make sure that your API key is correct and that you have enough printing credits. Contact AME if the problem persists."

This means you ran out of credits. Go to https://www.apexmediaextension.com and upgrade your package or send an email to support@apexmediaextension.com to see what we can do for your case.

The requested URL has been prohibited

If in APEX you force all outgoing connections to be HTTPS by setting: Manage Instance -> Security -> HTTP Protocol -> Require Outbound HTTPS -> No.

make sure you're calling AME also with HTTPS. If you're calling the AME cloud https://api.apexmediaextension.com make sure to load the certificate in your database or setup a proxy on your end.