Open dibble-james opened 9 months ago
@dibble-james https://github.com/ikvmnet/ikvm/issues/493
So I am working on a solution to this. The basic issue is that fop is split into three JARs, which access each other's package-private members. This is fine as long as all three are loaded dynamically. However, in general IKVM use, we treat each individual JAR as a separate assembly. But, package-private members get converted to 'internal'. So, .NET cannot access across them.
The solution I'm working on currently is to use the IgnoresAccessChecksToAttribute to insure each generated assembly has access to the internals of their referenced assemblies. This does skip a .NET verification check. But, it would have no impact on a Java compiler examine the assembly exported to a stub JAR. So, access should be prevented at compile time. It's an interesting solution, and we'll see if it works.
It also appears that this is a problem with fop itself, as they're engaged in a modernization effort for JPMS (JDK9+).
Hi, @wasabii
anything we can do to help on this issue?
I'm trying to use the FOP library in my Dotnet project, but I was able to generate PDFs only from simple XSLT/XML files.
I never came up with a good solution inside IKVM as of yet. It looks like the FOP issue I referenced has since been 'resolved'. Might want to check with that and see if any changes have been made that remove need for IKVM to do anything.
I briefly mentioned this to @wasabii over here and have created a little repro project: IKVM.FOP.zip
My Java and Maven knowledge is next to 0, but from anecdotal reading, the
fop-util
jar file here is being recreated by IKVM with a different signature, so whenfop-core
tries to call out to it, it think it's working with a different assembly and throws this exception:In the attached repro, I've got it working with a very basic fo file, it can generate a pdf from
align.xml
, but there's something inbasicfonts.xml
that sends it down a slightly different path that then causes the error. I haven't quite figured out how to reference the jar files usingIKVMReference
so I can absolve IKVM here and just put it down toMavenReference
.