Skip to content

lernejo/korekto-navy-battle-grader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Korekto Navy Battle grader

🆕 Korekto grader for Navy Battle project

Build codecov License

Exercise subject: here

How to launch

You will need these 2 env vars:

  • GH_LOGIN your GitHub login
  • GH_TOKEN a Personal Access Token with permissions:
    • (classic) : repo and user
    • (fine-grained):
      • Repository permissions:
        • Actions: Read-only
        • Contents: Read-only
git clone [email protected]:lernejo/korekto-navy-battle-grader.git
cd korekto-navy-battle-grader
./mvnw compile exec:java -Dexec.args="-s=$GH_LOGIN" -Dgithub_token="$GH_TOKEN"
Retrofit illegal access occurring on JDK16-openJ9 (curiously, not occurring with hotspot).

Related issues:

Symptoms :

[WARNING]
java.lang.ExceptionInInitializerError
    at java.lang.J9VMInternals.ensureError (J9VMInternals.java:184)
    at java.lang.J9VMInternals.recordInitializationFailure (J9VMInternals.java:173)
    at retrofit2.Retrofit$Builder.<init> (Retrofit.java:441)
    at com.github.lernejo.korekto.grader.api.LaunchingContext.newClient (LaunchingContext.java:48)
...
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int) accessible: module java.base does not "opens java.lang.invoke" to unnamed module @4f772fe7
    at java.lang.reflect.AccessibleObject.checkCanSetAccessible (AccessibleObject.java:357)
    at java.lang.reflect.AccessibleObject.checkCanSetAccessible (AccessibleObject.java:297)
    at java.lang.reflect.Constructor.checkCanSetAccessible (Constructor.java:188)
    at java.lang.reflect.Constructor.setAccessible (Constructor.java:181)
    at retrofit2.Platform.<init> (Platform.java:59)

Workaround :

  • launch with the --add-opens=java.base/java.lang.invoke=ALL-UNNAMED JVM option
  • with Maven : (export MAVEN_OPTS="--add-opens=java.base/java.lang.invoke=ALL-UNNAMED" && mvn compile exec:java -Dexec.mainClass="com.github.lernejo.korekto.toolkit.launcher.GradingJobLauncher" -Dexec.args="-s=mySlug")

About

Korekto grader for Java Api exercise

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages