Running ssl client from multiple applications fails in Sap j2ee engine

There are two applications making ssl connections to third party.
At a time only one application is able to make connection while other
throws error message <b>"No trusted certificate found".</b>
Currently we have  two j2ee applications running in SAP j2ee server. Both applications makes ssl connection to third party servers. Lets call first application as A1 and second application as A2.
A1 is an internet shopping application . It makes ssl connection to third party services at two places . One is while fetching the shipping charges from UPS site.
Code Snippet:
java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
System.getProperties().put("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
String lo_url = new URL("https://wwwcie.ups.com/ups.app/xml/Rate");
lo_connection = (URLConnection) lo_url.openConnection();
At other place A1 connects to cybersource service using webservice +ssl  for credit card authentication using cybersource API. It uses certificate in p12 format.
Code Snippet:
com.cybersource.ws.client.axis.soap.RequestMessage lo_requestMessage = new  com.cybersource.ws.client.axis.soap.RequestMessage();
Properties lo_cybsProperties = new Properties();
lo_cybsProperties.setProperty("merchantId","arvato");
lo_cybsProperties.setProperty("merchantRefCode","1234")
lo_requestMessage.setMerchantID( "arvato");
lo_requestMessage.setMerchantReferenceCode( "1234" );
lo_cybsProperties.setProperty("cybersourceURL","https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor");
lo_cybsProperties.setProperty("keysDir", "./WEB-INF/config");     
lo_requestMessage.setBillTo(setBillToAddress(po_mdsBillingAddress) );
// add ship to address
lo_requestMessage.setShipTo(setShipToAddress(po_mdsShiToAddress));
lo_requestMessage.setPurchaseTotals( setPurchaseTotal() );
//set cc details
lo_requestMessage.setCard( setCardDetails(po_mdsCreditCard) );
Set Items and total tax calculation
lo_replyMessage = com.cybersource.ws.client.axis.soap.Client.runTransaction( lo_requestMessage, lo_cybsProperties );
A2 Application
This application connects to Motorola secured web service to fetch details of mobile hand set. It uses keystore to create ssl connection with Motorola webservice.
Code Snippet
try {
TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
          return new java.security.cert.X509Certificate[0];
     public void checkClientTrusted(java.security.cert.X509Certificate[] certs, String authType) {}
public void checkServerTrusted(
java.security.cert.X509Certificate[] certs, String authType) {
SSLContext sc = SSLContext.getInstance("SSL");
sc.init(null, trustAllCerts, new java.security.SecureRandom());
} catch (Exception e) {
e.printStackTrace();
System.setProperty("javax.net.ssl.trustStore","SapWSM.keystore");
System.setProperty("javax.net.ssl.trustStorePassword","xxxx");
System.setProperty("javax.net.ssl.keyStore","SapWSM.keystore");
System.setProperty("javax.net.ssl.keyStorePassword","xxxx");
Problem Cases :
Case 1
Step 1 : Server starts
Step 2 : User access A1 first
Step3: A1 Connects to UPS using https (It is able to connect)
Step4: A1 connects to cybersource using webservice+ssl  (It is able to connect)
Step 5: Another user access A2
Step6: A2 tries connection to Motorola webservice over ssl
Result connectivity fails with description "No trusted certificate found".
Case2
Step 1 : Server starts
Step 2 : User access A2 first
Step3:  A2 tries connection to Motorola webservice over ssl (It is able to connect)
Step 5: Another user access A1
Step6: A1 connects to cybersource using webservice+ssl 
Result connectivity fails with description "No trusted certificate found".
Case3
Step 1 : Server starts
Step 2 : User access A2 first
Step3:  A2 tries connection to Motorola webservice over ssl (It is able to connect)
Step 5: Another user access A1
Step6: A1 connects to  UPS using ssl
Result connectivity fails with description "No trusted certificate found".

Hi Please answer my query it is really <b>
urgen
t</b> and we are not able to run both the applications in same server

Similar Messages

  • License Installation for Multiple Hardware Keys in SAP J2EE Engine

    Hi Everyone,
    I have a question to ask that we have a Failover setup in our Client Enviornment.
    But for SAP JAVA System I am seeing a Problem :
    Whenever Failover will happen SAP System will be moved to different Hardware box
    which has different Hardware Key.
    1) In SAP ABAP Systems we can install Multiple Licenses for Multiple HArdware Keys
        so that whenever Failover happens , no need to apply license for that Hardware key
    2) But in J2ee System under License Adapter , I am not able to see any option under the same
        to install another License
    Under Licnese Adpater Service , I am able to see license of J2ee-engine_ora , maintanance_ora & Netweaver_ora licneses
    Thanks --
    Deepak Gosain

    Hi,
    Try to paste the two licenses in the same file and then import the license file.
    Not sure but give it a try it should work.
    Regards,
    Vamshi.

  • Regarding RFC Communication from SAP R/3 to SAP J2EE Engine 6.40

    Hello,
         We have an application deployed in SAP J2EE engine 6.20. From SAP R3 (SAP R/3 version is 6.4C), We are communicating to the application deployed in SAP J2EE Engine 6.20 using RFC protocol. EJB module (Deployed in SAP J2EE Engine 6.20) which is being invoked from a Function Module using RFC protocol has the same name as the Function Module name. We were able to communicate to SAP J2EE Engine 6.20 this way.
         Currently, I have deployed the same application in SAP J2EE Engine 6.40.  I have followed the same procedure which i have used while depolying and working with SAP J2EE Engine 6.20. But, it is not working, and i was not able to communicate to SAP J2EE 6.40, the same way i did in SAP J2EE Engine 6.20. 
       Please let me know whether the procedure for communicating to SAP J2EE Engine 6.40 has changed in comparison with SAP J2EE Engine 6.20.
    Also,Any pointers regarding RFC and JCO implementation in SAP J2EE Engine 6.40 willl be helpful.
    Thank you.
    Regards,
    -Shabir Rahim.

    Hello ,
          The Connection in sm59 is established successfully> there were no Error thorwn in SAP when testing the connnection. But when i am making background call using a Function Module in SAP R3, the calls reaches Application deployed in SAP J2EE Engine 6.40, But it is failing with the error as,
    #1.5#005056A24413003C000000240000126000042853BD899290#1170240034258#/System/Server##com.sap.engine.services.dsr####sstra902_IPC_2629150#Guest#6813e650a93f11dba9f5005056a24413#Thread[JCO.ServerThread-1,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error#1#/System/Server#Plain####
    #1.5#005056A244130042000000000000126000042853CFDB80F8#1170240341655#/System/Server##com.sap.engine.services.dsr#Guest#2####322aaa71b11811db85e1005056a24413#SAPEngine_Application_Thread[impl:3]_36##0#0#Error#1#com.sap.engine.services.dsr#Java#DSR_36#com.sap.engine.services.dsr.res.DSRResourceBundle#Error while taking over external passport null#1#null#
    #1.5#005056A244130042000000030000126000042853CFDB86BD#1170240341671#/System/Server##com.sap.engine.services.jndi#Guest#2####322aaa71b11811db85e1005056a24413#SAPEngine_Application_Thread[impl:3]_36##0#0#Info#1#com.sap.engine.services.jndi#Plain###Incorrect name parameter rfcaccessejb//DCEUR/Z_AIS_IPC_CFG_PRICE in naming operation.#
    #1.5#005056A244130042000000040000126000042853CFDB8745#1170240341671#/System/Server##com.sap.engine.services.jndi#Guest#2####322aaa71b11811db85e1005056a24413#SAPEngine_Application_Thread[impl:3]_36##0#0#Info#1#com.sap.engine.services.jndi#Plain###Incorrect name parameter java:rfcaccessejb//DCEUR/Z_AIS_IPC_CFG_PRICE in naming operation.#
    #1.5#005056A24413003C000000280000126000042853CFDBC4AA#1170240341686#/System/Server##com.sap.engine.services.dsr####sstra902_IPC_2629150#Guest#6813e650a93f11dba9f5005056a24413#Thread[JCO.ServerThread-1,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error#1#/System/Server#Plain####
    Here, //DCEUR/Z_AIS_IPC_CFG_PRICE is the Funcrtion module name in SAP R/3 6.4C.
    Also Please let me know whether is there any Operating Differences between WAS 6.20 and WAS 6.40, for JCO/RFC based Communication( ie Comunicating with WAS 6.40 from SAP r/3 using RFC Protocol). Any materials and Information on how to work on SAP J2EE Engine 6.4 will also be very helpful.
    Thank you.

  • Running exe files from java applications

    Hello All,
    Is it possible to run executable files from java applications?
    I need to run an exe file on the client from the server machine, the exe could reside on either the server or any other machine on the LAN. Is it possible to specify the path of where the exe resides, and run it on a client machine?

    HI,
    I tried to launch a MS Word application using runtime.exec but it gives me some problem
    The foll. code to launch a txt file using notepad works.
    Runtime rt = Runtime.getRuntime();
    String[] callAndArgs = {"notepad.exe","C:\\coo7\\wizard.txt"};
    Process child = rt.exec(callAndArgs);
    However, oif I try to launch a MS Word application, it asks for the entire path of WINWORD.exe, (unlike just specifying notepad.exe as the first argument in String[] callAndArgs) and this can vary from one machine to another.. how do I get around this?
    The foll. code snippet works but the complete path of where WINWORD.exe might be installed on any machine, is not fixed:-(
    Runtime rt = Runtime.getRuntime();
    String[] callAndArgs = {"C:\\Program Files\\Office\\Office10\\WINWORD.exe","C:\\coo7\\wizard.doc"};
    Process child = rt.exec(callAndArgs);
    Any idea/suggestions pls..

  • SAP J2E Engine Terminates on Portal Application Servers.

    Short Text 
    SAP J2EE Engine Terminates 
    Long Text 
    we are experencing a problem with SAP Enterprise Portal Server 5.0,where SAPJ2E Engine service failing almost once in a week on either of the two servers.
    Server details
    Os: Window 2000 Service pack 4
    SAP J2EE verison : 6.20 Path 19
    SAP Enterprise Portal SP5
    EP5 SP5 Hot fix 3.
    Oracle 8i Enterprise Edition Release 8.1.7.4.1
    Java 2 Standard Environment 1.3.1_10
    Error from Event Viewer for SAPJ2E engine
    "The Description for Event ID (0) in source (SAP J2E Engine Alone) cannot be found.The Local computer may not have the necessary registry information or message DLL files to display messages from a remote computer.The following information is part of the event SAP J2EE Engine Alone error
    6.SetServiceStatus.
    Error from SAP J2E engine logs:
    "Socket receive failed."
    Error from console.log
    "Integrity token expired"
    Actions done at our end.
    1) Got the confirmation from the backup team that no backups are being run at that time of SAP J2EE engine failure.
    2) Checked the service market place.
    Note 578554 - SAP J2EE ISAPI module: Release notes and known issues
    Note 581599 - EP5.0 SP4 : SAPJ2EE engine crashes after a while
    Need your help ..its bit Urgent.

    Hi,
    I have check the License under port/system config/License.
    Please find the below details which tell the license is valid.
    This Portal is: Licensed
    Portal Release: 5.0
    System ID: EP5
    Hardware Key: X0135695037
    Installation No.: 0020117479
    System No.: 000000000310150667
    Software Product: Portal_ORA
    EP5 X0135695037 Portal_ORA Unlimited 31/Dec/9999 Permanent 0020117479 000000000310150667 Valid
    EP5 X0135695037 Portal Unlimited 31/Dec/9999 Permanent 0020117479 000000000310150667 Valid
    Thanks,
    Deepu

  • Webdynpro application errors with SLD,J2EE Engine - JCOs probelem

    Hi,
    I have developed a small webdynpro application
    1. Passing 2 values to RFC
    2. Getting result contents from RFC and displayed in a table.
    I am getting following errors:
    u2022     SLD is not accessible. Check SLD Data Supplier service settings.
    u2022     Insufficient permissions for getting SLD access information. You can add permissions for your application via the SLD service in the 'Visual Administrator'.
    u2022     ACCESS.ERROR: Authorization check for caller assignment to J2EE security role [SAP-J2EE-Engine : administrators].
    u2022     application [webdynpro/dispatcher] Processing HTTP request to servlet [dispatcher] finished with error.
    The error is: com.sap.tc.webdynpro.clientserver.session.CloseResponseException: An attempt to write after the stream had been closed.
    Exception id: [0002559A6FCB0077000000A0000CF0E8000460EC9406F721]
    u2022     application [webdynpro/dispatcher] Processing HTTP request to servlet [dispatcher] finished with error. The error is: com.sap.tc.webdynpro.clientserver.session.CloseResponseException: An attempt to write after the stream had been closed.
    at
    Please suggest me.

    Hi Kiran,
    You need configure SLD and JCo destinations in your j2ee engine..
    Check this [article |https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0c1d495-048e-2b10-babd-924a136f56b5] to create the SLD and JCo destinations.
    regards,
    Siva

  • Where to deploy EAR file(Client java proxy) in SAP J2EE engine (XI)?

    hi i m novice in J2ee technology of XI,
    I m trying a blog to create client Java proxy,
    can u tell me after making the EAR file .... where should i deploy it,
    means it instructs me to deploy the EAR file in the SAP J2EE engine.... what is that .... whats the URL and port ?

    Hi sudeep
    check these
    http://help.sap.com/saphelp_nw04/helpdata/en/01/a70e408230c442e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/9c/8a9383a2aeda4a962446d3c29b9e19/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/05/4fac3e00c8b014e10000000a114084/frameset.htm
    also this
    /message/3943924#3943924 [original link is broken]
    thanks

  • SAP j2ee engine is not running error while applying patches.

    Hi all,
    Iam in the process of aplpying patches using JSPM tool , for some of them iam getting the error messages , when i checked the log file for this tool it says:
    SAP J2ee engine is not running , unable to login to  <HOST name> with id <Login id>.
    Iam very new to this activity ,can anybody help me in this regard , i wil be very thankful.
    Thanks and Regards.
    Niyati.

    Hi,
    What exactly do you see when you say that the status in the MMC is OK? I don't think it can be green if you say that you get a message saying "Service Unavailable" when you try to login. If you get that message, it means that the service hasn't either been started or could not be started in case of an error. In this case the server status in the MMC should be yellow (or gray in case none of the services could be started)...
    Could you perhaps check it again? Another point to check would be if the connection to the database is OK. If you are using MySQL MaxDB, you could use the Database Manager tool to check this. Sometimes the log files fill up the database and the server cannot start because the database is full. In such cases you will need to clear the logs and then restart the entire cluster.
    Sameer

  • Multiple Applications failing to launch in Mac OSX Mavericks

    Hi there,
    I recently updated my Mac Pro to Mac OSX Mavericks (OS X 10.9.2), and since that time, I have experienced multiple applications in my Adobe CC Subscription failing to launch. As a first step, I attempted to uninstall the applications so that I could reinstall them and see if that fixed the problem. However, when I go to uninstall the applications, I get the same message (crash report) that I get when I attempt to launch them, so I'm unable to uninstall the applications.
    I'm not sure what the protocal is, or where I can send the crash reports to get a better idea of what is going wrong. Below I've listed a series of applications that are failing to launch, then the applications that are launching and running perfectly fine, along with some information about the computer I'm running on to see if the hardware might be out-of-date and adding to the problem.
    Thanks in advance for any help you can offer and I look forward to hearing from anyone that could provide some insight!
    Applications that are Crashing (all are CC versions):
    Photoshop
    Prelude
    Audition
    Speedgrade
    Dreamweaver
    InDesign
    Illustrator
    Firework
    Flash Builder
    Flash
    InCopy
    Adobe Acrobat Pro
    Applications that are Working (all are CC versions):
    Premiere Pro
    Bridge
    Lightroom 5.4
    Adobe Media Encoder
    Scout
    Muse
    About the Mac I'm working on:
    Mac Pro
    Early 2008
    Processor: 2 x 2.8 GHz Quad-Core Intel Xeon
    Memory: 16gb 800 MHz DDR2 FB-DIMM
    Graphics: ATI Radeon HD 5770 1024 MB

    Read http://forums.adobe.com/message/6109315#6109315 for a possible Mavericks fix
    -and http://forums.adobe.com/message/5889794#5889794 for another possible fix

  • Providing Certificate while generating a SSL client from wcf

    Hello,
    I am trying to generate a client from a wcf service which has an https endpoint which requires a certificate for authentication, when a try to connect to a web service from flash builder4 by providing the wsdl URI it give me the following error:
    There was an error during service introspection.
    WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported document at 'https://hassanraza-pc/Service/UserManagerService.svc?wsdl'.: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    Can some body help me....
    I need to know that how can i tell the flash builder about the certificate or if there is ny other way ....
    Thanks in anticipation:

    Hi, i'm facing the same issue .

  • Running Unix Command from WEB-APPLICATION

    Hi all,
    I want to run unix command from a java-based web application. the basic code part is this ---
    public class RunCommand
          public String runIt()
              String s = null, returnString = "";
              Process p=null;
              try
                       Runtime rt = Runtime.getRuntime();
                  p = rt.exec("sh testPOC.ksh");
                  p.waitFor();
                  BufferedReader stdInput = new BufferedReader(new
                       InputStreamReader(p.getInputStream()));
                  BufferedReader stdError = new BufferedReader(new
                       InputStreamReader(p.getErrorStream()));
                  // read the output from the command
                  returnString += "Here is the standard output of the command:<br>";
                  while ((s = stdInput.readLine()) != null) {
                      returnString += s;
                  // read any errors from the attempted command
                  returnString += "Here is the standard error of the command (if any): <br>";
                  while ((s = stdError.readLine()) != null) {
                      returnString += s;
              catch (IOException e)
                  returnString += "exception happened - here's what I know: ";
                  returnString += "error-> " + e.getMessage();
              catch(Exception e)
                returnString += "exception happened - here's what I know: ";
                  returnString += "error-> " + e.getMessage();
              return returnString;
      }this class is kept as an inner class. The control comes to its outer class, from servlet, from which the runit() is called. but the exception is occuring at line of p=rt.exec(.....). it tells "<command name> : not found transaction completed" [got this using getMessage() method].
    i am unable to show(and see, too) the stacktrace, because i don't have access to that test environment and its log. i can't run this in local because its windows one.
    now can anyone tell me, where is the problem. is there any limitation in web application server/container? this was successful when i used command prompt writing a .java file. Please help me. Thanks in advance...

    Friends, i've got, where the problem is.
    when we run a class file directly from a command prompt, we get an environment with that shell window. but for a servlet application running these kind of commands from a class creates kind of child processes. each and every command is executed as a child process of jvm and don't get those environment. we have 'PATH' variable in the environment. when a command (say, 'dir' or 'sh' or 'ls', etc.) is executed, the shell first search for that executable file (i.e. dir / sh / ls) in the given paths in the variable 'PATH'. this is not available for the child commands of jvm. hence the basic commands are searched in the current directory of the jvm and they are failed.
    i solved the problem giving full path of the commands. like :
    p = rt.exec("/bin/sh runningScript.ksh")

  • Run a report from an application

    Hi all,
    I don't know if this post belongs here or in the Reports forum. Anyway, any help with this will be muchly appreciated. I thought this task would be straightforward enough, but I'm having a whole lot of difficulty finding any instructions on it.
    I have an application developed in JDeveloper using BC4J. And I want to be able to print reports from this application. It is a standalone program, i.e., not JSP. I have a number of reports I will want to run, and for now I have created the simplest one in Oracle Reports. How do I run this from my Java application? I would really rather not have to open a browser window or generate a PDF, but just print the thing immediately (or give the user a preview if desired).
    Thank you in advance,
    Owen Gibbins

    Does anyone have any thoughts on this?

  • Running .bat files from java applications

    Has anyone tried to run a .bat file from a java application?
    I know I can run java commands by getting the application's runtime, but I've a number of *.bat files I like to run from the application without having to extract the commands from the .bat files.
    thks,

    Crikey! You were answered very shortly after you posted your question, and you STILL haven't bothered to come back. And are you going to create a new userid the next time you ask a question, since bat2004 seems tied to this particular question?

  • How to run a vi from Java application?

    I am passing data to a vi from my java swing application using data socket bean but I have to manually open and run the vi. How can I programatically open and run the vi from my java application without using ActiveX automation server?

    I don't know Java but if you can issue a shell command then you can run the VI with the command line:
    "\labview.exe" ""
    You have to set the VI to "Run when opened". The VI will run each time the command is issued, even if the VI is already opened.
    LabVIEW, C'est LabVIEW

  • Running OWB Client from Unix

    Hi
    I am trying to remember how to run OWB client (10gr1) from a unix command. Can anyone please help with what command you run from unix?
    Thanks
    GB

    Hi,
    To start Warehouse Builder using UNIX:
    1.Start a shell.
    2.Navigate (cd) to <OWB ORACLE HOME>/owb/bin/unix
    3. Invoke owbclient.sh
    Thanks,
    Sutirtha

Maybe you are looking for

  • My Ipod Touch will only search for available Wifi networks for a second then stop, and it will never find any networks anywhere.

    OK I own the 1st generation Ipod touch and granted I bought it used and its pretty old, but the Wifi doesnt work at all. When I click on the checkmark box it turns on and it looks like its trying to find a connection, but it only tries for one second

  • PDF Portfolio

    I have created a portfolio compiled of fill-in forms and other documents.. When I open a document within the portfolio that has multiple pages, the pages get jumbled up. I've noticed that it is happening with page two - so if double click a document

  • Adobe creative suite 5.5 design premium upgrade

    I am installing adobe creative suite 5.5 design premium upgrade on a new laptop.  I installed the upgrade and entered the serial number and received the green check.  It never ask for a prevoius serial number from the previous product.  Each time I o

  • How to create Schema Header and footer with Pipe delimiter file..?

    Hi all, I have issue with creating Schema Header and footer with body file ..The file format is Pipe delimiter.. The follwing file below like is... Adapters:File Adapter(Read)-11g. 1|000|2025|SDFG|54787 1|2055|244|9566|000|000|044|2577|361147|45554|w

  • Which MacBook Pro for recording?

    I'm looking to buy a MacBook of some kind, but I'm unsure of which one to get. Right now I think I'm going with the pro. So if I want to record on Logic 8 with an average amount of plug-ins and tracks, should I go with 2.4GHz or 2.5GHz? I was assumin