java.lang.IllegalArgumentException: Unrecognizable class type 'java.lang.String'

MuleSoft JIRA | Rohit Handa | 9 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    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.

    MuleSoft JIRA | 9 years ago | Rohit Handa
    java.lang.IllegalArgumentException: Unrecognizable class type 'java.lang.String'
  2. 0

    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.

    MuleSoft JIRA | 9 years ago | Rohit Handa
    java.lang.IllegalArgumentException: Unrecognizable class type 'java.lang.String'
  3. 0

    Re: [mule-user] Unable to perform PGP Encryption - C. Boyden - org.codehaus.mule.user - MarkMail

    markmail.org | 1 year ago
    java.lang.IllegalArgumentException: Invalid key type, PGPKeyBundle expected. at cryptix.openpgp.provider.PGPEncryptedMessageImpl.decrypt(PGPEncryptedMessageImpl.java:293) at org.mule.extras.pgp.KeyBasedEncryptionStrategy.decrypt(KeyBasedEncryptionStrategy.java:92) at org.mule.extras.pgp.filters.PGPSecurityFilter.authenticateInbound(PGPSecurityFilter.java:75) at org.mule.impl.security.AbstractEndpointSecurityFilter.authenticate(AbstractEndpointSecurityFilter.java:155) at org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:540) at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:315) at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:250) at org.mule.providers.vm.VMMessageReceiver.onCall(VMMessageReceiver.java:105) at org.mule.providers.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:193) at org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:223)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Unrecognizable class type 'java.lang.String'

      at org.mule.providers.jira.util.MathUtils.convertBigDecimalToPrimitive()
    2. org.mule.providers
      AbstractConnector.send
      1. org.mule.providers.jira.util.MathUtils.convertBigDecimalToPrimitive(MathUtils.java:74)
      2. org.mule.providers.jira.soap.JiraSoapMethodInvocation.fromProperties(JiraSoapMethodInvocation.java:149)
      3. org.mule.providers.jira.beans.JiraMethodInvocation.fromProperties(JiraMethodInvocation.java:63)
      4. org.mule.providers.jira.JiraMessageDispatcher.doSend(JiraMessageDispatcher.java:120)
      5. org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:224)
      6. org.mule.providers.AbstractConnector.send(AbstractConnector.java:1629)
      6 frames
    3. org.mule.impl
      MuleSession.sendEvent
      1. org.mule.impl.ImmutableMuleEndpoint.send(ImmutableMuleEndpoint.java:955)
      2. org.mule.impl.MuleSession.sendEvent(MuleSession.java:327)
      3. org.mule.impl.MuleSession.sendEvent(MuleSession.java:210)
      3 frames
    4. Mule Core
      OutboundRouterCollection.route
      1. org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:120)
      2. org.mule.routing.outbound.ChainingRouter.route(ChainingRouter.java:67)
      3. org.mule.routing.outbound.OutboundRouterCollection$1.doInTransaction(OutboundRouterCollection.java:66)
      4. org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:39)
      5. org.mule.routing.outbound.OutboundRouterCollection.route(OutboundRouterCollection.java:71)
      5 frames
    5. org.mule.impl
      WorkerContext.run
      1. org.mule.impl.model.DefaultMuleProxy.run(DefaultMuleProxy.java:476)
      2. org.mule.impl.work.WorkerContext.run(WorkerContext.java:310)
      2 frames
    6. Backport of JSR 166
      ThreadPoolExecutor$Worker.run
      1. edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
      2. edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
      2 frames
    7. Java RT
      Thread.run
      1. java.lang.Thread.run(Unknown Source)
      1 frame