Skip to Content
author's profile photo Former Member
Former Member

SAP Connector Runtime Error

Hello!

I'm trying to get the SAP conntector to work.

I try to run the sample code from the PDK documentation.

It compiles fine, but when I run the sample code in the portal I get a runtime error (sorry it's in german):

Portal-Laufzeitfehler

Fehler aufgetreten bei der Verarbeitung eines Request für :

iView : N/A

Komponentenname : N/A

com/sapportals/portal/ivs/cg/IConnectorService.

Exception id: 09:54_17/11/04_0001

See the details for the exception ID in the log file

This is the code that causes the error:

IConnectorService connectorservice = (IConnectorService)PortalRuntime.getRuntimeResources().getService( IConnectorService.KEY);

IConnectorGatewayService cgService = connectorservice.getIConnectorGatewayService();

Any ideas how I can get this code to work?

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 19, 2004 at 07:30 AM

    In the portal.log I found the following error description:

    java.lang.NoClassDefFoundError: com/sapportals/portal/ivs/cg/IConnectorService

    Maybe some libs are missing on the server?

    Or what else could be the problem?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 19, 2004 at 08:03 AM

    Hi again,

    I have had exactly the same problem and solved it by updating the SharingReference in the portalapp.xml file as follows:

    <property name="SharingReference" value="htmlb, com.sap.portal.runtime.config, com.sap.portal.runtime.config.component, usermanagement, com.sap.netweaver.bc.crt, com.sap.netweaver.bc.util, com.sap.netweaver.bc.sf, com.sap.netweaver.bc.rf, com.sap.netweaver.bc.sf.service, com.sap.netweaver.bc.rf.service, com.sap.portal.ivs.connectorservice"/>

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi to the both of you,

      the last entry of Elvez's updated portalapp is sufficient. The portal service

      com.sap.portal.ivs.connectorservice

      contains the required classess for using JCA.

      btw: This entry works as an indicator for the portal, that the above library / service is required by your application and therefore should be loaded, too, with the application.

      Regards,

      Dominik

  • author's profile photo Former Member
    Former Member
    Posted on Nov 19, 2004 at 08:51 AM

    Thank you for your answer Elvez!

    Which portalapp.xml file did you update? I changed the portalapp.xml in my project (in eclipse, dist/PORTAL-INF/portalapp.xml), but I'm still getting this runtime error. Do I have to change a portalapp.xml file on the server? I searched for the file on our EP server and got 308 search results.

    Add a comment
    10|10000 characters needed characters exceeded

    • I changed the portalapp.xml in my project. It seems, your problem is somewhere else. You are sure that your system is working? (You have tried the JNDI example and tested the system with a transaction iView)

      The only thing I can do now, is provide you with my code:

      try {

      IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();

      IService iService = request.getService(IConnectorService.KEY);

      IConnectorGatewayService cgService=(IConnectorGatewayService) iService;

      ConnectionProperties prop = new ConnectionProperties(request.getLocale(),request.getUser());

      IConnection connection = cgService.getConnection("SAP_R3_ALIAS", prop);

      } catch(Exception ex) {}

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2004 at 09:41 AM

    I don't know if the system is running correctly (I did not set up the system, I'm just a trainee, never worked with portals or SAP R3 before). It's not only the connector framework which is throwing runtime errors: I get runtime errors when I try to use htmlb, too.

    When I start the preinstalled samples from the PDK, they are running without any runtime errors. So the needed libraries seem to exist on the server.

    Any further ideas how to solve the problem? I begin to become desperate...

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.