java.lang.IllegalArgumentException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • This issue is applicable to all API method calls that have the (String token, String id) method signature and an all numeric value is expected for parameter 'id'. Following is the error stack trace: {noformat} Root Exception stack trace: java.lang.IllegalArgumentException: Unrecognizable class type 'java.lang.String' at org.mule.providers.jira.util.MathUtils.convertBigDecimalToPrimitive(MathUtils.java:74) at org.mule.providers.jira.soap.JiraSoapMethodInvocation.fromProperties(JiraSoapMethodInvocation.java:149) at org.mule.providers.jira.beans.JiraMethodInvocation.fromProperties(JiraMethodInvocation.java:63) at org.mule.providers.jira.JiraMessageDispatcher.doSend(JiraMessageDispatcher.java:120) at org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:224) at org.mule.providers.AbstractConnector.send(AbstractConnector.java:1629) at org.mule.impl.ImmutableMuleEndpoint.send(ImmutableMuleEndpoint.java:955) at org.mule.impl.MuleSession.sendEvent(MuleSession.java:327) at org.mule.impl.MuleSession.sendEvent(MuleSession.java:210) at org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:120) at org.mule.routing.outbound.ChainingRouter.route(ChainingRouter.java:67) at org.mule.routing.outbound.OutboundRouterCollection$1.doInTransaction(OutboundRouterCollection.java:66) at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:39) at org.mule.routing.outbound.OutboundRouterCollection.route(OutboundRouterCollection.java:71) at org.mule.impl.model.DefaultMuleProxy.run(DefaultMuleProxy.java:476) at org.mule.impl.work.WorkerContext.run(WorkerContext.java:310) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528) at java.lang.Thread.run(Unknown Source) {noformat} After debugging the code, I found that the cause of this exception is the call to JsonUtils in following line of code in JiraSoapMethodInvocation (line 143) class. It converts the incoming jsonParam value from String to BigDecimal ignoring the paramterType passed in the method call. {code}javaObject = JsonUtils.convertJsonToJavaObject(jsonParam, parameterType, null, null);{code} As a result when the object is converted back to class of parameterType java.lang.String later in the execution, the above exception is raised. Based on above, the root of the issue lies in the fact that JsonUtils.convertJsonToJavaObject() method is incorrect.
    via by Rohit Handa,
  • This issue is applicable to all API method calls that have the (String token, String id) method signature and an all numeric value is expected for parameter 'id'. Following is the error stack trace: {noformat} Root Exception stack trace: java.lang.IllegalArgumentException: Unrecognizable class type 'java.lang.String' at org.mule.providers.jira.util.MathUtils.convertBigDecimalToPrimitive(MathUtils.java:74) at org.mule.providers.jira.soap.JiraSoapMethodInvocation.fromProperties(JiraSoapMethodInvocation.java:149) at org.mule.providers.jira.beans.JiraMethodInvocation.fromProperties(JiraMethodInvocation.java:63) at org.mule.providers.jira.JiraMessageDispatcher.doSend(JiraMessageDispatcher.java:120) at org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:224) at org.mule.providers.AbstractConnector.send(AbstractConnector.java:1629) at org.mule.impl.ImmutableMuleEndpoint.send(ImmutableMuleEndpoint.java:955) at org.mule.impl.MuleSession.sendEvent(MuleSession.java:327) at org.mule.impl.MuleSession.sendEvent(MuleSession.java:210) at org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:120) at org.mule.routing.outbound.ChainingRouter.route(ChainingRouter.java:67) at org.mule.routing.outbound.OutboundRouterCollection$1.doInTransaction(OutboundRouterCollection.java:66) at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:39) at org.mule.routing.outbound.OutboundRouterCollection.route(OutboundRouterCollection.java:71) at org.mule.impl.model.DefaultMuleProxy.run(DefaultMuleProxy.java:476) at org.mule.impl.work.WorkerContext.run(WorkerContext.java:310) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528) at java.lang.Thread.run(Unknown Source) {noformat} After debugging the code, I found that the cause of this exception is the call to JsonUtils in following line of code in JiraSoapMethodInvocation (line 143) class. It converts the incoming jsonParam value from String to BigDecimal ignoring the paramterType passed in the method call. {code}javaObject = JsonUtils.convertJsonToJavaObject(jsonParam, parameterType, null, null);{code} As a result when the object is converted back to class of parameterType java.lang.String later in the execution, the above exception is raised. Based on above, the root of the issue lies in the fact that JsonUtils.convertJsonToJavaObject() method is incorrect.
    via by Rohit Handa,
    • java.lang.IllegalArgumentException: Unrecognizable class type 'java.lang.String' at org.mule.providers.jira.util.MathUtils.convertBigDecimalToPrimitive(MathUtils.java:74) at org.mule.providers.jira.soap.JiraSoapMethodInvocation.fromProperties(JiraSoapMethodInvocation.java:149) at org.mule.providers.jira.beans.JiraMethodInvocation.fromProperties(JiraMethodInvocation.java:63) at org.mule.providers.jira.JiraMessageDispatcher.doSend(JiraMessageDispatcher.java:120) at org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:224) at org.mule.providers.AbstractConnector.send(AbstractConnector.java:1629) at org.mule.impl.ImmutableMuleEndpoint.send(ImmutableMuleEndpoint.java:955) at org.mule.impl.MuleSession.sendEvent(MuleSession.java:327) at org.mule.impl.MuleSession.sendEvent(MuleSession.java:210) at org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:120) at org.mule.routing.outbound.ChainingRouter.route(ChainingRouter.java:67) at org.mule.routing.outbound.OutboundRouterCollection$1.doInTransaction(OutboundRouterCollection.java:66) at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:39) at org.mule.routing.outbound.OutboundRouterCollection.route(OutboundRouterCollection.java:71) at org.mule.impl.model.DefaultMuleProxy.run(DefaultMuleProxy.java:476) at org.mule.impl.work.WorkerContext.run(WorkerContext.java:310) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528) at java.lang.Thread.run(Unknown Source)
    No Bugmate found.