cancel
Showing results for 
Search instead for 
Did you mean: 

SAP JCo 3 -> Can a server side connection be done WITHOUT logon parms?

Former Member
0 Kudos

Hi All,

I'm trying to do a server side connection to SAP R/3 without using client logon parms such as user and password, application host, etc. with SAP Java Connector 3. Here is an example of what I'm trying to do:

Properties connectProperties = new Properties();
connectProperties.setProperty(DestinationDataProvider.JCO_CODEPAGE, "2");
createDataFile(DESTINATION_NAME1, "jcoDestination", connectProperties);

Properties servertProperties = new Properties();
servertProperties.setProperty(ServerDataProvider.JCO_GWHOST,gw_host);
servertProperties.setProperty(ServerDataProvider.JCO_GWSERV,gw_serv);
servertProperties.setProperty(ServerDataProvider.JCO_PROGID,prog_id);
servertProperties.setProperty(ServerDataProvider.JCO_REP_DEST, DESTINATION_NAME1);
servertProperties.setProperty(ServerDataProvider.JCO_CONNECTION_COUNT, "1");
createDataFile(SERVER_NAME1, "jcoServer", servertProperties);

Upon doing that I get the following exception:

Exception in thread "main" com.sap.conn.jco.JCoRuntimeException: (101) JCO_ERROR_CONFIGURATION: Invalid configuration on ABAP_AS_WITHOUT_POOL. User identity unknown: neither user nor logon ticket nor certificate is specified.

at com.sap.conn.jco.rt.DefaultDestinationManager.getUserId(DefaultDestinationManager.java:742)

at com.sap.conn.jco.rt.RfcDestination.initialize(RfcDestination.java:495)

at com.sap.conn.jco.rt.RfcDestination.getSystemID(RfcDestination.java:533)

at com.sap.conn.jco.rt.RepositoryManager.getRepository(RepositoryManager.java:30)

at com.sap.conn.jco.rt.RfcDestination.getRepository(RfcDestination.java:603)

Doing a server side connection without using log on parms on and just using the program ID, gateway service, and gateway host was possible in SAP JCo 2. Is this still possible in SAP JCo 3? By the exception it seems that I must give the user id and possibly password.

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

I need help on this also.

currently my instance on neo.ondemand cant connect to ECC, getRepository triggers an error, the same error from the original post.

Former Member
0 Kudos

Hi Marcus, i have he same problem. Do you know what the problem is?

Regards,

Hernán

former_member1191927
Participant
0 Kudos

Were you able to find a solution for this issue? I have the same issue. Any help is appreciated.

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi all,

sure, this is possible.  The credentials are only needed when using the comfortable mechanism of dynamic lookup of the function module metadata in an ABAP system, when receiving a function module. Instead of referring to a repository destination in the configuration, you can also define a custom repository and set it via API to the server before starting it. You need to add the complete set of functions and records to that repository before starting the server and then you won't need any credentials.

Best regards,

Markus

former_member1191927
Participant
0 Kudos

Thanks Marcus for the reply. Could you please share the code you may have used, I don't seem to go anywhere with this? Really appreciate your help.

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Narahari,

I cannot write the code for you, as I don't know the complete requirement and I don't know the runtime enviornment. Check the API documentation inside the SDK archive. However, some hints what to look at:

* JCoServer.setRepository(JCoRepository)

* JCo.createCustomRepository()

* JCoCustomRepository

A simple mechanism to define all required function modules, is to make use of the JCoRepository.save() and JCoRepository.load(). Otherwise you need to make use of the JCo.create...() methods for defining different metadata.

Best regards,

Markus

Former Member
0 Kudos

Hello Sir,

I am a student who is pursuing a project that deals with JCo 3.

I read your question on the forum and think that you have done the JCo stuff and can answer my questions.

Kindly, try to shed some light on following question:

Q1: I simply want to start with connecting my SAP system. I have a user ID and password for the same.

I saw some examples where they use "JCo.createClient(....)" and "JCo.client.connect()" to simply connect the client but

when I type in the code it shows me an error, because they are using package "com.sap.mw.jco" but since I am using JCo3,

I don't have that package instead I have "com.sap.conn.jco" which do not have createClient function.

Q2: By setting the classpath for "sapjco.jar" I was able to compile one of the sample programs but could not run it. Do you

know how to run the SAP JCo program.

Your guidance will be highly appreciated

-Thanks

-Dmukhi

Former Member
0 Kudos

Has anybody tried this or had a similar problem?