Skip to content

java.lang.IllegalArgumentException: object is not an instance of declaring class #1304

Description

@laurentpellegrino

Tests associated to functionalTests.dataspaces.TestDataSpaces are not passing when started with PNP -Dproactive.communication.protocol=pnp using the master and Java version 7 or 8.

Below is the stacktrace:

org.objectweb.proactive.core.ProActiveRuntimeException: org.objectweb.proactive.core.body.request.ServeException: Error while serving
    at org.objectweb.proactive.core.body.request.RequestImpl.serve(RequestImpl.java:163)
    at org.objectweb.proactive.core.body.BodyImpl$ActiveLocalBodyStrategy.serveInternal(BodyImpl.java:552)
    at org.objectweb.proactive.core.body.BodyImpl$ActiveLocalBodyStrategy.serve(BodyImpl.java:485)
    at org.objectweb.proactive.core.body.AbstractBody.serve(AbstractBody.java:426)
    at org.objectweb.proactive.Service.blockingServeOldest(Service.java:206)
    at org.objectweb.proactive.Service.blockingServeOldest(Service.java:181)
    at org.objectweb.proactive.Service.fifoServing(Service.java:146)
    at org.objectweb.proactive.core.body.ActiveBody$FIFORunActive.runActivity(ActiveBody.java:336)
    at org.objectweb.proactive.core.body.ActiveBody.run(ActiveBody.java:175)
    at java.lang.Thread.run(Thread.java:745)
    at functionalTests.dataspaces.TestDataSpaces$TestActiveObject.readDefaultInputFile(pnp://192.168.122.1:51398/ActiveObject_functionalTests.dataspaces.TestDataSpaces$TestActiveObject_67892988-14ff5d02c06--7ffc--70ca543b814ad80a-67892988-14ff5d02c06--8000)
    at (...)(Unknown Source)
    at org.objectweb.proactive.core.body.proxy.AbstractBodyProxy.reifyAsSynchronous(AbstractBodyProxy.java:345)
    at org.objectweb.proactive.core.body.proxy.AbstractBodyProxy.invokeOnBody(AbstractBodyProxy.java:172)
    at org.objectweb.proactive.core.body.proxy.AbstractBodyProxy.reify(AbstractBodyProxy.java:123)
    at pa.stub.functionalTests.dataspaces._StubTestDataSpaces$TestActiveObject.readDefaultInputFile(_StubTestDataSpaces$TestActiveObject.java)
    at functionalTests.dataspaces.TestDataSpaces.action(TestDataSpaces.java:131)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: org.objectweb.proactive.core.body.request.ServeException: Error while serving
    at org.objectweb.proactive.core.body.request.RequestImpl.serveInternal(RequestImpl.java:216)
    at org.objectweb.proactive.core.body.request.RequestImpl.serve(RequestImpl.java:160)
    at org.objectweb.proactive.core.body.BodyImpl$ActiveLocalBodyStrategy.serveInternal(BodyImpl.java:552)
    at org.objectweb.proactive.core.body.BodyImpl$ActiveLocalBodyStrategy.serve(BodyImpl.java:485)
    at org.objectweb.proactive.core.body.AbstractBody.serve(AbstractBody.java:426)
    at org.objectweb.proactive.Service.blockingServeOldest(Service.java:206)
    at org.objectweb.proactive.Service.blockingServeOldest(Service.java:181)
    at org.objectweb.proactive.Service.fifoServing(Service.java:146)
    at org.objectweb.proactive.core.body.ActiveBody$FIFORunActive.runActivity(ActiveBody.java:336)
    at org.objectweb.proactive.core.body.ActiveBody.run(ActiveBody.java:175)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.objectweb.proactive.core.mop.MethodCallExecutionFailedException: Arguments for the method readDefaultInputFile are invalids: java.lang.IllegalArgumentException: object is not an instance of declaring classfor the object functionalTests.dataspaces.TestDataSpaces$TestActiveObject@efdffa0(functionalTests.dataspaces.TestDataSpaces$TestActiveObject); nested exception is: 
java.lang.IllegalArgumentException: object is not an instance of declaring class
    at org.objectweb.proactive.core.mop.MethodCall.execute(MethodCall.java:359)
    at org.objectweb.proactive.core.body.request.RequestImpl.serveInternal(RequestImpl.java:214)
    ... 10 more

The issue seems to come from the reflective invokation made in MethodCall.execute. However, parameter and their type used for the invokation seem correct.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions