cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong repository version = 0 encountered.

Former Member
0 Kudos

Hi Guru,

We convert our existing Java Jco program to call RFC Sender adapter and XI should forward the request to RFC receiver adapter to our ECC.

We found that when we create client connection using gwhost, gwserv and tpname which is config in RFC sender adapter. In our Java program throw error in the step of mRepository.getFunctionTemplate.

The error is "Wrong repository version = 0 encountered.". It seems the program can not access function template from repository.

Anyone have this experience before, please advise

Thanks you.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member859847
Active Contributor
0 Kudos

Hi,

please check your java program JCO as mentioned below.

import java.io.*;

import com.sap.mw.jco.*;

public class JConnector {

JCO.Client mConnection;

JCO.Repository mRepository;

public JCO.Function createFunction(String name) throws Exception {

try {

IFunctionTemplate ft =

mRepository.getFunctionTemplate(name.toUpperCase());

if (ft == null)

return null;

return ft.getFunction();

}

catch (Exception ex) {

throw new Exception("Problem retrieving JCO.Function object.");

}

}

where as'Wrong repository version = 0 encountered'

because, it's null value.

i hope, it will clear your doubt.

warm regards

mahesh.

Former Member
0 Kudos

Hi all,

I have tried with JCO 2.1.8 and 3.0, the result got the same error.

My code exactly the same above code, I just add to show error message under catch statement.

catch (Exception ex)

{

throw new Exception(ex.getMessage()+". Problem retrieving JCO.Function object.");

}

This is the place that I got error "Wrong repository version = 0 encountered.."

Any idea?

Former Member
0 Kudos

Hi,

are 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.

check your connection once again

Regards,

Surya

Former Member
0 Kudos

Hi Guru,

We have tried to use static meta data in our JCo client program. It works and can send data to XI RFC sender adapter. But when we use with dynamic meta data using create Repository, we still got error "Wrong repository version = 0 encountered."

Anyone know how to solve it, We'd like to use Repository approach in our Java program.

Thanks you,