Showing posts with label REST. Show all posts
Showing posts with label REST. 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

Tuesday, April 7, 2020

EBS Custom Servlet Error: Error 404-- server has not found anything matching the Request-URI

 

Scenario:

Add a new custom servlet to EBS. Try to access the servlet from UI (Oracle Applications Front-End). The screen displays error below:

Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

We use R12.2.8. Error can happen in any version of R12 Integrated SOA Gateway (ISG) Web Services.

 

 

Cause:

The Custom Servlet needs to be mapped to Web.XML File.

In Orion based servers (12.2.8 or higher), the Web.xml file will get overwritten by Custom Tmp file contents during Middle Tier bouncing. In this cases the custom/ oacore_web_xml_FMW.tmp file needs to be mapped.

Relevant Folders:

Web.xml à $OA_HTML/WEB-INF

          Eg: /appsR122/DEV/fs2/FMW_Home/Oracle_EBS-app1/applications/oacore/html/WEB-INF

oacore_web_xml_FMW.tmp à $RUN_BASE/EBSapps/appl/fnd/12.0.0/admin/template/custom

          Eg: /appsR122/DEV/fs2/EBSapps/appl/fnd/12.0.0/admin/template/custom

 

Note: Create custom folder, if it is not present

Another error (no permissions to resource) is caused due to missing mapping for the resource. This is done by Resource Import command. It is mentioned in another post.

Solution:

1.    Create new mapping for the Servlet in oacore_web_xml_FMW.tmp file:

<!-- XXABC Entry for Custom Payment Configurations to Cyber Source - Begin -->
 
    <servlet-mapping>
    <servlet-name>XxabcLoopBackServletCys</servlet-name>
    <url-pattern>/oramipp_cys/*</url-pattern>
    </servlet-mapping>
 
     <servlet>
     <servlet-name>XxabcLoopBackServletCys</servlet-name>
     <servlet-class>xxabc.oracle.apps.iby.bep.loop.XxabcLoopBackServletCys</servlet-class>
       <init-param>
         <param-name>debug</param-name>
         <param-value>true</param-value>
       </init-param>
    </servlet>
    
<!-- XXABC Entry for Custom Payment Configurations to Cyber Source - End -->
2.    Bounce middle tier

3.    Make sure web.xml is updated and the mapping is present in web.xml file

 

Keywords:

Oracle EBS, R12, R12.2.8, Oracle Applications, ASADMIN, ISG, Integrated SOA Gateway, Web Services, REST, RestFul, oacore_web_xml_FMW.tmp

Monday, November 11, 2019

EBS JarSigner: Example Usages

 

What is JarSigner ?

A Custom Java JAR file needs to be signed using digital signature before it to be used for Oracle Application Server. This is to ensure file integrity and improve security. JarSigner command is used to create the signed JAR file.

This page give some examples of using JarSigner command.

JarSigner Examples:

Please substitute Password123 with your own Store Pass and Key Pass. Please substitute DEV_devappsap01 with your Middle Tier / Application Server name.

 

1) Generate Keypair for code signing certificate

 

2) Import root certificate to cacerts

 

keytool -import -alias YOUR_ALIAS -file root.crt -trustcacerts -v -keystore cacerts

 

3) Import intermediate certificate to adkeystore.dat

 

keytool -import -file intermediate.crt -trustcacerts -alias YOUR_ALIAS -keystore adkeystore.dat

 

4) Import Code Signing Cert (code signed cert would have been copied to adkeystore.crt)

 

adjkey -import -file adkeystore.crt -trustcacerts

 

5) On your User Desktop import the certificates in this order to Java

 

 
 
command -
$adjava oracle.apps.ad.jri.adjmx -areas $JAVA_TOP/customprod.zip -outputFile $JAVA_TOP/customprod.jar -jar $CONTEXT_NAME 1 CUST jarsigner -storePass Password123 -keyPass Password123
 
Error
 
ERROR: JarSigner subcommand exited with status 1
 
JarSigner standard output:
jarsigner: Certificate chain not found for: DEV_devappsap01.  DEV_devappsap01 must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.
 
Flag
 
adjava oracle.apps.ad.jri.adjmx -areas $JAVA_TOP/customprod.zip -outputFile $JAVA_TOP/customprod.jar -jar $CONTEXT_NAME 1 CUST jarsigner -storePass <KeyStore Password> -keyPass <Key Password>
 
 
adjava oracle.apps.ad.jri.adjmx -areas $JAVA_TOP/customprod.zip -outputFile $JAVA_TOP/customprod.jar -jar $CONTEXT_NAME 1 CUST jarsigner -storePass "Password123" -keyPass "Password123"
 
 
adjava oracle.apps.ad.jri.adjmx -areas $JAVA_TOP/customprod.zip -outputFile $JAVA_TOP/customprod.jar -jar "DEV_devappsap01" 1 CUST jarsigner -storePass "Password123" -keyPass "Password123"
adjava oracle.apps.ad.jri.adjmx -areas $JAVA_TOP/customprod.zip -outputFile $JAVA_TOP/customprod.jar -jar $CONTEXT_NAME 1 CUST jarsigner -storePass "Password123" -keyPass "Password123"
 
 
 
adjava oracle.apps.ad.jri.adjmx -areas ./customprod.zip -outputFile ./customprod.jar -jar "DEV_devappsap01" 1 CUST jarsigner -storePass "<pwd>" -keyPass "<pwd>"
 
 
 
LD_LIBRARY_PATH=/appsR122/
DEV/fs1/EBSapps/10.1.2/jdk/jre/lib/sparc:/appsR122/DEV/fs1/EBSapps/10.1.2/jdk/jre/lib/sparc/native_threads:/appsR122/DEV/fs1/EBSapps/appl/cz/12.0.0/bin:/appsR122/DEV/fs1/EBSapps/10.1.2/lib32:/appsR122/DEV/fs1/EBSapps/10.1.2/lib:/usr/dt/lib:/usr/openwin/lib:/appsR122/DEV/fs1/EBSapps/10.1.2/jdk/jre/lib/sparc:/appsR122/DEV/fs1/EBSapps/10.1.2/jdk/jre/lib/sparc/native_threads:/appsR122/DEV/fs1/EBSapps/appl/sht/12.0.0/lib:/appsR122/DEV/fs1/EBSapps/10.1.2/jdk/jre/lib/sparc/client
 
adjava oracle.apps.ad.jri.adjmx -areas $JAVA_TOP/customprod.zip -outputFile $JAVA_TOP/customprod.jar -jar "DEV_devappsap01" 1 CUST jarsigner -storePass "Password123" -keyPass "Password123"
 

 

 

Keywords:

Oracle EBS, R12, R12.2.8, Oracle Applications, JarSigner, ASADMIN, ISG, Integrated SOA Gateway, Web Services, REST, RestFul, $JAVA_TOP

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

Saturday, April 21, 2018

EBS REST WS Error: java.lang.SecurityException: User: ASADMIN~~, failed to be authenticated.

 

Scenario:

Typically the error comes when accessing/deploying/undeploying a web service in a test instance after cloning.

We use R12.2.8. Error can happen in any version of R12 Integrated SOA Gateway (ISG) Web Services.

  

Cause:

The ASADMIN can not login to create/deploy web service

Solution:

Here are the possible causes:

  • Ø ASADMIN password is not reset after cloning from production instances

Check ASADMIN user can login with the previous password from instance front-end link

Make sure the ASADMIN user has required permissions and responsibilities based on business requirements

ADASMIN is associated with proper MOAC (Multi Org Access Control) defined with User or Responsibility

  • Ø ASADMIN user or responsibility is inactivated, locked or end dated
  • Ø ISG Setup files are not properly configured

o   isgagent.properties

o   isg_contextfile.properties

 

Keywords:

Oracle EBS, R12, R12.2.8, Oracle Applications, ASADMIN, ISG, Integrated SOA Gateway, Web Services, REST, RestFul