Introduction

In my previous article Base64DecodeConverter – Base64 decoding made easy!, I introduced a new converter for FormatConversionBean to handle decoding of Base64 content.

This article covers Base64EncodeConverter, which handles encoding of content into a Base64 string in either plain text file or embedded in an XML payload.

Source Code and Deployment Archive

Refer to following blog on location of source code and/or EAR deployment file.

FormatConversionBean – One Bean to rule them all!

Usage of Module in Communication Channel

Module Processing Sequence

Number Module Name Type Module Key

<Depending on position of module in chain>

1) Asynchronous scenario,

Normally before the last module in channels

2) Synchronous scenario,

Before last module to convert request payload

After last module to convert response payload

Custom_AF_Modules/FormatConversionBean Local Enterprise Bean <Any Arbitrary Value>

Module Parameter Reference

Below are the parameters for configuration of the module for Base64 encoding. Certain parameters will automatically inherit the default values if it is not configured.

Parameter Name Allowed values Default value Remarks
converterClass com.equalize.xpi.af.modules.base64.Base64EncodeConverter Required field. Determines conversion class
outputType plain, xml

Required field. Indicates type of output data

  • plain = Base64 string as plain output text
  • xml = Base64 string embedded in XML element of XML payload
documentName

Required field when outputType = ‘xml’.

Document name of root element of XML output

documentNamespace

Required field when outputType = ‘xml’.

Namespace of root element of XML output

base64FieldName base64Content

Available when outputType = ‘xml’.

Field name of  XML element containing Base64 string

compress Y,N N Compress input content before encoding into Base64 string
messageLog

pre, post

Saves a log version of the message that is viewable in Message Monitor

  • pre = saves payload before conversion
  • post = saves payload after conversion
logLocation Name of log version when messageLog is populated. Location defaulted to value in messageLog if logLocation not populated

Example Scenarios

Here are some example scenarios of the behavior of the conversion based on different configuration options.

Scenario 1

  • Encode content into Base64 string in plain output text
  • Content will be compressed before encoding into Base64

Module parameters

Parameter Name Parameter Value
converterClass com.equalize.xpi.af.modules.base64.Base64EncodeConverter
outputType plain
compress Y

Result

Input /wp-content/uploads/2015/05/input1_706750.png
Output /wp-content/uploads/2015/05/output1_706751.png

Scenario 2

Screenshot of actual configuration and testing are shown below.

  • Encode content into Base64 string, and embed in XML payload
  • Output XML’s root element, namespace and field containing base 64 string specified

Module configuration on an SFTP receiver channel.

/wp-content/uploads/2015/05/config_706753.png

The input content to be encoded is sent via the Send Test message function.

/wp-content/uploads/2015/05/testdata1_706775.png

The log version ‘b64embedxml’ shows the content after encoding. The Base64 string is embedded into an XML payload.

/wp-content/uploads/2015/05/encoded_706776.png

The audit log shows the trace of steps being executed by the module.

/wp-content/uploads/2015/05/log_706777.png

The encoded output is verified using Base64 Decode – Online to decode the generated Base64 string to retrieve back the original content.

/wp-content/uploads/2015/05/verify_706782.png

Conclusion

With this new addition to FormatConversionBean, encoding of Base64 content can also now be easily handled without additional custom development

To report this post you need to login first.

