on 11-17-2004 8:54 AM
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?
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...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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) {}
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"/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.