Showing posts with label Web Service. Show all posts
Showing posts with label Web Service. Show all posts

Friday, December 4, 2020

ISG Rest Web Service – 500 Internal Server Error Exception

 Symptom/Problem/Error:

When a REST Web Service is invoked, the system immediately return Error Response mentioning “Error 500--Internal Server Error

<html>
   <head>
      <meta content="HTML Tidy for Java (vers. 26 Sep 2004), see www.w3.org" name="generator"/>
      <title>Error 500--Internal Server Error</title>
   </head>
   <body bgcolor="white">
      <font face="Helvetica">
         <br clear="all"/>
      </font>
      <table cellspacing="5" border="0">
         <tr>
            <td>
               <br clear="all"/>
               <h2>
                  <font size="3" color="black" face="Helvetica">Error 500--Internal Server Error</font>
               </h2>
            </td>
         </tr>
      </table>
      <table cellpadding="10" width="100%" border="0">
         <tr>
            <td bgcolor="white" width="100%" valign="top">
               <h3>
                  <font face="Courier New">
                     <font size="3" face="Helvetica">
                        From RFC 2068
                        <i>Hypertext Transfer Protocol -- HTTP/1.1</i>

The error can happen from SOAP UI, Postman or EBS ISG Test Client as well.

The same error can happen when the input XML is not properly parsed. But the error explained here is unrelated.

This typically happen when the service is invoked several times and very frequently. Due to some internal issue, EBS create multiple records in the resultant table.

 

Cause:

Duplicate records are created in “fnd_log_transaction_context” table due to Oracle EBS Bug.

Solution:

Step 1: Get Class ID of Problem Web Service

SELECT FSS.SERVICE_ALIAS, FSS.WSDL_URL, FSS.CLASS_ID, TO_CHAR(FSS.CREATION_DATE,'YYYY-MON-DD') AS CREATED_DATE,
    ICL.CLASS_NAME, ICL.IREP_NAME, ICL.CLASS_TYPE, ICL.PRODUCT_CODE, ICL.SOURCE_FILE_PATH, ICL.SOURCE_FILE_NAME, ICL.DISPLAY_NAME
FROM APPS.FND_SOA_SERVICES FSS, FND_IREP_CLASSES_VL ICL
WHERE FSS.WSDL_URL LIKE '%<Service Name>%%'
AND FSS.CLASS_ID = ICL.CLASS_ID(+)
--AND WSDL_URL LIKE '%/rest/%'   -- get only RESTful Web Services
ORDER BY FSS.SERVICE_ALIAS;

 

Step 2: Identify any service that has created duplicate records in FND LOG Transaction Context (fnd_log_transaction_context) table

select transaction_id, count(*)
from fnd_log_transaction_context
where transaction_type = 'SOA_INSTANCE'
group by transaction_id
having count(*) > 1;

 

Step 3: Delete the records: Replace the transaction_id in query below from the able query results.

DELETE from fnd_log_transaction_context
where transaction_type = 'SOA_INSTANCE'
and transaction_id = < transaction_id>;

 

System will automatically create new record in the table, when the web service is invoked first time after deletion.

No bouncing or Functional Admin Cache Clearing is required for this solution.


Keywords:

Oracle EBS, SOAP, fnd_log_transaction_context, REST, Web Service, R12, R12.2.8 Release, ISG, Integrated SOA Gateway, SOAP UI, Postman, WS

Wednesday, July 22, 2020

isgDesigner.xml ant Error: ISGManagementException: Wrong AdminUserName or/and AdminUserPassword

 

Symptom/Problem/Error:

When the below command is executed from Application Service Unix Box, the error is returned:

Command:

ant -f $JAVA_TOP/oracle/apps/fnd/isg/ant/isgDesigner.xml -Dactions="undeploy" -DserviceType=REST -DirepNames="FND_WEB_SEC"

Result/Error:

     [java] Invoking undeploy method on class Id : 2365...

     [java] oracle.apps.fnd.isg.mgmt.common.error.ISGManagementException: Wrong AdminUserName or/and AdminUserPassword or/and Server not reachable or/and Unknown jmxUrl

 

 

Cause:

Incomplete or incorrect ISG Setup.

 

Solution:

To implement the solution test the following steps in a development instance and then migrate accordingly:

 

Step 1. Reset the ASADMIN password:

 

1. Check that the permission of isgagent.zip are set to 777

2. Follow Oracle Metalink Note 1311068.1, "Section 3: Enabling ASADMIN User with the Integration Administrator Role"

 

3. On the Web Logic Server, Log into the WebLogic Server Administration Console. This will require special login link to the console. The user details are different from database. Contact Admin for access details.

a. Expand Service -> Data Source -> Select the link of the correct Data Source.

b. Configuration -> Connection Pool

c. Check inside the Properties box:

  - The 'User's property would normally be set to 'ASADMIN' e.g. user=ASADMIN

  - There should be dbcFile defined 

e.g. dbcFile=/<directory path>/<dbc file name>.dbc 

Make sure the <path> and <file name> are absolute, present in the middle tier and has access permissions.

  - If the password of the user provided here has been changed on the EBS Side, then update the password parameter with the new(same) password and confirm password.

d. Restart the Data Source if any of the above was updated.

 

4. Also in Web Logic Server (WLS) complete the following steps:

 

a. Navigate to bifoundation_domain - Services - Security Realms.

b. Select myrealm.

c. Select User Lockout tab.

d. Disable Lockout Enabled option.

e. Save

 

5. Use the below SQL statement to check whether ASADMIN user exists in fnd_vault or not. If the user exists in fnd_vault then this statement will return its password, otherwise it will return nothing.

 

select FND_VAULT.get('ISG', 'ASADMIN') from dual;

 

If the user does not exist, add it using the following statement:

   SQL> @$FND_TOP/sql/afvltput.sql FND ASADMIN <ASADMIN_PASSWORD>

 

Step 2. Undeploy the web service, then retest the configuration steps from section 6.2 and confirm the complete without error.

 

Keywords:

Oracle EBS, SOAP, REST, isgDesigner.xml, ant, ISGManagementException, AdminUserName, AdminUserPassword, ASADMIN, Web Service, R12, R12.2.8, ISG, Integrated SOA Gateway

Monday, October 22, 2018

ISG Error: java.lang.SecurityException: User: ASADMIN~~, failed to be authenticated

 Symptom/Problem/Error:

Responsibility: Integrated SOA Gateway (ISG) Administrator

Path: Search for a Service, Publish or Unpublish

The request fails with error message “java.lang.SecurityException: User: ASADMIN~~DEV, failed to be authenticated.”

We use the EBS Release 12.2.8 and REST web services by ISG. However, this error can occur in multiple R12.2 versions. Also both SOAP and REST calls can have the same issue.

This happens when you access a new instance after cloning.

 

Cause:

Two possible causes to this issue:

1.    Error with EBS Standard Functionality: Make sure the Patch 27949145:R12.OWF.C is applied in the instance

2.    Standard ISG Configuration files are created or updated properly

 

Solution:

Step 1: Apply Patch 27949145:R12.OWF.C.

Step 2: If the issue is not resolved by the Patch, make sure to review and correct ISG Configuration files. Here are all the configuration files:

  • $INST_TOP/soa/isgagent.properties
  • $JAVA_TOP/oracle/apps/fnd/txk/util/isg_contextfile.properties
  • $RUN_BASE/EBSapps/comn/clone/jlib/java/oracle/apps/fnd/txk/util/isg_contextfile.properties
  • $RUN_BASE/EBSapps/comn/adopclone_<context>/jlib/java/oracle/apps/fnd/txk/util/isg_contextfile.properties

Review User Name, Password and Instance UI Links in these files. Probably they are not updated after cloned from Production.


Keywords:

Oracle EBS, SOAP, REST, SecurityException, ASADMIN, failed to be authenticated, Web Service, R12, R12.2.8, ISG, Integrated SOA Gateway, SOAP UI, WS