JCA vs JCo

Hi,
When is it better to use JCo (through the SAP Connector wizards in the IDE or 'manually'), and when is it better to use JCA?
In case of JCA, are there any IDE wizards?
Thanks
Dov

Hi Zornitsa,
Here is what I see at the Log Viewer...
10:07:39.595    0 INFO    LicensingManager started for 40 ms.
10:07:43.442    0 ERROR   service cross - jar file C:\usr\sap\DB0\JC00\j2ee\cluster\server0\bin\services\cros
.jar does not exist.
10:07:43.613    1 ERROR   java.io.FileNotFoundException: C:\usr\sap\DB0\JC00\j2ee\cluster\server0\bin\service
\cross.jar
        at com.sap.engine.frame.core.load.res.JarResource.openJar(JarResource.java:401)
        at com.sap.engine.frame.core.load.res.JarResource.getClassInfo(JarResource.java:130)
        at com.sap.engine.frame.core.load.res.JarsResource.getClassInfo(JarsResource.java:41)
        at com.sap.engine.frame.core.load.ResourceLoader.loadLocalClass(ResourceLoader.java:249)
        at com.sap.engine.frame.core.load.ResourceLoader.loadClass(ResourceLoader.java:143)
        at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:303)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:219)
        at com.sap.engine.core.service630.container.ServiceRunner.run(ServiceRunner.java:132)
        at com.sap.engine.frame.core.thread.Task.run(Task.java:60)
        at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:72)
        at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:126)
10:07:43.773    1 ERROR   Service cross error. Nested exception is: java.lang.ClassNotFoundException: com.sap
engine.services.cross.CrossFrame
Loader Info -
ClassLoader name: [service:cross]
Parent loader name: [Frame ClassLoader]
References:
   interface:cross
Resources:
   C:\usr\sap\DB0\JC00\j2ee\cluster\server0\bin\services\cross.jar
Loading model: {parent,local,references}
        at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:314)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:219)
        at com.sap.engine.core.service630.container.ServiceRunner.run(ServiceRunner.java:132)
        at com.sap.engine.frame.core.thread.Task.run(Task.java:60)
        at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:72)
        at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:126)
10:07:43.773    1 ERROR   Core service cross failed. J2EE Engine cannot be started. --> java.lang.ClassNotFou
dException: com.sap.engine.services.cross.CrossFrame
Loader Info -
ClassLoader name: [service:cross]
Parent loader name: [Frame ClassLoader]
References:
   interface:cross
Resources:
   C:\usr\sap\DB0\JC00\j2ee\cluster\server0\bin\services\cross.jar
Loading model: {parent,local,references}
        at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:314)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:219)
        at com.sap.engine.core.service630.container.ServiceRunner.run(ServiceRunner.java:132)
        at com.sap.engine.frame.core.thread.Task.run(Task.java:60)
        at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:72)
        at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:126)
10:07:43.442    0 ERROR   service cross - jar file C:\usr\sap\DB0\JC00\j2ee\cluster\server0\bin\services\cros
.jar does not exist.
10:07:43.773    1 ERROR   Service cross error. Nested exception is: java.lang.ClassNotFoundException: com.sap
engine.services.cross.CrossFrame
Loader Info -
ClassLoader name: [service:cross]
Parent loader name: [Frame ClassLoader]
References:
   interface:cross
Resources:
   C:\usr\sap\DB0\JC00\j2ee\cluster\server0\bin\services\cross.jar
Loading model: {parent,local,references}
        at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:314)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:219)
        at com.sap.engine.core.service630.container.ServiceRunner.run(ServiceRunner.java:132)
        at com.sap.engine.frame.core.thread.Task.run(Task.java:60)
        at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:72)
        at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:126)
10:07:43.773    1 ERROR   Core service cross failed. J2EE Engine cannot be started.
10:07:43.823    2 INFO    Service runtimeinfo started. (20 ms).
And here is what I see in the Developer Studio Log:
17/08/2004 10:10:23 /userOut/deploy (com.sap.ide.eclipse.sdm.threading.DeployThreadManager) [Deploy Thread] ERROR:
MinhaApp.ear -> Deployment aborted
DEPLOYMENT ...
==> SDM host : C5057943L
==> SDM port : 50018
==> URL : file:/C:/DOCUME1/C5057943/LOCALS1/Temp/temp23923MinhaApp.ear
... ABORTED
Aborted: development component 'MinhaApp'/'sap.com'/'localhost'/'2004.08.16.12.14.47':
SDM could not start the J2EE cluster on the host C5057943L! The online deployment is terminated. A timeout occured during the cluster running verification!
(message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).STARTUP_CLUSTER)
Reason:
  ... ABORTED
