ORA-29259: fim da entrada

Dúvidas, dicas e truques de PL/SQL. Aqui também vão assuntos relacionados a pacotes, triggers, funções, Java-Stored Procedures, etc
Responder
Avatar do usuário
als04545
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Mensagens: 5
Registrado em: Seg, 21 Mar 2011 7:53 am
Localização: Lins - SP
Carlos Silva
" Nunca me preocupo com o futuro... muito em breve, ele virá. " Albert Einstein

Olá.

Tenho uma API que consumo via UTL_HTTP, Oracle 11g. A URL está utilizando protocolo HTTP. E funcionando corretamente para muitas das requisições transitando JSON.

Mas, peguei alguns casos que a integração fica 2 minutos processando e ocorre o erro ora-29259: fim da entrada.

Se passo o mesmo arquivo(JSON), que tentei integrar via Oracle no Postman ele funciona corretamente.

Alguém já passou por isso ou pode me dar uma direção? :cry:
Avatar do usuário
dr_gori
Moderador
Moderador
Mensagens: 5024
Registrado em: Seg, 03 Mai 2004 3:08 pm
Localização: Portland, OR USA
Contato:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

Tem um DOC que pode ter a solução que você precisa:

Selecionar tudo

APPLIES TO:
PL/SQL - Version 11.2.0.1 and later
Oracle Database - Enterprise Edition - Version 11.2.0.1 and later
Generic (Platform Independent)
SYMPTOMS
When attempting to call a secured web service (HTTPS) using an Oracle wallet file, via the UTL_HTTP package, it fails with:

ORA-29259: end-of-input reached
or:

ORA-29263: HTTP protocol error  
CHANGES
None. 

CAUSE
The correct Access Control List (ACL) permission has not been configured for the Oracle wallet. 

SOLUTION
When using an Oracle wallet file, an Access Control List needs to be configured for the Oracle wallet.

Version 11g
Use the following method to configure an Access Control List for the Oracle wallet by replacing the parameter values as appropriate:

SET SERVEROUTPUT ON
BEGIN
  DBMS_NETWORK_ACL_ADMIN.CREATE_ACL
  (
    ACL         => '<name_of_the_XML_file>',
    DESCRIPTION => '<description_for_ACL>',
    PRINCIPAL   => '<user_or_role>',
    IS_GRANT    => TRUE,
    PRIVILEGE   => '<privilege_name>',
    START_DATE  => NULL,
    END_DATE    => NULL
  );
EXCEPTION WHEN OTHERS THEN
  DBMS_OUTPUT.PUT_LINE('Error occurred while creating ACL: '|| SQLERRM);
END;
/
For the PRIVILEGE parameter, use one of the following case-sensitive values (note the use of hyphens in these privilege names):

use-passwords to give the user permission to use passwords in the wallet.
use-client-certificates to authenticate the user with a client certificate in the wallet.
If both are required, the second one can be added by calling DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE:

BEGIN
  DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE
  (
    ACL => '<name_of_the_XML_file>',
    PRINCIPAL => '<user_or_role>',
    IS_GRANT => TRUE,
    PRIVILEGE => '<privilege_name>'
  );
EXCEPTION WHEN OTHERS THEN
  DBMS_OUTPUT.PUT_LINE('Error occurred while adding privilege to ACL: '|| SQLERRM);
END;
/
Next, assign the Access Control List to the Oracle wallet:

BEGIN
  DBMS_NETWORK_ACL_ADMIN.ASSIGN_WALLET_ACL
  (
    ACL         => '<name_of_the_XML_file>',
    WALLET_PATH => 'file:<directory_path>'
  );
EXCEPTION WHEN OTHERS THEN
  DBMS_OUTPUT.PUT_LINE('Error occurred while assigning ACL to wallet: '|| SQLERRM);
END;
/
For the WALLET_PATH parameter, use the absolute path and include file: before it. The directory path is case sensitive. Do not use environment variables such as $ORACLE_HOME in the path. 

Version 12.1 and above
Use the following method to configure an Access Control List for the Oracle wallet by replacing the parameter values as appropriate:

SET SERVEROUTPUT ON
BEGIN
  DBMS_NETWORK_ACL_ADMIN.APPEND_WALLET_ACE
  (
    WALLET_PATH => 'file:<directory_path>',
    ACE => XS$ACE_TYPE(
                        PRIVILEGE_LIST => XS$NAME_LIST('<privilege1>'[,'<privilege2>']),
                        PRINCIPAL_NAME => '<user_or_role>',
                        PRINCIPAL_TYPE => XS_ACL.PTYPE_DB
                      )
  );
EXCEPTION WHEN OTHERS THEN
  DBMS_OUTPUT.PUT_LINE('Error while configuring ACL for wallet: '|| SQLERRM);
END;
/
When granting an ACL to an Oracle Wallet, the PRIVILEGE_LIST must contain either or both of use_client_certificates or use_passwords as appropriate. Note the use of underscores in these privilege names.

For the WALLET_PATH parameter, use the absolute path and include file: before it. The directory path is case sensitive. Do not use environment variables such as $ORACLE_HOME in the path.

Documentation References
11g: Oracle Database Security Guide, chapter 4, "Configuring Privilege and Role Authorization", section "Managing Fine-Grained Access in PL/SQL Packages and Types", subsection "Configuring Access Control to a Wallet".

12.1 and above: Oracle Database Security Guide, chapter 6, "Managing Fine-Grained Access in PL/SQL Packages and Types", section "Configuring Access Control to an Oracle Wallet".
Responder
  • Informação
  • Quem está online

    Usuários navegando neste fórum: Nenhum usuário registrado e 16 visitantes