Article ID: 130458, created on Mar 18, 2017, last review on Mar 18, 2017

  • Applies to:
  • Operations Automation 7.0

Symptoms

API reqeust 'pem.activateSubscription' fails with the error returned:

<?xml version="1.0" encoding="UTF-8"?><methodResponse><fault><value><struct><member><name>faultCode</name><value><int>-1</int></value></member><member><name>faultString</name><value><string>javax.ejb.EJBException: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer</string></value></member></struct></value></fault></methodResponse>

Cause

The error means that one of the values in the body of XML request has not integer data type as is supposed to.

Resolution

Refer to API Guide to find which type should a values have and set it accordingly.

Example:

Incorrectly defined limit (16):

                      <member>
                    <name>resource_limit</name>
                    <value>
                      <string>16</string>
                    </value>
                  </member>

should be defined with integer data type as per the guide:

                  <member>
                    <name>resource_limit</name>
                    <value>
                      <int>16</int>
                    </value>
                  </member>

Search Words

java.lang.ClassCastException

javax.ejb.EJBException: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer

pem.activateSubscription fails

java.lang.String cannot be cast to java.lang.Integer

open api java exception

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07 0871c0b47b3b86ae3b1af4c2942cd0ce 1941880841f714e458ae4dc3d9f3062d

Email subscription for changes to this article
Save as PDF