JCO References

Hi experts,
I m having a pretty weird problem about JCO References.
I was using WD_MODELDATA_DEST as my reference and then changed it to WD_MODELDATA_DEST_CATERING but after deploying the DC and then i try to retrieve data, i get the following error:
Could not create JCOClientConnection for logical System: WD_MODELDATA_DEST - Model: class com.diagonal.sd.msmeal.model.SpecialMealModel. Please assure that you have configured the RFC connections and/or logical system name properly for this model!
The strange thing is that i have already changed the logical system name to  WD_MODELDATA_DEST_CATERING  but the error still shows the old one. Even after a full restart, there is no difference. So i got no clue what is wrong since this should be a pretty straighforward configuration.
FYI, the way i changed the logical system name is as follows:
Under webdynpro perspective, right click on the root of the DC project and select properties and under webdynpro refereces i selected JCO references. After i did that i rebuilt the project and deploy.
Thanks in advance.
Best Regards,
Daniel

Hi Daniel,
Check out this blog from Bertram Ganz. It may help you.
/people/bertram.ganz/blog/2006/01/27/web-dynpro-adaptive-rfc--how-to-change-logical-system-names-after-model-import
Regards,
Gopal

Similar Messages

  • How to change the JCO reference to an existing model

    Hi
    We had created a few models with the 2 - default (WD_model..) JCO references, now is it possible to change the references to a different custom /name without re-importing the models again ?
    The issue for us is very critical because, we need to maintain unique reference for all the models under each application for the same server.
    please let us know asap.
    thanks
    sathyanarayanan

    Hi Sathya & Ravi,
    If you want to change only the JCO Destinations  that your model refers to, then its very much possible to change their names.
    But if the model stucture has got changed , then you should reimport that.
    I guess, trying out the following steps for changing the names will work out for you.
    1) For Medata Dest--
    a) Click on the local disctionary stucture that has been generated by importing the model.
    b) Click on the properties tab on the bottom right corner.There you shoulb be able to change the Metadata dest name.
    2) For Application data Dest-
    a) Right Click on model classes (model_Input & model_output) &  then click EDIT.
    b) Same Way, on the bottom right corner , Change whichever proerty you want to alter inlcuding the Dest Name.
    In this way, you can mainten unique JCO references for all the models you are using in your project.
    ReBudild & Redploy the entire project . Create the New JCOs Destinations in the content Admin & happily run your application.
    Regards,
    sandip

  • How to change the JCO reference of an existing model  in CE 7.1

    Hi All
    I have read an article which explains the method to change the JCO reference of model but when I tried to follow the same steps in CE 7.1 i am not able to find the category "Model Settings" (on clicking model edit option) containing the property "modelInstance_defaultLogicalSystem" which needs to be changed.
    So is there any other method that needs to be followed in CE 7.1 to change the JCO reference? or should i delete and recreate the models with new JCO reference.
    Any suggestions would be highly helpful.
    Regards,
    Ashwin Kulkarni.

    Hi Ashwin,
    I guess you are not opening the models node. Open the models node shown in the web dynpro explorer.
    ---local Development [project1]
    ----Web Dynpro
    ----Application
    ----Model
    --Model1                                <<<<----Click Here and select properties tab
    ----Model Classes
    ----Component Interfaces
    ----Components
    ----Dictionary
    ----Resources
    Then select the model for which you want to change the JCo references and then in teh properties tab you will find the desired propoerty and then just change the modelInstance_defaultLogicalSystem Property.
    I guess this will solve your problem.
    Thanks
    Sarbjeet Singh,

  • Change JCO references

    Hello ,
    We changed to a new portal server. I'm trying to change the model JCO references to the new ones unsuccessfully...
    I need to change WD_RFC_METADATA_DEST to WD_RFC_METADATA_DEST2 .
    Does any one have any idea except from create new model??
    thanks,
    Michal.

    Michal,
    To change a Model Object's logical system follow these steps.
    To change Logical system for RFC metadata,
               Select Dictionaries node under your Web Dynpro DC.
               Select the model node for relevant model object.
               Select 'Properties' tab. You can see the name of logical system here.
               Logical System name can be changed here.
    To change Logical system for Model instances,
               Open 'Models' node under your Web Dynpro DC.
               Open the relevant Model Object.
               Double click any of subordinate model classes and select 'Properties' tab.
               Under 'Model settings', overwrite the name of logical system.
    Then follow these steps to remove old references.
    Right click on your Web Dynpro DC and select 'Properties'.
    Select 'Web Dynpro References' in Pop up window.
    Select tab 'JCo References'
    Remove old JCo destination names from here.
    That should get the JCo destination names changed.
    Hope it helps,
    Vishwas.

  • WriteHTML has no value using com.sap.mw.jco reference

    When we use the weak reference of JCO(WAS6.40 built-in) in the Deploy service to deploy our J2EE application, the writeHTML will write out files with all the parameters but NO value. It will have "default" row with no value instead of "value" row with actual values.
    However, if we change to use jco2.0 and add the path to the J2EE startup, the writeHTML will includes the parameters and a value row with the actual values.
    Is there any special settings we need to set? Any help is appreciated. Thank you

    Hey,
    I know it's been a long time. Did you figure out why the writeHTML of JCo printed without any values?
    Rajiv

  • Concurrent use of SAP JCO

    Hello everybody.
    I'm developing a Java web application where I have to access the SAP system inside a company. I'm using JCO and it works fine, but whenever I deploy the web application in Tomcat, I must restart it to work with it again. If not I get the following exception:
    JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [Native Library /usr/lib/libsapjcorfc.so already loaded in another classloader]
    I found some threads about this problem in the forums, and the solution was to put the SapJco.jar into tomcat commons/lib directory, not inside the WEB-INF/lib. I did that and it's still not working.
    Does anyone know what to do?
    Thank's in advance.
    Regards.
    Daniel.

    Hi Daniel,
    You have to add following XML elements in your XML file.
    <application-j2ee-engine>
         <reference
              reference-type="weak">
              <reference-target
                   provider-name="sap.com"
                   target-type="library">com.sap.mw.jco</reference-target>
         </reference>
         <provider-name>sap.com</provider-name>
         <fail-over-enable
              mode="disable"/>
    </application-j2ee-engine>
    We are using this in WAS server. I guess for tomcat also its similar to this only.
    Regards,
    Bhavik

  • JCO RFC provider: Server function not found, short dump

    Hi all,
    I'm trying to use the JCO RFC provider service of NW04s (SP15) together with an ABAP 4.6C system. I've followed all the documentation that I could find, but couldn't get it to work yet. This is what I've done so far:
    Using SM59 I've had a destination APP_JK1 created for me on the R/3 system. AFAIK it's set up correctly and marked as a "registered server", connection tests were successful.
    On the portal, I've created a RFC portal destination using my R/3 credentials and successfully tested it. Then I created an entry in the RFC provider service, using the correct values for system, id & gateway, and let it point to my RFC destination for the repository connection. The program ID is also APP_JK1.
    Next, I created a stateless session bean which is part of an EAR, gave it a JNDI name of "RFCTEST" and added a method like this:
        * @ejb.interface-method view-type="both"
        * @param function called function
       public void processFunction(com.sap.mw.jco.JCO.Function function) {
          JCO.ParameterList input  = function.getImportParameterList();
          String query = input.getString("I_STRING_SEARCH");
          JCO.ParameterList output = function.getExportParameterList();
          output.setValue(query, "ECHOTEXT");
    (The project uses xdoclet for the creation of J2EE stuff)
    In application-j2ee-engine.xml located in the META-INF directory of my EAR, I've added:
    <reference reference-type="hard">
         <reference-target provider-name="sap.com" target-type="library">com.sap.mw.jco</reference-target>
    </reference>
    The application deploys without errors, and besides from my RFC connection works as expected. In the JNDI registry view of VisualAdmin I see the corresponding entry: "rfcaccessejb/RFCTEST" is a local reference to my stateless session bean.
    On ABAP, I have a tiny little program that calls my function, mainly looking like this:
    CALL FUNCTION 'RFCTEST' DESTINATION 'APP_JK1'
      EXPORTING
        I_STRING_SEARCH = query
      IMPORTING
        ECHOTEXT = t1.
    Unfortunately, it short dumps immediately. The error message is:
    JCO.Server could not find server function 'RFCTEST'
    I'm lost. What could be wrong? Any help is greatly appreciated. Kind regards,
    Christian Aust

    Hello Perry song,
    You got the short dump bcoz, there is no perform by the name you provided in the program,
    for example. consider there are 2 programs.
    Program 1 :
    REPORT  ZPGM1.
    *Calling a perform SNAME1 , the code of perform is written in ZPGM2.
    perform sname1 IN PROGRAM ZPGM2.
    Program 2 :
    REPORT  ZPGM2.
    perform sname1 .
    Form SNAME1 .
    write : 'Text in form SNAME1' .
    endform.                    " SNAME1
    (here SNAME1 is found and it works perfectly )
    Change in Program 1 :
    REPORT  ZPGM1.
    *Calling perform DELTA ,
    perform DELTA IN PROGRAM ZPGM2 IF FOUND.
    Now the perform statement will search for perform " DELTA " in ZPGM2 , but there is no perform by name DELTA , so here we need to mention the condition " IF FOUND "  , so now by mentioning the condition " IF FOUND " in perform statement ,  if the perform DELTA is not found then it wont go to DUMP.
    If condition " IF FOUND "  is not mentioned in perform statement like
    perform DELTA IN PROGRAM ZPGM2 . ( This gives DUMP )
    just type " IF FOUND " when u r calling a perform from other program ( i guess this will solve the problem ).
    Hope it might be helpfull,
    Regards ,
    Aby
    Edited by: abhi on Nov 6, 2008 10:14 AM

  • Jco connection :null

    Hi sap gurus
    I am using rfc  connection for executing bapi using some jco connections. but if  the jco are being used for one time it is being executed . but when we deploy application another time . the exception is received as dynamicrfcexecution error jco connection:null.
    when we change the poolsize it is being . the rfc is executed  for only one time.
    please suggest a way to close jco connections . if already present.
    Thanks & Regards
    prasad

    hi , logon mechanism  while creating the JCO Destinations.
    Is  Logon Ticket
    This is code what iam using for rfc access
    Zhr_Emp_List_Input input = new Zhr_Emp_List_Input();
              wdContext.nodeZhr_Emp_List_Input().bind(input); 
         wdContext.nodeZhr_Emp_List_Input().currentZhr_Emp_List_InputElement().setPernr("10" );
              try {
                   wdContext.nodeZhr_Emp_List_Input().currentZhr_Emp_List_InputElement().modelObject().execute();
                   wdContext.nodeOutput().invalidate();
              } catch (WDDynamicRFCExecuteException e) {
                   wdComponentAPI.getMessageManager().reportSuccess(e.toString());
                                  // TODO Auto-generated catch block
                   e.printStackTrace();
              }finally {          
         wdContext.currentZhr_Emp_List_InputElement().modelObject().modelInstance().disconnectIfAlive();  
    for the above code where  Zhr_Emp_List_Input  is the rfc . which will return employee details when we set the Pernr(personal number) to rfc
    the exception is
    com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException: Error connecting using JCO.Client: null
    for only one time the rfc is executing . for the other time if we increase the pool size or change the whole jco references for webdynprojava application . we are able to execute the application

  • Set JCO CLient via code

    Hi All,
    I need to use the same WD for several R/3 clients.
    Is there a way that I could use several JCO reference and there for set the modeldata and the metadata reference that I need via code.
    Regards,
    Orlando Covault

    Hi,
    There are tow options for JCO creations:
    1: If you know at design time which JCO connections you want to use and that they are available on your system: create a Model for every connection.
    2: If you want to create these connections dynamically change the JCO connection everytime you call your model like this:
    IWDDynamicRFCModel model;
    model = (IWDDynamicRFCModel) WDModelFactory.getModelInstance(ModelName.class);
    model.setJcoClient(connection)
    --> continue calling code.
    or:
    model.setSystemName(<<JCO ClientName>>)
    see: http://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/modelimpl/dynamicrfc/IWDDynamicRFCModel.html
    Also you can refer the blog from Anilkumar Vippagunta at
    /people/anilkumar.vippagunta2/blog/2007/02/06/dynamic-jco-creation
    regards
    amit bagati

  • Change of Jco destinations

    Hi every body,
          I have called a Rfc from the back end by using the jco destinations,now i want to change the same jco destinations without reimporting the model objects again from the back end.Please  let me know the answer.

    Hi
    If you want to change only the JCO Destinations that your model refers to, then its very much possible to change their names.
    But if the model stucture has got changed , then you should reimport that.
    I guess, trying out the following steps for changing the names will work out for you.
    1) For Medata Dest--
    a) Click on the local dictionary stucture that has been generated by importing the model.
    b) Click on the properties tab on the bottom right corner.There you shoulb be able to change the Metadata dest name.
    2) For Application data Dest-
    a) Right Click on model classes (model_Input & model_output) & then click EDIT.
    b) Same Way, on the bottom right corner , Change whichever proerty you want to alter inlcuding the Dest Name.
    In this way, you can mainten unique JCO references for all the models you are using in your project.
    ReBudild & Redploy the entire project . Create the New JCOs Destinations in the content Admin & happily run your application.
    Regards
    Vijay Kalluri

  • Wrong JCO names appear in JCO refrences on model reimport

    Hello All,
    I have two JCO names mentioned in the JCO refrences in the properties of  my DC. But As soon as I reimport model, a third JCO name which is wrong, appears in the JCO references tab of DC properties automatially. where is this JCO name coming from ?
    Regards
    Mrinalini

    hi
    check the JCO name in data dictionary in your project, to reflect the new JCO's, you must deploy it once. Also invalidate the JCO after deployment (using System adminstration).

  • WDTypeNotFoundException error Jco connection

    Hello,
    I developed WD project and it was all OK, but when I changed the J2EE engine server host and port to our EP environment, deployed and run I got the following WDTypeNotFoundException error:
    com.sap.tc.webdynpro.services.exceptions.WDTypeNotFoundException: type br.com.embraer.dp006.model.zdpnpl098.types.Zz_Doc_Number could not be loaded: com.sap.dictionary.runtime.DdException: TypeBroker failed to access SLD: Error while obtaining JCO connection.
    I reimported the model and nothing was changed, I restarted the J2EE server and the error remains. I don't what to do now. Does anybody have a clue? Thanks.

    Hi Chang
    In WD project check what are the JCO References you have used. Check whether these JCO connections are created in your EP enviornment, If not create the same and run your application
    Kishore

  • Programmatically changing JCOs

    Hello all,
    is there an API to programmatically change the JCOs instead of using the content administrator. I often have to switch the underlying R3 system and so dealing with the content administrator is sometimes a little bit monotonous.
    Anyone who has an idea where to find related information, please tell me.
    Thank you
    volker

    Hi
       Well the only way to do what you are looking at is
    1. Create the JCO destinations for the number of SAP systems that you have in the WebDynpro Content Administrator. For Eg : "DEV" and "TST"
    2. Create a properties file called "Connection.properties". Maintain a property in the file say "JCOConnectionName=DEV"
    3. For reading the properties file please refer to the link http://help.sap.com/saphelp_nw04/helpdata/en/b8/aa343e32ff1033e10000000a114084/frameset.htm
    4. Now if the system is down and you would like to change the system name just edit the properties file and change the name from "DEV" to "TST".
    5. The only additional change you will have to do is open up your application and do the following steps.
    Steps :
    If you want to change only the JCO Destinations that your model refers to, then its very much possible to change their names.
    But if the model stucture has got changed , then you should reimport that.
    I guess, trying out the following steps for changing the names will work out for you.
    1) For Medata Dest--
    a) Click on the local disctionary stucture that has been generated by importing the model.
    b) Click on the properties tab on the bottom right corner.There you shoulb be able to change the Metadata dest name.
    2) For Application data Dest-
    a) Right Click on model classes (model_Input & model_output) & then click EDIT.
    b) Same Way, on the bottom right corner , Change whichever proerty you want to alter inlcuding the Dest Name.
    In this way, you can mainten unique JCO references for all the models you are using in your project.
    ReBudild & Redploy the entire project . Create the New JCOs Destinations in the content Admin & happily run your application.
    Let me know if that helps you.
    regards
    ravi

  • JCO Connection Error Help

    Hi!
    To give a background, we are using NWDI in this project, and using two boxes, one for local deployment and the other one is the actual development box. We currently changed JCO destinations in our RFC calls, and I have already checked-in and activated the activity for that. I've also deployed the application in the local deployment box.
    Now, from what I remember, when activating activities, the changes should also be reflected in the development box (even if deployed in a different local deployment box).
    However, I got this error in the development box (but didn't in the local deployment box).
    When I tried running a WD app, I got this error:
    Failed to Resolve JCO destination <old JCO destination>.. No such destination is defined in SLD.
    I know that the JCO reference is missing, but that is because it still looks for the old JCO, which is not supposed to be the case since I've already configured my RFC to use the new JCOs in the WD side.
    Does anyone know why teh dev box can't see the changes? Or how do we resolve this?
    Thanks!

    Angelo:
    Login as admin to your dev box WD Content:
    http://<host>:<HTTP port>/webdynpro/dispatcher/sap.com/tcwdtools/Explorer
    Click on Maintain JCo Destinations and verify you have the correct names for JCo destinations for you apps and also check the connection info. You may click "test" and "ping" to verify the connection is working.
    If your JCo destinations are OK, but application is not connecting, restart your Portal. Usually it is not required, though.
    Regards,
    Slava

  • Using a Deployable Proxy in a Web Dynpro Application

    Hi,
    We have a Web Dynrpo application whose model is built from a set of Java business objects (POJOs.)  These Java business objects currently make calls to a back-end R/3 system using JCo.  We would like to provide the ability to allow the calls to be made over Web Services to the back-end system. 
    To call the RFMs as web services we have created a Deployable Proxy project, added the proxy as a public part, then referenced that public part in the web dynpro application.  At this point we can write code to call the web service that looks something like:
    InitialContext ctx = new InitialContext();
    Object serviceObject = ctx.lookup("wsclients/proxies/meridium.com/rcmo~proxies/com.meridium.rcmo.ws.proxies.plants.PlantProxy");                                        
    Z_MRDM_GET_PLANTSService service = (Z_MRDM_GET_PLANTSService)ctx.lookup("wsclients/proxies/meridium.com/rcmo~proxies/com.meridium.rcmo.ws.proxies.plants.PlantProxy");
    Z_MRDM_GET_PLANTSPortType port = service.getLogicalPort();
    Z_MRDM_GET_PLANTS plantParameter = new Z_MRDM_GET_PLANTS();
    plantParameter.setI_PLANTID(id);
    plantParameter.setI_PLANTNAME(name);
    Z_MRDM_GET_PLANTSResponse response = port.z_MRDM_GET_PLANTS(plantParameter);
    MT001W[] plantArray = response.getET_PLANTS();
    The problem is that when I call looup to retrieve the service implementation I get a ClassCastException. 
    The tutorials for using a proxy in web dynpro all assume that the web service is what the model is based upon but that's not possbile for our scenario we need to call the proxy from the business objects which are the basis for our model.
    According to the help documentation for consuming a deployable proxy in a JSP page:
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/2d/b9766df88f4a24967dae38cb672fe1/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/2d/b9766df88f4a24967dae38cb672fe1/frameset.htm</a>
    It discusses adding JNDI mappings.  Is this what's needed for the reference to work in a Web Dypro application too?  If so, how would one add the JNDI mappings references to a Web Dynpro application?
    Many thanks!

    Hi Dheeram,
    I'm not certain about JSPDynpage specifically, but in a general J2EE Enterprise Application project you can add a reference to the application-j2ee-engine.xml file.  For example here's the content of an application-j2ee-engine.xml file that references a proxy:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">
    <application-j2ee-engine>
         <reference
              reference-type="hard">
              <reference-target
                   provider-name="sap.com"
                   target-type="library">com.sap.mw.jco</reference-target>
         </reference>
         <reference
              reference-type="hard">
              <reference-target
                   provider-name="sap.com"
                   target-type="library">com.sap.aii.proxy.framework</reference-target>
         </reference>
         <reference
              reference-type="hard">
              <reference-target
                   provider-name="sap.com"
                   target-type="library">com.sap.aii.util.misc</reference-target>
         </reference>
         <reference
              reference-type="hard">
              <reference-target
                   provider-name="sap.com"
                   target-type="interface">tc/sec/destinations/interface</reference-target>
         </reference>
         <reference
              reference-type="hard">
              <reference-target
                   provider-name="sap.com"
                   target-type="library">security.class</reference-target>
         </reference>
         <reference
              reference-type="weak">
              <reference-target
                   provider-name="sap.com"
                   target-type="service">tc~sec~destinations~service</reference-target>
         </reference>
         <reference
              reference-type="weak">
              <reference-target
                   provider-name="sap.com"
                   target-type="interface">tc~sec~destinations~interface</reference-target>
         </reference>
         <reference
              reference-type="weak">
              <reference-target
                   provider-name="engine.sap.com"
                   target-type="service">webdynpro</reference-target>
         </reference>
         <reference
              reference-type="weak">
              <reference-target
                   provider-name="meridium.com"
                   target-type="application">rcmo~proxies</reference-target>
         </reference>
         <provider-name>sap.com</provider-name>
         <fail-over-enable
              mode="disable"/>
    </application-j2ee-engine>

Maybe you are looking for

  • Export to Excel will not produce more than 2000 rows

    I am trying to export a sharepoint list to excel that has around 8000 items in it, however when it does...i'm only able to see 2000 entries and the other 6000 are missing. I'm working with SharePoint 2013 Enterprise and Excel 2013. Would anyone have

  • Problem to calculate the coherence (using NetworkFunction-VI) with only 1 row of data for each, the stimulus and response input

    Hello, I am trying to calculate the coherence of a stimulus and response signal using the Network Functions (avg) VI's. The problem is that I always get a coherence of "1" at all frequencies. This problem is already known (see KnowledgeBase document:

  • ERM & CUP: Risk Analysis Error

    Hello everyone, Will someone please urgently help us with this issue?  Any suggestions are greatly appreciated!  : ) We are on AC v5.3 SP 8.  In RAR, we are able to run a Risk Analysis both in the foreground and background across all users and roles.

  • Unable to upload photos from photostream to FB

    this has never worked right for me, but since the icloud update, my work around is no longer working. When I go to upload a photostream photo to my FB page, I can not select it. The photo is there, in photostream, but now, after the update and the ne

  • Mail 8.2 - Fonts & Colors Defaults?

    I've just installed Yosemite on my iMac. Previously I had altered/changed the Fonts & Colors in Mail. So, could someone please tell me (or better, show me) what the default settings are for Fonts & Colors in Mail 8.2? Thanks. Here's what I'm currentl