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

Illegal reflective access by com.rits.cloning.Cloner$CloneObjectCloner for Timestamp.nanos #113

Open
johanhaleby opened this issue Nov 29, 2021 · 1 comment

Comments

@johanhaleby
Copy link

Hi!

I run into this problem when running our application:

[ERROR] WARNING: An illegal reflective access operation has occurred
[ERROR] WARNING: Illegal reflective access by com.rits.cloning.Cloner$CloneObjectCloner (file:/root/.m2/repository/io/github/kostaskougios/cloning/1.10.3/cloning-1.10.3.jar) to field java.sql.Timestamp.nanos
[ERROR] WARNING: Please consider reporting this to the maintainers of com.rits.cloning.Cloner$CloneObjectCloner
[ERROR] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[ERROR] WARNING: All illegal access operations will be denied in a future release

I'm using Java 17. Is there anything I can/should do from my side?

Regards
/Johan

@chadlwilson
Copy link

Might want to look at #105

For this type of thing you probably need to implement and register a fast cloner for java.sql.Timestamp which does not rely on reflection (to internals of the object)

There's an example at https://github.com/gocd/gocd/blob/5638a49a35e5a96836f8870deae69a8e9c8f1093/util/src/main/java/com/thoughtworks/go/util/ClonerFactory.java#L42-L68 if you're interested (and test)

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