jorabin / KeePassJava2

Java API for KeePass Password Databases - Read/Write 2.x (File versions 3 and 4), Read 1.x
Apache License 2.0
251 stars 70 forks source link

SimpleXML doesn't play nicely with Java17 #40

Closed jorabin closed 1 month ago

jorabin commented 1 year ago
[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 commented 1 year ago

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 commented 1 year ago

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

giusvale-dev commented 1 year ago

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

jorabin commented 1 year ago

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

jorabin commented 1 month ago

finally closed as 2.2.2 release