13 Comments

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

  1. Nitin Deshpande

    Hello Eng Swee Yeoh

    First of all, thanks a lot for creating this blog. It is an excellent blog and i found this when i needed the most, as i am 10 days away for go-live and Bank(3rd party) has come up with this request saying they needed message encoded in Base64. I didnt what to do, and started building a Custom adapter module, but as we all know custom adapter module are not so easy to build and deploy and this would require hell lot of time. But at the right time, i came across your blog which can help me out to meet the very strict project timelines 🙂

    I am interested in using Base64EncodeConverter to convert the Signed XML message content into Base64 and send the same to 3rd party.

    But when my Basis colleague tried to deploy the EAR file, it ended up with the below warning –

    EJBContainer\applicationjars\com.equalize.xpi.af.modules.ejb.jar

    —————————————————————

    Error occurred while trying to load com.equalize.xpi.af.modules.util.AbstractMod

    ule

    at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiPare

    Can you please help me with the same on an urgent basis?

    Regards,

    Nitin Deshpande

    (0) 
    1. Eng Swee Yeoh Post author

      Hi Nitin

      I’ve not faced any errors during deployment before. Many others have also downloaded the EAR file and deployed on their systems perfectly fine, so I’m not really sure what your problem could be.

      First of all, please ensure that your PI/PO system is at least 7.31 SP13 or 7.4 SP08 or higher.

      If it is, then you need to provide more details of the error as the one you’ve provided above does not really indicate where the error is.

      Rgds

      Eng Swee

      (0) 
      1. Nitin Deshpande

        Hello Eng Swee Yeoh

        Thanks a lot for your swift reply.

        I will let you know the procedure i am following to deploy the Adapter Module Bean.

        1. I clicked on the below link –

        https://github.com/engswee/com.equalize.xpi.af.modules/releases/tag/v20150807

        2. Downloaded the .EAR file – com.equalize.xpi.af.modules.app.ear

        3. Provided the same to my basis colleague to deploy

        4. My Basis colleague deployed it and faced the above mentioned warning

        Is the above procedure correct? I will get back to you soon with the detailed error.

        Regards,

        Nitin

        (0) 
  2. Nitin Deshpande

    Hello Eng Swee Yeoh

    Please find below the log file, for more information on the error i am facing.

    Error occurred while trying to load com.equalize.xpi.af.modules.util.AbstractMod

    ule

    ————————- Loader Info ————————-

    ClassLoader name: [sap.com/com.equalize.xpi.af.modules.app]

    Loader hash code: 61ab2023

    Living status: alive

    Direct parent loaders:

       [system:Frame]

       [interface:webservices]

       [interface:cross]

       [interface:security]

       [interface:transactionext]

       [library:webservices_lib]

       [library:opensql]

       [library:jms]

       [library:ejb20]

       [service:p4]

       [service:ejb]

       [service:servlet_jsp]

       [service:engine.security.facade]

       [interface:com.sap.aii.af.ifc.facade]

       [library:com.sap.aii.af.lib.facade]

       [service:com.sap.aii.af.svc.facade]

    Resources:

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    app_libraries_container\dom4j-1.6.1.jar

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    app_libraries_container\poi-3.9-20121203.jar

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    app_libraries_container\xmlbeans-2.3.0.jar

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    app_libraries_container\com.equalize.xpi.util.jar

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    app_libraries_container\poi-ooxml-3.9-20121203.jar

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    app_libraries_container\poi-ooxml-schemas-3.9-20121203.jar

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    EJBContainer\applicationjars\com.equalize.xpi.af.modules.ejb.jar

    —————————————————————

    Error occurred while trying to load com.equalize.xpi.af.modules.DynamicAttribute

    ChangeBean

            at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiPare

    ntClassLoader.java:250)

            at com.sap.engine.services.ejb3.runtime.impl.Actions_BeanClassesInitiali

    zation.loadApplicationClass(Actions_BeanClassesInitialization.java:54)

            at com.sap.engine.services.ejb3.runtime.impl.Actions_BeanClassesInitiali

    zation.loadApplicationClasses(Actions_BeanClassesInitialization.java:41)

            at com.sap.engine.services.ejb3.runtime.impl.Actions_ComponentInterfaces

    ProviderClassesInitialization.loadApplicationClasses(Actions_ComponentInterfaces

    ProviderClassesInitialization.java:20)

            at com.sap.engine.services.ejb3.runtime.impl.Actions_SessionBeanClassesI

    nitialization.loadApplicationClasses(Actions_SessionBeanClassesInitialization.ja

    va:20)

            at com.sap.engine.services.ejb3.runtime.impl.Actions_StatelessBeanClasse

    sInitialization.loadApplicationClasses(Actions_StatelessBeanClassesInitializatio

    n.java:18)

            at com.sap.engine.services.ejb3.runtime.impl.Actions_BeanClassesInitiali

    zation.perform(Actions_BeanClassesInitialization.java:27)

            at com.sap.engine.services.ejb3.container.CompositeAction.perform(Compos

    iteAction.java:84)

            at com.sap.engine.services.ejb3.container.ApplicationStarter.perform(App

    licationStarter.java:213)

            at com.sap.engine.services.ejb3.container.ContainerInterfaceImpl$Actions

    .perform(ContainerInterfaceImpl.java:1133)

            at com.sap.engine.services.ejb3.container.ContainerInterfaceImpl.prepare

    Start(ContainerInterfaceImpl.java:575)

            at com.sap.engine.services.deploy.server.utils.container.ContainerWrappe

    r.prepareStart(ContainerWrapper.java:509)

            at com.sap.engine.services.deploy.server.application.StartTransaction.pr

    epareCommon(StartTransaction.java:403)

            … 29 more

    Caused by: java.lang.NoClassDefFoundError: Module

    ————————- Loader Info ————————-

    ClassLoader name: [sap.com/com.equalize.xpi.af.modules.app]

    Loader hash code: 61ab2023

    Living status: alive

    Direct parent loaders:

       [system:Frame]

       [interface:webservices]

       [interface:cross]

       [interface:security]

       [interface:transactionext]

       [library:webservices_lib]

       [library:opensql]

       [library:jms]

       [library:ejb20]

       [service:p4]

       [service:ejb]

       [service:servlet_jsp]

       [service:engine.security.facade]

       [interface:com.sap.aii.af.ifc.facade]

       [library:com.sap.aii.af.lib.facade]

       [service:com.sap.aii.af.svc.facade]

    Resources:

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    app_libraries_container\dom4j-1.6.1.jar

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    app_libraries_container\poi-3.9-20121203.jar

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    app_libraries_container\xmlbeans-2.3.0.jar

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    app_libraries_container\com.equalize.xpi.util.jar

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    app_libraries_container\poi-ooxml-3.9-20121203.jar

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    app_libraries_container\poi-ooxml-schemas-3.9-20121203.jar

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    EJBContainer\applicationjars\com.equalize.xpi.af.modules.ejb.jar

    —————————————————————

    Error occurred while trying to load com.equalize.xpi.af.modules.util.AbstractMod

    ule

            at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiPare

    ntClassLoader.java:250)

            at java.lang.ClassLoader.defineClass1(Native Method)

            at java.lang.ClassLoader.defineClassCond(ClassLoader.java:735)

            at java.lang.ClassLoader.defineClass(ClassLoader.java:716)

            at com.sap.engine.boot.loader.ResourceMultiParentClassLoader.loadClassLo

    cal(ResourceMultiParentClassLoader.java:189)

            at com.sap.engine.boot.loader.MultiParentClassLoader.findClassInLoaderGr

    aph(MultiParentClassLoader.java:316)

            at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiPare

    ntClassLoader.java:275)

            at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiPare

    ntClassLoader.java:247)

            … 41 more

    Caused by: java.lang.NoClassDefFoundError: Module

            at java.lang.ClassLoader.defineClass1(Native Method)

            at java.lang.ClassLoader.defineClassCond(ClassLoader.java:735)

            at java.lang.ClassLoader.defineClass(ClassLoader.java:716)

            at com.sap.engine.boot.loader.ResourceMultiParentClassLoader.loadClassLo

    cal(ResourceMultiParentClassLoader.java:189)

            at com.sap.engine.boot.loader.MultiParentClassLoader.findClassInLoaderGr

    aph(MultiParentClassLoader.java:316)

            at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiPare

    ntClassLoader.java:275)

            at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiPare

    ntClassLoader.java:247)

            … 48 more

    Caused by: java.lang.ClassNotFoundException: Module

    ————————- Loader Info ————————-

    ClassLoader name: [sap.com/com.equalize.xpi.af.modules.app]

    Loader hash code: 61ab2023

    Living status: alive

    Direct parent loaders:

       [system:Frame]

       [interface:webservices]

       [interface:cross]

       [interface:security]

       [interface:transactionext]

       [library:webservices_lib]

       [library:opensql]

       [library:jms]

       [library:ejb20]

       [service:p4]

       [service:ejb]

       [service:servlet_jsp]

       [service:engine.security.facade]

       [interface:com.sap.aii.af.ifc.facade]

       [library:com.sap.aii.af.lib.facade]

       [service:com.sap.aii.af.svc.facade]

    Resources:

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    app_libraries_container\dom4j-1.6.1.jar

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    app_libraries_container\poi-3.9-20121203.jar

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    app_libraries_container\xmlbeans-2.3.0.jar

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    app_libraries_container\com.equalize.xpi.util.jar

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    app_libraries_container\poi-ooxml-3.9-20121203.jar

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    app_libraries_container\poi-ooxml-schemas-3.9-20121203.jar

       E:\usr\sap\YIP\J00\j2ee\cluster\apps\sap.com\com.equalize.xpi.af.modules.app\

    EJBContainer\applicationjars\com.equalize.xpi.af.modules.ejb.jar

    Regards,

    Nitin Deshpande

    (0) 
    1. Eng Swee Yeoh Post author

      Hi Nitin

      What version & SP of PI are you deploying the EAR file to?

      Can you also please make sure that your Basis colleague is using a version of NWDS that is compatible with the PI system?

      I have tried redeploying the EAR file (that was uploaded on GitHub) following the below steps and did not encounter any issues.

      Deploying .EAR files on PI 7.1 Using SAP NetWeaver Developer Studio

      From the trace, I found that the error was caused by the following.

      Caused by: java.lang.NoClassDefFoundError: Module

      com.sap.aii.af.lib.mp.module.Module is a standard PI adapter framework class which should be already available in the PI system. It is in the JAR file com.sap.aii.af.lib.mod.jar which you can check via Java Class Loaded Viewer in NWA as shown below.

      /wp-content/uploads/2015/08/loader_778392.png

      My gut feel is that you are running on a version of PI or NWDS that is not compatible.

      Rgds

      Eng Swee

      (0) 
      1. Nitin Deshpande

        Hello Eng Swee Yeoh

        Thanks a lot for your reply.

        I am running this on SAP PO 7.4 system SP 08.

        And EAR file is not being deployed using NWDS, i have provided it to my Basis colleague and he is deploying it using Deployment Controller.

        Regards,

        Nitin Deshpande

        (0) 
        1. Eng Swee Yeoh Post author

          Hi Nitin

          I’m not familiar with Deployment Controller. So far many others have downloaded and deployed the EAR file successfully without issue.

          I would suggest that you ask your Basis colleague to deploy it using NWDS or maybe through Telnet (search on SCN for how that’s done).

          Rgds

          Eng Swee

          (0) 
          1. Nitin Deshpande

            Hi Eng,

            I am using NWDS 7.31 SP13 to deploy this EAR file. Am i using the right version?

            As NWDS 7.4 is not yet released, i have read it on SCN that we are supposed to use NWDS 7.31 with SP +5 as that of your PO 7.4 system.

            While i am deploying i am getting the System not responding error, when i run the EAR file using

            Run As -> Run on Server -> System Name

            Error during deployment

              Error during deployment: System *** not responding.

              System *** not responding.

            Do you have any idea on how to resolve this issue?

            Regards,

            Nitin Deshpande

            (0) 
            1. Nitin Deshpande

              Hello Eng Swee Yeoh

              I have fixed the system not responding error. Now i am able to deploy the EAR file using NWDS. But the deployment with the warning. I ignored it and tried triggering the data through the channel where i have used the FormatConversionBean module.

              And i get the below error in my receiver channel. May be the below error description will help you tell me what is the error exactly and help me resolve this issue –

              Message processing failed. Cause: javax.naming.NamingException: Exception during lookup operation of object with name localejbs/Custom_AF_Modules/FormatConversionBean, cannot resolve object reference. [Root exception is javax.naming.NamingException: Error occurs while the EJB Object Factory trying to resolve JNDI reference Reference Class Name: Type: clientAppName Content: sap.com/com.equalize.xpi.af.modules.app Type: interfaceType Content: local Type: local-home Content: com.sap.aii.af.lib.mp.module.ModuleLocalHome Type: ejb-link Content: FormatConversionBean Type: jndi-name Content: Custom_AF_Modules/FormatConversionBean Type: local Content: com.sap.aii.af.lib.mp.module.ModuleLocal com.sap.engine.services.ejb3.runtime.impl.refmatcher.EJBResolvingException: Cannot start application sap.com/com.equalize.xpi.af.modules.app; nested exception is: java.rmi.RemoteException: ASJ.dpl_ds.006125 Error occurred while starting application locally and wait.; nested exception is: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception while [preparing start of application sap.com/com.equalize.xpi.af.modules.app]. at com.sap.engine.services.ejb3.runtime.impl.DefaultContainerRepository.startApp(DefaultContainerRepository.java:347) at com.sap.engine.services.ejb3.runtime.impl.refmatcher.result.SingleResultImpl.add(SingleResultImpl.java:93) at com.sap.engine.services.ejb3.runtime.impl.refmatcher.BeanMatcher.matchLocalInterfaces(BeanMatcher.java:185) at com.sap.engine.services.ejb3.runtime.impl.refmatcher.BeanMatcher.matchInterfaces(BeanMatcher.java:87) at com.sap.engine.services.ejb3.runtime.impl.refmatcher.BeanMatcher.matchReferenceToBean(BeanMatcher.java:50) at com.sap.engine.services.ejb3.runtime.impl.DefaultContainerRepository.matchBean(DefaultContainerRepository.java:386) at com.sap.engine.services.ejb3.runtime.impl.DefaultContainerRepository.matchApps(DefaultContainerRepository.java:363) at com.sap.engine.services.ejb3.runtime.impl.DefaultContainerRepository.getEnterpriseBeansContainers(DefaultContainerRepository.java:94) at com.sap.engine.services.ejb3.runtime.impl.DefaultRemoteObjectFactory.resolveReference(DefaultRemoteObjectFactory.java:82) at com.sap.engine.services.ejb3.runtime.impl.EJBObjectFactory.getObjectInstance(EJBObjectFactory.java:197) at com.sap.engine.services.ejb3.runtime.impl.EJBObjectFactory.getObjectInstance(EJBObjectFactory.java:109) at com.sap.engine.system.naming.provider.ObjectFactoryBuilderImpl._getObjectInstance(ObjectFactoryBuilderImpl.java:76) at com.sap.engine.system.naming.provider.ObjectFactoryBuilderImpl.access$100(ObjectFactoryBuilderImpl.java:33) at com.sap.engine.system.naming.provider.ObjectFactoryBuilderImpl$DispatchObjectFactory.getObjectInstance(ObjectFactoryBuilderImpl.java:226) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:283) at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:435) at com.sap.engine.services.jndi.implclient.OffsetClientContext.lookup(OffsetClientContext.java:224) at com.sap.engine.services.jndi.implclient.OffsetClientContext.lookup(OffsetClientContext.java:243) at javax.naming.InitialContext.lookup(InitialContext.java:392) at javax.naming.InitialContext.lookup(InitialContext.java:392) at com.sap.aii.af.lib.util.ejb.FastEjbFactory.createEjbInstance(FastEjbFactory.java:70) at com.sap.aii.af.lib.util.ejb.FastEjbFactory.createEjbInstance(FastEjbFactory.java:51) at com.sap.aii.af.app.mp.ejb.ModuleProcessorBean.getModuleLocal(ModuleProcessorBean.java:385) at com.sap.aii.af.app.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:261) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:47) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:50) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:37) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_MethodRetry.invoke(Interceptors_MethodRetry.java:46) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:191) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:23) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:25) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:17) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:138) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:172) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:99) at com.sun.proxy.$Proxy453.process(Unknown Source) at com.sap.aii.af.app.listener.AFWListenerBean.onMessage(AFWListenerBean.java:430) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:47) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:50) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:37) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_MethodRetry.invoke(Interceptors_MethodRetry.java:46) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:191) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:23) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:25) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:17) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:138) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:172) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:99) at com.sun.proxy.$Proxy402.onMessage(Unknown Source) at com.sap.engine.messaging.impl.spi.ServicesImpl.deliver(ServicesImpl.java:361) at com.sap.aii.adapter.xi.ms.XIEventHandler$TRPProcessingBlock.process(XIEventHandler.java:1717) at com.sap.engine.messaging.impl.spi.stage.ProcessorImpl.proceedToProcessingBlock(ProcessorImpl.java:99) at com.sap.engine.messaging.impl.spi.stage.ProcessorImpl.processMessage(ProcessorImpl.java:70) at com.sap.aii.adapter.xi.ms.processor.ScenarioConfigurableProcessor.processMessage(ScenarioConfigurableProcessor.java:52) at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:462) at com.sap.engine.messaging.impl.core.queue.consumer.SendConsumer.processMessage(SendConsumer.java:324) at com.sap.engine.messaging.impl.core.queue.consumer.SendConsumer.onMessage(SendConsumer.java:103) at com.sap.engine.messaging.impl.core.queue.Queue.run(Queue.java:1064) at com.sap.engine.messaging.runtime.MSWorkWrapper.run(MSWorkWrapper.java:58) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:185) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:302)


              Regards,

              Nitin Deshpande

              (0) 
              1. Eng Swee Yeoh Post author

                Hi Nitin

                From the trace, I think the module was not deployed correctly as the JNDI reference cannot be resolved. If it is deployed correctly, you should be able to view it in the JNDI Browser of NWA. Do verify this.

                /wp-content/uploads/2015/09/jndi_780944.png

                I’m not sure how you are deploying this in NWDS, because there shouldn’t be any warnings. You should use the Deploy View instead of Running the EAR file on server. Please follow the steps listed in the link of my previous reply.

                Rgds

                Eng Swee

                (0) 
                1. Nitin Deshpande

                  Hello Eng,

                  This issue has been resolved. The problem was with the NWDS not properly configured to deploy the EAR files. I configured it and it works absolutely fine.

                  And the encoding part using Base64 encoder Module is working perfectly. Thanks a lot for the Module and your help in resolving the issue.

                  Regards,

                  Nitin Deshpande

                  (0) 
                  1. Eng Swee Yeoh Post author

                    Glad to hear that it’s been deployed correctly and works fine! 🙂 If you don’t mind, would be good if you share what exactly was the missing/incorrect NWDS configuration and how you fixed it. This might benefit others who come across a similar issue in the future.

                    (0) 
  3. Sam PI

     

    Hi there.. Ecellent work indeed.I have downloaded the EAR and deployed it to success.Let me explain what i am trying to do.

    1. Proxy -> REST call
    2. Usage of dynamic config to build URL.
    3. Requirement to send binary data.

    When i use the adaptermodule just before the REST adapter is called, i get an error as below:

    com.sap.aii.adapter.rest.ejb.sender.InterfaceExtensionFailedException: Could not parse message content to add interface element

    Please suggest something to help close out my requirement.

    (0) 

Leave a Reply