ButterCMS / java-starter-buttercms

Drop-in proof-of-concept Java + Spring app, fully integrated with your ButterCMS account
https://java-starter-buttercms.herokuapp.com/
0 stars 5 forks source link

Warnings on install and run #2

Closed ViolanteCodes closed 2 years ago

ViolanteCodes commented 2 years ago

Just a few questions re: installation and running -

  1. Why does the installation line in the readme use the -DskipTests flag? Is this to make the installation faster?

  2. On installation or running local server, I am getting warnings for illegal access:

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

Is it possible to fix the root cause of this warning?

HonzaStefanik commented 2 years ago

What version of JDK are you using (java --version)? You could also try doing mvn clean to delete any old files that could potentially cause this and then compile it again.

Paste the whole output of the mvn spring-boot:run command, maybe there will be some additional info in it (it should log the version of java among other things).

The DskipTests flag was left over as an oversight, removed as it is unnecessarily confusing

ViolanteCodes commented 2 years ago

Warning persists after mvn clean. One interesting thing I noted is the warning also comes up with the mvn clean and mvn install commands.

java --version output:

maria@maria-Galago-Pro:~/Programming/butter/starters/java-starter-buttercms$ java --version
openjdk 11.0.15 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1)
OpenJDK 64-Bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1, mixed mode, sharing)

mvn spring-boot:run full output:

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
[INFO] Scanning for projects...
[INFO] 
[INFO] ---------------< com.buttercms:spring-starter-buttercms >---------------
[INFO] Building spring-starter-buttercms 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] >>> spring-boot-maven-plugin:2.6.4:run (default-cli) > test-compile @ spring-starter-buttercms >>>
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ spring-starter-buttercms ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO] Copying 36 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ spring-starter-buttercms ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ spring-starter-buttercms ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory /home/maria/Programming/butter/starters/java-starter-buttercms/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ spring-starter-buttercms ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] <<< spring-boot-maven-plugin:2.6.4:run (default-cli) < test-compile @ spring-starter-buttercms <<<
[INFO] 
[INFO] 
[INFO] --- spring-boot-maven-plugin:2.6.4:run (default-cli) @ spring-starter-buttercms ---
[INFO] Attaching agents: []

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.6.4)

2022-06-07 10:11:12.970  INFO 28464 --- [           main] c.b.s.SpringStarterButtercmsApplication  : Starting SpringStarterButtercmsApplication using Java 11.0.15 on maria-Galago-Pro with PID 28464 (/home/maria/Programming/butter/starters/java-starter-buttercms/target/classes started by maria in /home/maria/Programming/butter/starters/java-starter-buttercms)
2022-06-07 10:11:12.973  INFO 28464 --- [           main] c.b.s.SpringStarterButtercmsApplication  : No active profile set, falling back to 1 default profile: "default"
2022-06-07 10:11:13.642  INFO 28464 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2022-06-07 10:11:13.648  INFO 28464 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2022-06-07 10:11:13.648  INFO 28464 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.58]
2022-06-07 10:11:13.693  INFO 28464 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2022-06-07 10:11:13.693  INFO 28464 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 670 ms
2022-06-07 10:11:14.019  INFO 28464 --- [           main] o.s.b.a.w.s.WelcomePageHandlerMapping    : Adding welcome page template: index
2022-06-07 10:11:14.108  INFO 28464 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2022-06-07 10:11:14.117  INFO 28464 --- [           main] c.b.s.SpringStarterButtercmsApplication  : Started SpringStarterButtercmsApplication in 1.515 seconds (JVM running for 1.781)
ViolanteCodes commented 2 years ago

@HonzaStefanik forgot to tag; see responses above

HonzaStefanik commented 2 years ago

2022-06-07 10:11:12.970 INFO 28464 --- [ main] c.b.s.SpringStarterButtercmsApplication : Starting SpringStarterButtercmsApplication using Java 11.0.15

Try it with Java 8 as that is the expected version, that's the only thing I can think of right now.

I still couldn't manage to reproduce it even with Java 11.0.15 though, which is kind of weird.

ViolanteCodes commented 2 years ago

@HonzaStefanik Okay, in that case, I'm fine with marking this closed - it's just a warning and it doesn't seem to affect the functionality of the application at all.