Calling stopApp(String, Map) on J2EEServer instance results in exception

Hi All,
I'm trying to stop a deployed application on SJSAS 8.1 using AMX beans. The specific problem that I am having is that I receive an IllegalArgumentException when I call stopApp(String, Map) on an instance of J2EEServer.
The API documentation for J2EEServer leaves quite a lot to the imagination and as a result I'm not sure if I'm putting the correct information in the Map object. I have tried all sorts of things including passing in null and empty maps but every combination results in the same exception.
The code I am using is as follows:
        final String host = "localhost";
        final int port = 4867;
        final String user = "admin";
        final String password = "adminpassword";
        final TLSParams tlsParams = null;
        final AppserverConnectionSource conn =
        new AppserverConnectionSource(AppserverConnectionSource.PROTOCOL_RMI,
                                      host, port, user, password, tlsParams, null);
        JMXConnector jmxConn;
        DomainRoot dr = null;
        J2EEDomain j2eeDomain;
        J2EEServer j2eeServer = null;
        try
            jmxConn = conn.getJMXConnector(false);
            dr = conn.getDomainRoot();
            j2eeDomain = dr.getJ2EEDomain();
            final Map servers = j2eeDomain.getServerMap();
            j2eeServer = (J2EEServer) servers.get("sjsas-instance");
        catch (IOException ioe)
            fail("Test threw an unexpected exception, details: " + ioe.getMessage());
        System.out.println("Domain name is: " + dr.getAppserverDomainName());
        Map map = new HashMap();
        map.put(DeploymentMgr.DEPLOY_OPTION_NAME_KEY, "my-application-name");
        j2eeServer.stopApp("spr-adapter", map);The exception that I'm getting is as follows:
java.lang.reflect.UndeclaredThrowableException
     at $Proxy3.stopApp(Unknown Source)
     at JMSConnectivityTest.testJMSConnectivity(JMSConnectivityTest.java:65)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
Caused by: java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at com.sun.enterprise.management.support.AMXImplBase.invoke(AMXImplBase.java:1363)
     at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
     at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
     at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
     at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
     at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1410)
     at javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81)
     at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1247)
     at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1343)
     at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:784)
     at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
     at sun.rmi.transport.Transport$1.run(Transport.java:153)
     at java.security.AccessController.doPrivileged(Native Method)
     at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
     at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
     at java.lang.Thread.run(Thread.java:595)
Caused by: javax.management.RuntimeOperationsException: Exception occured trying to get an MBean
     at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:999)
     at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:804)
     at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
     at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:201)
     at $Proxy12.stopAndReturnStatusAsMap(Unknown Source)
     at com.sun.enterprise.management.j2ee.J2EELogicalServerImplBase.stopApp(J2EELogicalServerImplBase.java:106)
     ... 24 more
Caused by: java.lang.IllegalArgumentException: Object name cannot be null
     ... 30 moreAnd the entry I get in the server.log is as follows:
[#|2008-06-09T16:32:55.399+0100|FINER|sun-appserver-ee8.1_02|javax.enterprise.system.tools.admin.server.mbeans.J2EEServer:sjsas-instance|_ThreadID=22;|# AMXImplBase.invoke: stopApp{java.lang.String,java.util.Map} on amx:j2eeType=J2EEServer,name=sjsas-instance|#]
[#|2008-06-09T16:32:55.399+0100|FINER|sun-appserver-ee8.1_02|javax.enterprise.system.tools.admin.server.mbeans.J2EEServer:sjsas-instance|_ThreadID=22;|invoking: public void com.sun.enterprise.management.j2ee.J2EELogicalServerImplBase.stopApp(java.lang.String,java.util.Map)|#]if anyone can provide any pointers I'd be most grateful of the assistance.
Cheers,
Edd

Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!
Try a Coke-a-Cola ther good!

Similar Messages

  • Variable to String Mapping

    I'm new to flash and working to embed the flash player in a .NET application. It's going "well" for the definition of "well" that adding the COM control and getting it to play a movie was easy and took about 3 minutes.
    What's not going well is that I cannot find documentation on the variable to string mapping used the SetParameter variable parameter. To coordinate between the apps, I want to be able to say: "flashPlayer.SetVariable("flash_variable", "value_to_set"). Obviously SetVariable does this. What's not obvious is how "flash_variable" is constructed.
    For example, in the actionscript for a button called "OneBigButton" I have the following code:
    OneBigButton.addEventListener( MouseEvent.CLICK, onClick );
    var testSetValue = "value";
    function onClick(evt:MouseEvent):void {
        trace("got the click " + testSetValue);
        outputText.text = testSetValue;
    When I try this:
    flashPlayer.SetVariable( "testSetValue", "foo" );
    The results do not get set in testSetValue.
    I'd love a pointer to the documentation on how namespaces, class instances, etc affect the string construction used in SetVariable and GetVariable as I can't find it anywhere.
    Thanks in advance!

    From the second blog post:http://bojordan.com/log/?p=269
    "To set a variable in the Flash code named “myFlashVariable” to the value “Hello Flash”, just call:
        this.yourFlashControl.SetVariable("myFlashVariable", "Hello Flash!");"
    What I was originally looking for, is documentation for how the string "myFlashVariable" is constructed in the face of name spaces, containing classes etc. Sounds like this is now complex and obsolete.
    ExternalInterface does what I'm looking for -- since one can obviously use it to produce a "set" function and hopefully a "get" function as well.
    Of course that left me looking for the detailed documentation about how the as3 function signature is translated back and forth from XML. That's available under the tree here:
    http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Liv eDocs_Parts&file=00000340.html
    and is specifically addressed here (though notably they specify <arguments> by example only and I'm still not 100% clear on how return values work):
    http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Liv eDocs_Parts&file=00000340.html

  • External Assembly Call in BizTalk Map

    Hello All,
    I am trying to call an external assembly as below from a scripting Functoid:
    public static string dblookup()
    string eaidbconnection = null;
    eaidbconnection = System.Convert.ToString(BizTalk.CE.Eai.Common.EaiSettings.GetSetting("ForecastFileExclusions"));
    return eaidbconnection;
    But when I do so and test the map am getting the below error: Exception has been thrown by the target of an invocation.Object reference not set to an instance of an object.
    When I deploy the application and then use the map as inbound map in the receive port I get the error as : Exception has been thrown by the target of an invocation.
    The external assembly is gaced in assembly too.
    What is wrong with the code?

    Hello All,
    Even when I change the code of the method to just return a string it is not working :
    public static string dblookup()
    string eaidbconnection = null;
    eaidbconnection = "Provider=SQLOLEDB;Server=ServerName\SQL02;Database=EAI_Main;Integrated Security=SSPI;";
    return eaidbconnection;
    I am using a databaselookup functoid and want to keep the database name input as configurable. so want to fetch it from a table.. but that is not working so in the above code am simply returning the connection string from the method and that is also not
    working. But, when use this connection string directly in the db functoid it works. There seems to be something wrong when I am calling the external assembly from sricting functoid. I think this is a server issue ?  so is there anythign I can check to
    confirm the same ?

  • Can we call a Java Map in Message  Map

    Hello,
    Can we call a Java Map in Message  Map
    Thanks and Regards
    Hemant

    Hello Vijay,
    I think this is your code:
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import java.util.Map;
    import java.io.*;
    public class PayloadToXMLField1 implements StreamTransformation {
        String strXML = new String();
       //Declare the XML tag for your XML message
       String StartXMLTag = "<DocumentBody>";
       String EndXMLTag = "</DocumentBody>";
       //String StartXMLTag1 = "<Code>";
       //String EndXMLTag1 = "</Code>";
        AbstractTrace trace;
        private Map param = null;
        public void setParameter(Map param) {
            this.param = param;
        public void execute(InputStream in, OutputStream out) {
            trace =
                (AbstractTrace) param.get(
                    StreamTransformationConstants.MAPPING_TRACE);
            trace.addInfo("Process Started");
            try {
                StringBuffer strbuffer = new StringBuffer();
                byte[] b = new byte[4096];
                for (int n;(n = in.read(b)) != -1;) {
                    strbuffer.append(new String(b, 0, n));
                strXML = strbuffer.toString();
            } catch (Exception e) {
                System.out.println("Exception Occurred");
            String outputPayload =
                StartXMLTag
             + "<![CDATA["
             + strXML
             + "]]>"
             + EndXMLTag;
            try {
                out.write(outputPayload.getBytes());
             trace.addInfo("Process Completed");;
            } catch (Exception e) {
                trace.addInfo("Process Terminated: Error in writing out payload");;
    I need this code to be converted in UDF if Java map cannot be called in Message Map.
    Can anyone help me how to write UDF for the same java map.
    Thanks and Regards
    Hemant

  • How to call the second mapping in the first mapping fails in the BPM

    Hi All,
    I have a scenario like this.
    There are two mappings. There is a one condition while genearying the root element of the first mapping. If this condition is not satisfies the first mapping will fail. If this mapping fails i want to trigger another mapping.
    How to achieve this functionality.
    If it is possible with BPM. how to call the second mapping in the BPM.

    Hi
    you can not create the containter for the synchronous interfaces.
    you have to craete the two asysnchronous abstact interfaces .
    thenusing those two abstract interfaces you have to define the containers in the BPM.
    and you also have to define the interface mapping b/w those two abstract interfaces.
    once you define the interface mapping you will be able to select the interface mapping using the transformation step in BPM.
    once you select the interface mapping in BPM then you will be able to selece the interfaces
    if you still face the problenm please reply me back.
    Thanks
    Rinku Gangwnau

  • Is there a script called stopapps.sh to shutdown the Oracle Application

    Hi,
    Is there a script called stopapps.sh to shutdown the Oracle Application Server? Thank you in advance.

    Hi,
    I m posting in terms of oracle Application Server 10g release2 and release3,
    There is no script like stopapps.sh
    In order to stop an application server.
    *./opmnctl.sh stopall*
    opmnctl .sh is found in the location:$ORACLE_HOME/opmn/bin
    For more details,follow the below link
    Stopping OAS infra
    http://docs.oracle.com/cd/B1590401/core.1012/b13995/start.htm#i1031913_
    Stopping OAS midteir
    http://docs.oracle.com/cd/B1590401/core.1012/b13995/start.htm#i1032140_
    Regards
    Fabian

  • Synchronous Call without Operations Mapping

    Hi All,
    We have requirement to call a web service from WebDynpro hosted on BW system via PI. For this wanted to use AAE (advanced adapter engine) with SOAP to SOAP adapters. We are thinking of implementing this interface without message mapping hence no operation mapping.
    There are two reasons for this, 1. To increase the speed for the call 2. In PI there is nothing to transform, just to proxy it thru
    Now here my question are,
    Is our approach correct?
    Can we implement synchronous calls without operation mapping?
    Here we are using integrated configuration for this interface.
    If this approach is wrong, please suggest me a better way to proxy-ing PI for given requirement.
    Thanks in advance.
    Regards,
    Prasad.
    Edited by: PrasadBabu Koribilli on Mar 30, 2011 9:46 AM

    Hello Stefan,
    Thank you for the reply.
    I proposed the same to the project. But as per the guidelines any connection to backend SAP system should go through PI. So i will have to find a solution to satisfy both.
    So please advise.
    Thanks,
    Prasad.

  • How to call iOS 6 Maps from App

    Hi,
    i am searching around for an answer but could not find one. I want to call ne the Maps app from mit App to show me the possible routes to my target location. Before iOS 6 my call looks like this:
    http://maps.google.com/maps?saddr=37.785834,-122.406417&daddr=49.305500,8.132570
    The Google Maps app open as expected with the possible routes for selection. Now under iOS 6 i changed my call like this:
    maps://q=&saddr=37.785834,-122.406417&daddr=49.305500,8.132570&view=map
    This opens the new Maps app correctly but i get the following error:
    Directions Not Available
    Directions could not be found between these locations.
    Whats the problem? Do i miss something?
    greetings Mike

    Before updating my iPhone the maps were great but with this new OS 6 the maps are not working...is there is anyway we can have the previous maps until they fix the problem?!!!

  • How to call a package from a different instance?

    Dear all:
    how to call a package from a different instance?
    for example:
    package A belongs to instance A1
    package B belongs to instance B1
    Now I want to call the package B in instance A1, how can I do ? my environment is oracle 10g
    Regards
    Terry

    Terry Chen wrote:
    Dear all:
    how to call a package from a different instance?
    for example:
    package A belongs to instance A1
    package B belongs to instance B1
    Now I want to call the package B in instance A1, how can I do ? my environment is oracle 10g
    First you have to create create dblink in A1 database as below
    CREATE DATABASE LINK INSA1
       CONNECT TO USER_NAME IDENTIFIED BY <pass>
       USING 'B!' Then you can execute exec pack_b@INSA1;

  • How to execute a string formula and assign the result to a number field

    How to execute a string formula and assign the result to a number field
    Hi,
    we have a function that returns a string like this:
    '(45+22)*78/23'
    After we should calculate this string and assign the value to a numeric block field
    Example:
    k number(16,3);
    k:=fun1('(45+22)*78/23'); where fun1 execute and translate to number the string.
    Does exist a function like fun1 ??
    How can we do ?
    Regards

    Hello,
    this is the code that does the job:
    SQL> set serveroutput on
    SQL> DECLARE
    2 ch VARCHAR2(20) :='22+10' ;
    3 i NUMBER ;
    4 BEGIN
    5 EXECUTE IMMEDIATE 'select ' || ch || ' from dual' INTO i;
    6 dbms_output.put_line ('i = ' || TO_CHAR(i));
    7 END ;
    8 /
    i = 32
    Procédure PL/SQL terminée avec succès.
    SQL>
    just you have to do is to create a small stored function that take the string to calculate and return the number result
    Francois

  • Strange file called masterNames.strings launches xcode at startup

    I've just upgraded my hard drive to 640GB and duplicated the previous 500GB hard drive with SuperDuper. Everything seems like how it is supposed to be, except that xcode launches this strange file called "masterNames.strings" when I start the machine. Below is the content of the file.
    "Title & Bullets - Right" = "标题与项目符号 - 右对齐";
    "Title - Top" = "标题 - 顶部对齐";
    "Bullets" = "项目符号";
    "Title - Center" = "标题 - 居中";
    "Title, Bullets & Photo" = "标题、项目符号与照片";
    "Blank - Ornamental Border" = "空白 - 装饰边框";
    "Title & Bullets" = "标题与项目符号";
    "Title & Bullets - Left" = "标题与项目符号 - 左对齐";
    "Blank" = "空白";
    "Photo - 3 Up" = "照片 - 3 联";
    "Title & Bullets - 2 Column" = "标题与项目符号 - 2 栏";
    "Photo - Vertical" = "照片 - 垂直";
    "Title & Subtitle" = "标题与副标题";
    "Photo - Horizontal" = "照片 - 水平";
    Apparently it's in Chinese but Chinese is not at all the language I've set up the OS with. I use U.S. English. I do not know where this file came from. I've repaired permissions using Maintenance but it doesn't seem to fix it.
    I've googled around to see if anyone has experienced a similar problem and found one (and only one) that looks strikingly similar to my issue, except that the language is Portuguese for him. Here's the link to that thread. It was two years ago and doesn't look like it was solved.
    http://discussions.apple.com/thread.jspa?threadID=1800575
    Could somebody please help me? This is pretty annoying.

    Open Accounts preferences and click on the Login Items tab. If you see that file in the list then select it and click on the Delete [-] key.
    Consider otherwise that your clone is not good unless it's also happening on the drive you replaced.

  • Calling a PP03 BDC  from abap webdynpro throws an exception from the class

    Hi Experts,
    I am calling a BDC FM for PP03 TCPDE form abap webdynpro.
    When i run the standalone FM, it works fine and When called from Webdynpro its giving a dump saying an exception is raised in the class CL_GUI_SPLITTER_CONTAINER.
    Can you please let me know how to resolve the issue? Your siggestions will be of great help to me.
    Thanks,
    Shilpa

    >
    shilpa hv wrote:
    > Hi Experts,
    >
    > I am calling a BDC FM for PP03 TCPDE form abap webdynpro.
    > When i run the standalone FM, it works fine and When called from Webdynpro its giving a dump saying an exception is raised in the class CL_GUI_SPLITTER_CONTAINER.
    >
    >
    > Can you please let me know how to resolve the issue? Your siggestions will be of great help to me.
    >
    >
    > Thanks,
    > Shilpa
    Hi,
    The FM might be calling a dialog or bringing a GUI screen up. This would cause the Webdynpro session to disconnect abruptly.
    Any conversion exit, GUI screen,dialog popup, transaction handling..etc would cause the webdynpro to disconnect. So you cannot use all FM's as it is.

  • Mapping lookup API - Payload result = accessor.call(payload)

    I'm trying to execute a ABAP FM from XI mapping via user defined FM...the results seems to be inconsistent all the time.
    I'm trying to pass 2 parameters to the FM, sometimes one of the 2 gets passed and if I switch them around, get the one not the other. Its seems really strange. I tried passing same values for both and now I don't see either.
    Could there be timing issue with actual activation of code and execution of my interface. I'm really confused. Has anyone faced same issues.
    Thank you.

    hi parimala,
    we have used an RFC look up from our User Defined functions and have not faced any issues.
    Just to confirm if you have done this,
    XmlPayload payload = LookupService.getXmlPayload(inputStream);
    Payload rfcOutPayload = accessor.call(payload);
    inputstream will contain the RFC REQUEST message in XML format along with the corresponding values for the input to the RFC populated.
    Check the RFC and see the input it contains and populate the values correspondingly in the XML strcutur e and then convert it to an InputStream and pass it to the Above code.
    It should work, coz it worked fine for me.
    Regards,
    Bhavesh

  • RFC Call in Message Mapping

    Hi there
    I am trying to do a table lookup from XI in my message mapping by calling an remote RFC. The return values must return ALL the value for a specific column. The code I have here returns a blank value. Can someone see what my problem may be?
    My variables for my UDF is:
    public String UDF_RFC(String DBTABLE,String MATNR,String FIELDS,String businessSystem,String communicationChannel,Container container)
    And my Code:
    "My code appears to mess up my message structure, I will attach it in a responce..
    Thanks,
    Jan
    Edited by: Jan de Lange on Sep 16, 2009 11:09 AM
    Edited by: Jan de Lange on Sep 16, 2009 11:09 AM

    // declare parameters
    String returnValue = "";
    String rfcXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:ZINT_XI_GET_SITES xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\"><LT_SITES><item><WERKS></WERKS></item></LT_SITES></ns0:ZINT_XI_GET_SITES>";
    AbstractTrace trace = container.getTrace();
    RfcAccessor accessor = null;
    ByteArrayOutputStream out = null;
    try
    // 1. Determine a communication channel (Business system + Communication channel)
    Channel channel = LookupService.getChannel(businessSystem,communicationChannel);
    // 2. Get a RFC accessor for the channel.
    accessor = LookupService.getRfcAccessor(channel);
    // 3. Create an XML input stream that represents the RFC request message.
    InputStream inputStream = new ByteArrayInputStream(rfcXML.getBytes());
    // 4. Create the XML Payload
    XmlPayload payload = LookupService.getXmlPayload(inputStream);
    // 5. Execute the lookup.
    Payload result = null;
    result = accessor.call(payload);
    InputStream in = result.getContent();
    // 6. Create a DOM structure from the input XML
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse(in);
    NodeList      nodelist = document.getElementsByTagName("*");
    Node          node;
    Element       element;
    NamedNodeMap  nnm = null;
    String attrname;
    String attrval;
    int    i, len;
    len = nodelist.getLength();
    for (int j=0; j < len; j++) {
                element = (Element)nodelist.item(j);
                System.out.println(element.getTagName() + ":");
                nnm = element.getAttributes();
            if (nnm != null) {
                for (i=0; i<nnm.getLength(); i++) {
                    node = nnm.item(i);
                    attrname = node.getNodeName();
                    attrval  = node.getNodeValue();
                    returnValue += attrname + " = " + attrval + "##";
    // 7. To free resources, close the accessor..
    if (accessor!=null) {
    try {
    accessor.close();
    } catch (LookupException e) {
    trace.addWarning("Error while closing accessor " + e.getMessage() );
    } catch (Exception e) {
    trace.addWarning("Error" + e);
    // 8. return a single id value to the message mapping
    return returnValue;

  • Map Fields, store procedure results is "Expr1000"

    Hi guys.
    This is my problem.
    I have a sql server 2005 database. In this database i have a store procedure (3100 lines, with temporal tables, unions .. etc).
    When i try to create the report in CR9, i do this :
    1) i'm go to "set datasource location"
    2) select the database
    3) select the store procedure
    4) put some parameters
    5) Accept
    When i want to add the fields to the report ....
    the only results from the SP is a result field called "Expr1000".
    I execute the store in my sql server and this give me all the columns results (174 columns).
    My question is:
    What is the error , that in CR9 i can't see all the columns results , and only i can see "Expr1000".
    Thanks !!!!!
    Pablo Reynoso.

    This is definitely not the solution for everyone but reading this thread made me do a little more checking on my own.
    I too was receiving the "Expr1000" field from the SP when linking it into a new report or even when trying to MAP fields in an existing report template.  In the Map Fields dialog the source SP had no fields displayed for Mapping.
    What I discovered was S.U.E. (stupid user error).  While testing some changes to the source SP I changed the return result from returning data to returning the actual sql code I was constructing in the SP.  I often write the code into a local string variable and then use the 'exec(@str);' command as the final step of the SP.  I changed that code to 'Select @str;' which returned the @str string value when I executed the SP from within SQL Manager - to see the actual sql code.
    I never changed the code back to using the 'exec(@str);' so I was returning a 4,000+ char string from the SP which when loaded into Crystal the SP "field" became "Expr1000".
    After making this little change, returning the data instead of a single LARGE string the report behavior returned to what is was before the testing snafu.
    Hope this helps someone else, at least maybe point them to their code changes and not necessarily the CR template.
    Dave

Maybe you are looking for

  • Profit center wise vendor / customer invoices

    hi experts, i believe profit center wise balance sheet is a possible but i am not sure how. but one thing that beats me is how can i make profit center wise invoices on vendor and customer. if its a question of some customization do explain me regard

  • Clustering not Load balancing on solaris with apache

    apache weblogic plugin does not do round-robin , it's kind of random when           direct the request to the appserver. anyone has seen this problem?           weblogic5.1 sp9. solaris 2.7 jre1.3.1 rc2           

  • The driver interface is not consistent

    Using NIDAQmx v7.4 Why does the method DAQmxGetAIRngHigh fail on a simulated PCI-6143 device? (Requested value is not supported value for this property.) DAQmxResetAIRngHigh works and is called just before DAQmxGetAIRngHigh. Why does the method DAQmx

  • R.E.S.P.O.N.S.I.V.E.

    Again and again ... thank you to the point of break to make responsive (as does so MACAW.CO). Every day of my clients ask responsive !!! I am desperate to not be able to do with Muse.

  • What is the best way to get another object's method to update my GUI?

    package stuff; import java.awt.event.*; import javax.swing.*; import java.awt.*; public class Test extends JFrame{   private static JButton ProcessButton = new JButton();   private static JLabel jLabel2 = new JLabel();   public static void main( Stri