Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Extension tool error

RajeshU
RajeshU Posts: 19

When trying to execute a java code through extension tool I see the below error,
Please suggest on the same.

Additional Details:
argument type mismatch

java.lang.IllegalArgumentException: argument type mismatch

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at com.parasoft.scripting.java.JavaCode$JavaMethodRunnable.run(JavaCode.java:211)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

Comments

  • RajeshU
    RajeshU Posts: 19

    Note that I get this error when I try to run a method in the Parasoft REST API jump start project and also im using the Server edition license to do the same.

  • jakubiak
    jakubiak Posts: 795 admin

    We don't recommend using the Jump Start project any more. Please see this post for what to do instead: https://forums.parasoft.com/discussion/4061/creating-excel-datasource-using-java-in-parasoft-maven-jumpstart-project

  • RajeshU
    RajeshU Posts: 19

    hi, we are able to run the code from java view but when we run the code from parasoft soa test view , we see the above error.

  • jakubiak
    jakubiak Posts: 795 admin

    I would recommend contacting Parasoft support for help with your issue. There is not enough information here to understand why the Extension Tool is encountering that error when running the code.

  • RajeshU
    RajeshU Posts: 19

    hi I found in one of the forums that the above error arises when we use a non standard java compiler, hence the reason for failure when we run from Soatest view through the extension tool, where as it is successful when we run in java view.

    Is there a solution to over come this ?

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited January 2019

    An IllegalArgumentException happens when invoking a method with incompatible arguments. I'm guessing your java method does not have the expected signature. Methods invoked by the Extension tool must adhere to a very specific signature. It is hard to say what you might be doing wrong without having more information. Someone would probably need to see exactly how your Extension Tool is configured and the source for what Java method you are attempting to invoke. I'd recommend contacting Parasoft Support if you need timely assistance.