Skip to Content

The motive of this blog is to introduce one of the hidden tools in SAP XI/PI, which I found recently when I am investigating on “why mapping export (XIM files) functionality is disabled in latest SAP PI(>=7.1) releases?”. Unfortunately, I could not find a short cut for PI7.3 version, but however I could find it for PI7.1 version (it is, CTRL+SHIFT+ALT 0 in mapping editor).

Apart from this, I found one more interesting hidden tool (applicable from XI version >= 3.0) which can be quite useful to debug/understand repository and directory frameworks loading mechanism, logging, exceptions etc. I believe, SAP uses this tool internally for debugging purposes during product development 😉

In this blog, I will explain how to launch ESR/ID with a batch file with little extra configuration and few other benefits of this hidden tool.

Steps:-

  1. Open ESR/IR using XI main page. http://<xihostname>:<port>/rep (or) /dir for PI >= 7.1
  2. Open any existing mapping/create a fresh one
  3. Go to mapping Test Tab -> and then press CTRL+SHIFT+ALT J. A new window as shown below will be launched.
    • IBStarter.JPG
  4. Change the folder path if required (For this blog, I am using the default folder option c:\TempIbJars )
    • ChooseFolder.JPG
  5. Now copy the IR/ESR path from XI main page into Step 3, JNLP file URL text box and then click execute button.
      • E.g., http://<xihostname>:<port>/rep/start/sso/Repository.jsp (for PI7.3)

      • http://<xihostname>:<port>/rep/start/repository.jnlp (for <= PI7.1)

  6. It takes a while, for the tool to download all jars files from XI server to c:\TempIbJars along with a batch and aii.properties file. This process is similar to java web start which copies all jars file to a cache folder. You can also see each jar file download status in the tool.
    • JNLPDownloadStatus.JPG
  7. Go to c:\TempIbJars directory and then execute start.bat file. The batch file will try to launch ESR, but however it will fail with below exception.
    • BatchException.JPG
  8. The exception indicates that, we need one more javaws.jar file from java home directory e.g., C:\<JAVA_DIR>\jre\lib into the current working directoy C:\TempIbJars. Copy the javaws.jar file and then edit the batch file as below. And then, rename start.bat to start_ESR.bat (you will know the reason for renaming, when we start working with ID/configuration tool what is described in next few steps)
    • First line in batch file (Optional) – path=.;<Drive>:\<JAVA_DIR>\bin
    • IRBatchFileEdit.JPG
  9. Now, execute the renamed start_ESR.bat file. We are done, the ESR will get launched now 🙂
    • LaunchIRBat.JPG
  10. Now it is time to work with ID-Configuration tool. Follow the same steps as 5, 6 but with ID directory link 😉 The tool will download directory related jar files, start.bat file along with previously downloaded jars (overwrites) which are common for both IR/ESR and ID frameworks.
    • E.g., http://<xihostname>:<port>/dir/start/sso/Directory.jsp (for PI7.3)
    • http://<xihostname>:<port>/dir/start/directory.jnlp (for <= PI7.1)

      IDExtraJars.JPG

  11. Rename start.bat file to start_ID.bat and then edit the batch file to make it work (similar to step 8 but with one extra change)
    • IDBatchFileEdit.JPG
  12. Execute the modified ID batch file, it will launch ID-Configuration tool 🙂

Benefits:-

  • We can use some of the downloaded jars for java mapping development/adapter module development. E.g., aii_map_api.jar for PI <= 7.0)/ com.sap.xpi.ib.mapping.lib.jar for PI >= 7.1 version, com.sap.aii.af.lib.mod.jar for adapter module development. Especially, in case of java mapping developments, no need to request BASIS team for mapping jar/download from SAP marketplace/use custom abap reports to download mapping jar from IX server.
  • Just to add, we can also download jar files by pointing browser with each jar resource (jar files can be found in JNLP description file) e.g., http://<XIserver>:<port>/rep/repository/com.sap.xpi.ib.mapping.lib.jar
  • Few other interesting jars,
      • com.sap.aii.af.sdk.jar
      • sap.com~tc~bl~guidgenerator~impl.jar
      • com.sap.xi.flib.lib_api.jar
      • com.sap.xi.mapping.tool.lib_api.jar
  • The IR, ID batch DOS consoles clearly shows logging status while launching frameworks and then for each action after launch. This will help developers to closely understand what is happening in the background.

Custom ESR/ID application title:-


04/24/2013, 6:19 PM GMT (Custom ESR/ID application title, request from Dingjun)

  • Modify the batch file to force the system variable jnlp.SAPMYNAME value and then pass it to java run time as java -Djnlp.SAPMYNAME=”%jnlp.SAPMYNAME%” as shown in below snap shot.

ForceSystemVariable.JPG

Result will be as below 🙂

ESR_forced_Title.JPG

Have fun with the newly explored IR/ESR, ID batch file tools 🙂 and provide your valuable feedback

My new blog with JNLP files: http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/04/25/hidden-tools-functionality-with-esrid-jnlp-files

To report this post you need to login first.

25 Comments

You must be Logged on to comment or reply to a post.

    1. Praveen Gujjeti Post author

      Thanks Prateek.

      As usual there is no SAP documentation, just found when I am exploring on mapping exports as XIMs and my little bit java knowledge helped me 🙂

      Just to say, there is one more tool CTRL+SHIFT+ALT M (message mapping test tab) which is like a password mask, but I do not know the purpose of it yet.

      Regards,

      Praveen Gujjeti

      (0) 
  1. Dingjun Jia

    Hi Praveen,

    Thanks for your sharing.

    With your method, the loaded ESR or IR has always the same title Enterprise Service Builder or Integration Builder. Is it possible to add hostname or system ID to the title? This will help, when man works in multi systems.

    (0) 
    1. Praveen Gujjeti Post author

      Hi Dingjun,

      >>Is it possible to add hostname or system ID to the title?


      I observed this before, but unfortunately I do not know a solution at this moment. But I will check and come back to you

      Regards,

      Praveen Gujjeti

      (0) 
    2. Praveen Gujjeti Post author

      Hi Dingjun,

      It is possible now with forced system variables. blog is updated with this information under Custom ESR/ID application title section. Thanks for your feedback.

      Regards,

      Praveen Gujjeti

      (0) 
      1. Dingjun Jia

        Hi Praveen,

        Thanks a lot! It works now great.

        Maybe you have a minor typo mistake on step 5:

        >>E.g., http://<xihostname>:<port>/rep/start/sso/Repository.jsp (for PI7.3)

        I tested on PI 7.31, and it works only with http://<xihostname>:<port>/rep/start/sso/repository.jnlp

        best regards

        Dingjun

        (0) 
          1. Yashu Vyas

            Hi Praveen,

            We tried with both .jsp and .jnlp extensions but getting following error in case of jnlp –

            1. com.sap.aii.utilxi.xml.xdom.XDOMException$ParseError: Error when parsing an XML document (The markup in the document following the root element must be well-formed.)

            If possible can you please provide your inputs, where you think we might be doing something incorrectly?

            Regards,

            Yashu

            (0) 
            1. Praveen Gujjeti Post author

              Hi Yashu,

              Check if you are able to launch the repository tool using .jnlp link from browser.

              BTW, as long as it works with at least one link from mapping IB Starter tool, I hope we are fine 🙂

              Regards,

              Praveen Gujjeti

              (0) 
  2. Ankit Srivastava

    Hello Praveen,

    A very nice blog! But when I try the above trick, I am getting the following error after clicking on run:

    com.sap.aii.utilxi.xml.xdom.XDOMException$ParseError: Error when parsing an XML document (The markup in the document following the root element must be well-formed.)

    at com.sap.aii.utilxi.xml.xdom.XDOMInputter.parse(XDOMInputter.java:67)

    at com.sap.aii.utilxi.xml.xdom.XDOMInputter.parse(XDOMInputter.java:76)

    at com.sap.aii.mappingtool.helpers.IBJnlpLoader.internalRun(IBJnlpLoader.java:105)

    at com.sap.aii.mappingtool.helpers.IBJnlpLoader.access$000(IBJnlpLoader.java:29)

    at com.sap.aii.mappingtool.helpers.IBJnlpLoader$1.run(IBJnlpLoader.java:57)

    Also, I don’t have access to PI 7.1 Jars. Where can I get these jars?

    Thanks & Regards,

    Ankit Srivastava

    (0) 
      1. Praveen Gujjeti Post author

        Hi Ankit,

        Sorry, I missed your first comment. It seems the issue with while parsing JNLP xml file at runtime from server.

        What is your PI/PO version? And what is the java version you are using in BAT file for your PI/PO system?

        Are you able to normally launch ESR/ID swing frameworks from browser?

        Any regarding PI7.1 jars files you must have access to PI7.1 system. Send me a direct message with your email id. I can send you jar file to your email.

        Best Regards,

        Praveen Gujjeti

        (0) 
        1. vishal jain

          Hi Praveen

          As you mentioned in the Benifits section, we can download the Jar files.

          >>>>Just to add, we can also download jar files by pointing browser with each jar resource (jar files can be found in JNLP description file) e.g., http://<XIserver&gt;:<port>/rep/repository/com.sap.xpi.ib.mapping.lib.jar

          I tried to do so and was able to extarct this jar file, however when I tried the same path for

          com.sap.aii.af.lib.mod.jar I got HTTP 404 error, is there a different path for Integartion directory jar files? If yes, please share the same.

          Regards

          VJ

          (0) 
            1. vishal jain

              Hi Praveen

              I have more doubt, is there any possiblity where we can tree view or something to view which jar file comes uder which path. I was trying to download couple of more jar files for module develpment but was unable to find them under ESR and ID path as well.

              Below are the JAR files which I need:

              com.sap.aii.af.ms.ifc_api.jar

              com.sap.aii.af.svc_api.jar

              com.sap.aii.af.cpa.svc.api.jar

              Please help 🙂

              Regards

              VJ

              (0) 
              1. Praveen Gujjeti Post author

                Hi Vishal,

                Unfortunately these jar files are not part of ESR and DIR urls. You have to request BASIS team for these jar files

                Regards,

                Praveen Gujjeti

                (0) 
    1. saidarao chintalapudi

      Hello Ankit,

       

      I am also getting same error like above.

      com.sap.aii.utilxi.xml.xdom.XDOMException$ParseError: Error when parsing an XML document (Content is not allowed in prolog.)
      	at com.sap.aii.utilxi.xml.xdom.XDOMInputter.parse(XDOMInputter.java:94)
      	at com.sap.aii.utilxi.xml.xdom.XDOMInputter.parse(XDOMInputter.java:49)
      	at com.sap.aii.utilxi.xml.xdom.XDOMInputter.parse(XDOMInputter.java:45)
      	at com.sap.aii.mappingtool.helpers.IBJnlpLoader.internalRun(IBJnlpLoader.java:105)
      	at com.sap.aii.mappingtool.helpers.IBJnlpLoader.access$000(IBJnlpLoader.java:29)
      	at com.sap.aii.mappingtool.helpers.IBJnlpLoader$1.run(IBJnlpLoader.java:57)
      Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
      	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
      	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
      	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
      	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
      	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
      	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
      	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
      	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
      	at com.sap.aii.utilxi.xml.xdom.XDOMInputter.parse(XDOMInputter.java:91)

      is it resolved?

      can you help me on the same .

      Thanks,

      Saidarao

      (0) 

Leave a Reply