Skip to Main Content
  • Questions
  • Unable to open file even though given correct file path wile reading certificate from wallet

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Ranga Prasad.

Asked: July 18, 2016 - 12:54 pm UTC

Last updated: July 22, 2016 - 7:25 pm UTC

Version: 11.2.0.1.0

Viewed 10K+ times! This question is

You Asked

Hi Tom ,

We have requirement to communicate payment gateway through https from plsql. so we used SSL through wallets.
But in 11.2.0.1.0 we are unable to read file from wallet even though correct file path provided.
I gone through below link also it doesn't solve my problem.

https://asktom.oracle.com/pls/apex/f?p=100:11:16512428708340::::P11_QUESTION_ID:921629345219

Below is the code we used.

Declare
M_req utl_http.req;
M_resp utl_http.resp;
l_response_text  CLOB;
--l_list json_list;
buf VARCHAR2(32767);
Begin
 utl_http.set_wallet('file:C:\app\product\11.2.0\dbhome_1\BIN\owm\wallets\AXIA', 'xxxxx');
 M_req :=  utl_http.begin_request('https://demowebsite.com/organization_mapping?api_id=abcd'||'&'||'api_token=xyz');
 utl_http.set_header(M_req, 'Accept', 'application/testfusion+json');
   M_resp := UTL_HTTP.get_response(M_req);
 Begin
  LOOP
   UTL_HTTP.read_text(M_resp, buf);
   l_response_text := l_response_text || buf;
  END LOOP;
 EXCEPTION
  WHEN UTL_HTTP.end_of_body THEN
      NULL;
 End;
 --l_list := json_list(l_response_text);
 dbms_output.put_line(l_response_text);
UTL_HTTP.end_response(M_resp);
EXCEPTION
  WHEN UTL_HTTP.end_of_body THEN
    UTL_HTTP.end_response(M_resp);
End;
/


Always I am getting below error

ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1130
ORA-28759: failure to open file
ORA-06512: at line 9

Please help in fixing issue.

Thanks in Advance,
S Ranga Prasad.

and Connor said...

a) make sure your wallet is in the location you are specifying
b) make sure the permissions on the wallet are correct
c) make sure the wallet is auto-login

These are the most common causes of this error that I see

Rating

  (6 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

A reader, July 21, 2016 - 12:38 pm UTC

Can you post your sqlnet.ora file?

What are possible permissions for wallet

Ranga Prasad Singari, July 21, 2016 - 12:54 pm UTC

Hi Connor McDonald,

Thanks for your response. I am sure on point a and c both are correct. I need clarification on point b only.

Can you please elaborate more on below point. What are the possible permissions on wallet and how we can give.

b) make sure the permissions on the wallet are correct

Thanks and Regards,
S Ranga Prasad
Connor McDonald
July 22, 2016 - 7:21 pm UTC

Make sure the wallet is accessible by the account that the database is running under.

SQLNet.ora file

Ranga Prasad Singari, July 21, 2016 - 1:02 pm UTC

Below is SQnet.ora file content.

# sqlnet.ora Network Configuration File: C:\app\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.

# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

Help

A reader, July 21, 2016 - 4:30 pm UTC

Hellow
S Ranga Prasad ,
Where is a wallet location in sqlnet.ora file?

Wallet Location Added in sqlnet.ora also got same error

Ranga Prasad Singari, July 22, 2016 - 11:02 am UTC

Hi ,

Even though I added below statement in sqlnet.ora i got same error.

WALLET_LOCATION =
(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=C:\app\product\11.2.0\dbhome_1\BIN\AXIA)))


Thanks and Regards,
S Ranga Prasad
Connor McDonald
July 22, 2016 - 7:25 pm UTC

You might also like to try a sqlnet trace to see if that helps determine where the fault lies.

A reader, July 23, 2016 - 4:02 am UTC

Hello S Ranga Prasad, Try to below , you may got solution

WALLET_LOCATION=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=C:\app\product\11.2.0\dbhome_1\BIN\AXIA)))

SQLNET.WALLET_OVERRIDE = TRUE
SSL_CLIENT_AUTHENTICATION = FALSE
SSL_VERSION = 0

More to Explore

CLOB/BLOB/etc

Complete documentation on Securefiles and Large Objects here