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

Java RuntimeException when writing synonyms.xml #175

Open
mattgillam opened this issue Sep 3, 2022 · 2 comments
Open

Java RuntimeException when writing synonyms.xml #175

mattgillam opened this issue Sep 3, 2022 · 2 comments

Comments

@mattgillam
Copy link

Thank you for Anonimatron.

Describe the bug
Java Exception:

Writing Synonyms to /Users/*****/anonimatron-1.15/synonyms.xml ...Exception in thread "main" java.lang.RuntimeException: Could not instantiate serializer com.sun.org.apache.xml.internal.serialize.XMLSerializer: java.lang.IllegalAccessException: class org.exolab.castor.xml.BaseXercesJDK5Serializer cannot access class com.sun.org.apache.xml.internal.serialize.XMLSerializer (in module java.xml) because module java.xml does not export com.sun.org.apache.xml.internal.serialize to unnamed module @544ff9ef

synonyms.xml is a zero length file

The database target database does appear to be anonymised successfully. I'm using SQL Server.

Desktop (please complete the following information):

  • OS: MacOS 12.5.1
[~/dev/anonimatron-1.15]$ java --version
java 17.0.4.1 2022-08-18 LTS
Java(TM) SE Runtime Environment (build 17.0.4.1+1-LTS-2)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.4.1+1-LTS-2, mixed mode, sharing)

I appreciate this may be an issue with Castor (I have failed to find a fix) but I'm not clear why other Anonimatron users have experienced it, maybe that will help me find a correction, any pointers welcome.

Thank you.

@realrolfje
Copy link
Owner

Hi Matt, this seems to be an issue caused by the incompatibility of the old (Castor) code with the new, more strict access checking in newer versions of Java. As a matter of fact I currently have the same issue when running the unittests of anonimatron on Java 20. This problem is not unique to Anonimatron or Castor: https://stackoverflow.com/questions/53633788/java-lang-illegalaccesserror-cannot-access-class-because-module-does-not-export

I don't have an immediate fix for this, other than the workaround of using an older version of Java. Currently Anonimatron support Java 8, I am considering to no longer support that version so that I can bump some dependencies to a higher version and at the same time solve this issue.

Thanks for reporting this, I'll keep this issue open until this is solved.

@mattgillam
Copy link
Author

mattgillam commented Sep 5, 2022

Thank you Rolfje.

Actually I think this is not a blocking issue for us as I think we won't have the need to repeat Anonimatron runs with matching output, but I'll watch the issue.

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