cancel
Showing results for 
Search instead for 
Did you mean: 

JCO.Repository: Wrong repository version = 0 encountered

Former Member
0 Kudos

I have been working with JCO for a while, until version 2.1.6 everything was working fine (2.0.12, 2.1.15). Now I am getting this message "JCO_ERROR_INTERNAL: Wrong repository version = 0 encountered

". I tried it with 6.20 and 6.40 systems. The function I am trying to get metadata for is pretty standard - XMI_LOGIN (tried BAPI_XMI_LOGIN as well), the connection user has SAP_ALL profile granted...Any ideas?

com.sap.mw.jco.JCO$Exception: (108) JCO_ERROR_INTERNAL: Wrong repository version = 0 encountered

at com.sap.mw.jco.JCO$Repository.queryFunctionInterface (JCO.java:19431)

at com.sap.mw.jco.JCO$Repository.queryFunctionInterface(JCO.java:19114)

at com.sap.mw.jco.JCO$Repository.getFunctionInterface(JCO.java:19228)

at com.sap.mw.jco.JCO$BasicRepository.getFunctionTemplate(JCO.java:18291)

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Found the problem. It is ridiculous as usual: if RFC Connection property lcheck (check connection on logon) is not specified (not 1) the connection is never really opened and Repository is not initialized. all Repository.get... calls will fail. Added lcheck=1 and everything works fine.

Former Member
0 Kudos

I take it back. I rolled back the JCO version to 2.1.5 and 2.1 and it produced the same results. Got to be something with my code. Still, it is hard to figure out what really changed and the message "JCO_ERROR_INTERNAL: Wrong repository version = 0" is somewhat confusing as there is no control over repository version from within JCO. Can anybody point me in the right direction? Thanks

Former Member
0 Kudos

Have you tried this basic connection? I'm sorry if this is rudimentary.

client = JCO.createClient(SAPConnect.SAPClient, SAPUsername,SAPPassword,SAPConnect.SAPLang,SAPConnect.SAPServer,SAPConnect.SAPSysNum);

client.connect();

JCO.Repository mRepository = new JCO.Repository(SAPConnect.SAPClient, client);

JCO.Function jcoFunction = new JCO.Function(mRepository.getFunctionTemplate("BAPI_SALESORDER_CHANGE"));

jcoFunction .writeHTML(out);

Former Member
0 Kudos

So you upgraded to the latest JCO? Did you make sure to replace the OS libraries? If you did, did you restart the server?

Try creating a java application and use the JCO version that you are trying to move too. This will give you better idea of what errors are going on.

I am using 2.1.6 version just fine, but I started using it initially.