Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I get java.lang.RuntimeException: java.lang.RuntimeException: Can't create MapArray. Exception: Class com.epam.jdi.tools.DataClass #481

Open
sekharsdet opened this issue Oct 20, 2021 · 1 comment

Comments

@sekharsdet
Copy link

Whenever I run jdi dark bdd tests from cli (mvn test), I get below error.
java.lang.RuntimeException: java.lang.RuntimeException: Can't create MapArray. Exception: Class com.epam.jdi.tools.DataClass can not access a member of class com.epam.http.requests.RequestData with modifiers "private static transient"
at com.epam.jdi.tools.func.JFunc2.execute(JFunc2.java:16)
at com.epam.http.requests.RestMethod.call(RestMethod.java:281)
at com.epam.jdi.http.stepdefs.en.RequestStepsEN.performRequest(RequestStepsEN.java:28)
at ✽.perform "getMethod" request(file:src/test/resources/requirements/features/GetInvestmentRecommendations.feature:6)
Caused by: java.lang.RuntimeException: Can't create MapArray. Exception: Class com.epam.jdi.tools.DataClass can not access a member of class com.epam.http.requests.RequestData with modifiers "private static transient"
at com.epam.jdi.tools.map.MapArray.(MapArray.java:66)
at com.epam.jdi.tools.map.MapArray.(MapArray.java:74)
at com.epam.jdi.tools.DataClass.fields(DataClass.java:34)
at com.epam.http.requests.RestMethod.logRequest(RestMethod.java:239)
at com.epam.jdi.tools.func.JFunc2.execute(JFunc2.java:14)
at com.epam.http.requests.RestMethod.call(RestMethod.java:281)
at com.epam.jdi.http.stepdefs.en.RequestStepsEN.performRequest(RequestStepsEN.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43

@wsbaser
Copy link

wsbaser commented Oct 21, 2021

Looks like we a trying to read synthetic field using reflection in DataClass. It is unclear though why these synthetic fields are generated. They may be generated by JaCoCo or other plugins, but Sekhar did not confirm that he uses any.
TODO: Create project with JaCoCo and try to run tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants