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

App is updated to avoid "illegal reflective access operation" warning #31

Open
1 of 3 tasks
izgeri opened this issue Jan 12, 2021 · 0 comments
Open
1 of 3 tasks

Comments

@izgeri
Copy link
Contributor

izgeri commented Jan 12, 2021

Summary

When you run the app, it gives you a warning that it's doing something that should not be allowed and will not be supported in the future.

Steps to Reproduce

Run the app against a remote postgres DB instance:

docker run \
  -e DB_URL="postgresql://[DB_URL]:[DB_PORT]/{DB_DATABASE]" \
  -e DB_USERNAME="[DB_USER]" \
  -e DB_PASSWORD="[DB_PASS]" \
  -e DB_PLATFORM="postgres" \
  -p 8080:8080 \
  -d cyberark/demo-app

Look at the app logs

$ docker logs [APP_CID]

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::       (v1.5.10.RELEASE)

2021-01-12 20:53:07.509  INFO 1 --- [           main] hello.Application                        : Starting Application v0.1.0 on 54ddc091e225 with PID 1 (/app.jar started by root in /)
2021-01-12 20:53:07.517  INFO 1 --- [           main] hello.Application                        : No active profile set, falling back to default profiles: default
2021-01-12 20:53:07.672  INFO 1 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@28701274: startup date [Tue Jan 12 20:53:07 UTC 2021]; root of context hierarchy
...

Expected Results

App starts up with no warnings

Actual Results (including error logs, if applicable)

App logs show this warning:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (jar:file:/app.jar!/BOOT-INF/lib/spring-core-4.3.14.RELEASE.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 org.springframework.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

Reproducible

  • Always
  • Sometimes
  • Non-Reproducible

Version/Tag number

latest

Environment setup

Just running Docker container on local machine.

Additional Information

n/a

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

No branches or pull requests

1 participant