Skip to content

Problem SumOfArray(Part 03, problem 20) can't upload code even though the code runs fine locally. #466

Open
@PeapGit

Description

@PeapGit

Compilation error: stderr: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release stdout: [INFO] Scanning for projects... [INFO]  [INFO] ----------------------< tkt:Part03_20.SumOfArray >---------------------- [INFO] Building Part03_20.SumOfArray 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO]  [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ Part03_20.SumOfArray --- [INFO]  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Part03_20.SumOfArray --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /app/src/main/resources [INFO]  [INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ Part03_20.SumOfArray --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to /app/target/classes [INFO]  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Part03_20.SumOfArray --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /app/src/main/resources [INFO]  [INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ Part03_20.SumOfArray --- [INFO] Nothing to compile - all classes are up to date [INFO]  [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ Part03_20.SumOfArray --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /app/src/test/resources [INFO]  [INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ Part03_20.SumOfArray --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to /app/target/test-classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR :  [INFO] ------------------------------------------------------------- [ERROR] /app/src/test/java/SumOfArrayTest.java:[31,37] method sumOfNumbersInArray in class SumOfArray cannot be applied to given types;   required: int[],int   found: int[]   reason: actual and formal argument lists differ in length [INFO] 1 error [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time:  2.189 s [INFO] Finished at: 2024-07-21T22:21:24Z [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile (default-testCompile) on project Part03_20.SumOfArray: Compilation failure [ERROR] /app/src/test/java/SumOfArrayTest.java:[31,37] method sumOfNumbersInArray in class SumOfArray cannot be applied to given types; [ERROR]   required: int[],int [ERROR]   found: int[] [ERROR]   reason: actual and formal argument lists differ in length [ERROR] -> [Help 1] [ERROR]  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR]  [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions