java.lang.IllegalArgumentException: argument type mismatch

Apache's JIRA Issue Tracker | Charles Moulliard | 2 years ago
  1. 0

    When camel-scr (2.15-SNAPSHOT) is deployed and used with Apache Karaf - 2.3.0.redhat-611412 The following errors are generated when SCR got the CamelComponent or lost the Component {code} 2014-12-26 11:13:49,453 | ERROR | r-1.0.0-thread-2 | osgi-camel-scr | ? ? | 255 - com.redhat.gpe.training.osgi-camel-scr - 1.0.0 | [com.redhat.gpe.training.osgi.camel.BootStrap(52)] The gotCamelComponent method has thrown an exception java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_51] at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_51] at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:231)[82:org.apache.felix.scr:1.8.0.redhat-611412] at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:39)[82:org.apache.felix.scr:1.8.0.redhat-611412] {code} {code} 2014-12-26 11:22:50,355 | ERROR | l Console Thread | osgi-camel-scr | ? ? | 255 - com.redhat.gpe.training.osgi-camel-scr - 1.0.0 | [com.redhat.gpe.training.osgi.camel.BootStrap(52)] The lostCamelComponent method has thrown an exception java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_51] at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_51] at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:231)[82:org.apache.felix.scr:1.8.0.redhat-611412] at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:39)[82:org.apache.felix.scr:1.8.0.redhat-611412] at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:624)[82:org.apache.felix.scr:1.8.0.redhat-611412] at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:508)[82:org.apache.felix.scr:1.8.0.redhat-611412] at org.apache.felix.scr.impl.helper.BindMethod.invoke(BindMethod.java:37)[82:org.apache.felix.scr:1.8.0.redhat-611412] at org.apache.felix.scr.impl.manager.DependencyManager.invokeUnbindMethod(DependencyManager.java:1711)[82:org.apache.felix.scr:1.8.0.redhat-611412] {code} Here is the code used as example : {code} import org.apache.camel.CamelContext; import org.apache.camel.RoutesBuilder; import org.apache.camel.scr.AbstractCamelRunner; import org.apache.camel.spi.ComponentResolver; import org.apache.felix.scr.annotations.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.List; @Component(label = BootStrap.COMPONENT_LABEL, description = BootStrap.COMPONENT_DESCRIPTION) @Properties({ @Property(name = "camelContextId", value = "camel-scr-exercise"), @Property(name = "active", value = "true") }) @References({ @Reference(name = "camelComponent",referenceInterface = ComponentResolver.class, cardinality = ReferenceCardinality.MANDATORY_MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY, bind = "gotCamelComponent", unbind = "lostCamelComponent") }) public class BootStrap extends AbstractCamelRunner { public static final String COMPONENT_LABEL = "bootstrap.CamelScrExercise"; public static final String COMPONENT_DESCRIPTION = "This is the description for camel-scr-exercise."; public static final Logger LOGGER = LoggerFactory.getLogger(BootStrap.class); @Override protected List<RoutesBuilder> getRouteBuilders() { LOGGER.info("Load Camel Routes definition"); List<RoutesBuilder> routesBuilders = new ArrayList<>(); routesBuilders.add(new GreeterRoute()); return routesBuilders; } } {code}

    Apache's JIRA Issue Tracker | 2 years ago | Charles Moulliard
    java.lang.IllegalArgumentException: argument type mismatch
  2. 0

    When camel-scr (2.15-SNAPSHOT) is deployed and used with Apache Karaf - 2.3.0.redhat-611412 The following errors are generated when SCR got the CamelComponent or lost the Component {code} 2014-12-26 11:13:49,453 | ERROR | r-1.0.0-thread-2 | osgi-camel-scr | ? ? | 255 - com.redhat.gpe.training.osgi-camel-scr - 1.0.0 | [com.redhat.gpe.training.osgi.camel.BootStrap(52)] The gotCamelComponent method has thrown an exception java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_51] at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_51] at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:231)[82:org.apache.felix.scr:1.8.0.redhat-611412] at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:39)[82:org.apache.felix.scr:1.8.0.redhat-611412] {code} {code} 2014-12-26 11:22:50,355 | ERROR | l Console Thread | osgi-camel-scr | ? ? | 255 - com.redhat.gpe.training.osgi-camel-scr - 1.0.0 | [com.redhat.gpe.training.osgi.camel.BootStrap(52)] The lostCamelComponent method has thrown an exception java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_51] at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_51] at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:231)[82:org.apache.felix.scr:1.8.0.redhat-611412] at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:39)[82:org.apache.felix.scr:1.8.0.redhat-611412] at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:624)[82:org.apache.felix.scr:1.8.0.redhat-611412] at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:508)[82:org.apache.felix.scr:1.8.0.redhat-611412] at org.apache.felix.scr.impl.helper.BindMethod.invoke(BindMethod.java:37)[82:org.apache.felix.scr:1.8.0.redhat-611412] at org.apache.felix.scr.impl.manager.DependencyManager.invokeUnbindMethod(DependencyManager.java:1711)[82:org.apache.felix.scr:1.8.0.redhat-611412] {code} Here is the code used as example : {code} import org.apache.camel.CamelContext; import org.apache.camel.RoutesBuilder; import org.apache.camel.scr.AbstractCamelRunner; import org.apache.camel.spi.ComponentResolver; import org.apache.felix.scr.annotations.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.List; @Component(label = BootStrap.COMPONENT_LABEL, description = BootStrap.COMPONENT_DESCRIPTION) @Properties({ @Property(name = "camelContextId", value = "camel-scr-exercise"), @Property(name = "active", value = "true") }) @References({ @Reference(name = "camelComponent",referenceInterface = ComponentResolver.class, cardinality = ReferenceCardinality.MANDATORY_MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY, bind = "gotCamelComponent", unbind = "lostCamelComponent") }) public class BootStrap extends AbstractCamelRunner { public static final String COMPONENT_LABEL = "bootstrap.CamelScrExercise"; public static final String COMPONENT_DESCRIPTION = "This is the description for camel-scr-exercise."; public static final Logger LOGGER = LoggerFactory.getLogger(BootStrap.class); @Override protected List<RoutesBuilder> getRouteBuilders() { LOGGER.info("Load Camel Routes definition"); List<RoutesBuilder> routesBuilders = new ArrayList<>(); routesBuilders.add(new GreeterRoute()); return routesBuilders; } } {code}

    Apache's JIRA Issue Tracker | 2 years ago | Charles Moulliard
    java.lang.IllegalArgumentException: argument type mismatch
  3. 0

    java.lang.IllegalArgumentException with PojoDependencyInjector

    GitHub | 3 years ago | hbrackmann
    java.lang.IllegalArgumentException: argument type mismatch
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Addon Prowl 1.4 issue

    GitHub | 3 years ago | fbodart
    java.lang.IllegalStateException: Could not invoke method: org.openhab.action.prowl.internal.Prowl.pushNotification(java.lang.String,java.lang.String,java.lang.String) on instance: null
  6. 0

    @Consumes doesn't work with JSON

    Stack Overflow | 2 years ago | Everv0id
    java.lang.IllegalArgumentException: argument type mismatch

  1. Aria Pahlavan 16 times, last 3 weeks ago
  2. kjhdofjosvs 2 times, last 1 month ago
  3. tyson925 2 times, last 1 month ago
  4. kuldeep 2 times, last 2 months ago
  5. aldrinleal 1 times, last 5 months ago
6 more registered users
72 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    argument type mismatch

    at sun.reflect.NativeMethodAccessorImpl.invoke0()
  2. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_51]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_51]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_51]
    4. java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_51]
    4 frames
  3. Apache Felix Declarative Services
    DependencyManager.invokeUnbindMethod
    1. org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:231)[82:org.apache.felix.scr:1.8.0.redhat-611412]
    2. org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:39)[82:org.apache.felix.scr:1.8.0.redhat-611412]
    3. org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:624)[82:org.apache.felix.scr:1.8.0.redhat-611412]
    4. org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:508)[82:org.apache.felix.scr:1.8.0.redhat-611412]
    5. org.apache.felix.scr.impl.helper.BindMethod.invoke(BindMethod.java:37)[82:org.apache.felix.scr:1.8.0.redhat-611412]
    6. org.apache.felix.scr.impl.manager.DependencyManager.invokeUnbindMethod(DependencyManager.java:1711)[82:org.apache.felix.scr:1.8.0.redhat-611412]
    6 frames