Why does createOrUpdatePath API fail with incompatible data type errors ?

Solution Verified - Updated -

Issue

  • createOrUpdatePath API fails with "java.lang.Integer incompatible with java.lang.Boolean "
  • catalina.out errors :
Caused by:
java.lang.ClassCastException: java.lang.Integer incompatible with java.lang.Boolean
        at com.redhat.rhn.frontend.xmlrpc.configchannel.XmlRpcConfigChannelHelper.createOrUpdatePath(XmlRpcConfigChannelHelper.java:134)
        at com.redhat.rhn.frontend.xmlrpc.system.config.ServerConfigHandler.createOrUpdatePath(ServerConfigHandler.java:196)
        ... 41 more

The API is :

my %path_info;
$path_info{'contents'} = encode_base64(`cat $local_file`);
$path_info{'contents_enc64'} = 1;
$path_info{'owner'} = $client->string('root');
$path_info{'group'} = $client->string('root');
$path_info{'permissions'} = $client->string('644');
$path_info{'macro-start-delimiter'} = '';
$path_info{'macro-end-delimiter'} = '';
# 'system_u:object_r:etc_t:s0'
$path_info{'selinux_ctx'} = $selinux_ctx;
$path_info{'revision'} = '';
  • createOrUpdatePath API fails with error "java.lang.Integer incompatible with java.lang.String"

    The API is :

fileStruct = {"contents" : fileInfo[0]["contents"], "owner" : fileInfo[0]["owner"], "group" : fileInfo[0]["owner"], "permissions" : fileInfo[0]["permissions"], "revision" : fileInfo[0]["revision"]}           

client.configchannel.createOrUpdatePath(key, channel, path[0], 0, fileStruct)

Environment

  • Red Hat Satellite

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content