KeePassJava2 icon indicating copy to clipboard operation
KeePassJava2 copied to clipboard

SimpleXML doesn't play nicely with Java17

Open jorabin opened this issue 2 years ago • 4 comments

[ERROR] Errors: 
[ERROR]   KdbxInnerOutputStreamTest.test:46 » IllegalState java.lang.reflect.InaccessibleObjectException: Unable to make field private final long java.util.UUID.mostSigBits accessible: module java.base does not "opens java.util" to unnamed module @a803f94
[ERROR]   SimpleSaveAndReloadTest>SaveAndReloadChecks.saveAndReloadTest:59->saveDatabase:52 » IllegalState java.lang.reflect.InaccessibleObjectException: Unable to make field private final long java.util.UUID.mostSigBits accessible: module java.base does not "opens java.util" to unnamed module @a803f94
[ERROR]   SimpleSaveAndReloadTest>SaveAndReloadChecks.saveAndReloadTest2:103->saveDatabase:52 » IllegalState java.lang.reflect.InaccessibleObjectException: Unable to make field private final long java.util.UUID.mostSigBits accessible: module java.base does not "opens java.util" to unnamed module @a803f94
[ERROR]   SimpleSaveAndReloadTest.uppercaseBooleanTest:74 » IllegalState java.lang.reflect.InaccessibleObjectException: Unable to make field private final long java.util.UUID.mostSigBits accessible: module java.base does not "opens java.util" to unnamed module @a803f94

Looks a lot like it's trying to use reflection and can't.

jorabin avatar May 08 '23 14:05 jorabin

It doesn't seem as though SimpleXML is under active development (as mentioned under #26), but then again, it may burst into life again (mentioning no names I can think of a project that went quiet for a long time 😄 ), however, for now it looks like it's not a good bet for the future.

Wondering if anyone has some ideas, since as also mentioned (under #30) wondering what kind of place JAXB has in this project going forward? And as also noted elsewhere (in #12 and in the readme), the DOM implementation has a number of virtues, like it doesn't mess up what it doesn't understand, but DOM traversal never has been fast.

It's tempting to go with Jackson, but there are other options and wondering if anyone has experience they'd like to share in this area? See also A Guide to XML in Java.

jorabin avatar May 08 '23 14:05 jorabin

Per #46 @giusvale-dev has contributed a Jackson implementation, which I think means we have a path forward with SimpleXML replacement ... thanks Giuseppe!

jorabin avatar Aug 22 '23 14:08 jorabin

We still have many tasks to implement again! See you soon 💪💪💪

giusvale-dev avatar Aug 22 '23 14:08 giusvale-dev

I will try to gather up some more issues over coming weeks and will release 2.2.2 to Maven after that.

jorabin avatar Aug 22 '23 14:08 jorabin