Aborted: development component 'MinhaApp'/'sap.com'/'localhost'/'2004.08.16.12.14.47':
SDM could not start the J2EE cluster on the host C5057943L! The online deployment is terminated. A timeout occured during the cluster running verification!
(message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).STARTUP_CLUSTER)
DEPLOYMENT ...
==> SDM host : C5057943L
==> SDM port : 50018
==> URL : file:/C:/DOCUME1/C5057943/LOCALS1/Temp/temp23923MinhaApp.ear
... ABORTED
Aborted: development component 'MinhaApp'/'sap.com'/'localhost'/'2004.08.16.12.14.47':
SDM could not start the J2EE cluster on the host C5057943L! The online deployment is terminated. A timeout occured during the cluster running verification!
(message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).STARTUP_CLUSTER)
Thank you very much again!
Dov

Similar Messages

  • Difference between JCA and Jco.

    Hi Guys,
    I am a little confused between JCA and JCo, I am currently working with SAP Portal 6.0 according to its specifications JCo is a depricated and suggests the usage of JCA. On the other hand when I was reading about connecting to an SAP system using java, it suggests the usage of JCo. My knowledge with regard to JCo is limited, so I was wondering if anyone could throw some light here as to what is the difference in using either of them or rather which is the prefered way about going about it.
    Thanks in advance..
    Rajitha

    I think lancea is definitely on the right track.
    Jco is typically described as the way to use SAP from Java code and to use Java code from SAP. It is a specific API for allowing SAP and external Java code to call each other.
    JCA (J2EE Connector Architecture) is a general-purpose archiecture and API for allowing external systems and J2EE apps running in an app server to work together. To get a J2EE app working with SAP would require the use of an SAP connector, written to the JCA specs. More than likely, such a connector would itself use Jco. But the J2EE application code would use the connector, not the Jco code directly.
    I hope that helps.
    - Tim (Sun Microsystems)

  • JCO/JCA

    Hi all,
    I searched for JCO/JCA topics in the forum, but I confused some terms/usages about them. Could anyone clarify for me:
    1. What is different between JCO and JCA? Does JCA have the api to programming as JCO? From EP 6, JCO is deprecated, we use JCA to connect to SAP instead, is it right?
    2. With JCO, what is JCO Destination, JCO inbound, JCO outbound? When we need to configure JCO Destination?
    3. If we develop a portal application (ex: JSPDynPage)/ a WebDynPro application to get data from SAP, do you need configure JCO (in SLD, in EP, ...) or we just need use JCO API in code? How do we configure it?
    4. What is Adaptive RFC?

    Hello
    a short answer to some of your questions
    1. What is different between JCO and JCA?
    JCO is a SAP java library to connect to a SAP R/3 System. it can be used by independant (ie non-portal) application.
    JCA, as i understand it, is a library whose structure as been defined by Sun, to connect to external system. The JCA implementation in the portal is based on JCO, and is to be used in the portal.
    3. If we develop a portal application (ex: JSPDynPage)/ a WebDynPro application to get data from SAP, do you need configure JCO (in SLD, in EP, ...) or we just need use JCO API in code? How do we configure it?
    If you use WebDynpro, you configue JCO in the WAS, and then use the plugins to create connections to R/3 RFC Functions.
    If you develops standard Iviews (JspDynPage or Dynpage), you use the JCA api to get a connection to an alias, that itself point to a (R/3) system that has been defined in the portal administration.
    Regards

  • JCA in web service

    Hi,
    I am writing my first web service and I need to connect to R/3 system. I would like to use JCA(or what is better JCA or JCO?) but i dont know where i may take request/user object which are used in this sniplet.
    ConnectionProperties prop = new ConnectionProperties(request.getLocale(),
    request.getUser());
    IConnection client = cgService.getConnection("SYSTEM_ALIAS_NAME", prop);
    thanks
    Jiri Juranek

    It depends from where you are calling your webservice, but from an iView you have the request object available, and then if you call your webservice method by passing it the request object, it should be ok.
    I don't know if this helps.
    Xavier.

  • Some Jco questions

    Hi,
    I have some question about Jco:
    -is it needed to install Jco on the same server as R/3 run, or is it possible to run it on a own server?
    -is 2.0 the newest version=
    -Is there any support?
    thank you very much
    kindest regards
    Pete

    JCA is more of open architecture. JCO is home grown product from SAP to make java based systems talk to SAP.
    JCA is nothing but J2EE connector Architecture which is developed by SUN.
    I am definitely thinking, there is rewrite if you move to JCA from JCO.

  • Help on Jco

    Hi All,
    I am new to creating Jcos.Can any one have any tutorial on Jcos in EP6 SP2 pdk.I read help document but i am really confused.Its little urgent please post your valueble suggestions.
    Thaks in advance
    JH

    Hi Mike,
    Thank you for your reply.
    I am new to this JCO.I dont know exactly the difference between JCA and JCO.Could you please elaborate it?.
    By reading pdk documentation i installed JCo.Now the evvironment is set.Actually i am using eclipse with sap plugins once i create the project.I dont know exactly where i have to copy the Jco java file which i saw in pdk jco examples.I dont know much about portalapp.xml file .
    I didnt found any doc on creation of jco from scratch.
    I am really thank ful to you if you provide any doc.
    Thank you very much
    regards,
    JH

  • Calling BAPI from EP

    Hi,
    I am a newbie in terms of calling a BAPI in EP.
    I have done that in Web Dynpro and i know we need to use Jco to accomplish that.
    Any pointers to some good documents or any threads/web logs will be highly beneficial.
    Points will be awarded!
    Regards,
    Dev

    What you mean BAPI in EP?
    If u are trying to code using JSPDynpage then ,starting from EP 6.0 SAP has recommended to use JCA. (not JCo)
    Think below link has code sample and an HOW-TO Guide.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bc9baf90-0201-0010-479a-b49b25598ebf
    Try it out.
    PLZ DON FORGET POINTS, IF IT HELPED.
    Regards,
    P.

  • ESS screens in MYSAPERP

    Hi :
    Is there a document or a presentation that is available that shows the ESS screens implemented in MYSAPERP and SAP Netwaeaver 04 ( with integrated ITS).
    We are currently in 4.6c and planning on an upgrade.  We would like gain an understnading of the training and change impacts...
    Apparently there is a presentation available..  I could not find it in service market place..
    Thanks
    Rachel

    ESS in MYSAPERP is built on java/webdynpro based iviews which use JCA via JCO. ITS is there but i don't think it is being used in the business package developed for MYSAPERP.

  • ESS Technology in  MYSAPERP

    Does ESS in MYSAPERP use the same JCo middleware like MSS does for the java based iviews ?
    What is the technology since ITS in MYSAPERP2004 is part of the integrated WAS ( web application server )
    Thanks
    Rachel

    ESS in MYSAPERP is built on java/webdynpro based iviews which use JCA via JCO. ITS is there but i don't think it is being used in the business package developed for MYSAPERP.

  • Jco,jca,enterprise connector

    i know jco but wat is the use of jca and enterprise connector
    wen to use
    jco, jca, enterprise connector

    Hi Samyuktha,
                            Check these docs
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/36/5db440c97f3716e10000000a155106/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/36/5db440c97f3716e10000000a155106/frameset.htm</a>
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/94/3c1b40fcdd8f5ce10000000a155106/frameset.htm">http://help.sap.com/saphelp_nw04s/helpdata/en/94/3c1b40fcdd8f5ce10000000a155106/frameset.htm</a>
    regards
    Sumit

  • How do I get started replacing JCo with JCA?

    Hi all,
    After upgrading to EP SP15 I'm now reading that I should stop using JCo for client connection and start using JCA.
    I've searched but can't seem to find any step-by-step procedure that shows me how to convert my existing Java code to be JCA-compliant. 
    Basically, I was doing client = poolEntry.getClient() and then using the client.execute("myrfc").  What code change is required to replace that code with JCA code?
    Thanks,
    Mike

    Hey Mike,
    Glad I could help!!
    There have been a couple things that I have noticed.  If you are using a table as an input parameter, use a table.close() once you are done filling it and before adding it to the importParams("table_name",table) code.  I have two scenarios for that.  Here is the first:
    for (int j = 0; j < exportTable.length; j++) {
         table.insertRow();
         table.setString("VAR1", exportTable[j][0]);
         table.setString("VAR2", exportTable[j][1]);
    table.close();
    importParams.put("EXTAB", table);
    ,and the second one:
    table.insertRow();          
    table.setString("VAR1", "This is variable 1");
    table.setString("VAR2", "This is variable 2");
    table.close();
    importParams.put("EXTAB", table);
    We are running EP6 SP14.  In that booklet, it doesn't show using table.close().  You may not have to use it, but for me, I couldn't get it to work any other way.  Once it was working, I removed it, and I would receive nothing.
    Other than that right now, I haven't really run into any other problems... yet... haha.
    Cheers,
    Kevin

  • JCo or JCA

    I am currently working 4.6C and would like to move from ABAP to java enviornment.
    Please let me know whether to use JCo or JCA for java web based development.
    Thanks,
    Harsha

    Hi Harsha,
    I think i can give conn infor here itself.
    <b>Jco conn from  ABAP to Java</b>
    =====================
    You can  use the JCO RFC Provider Service of the Web Application Server for your ABAP to Java calls.
    The steps involved in that are
    1. Configure destination in SM59 in SAP.
    2. Create RFC Destination in Visual Admin.
    3. Create a stateless session bean with JNDI name as the name of calling function module in SAP.
    4. Add a business method public void processFunction(JCO.Funtion fn) which is called by the JCO RFC Provider Service. The name should be 'processFunction'.
    5. Set library references in application-j2ee-engine.xml to type weak for the following
    a. com.sap.mw.jco.
    b. com.sap.tc.Logging (if you are using the logging api )
    Here is the sample code for the EJB biz method
    Business Method.
    public void processFunction(JCO.Function function) {
    try {
    // Get the import parameters for the function module
    JCO.ParameterList importList = function.getImportParameterList();
    logger.infoT("The value sent is" +
    (String)importList.getValue("USER_NAME"));
    // Set the export parameter value for the function module
    JCO.ParameterList export = function.getExportParameterList();
    export.setValue("From EJB", "RETURN");
    function.setExportParameterList(export);
    catch (java.lang.Exception e) {
    e.printStackTrace();
    <b>Jco conn from  Java to others(ex:ABAP)</b>
    =====================-==========
    •     Open Visual Admin(C:\usr\sap\SID\JCxx\j2ee\admin\go.bat) and connect to server
    •     Go to Destinations service
    •     Open HTTP Settings Tab
    •     Add/Edit destination SLD_DataSupplier and type following values
    URL – http://xyz.corp:53000
    Authentication - BASIC
    User – dynproxxx
    Password - bp52st000
    •     Press save and test (if you get response code 200 everything is o.k.)
    •     Add/Edit other HTTP Destination named SLD_Client with the same values as SLD_DataSupplier:
    URL – http://xyz.corp:53000
    Authentication - BASIC
    User – dynproxxx
    Password - bp52st000
    •     Press save and test (if you get response code 200 everything is o.k.)
    •     Go to SLD Data Supplier service.
    •     Press the button named: Send the Data to SLD and confirm triggering SLD Data transfer (if you receive successful message everything is o.k.).
    ===================
    following blog might helpfull
    =======================
    /people/michal.krawczyk2/blog/2005/03/10/registering-a-new-technical-system-in-sld--abap-based
    for basic infor
    ==============
    http://help.sap.com/saphelp_nw04s/helpdata/en/21/84570b3ae14e77b3047c82218974b9/frameset.htm
    Award points if it helps

  • JCO x JCA

    Hi,
    which of these is recommended to use and why?
    thanks
    JJ

    Hi Jiri,
    JCo is the SAP specific way to access SAP from Java. It has been the officially recommended but proprietary technology as long as there hasn't been a generic solution for accessing "backends" (EIS). For history reasons this holds for EP5.
    JCA is such a generic technology ( see http://java.sun.com/j2ee/connector/index.jsp ). So it has also become the officially recommended technology for accessing SAP from EP6 on.
    Hope it helps
    Detlev

  • Custom iView Connecting to SAP R/3 system using JCA !!

    I did not get any response on the Portal forum so posting it again in the WebAs forum ...
    Environment : SAP Portal : EP 6.p SP2
    I am using JCA to connect to the SAP backend systems.
    The following code connects to the backend ...
    IConnectionFactory connectionFactory = (IConnectionFactory) ctx.lookup("EISConnections/SAPFactory");
    IConnectionSpec spec = connectionFactory.getConnectionSpec();
    ((Map) spec).put("client", "CLIENT_NUMBER");
    ((Map) spec).put("UserName", "YOUR_LOGIN_ID");
    ((Map) spec).put("Password", "YOUR_PASSSWORD");
    ((Map) spec).put("logonmethod", "UIDPW"); // or SAPLOGONTICKET
    ((Map) spec).put("Language", "YOUR_LOGIN_LANGUAGE");
    ((Map) spec).put("ashost", "YOUR_APPLICTION_SERVER_NAME");
    ((Map) spec).put("sysnr", "YOUR_SYSTEM_NUMBER");
    IConnection client = connectionFactory.getConnectionEx(spec);
    I want to use the message server for load balancing. Is there a way to specify the message server and logon group ??
    These is the code to get the BAPI information ...
    // Create interaction
    IInteraction interaction = client.createInteractionEx();
    IInteractionSpec interactionSpec = interaction.getInteractionSpec();
    interactionSpec.setPropertyValue("Name", "REMOTE_FUNCTION_MODULE_NAME");
    // Create IFunction instance
    IFunctionsMetaData functionsMetaData = client.getFunctionsMetaData();
    IFunction function
    = functionsMetaData.getFunction("REMOTE_FUNCTION_MODULE_NAME");
    // CCI api only has one datatype: Record
    RecordFactory recordFactory = interaction.getRecordFactory();
    MappedRecord importParams
    = recordFactory.createMappedRecord("CONTAINER_OF_IMPORT_PARAMS"
    and the following code populates the input table parameters ...
    IStructureFactory structureFactory
    = interaction.retrieveStructureFactory();
    IRecordSet table
    = (IRecordSet) structureFactory.getStructure(
    function.getParameter("TABLE_NAME").getStructure());
    table.insertRow();
    table.setString("COLUMN_NAME_1", "VALUE_1");
    table.setString("COLUMN_NAME_2", "VALUE_2");
    table.insertRow();
    table.setString("COLUMN_NAME_1", "VALUE_1");
    table.setString("COLUMN_NAME_2", "VALUE_2");
    importParams.put("TABLE_NAME", table);
    The above code causes performance issues in the SAP system because the code is calling the following other BAPI through the JCA java api ...
    1) RFC_GET_FUNCTION_INTERFACE
    2) DDIF_FIELDINFO_GET
    Looks like, the JCA library is not caching the metadata information for the BAPI instead for each call, it is calling other BAPI's to get the BAPI metadata information. Also, if I reuse the same IFunction class instance for all connections (Using Singleton Class), it seems to make less "RFC_GET_FUNCTION_INTERFACE" bapi calls.
    The problem is with the input table structure which I need to populate for the BAPI. Every time the structure is populated, the internal BAPI's are getting called and it takes more time to populate the structure as number of users increases.
    I am looking answers to the following questions ...
    1) Specify message and logon group in JCA
    2) Provide a way to cache the metadata for the BAPI's
    More details about JCA can be found here ...
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bc9baf90-0201-0010-479a-b49b25598ebf
    I appreciate your help !!
    Thanks
    Bhabesh Patel

    we updated JCO to the latest version for EP 6 SP2 Patch 8 and it fixed the issue.

  • R/3 connection using JCA For Ep 6.0 SP2 !!

    I am able to connect to R3 system from the Ep 6.0 Sp2 portal using IConnectorService (JCA).
    I am trying to find a solution where I can generate java proxy for BAPI's so that I can eliminate data mapping between R3 and Java in EP 6.0 SP2 environment.
    In EP 6.0 Sp4, the Netweaver Developer Studio provides a "SAP Enterprise Connector" wizard which generates proxy classes for java but uses JCO to connect to R/3 system. It is very usefull since the mapping of data types can be done in one place for all BAPI's which needs to be called from the portal and also I do not need to constatly look at the SAP GUI for BAPI definitions and return types. I can look at the java proxies to know exactly what I need to pass to invoke a BAPI and what I am getting back. I really like these connector wizard.
    Is there a way to generate proxies using some tool for EP 6.0 sp2 using JCA as the mechanism since it is recommended to  use JCA from EP 6.0 onward instead of JCO for better performance and management of R/3 connection ??
    I appreciate your help !!

    Thanks Will.
    I have two choices to connect to R/3 system from EP 6.0 Sp2 ...
    1) JCA : If I use JCA, I may have to write the layer of
             mapping the data and calling the BAPI's from R/3
             system to java.
    2) JCO : I can use the "SAP Enterprise Connector" wizard.
             The only thing I have to make sure is R/3
             connection management using IJCOClientService 
             and JCOClientPoolEntry.
    I am also aware that the iView's I am writing will be used by lot of users since we are migrating an existing applications functionality to SAP Portal.
    So my question is, Which way should I implement the connection to R/3 so that I can achieve better performance and scalability ??
    Thanks again for your help !!

Maybe you are looking for