[GeoNetwork-users] API java client implementation problem

Dear users, maybe one of you could help me with the implementation of the api java client.
I tried to execute the following lines of code as described in the documentation (https://geonetwork-opensource.org/manuals/trunk/en/api/the-geonetwork-api.html#building-client-for-the-api-using-codegen):

"...
private static final String CATALOGUE_URL = "http://127.0.0.1:8080/geonetwork";
ApiClient client;
private static final String USERNAME = "***";
private static final String PASSWORD = "***";

 public void initConfiguration\(\) \{
     client
         = Configuration\.getDefaultApiClient\(\);
     client\.setBasePath\(CATALOGUE\_URL\);
 \}

 public void getMeInfoTest\(\) \{
     try \{
         client\.getHttpClient\(\)\.networkInterceptors\(\)\.clear\(\);
         if \(client\.getHttpClient\(\)\.getFollowRedirects\(\)\)
             System\.out\.println\("FollowRedirects"\);

         MeApi meApi = new MeApi\(\);
         MeResponse meResponse = meApi\.getMe\(\);

     \} catch \(ApiException e\) \{
         e\.printStackTrace\(\);
     \}
 \}

..."

After the call "MeResponse meResponse = meApi.getMe();"
comes the exception "org.fao.geonet.ApiException: Content type "text/html;charset=utf-8" is not supported for type: class org.fao.geonet.openapi.model.MeResponse"

What could be wrong?