Closed ctoabidmaqbool1 closed 6 months ago
Moreover, ICEPdf Viewer libray is not modular one e.g. having module-info.java, Java pick auto modular name.
Sample project : https://github.com/ctoabidmaqbool1/ICEPDF-Viewer-Modular-Test
Also it's not working:
implementation('com.github.pcorless.icepdf:icepdf-core:7.2.0') {
exclude group: 'org.bouncycastle', module: 'bcprov-ext-jdk18on'
}
implementation 'com.github.pcorless.icepdf:icepdf-viewer:7.2.0'
implementation('com.github.pcorless.icepdf:icepdf-core:7.2.0') {
exclude module: 'bcprov-ext-jdk18on'
}
implementation('com.github.pcorless.icepdf:icepdf-viewer:7.2.0') {
exclude module: 'bcprov-ext-jdk18on'
}
@pcorless This somehow solve the issue, But I am not sure if I can exclude bcprov-ext-jdk18on without any major issue?
Pretty sure I have that fixed on the head/trunk branch but will double check. You can keep bcprov-ext-jdk18on and exclude bcprov-jdk18on.
I'll take a look at the module, that's been on my todo list for quite some time.
Another issue I am facing is:
Providers:
com.ctc.wstx provides com.ctc.wstx.shaded.msv.org_isorelax.verifier.VerifierFactoryLoader not used by any observable module
com.ctc.wstx provides com.ctc.wstx.shaded.msv.relaxng_datatype.DatatypeLibraryFactory not used by any observable module
com.fasterxml.jackson.dataformat.xml provides com.fasterxml.jackson.core.JsonFactory not used by any observable module
com.fasterxml.jackson.databind provides com.fasterxml.jackson.core.ObjectCodec used by com.fasterxml.jackson.core
com.fasterxml.jackson.dataformat.xml provides com.fasterxml.jackson.core.ObjectCodec used by com.fasterxml.jackson.core
com.fasterxml.jackson.datatype.jsr310 provides com.fasterxml.jackson.databind.Module used by com.fasterxml.jackson.databind
com.my.app.merged.module provides io.jsonwebtoken.CompressionCodec not used by any observable module
com.my.app.merged.module provides io.jsonwebtoken.io.Deserializer not used by any observable module
com.my.app.merged.module provides io.jsonwebtoken.io.Serializer not used by any observable module
java.desktop provides java.net.ContentHandlerFactory used by java.base
java.base provides java.nio.file.spi.FileSystemProvider used by java.base
java.naming provides java.security.Provider used by java.base
java.security.jgss provides java.security.Provider used by java.base
java.security.sasl provides java.security.Provider used by java.base
java.xml.crypto provides java.security.Provider used by java.base
org.bouncycastle.provider provides java.security.Provider used by java.base
com.my.app.merged.module provides java.sql.Driver used by java.sql
org.hsqldb provides java.sql.Driver used by java.sql
java.base provides java.util.random.RandomGenerator used by java.base
com.my.app.merged.module provides javax.imageio.spi.ImageInputStreamSpi used by java.desktop
com.my.app.merged.module provides javax.imageio.spi.ImageReaderSpi used by java.desktop
com.my.app.merged.module provides javax.imageio.spi.ImageWriterSpi used by java.desktop
java.desktop provides javax.print.PrintServiceLookup used by java.desktop
java.desktop provides javax.print.StreamPrintServiceFactory used by java.desktop
java.management provides javax.security.auth.spi.LoginModule used by java.base
java.desktop provides javax.sound.midi.spi.MidiDeviceProvider used by java.desktop
java.desktop provides javax.sound.midi.spi.MidiFileReader used by java.desktop
java.desktop provides javax.sound.midi.spi.MidiFileWriter used by java.desktop
java.desktop provides javax.sound.midi.spi.SoundbankReader used by java.desktop
java.desktop provides javax.sound.sampled.spi.AudioFileReader used by java.desktop
java.desktop provides javax.sound.sampled.spi.AudioFileWriter used by java.desktop
java.desktop provides javax.sound.sampled.spi.FormatConversionProvider used by java.desktop
java.desktop provides javax.sound.sampled.spi.MixerProvider used by java.desktop
com.ctc.wstx provides javax.xml.stream.XMLEventFactory used by java.xml
com.ctc.wstx provides javax.xml.stream.XMLInputFactory used by java.xml
com.ctc.wstx provides javax.xml.stream.XMLOutputFactory used by java.xml
java.logging provides jdk.internal.logger.DefaultLoggerFinder used by java.base
com.my.app.merged.module provides org.apache.batik.script.InterpreterFactory not used by any observable module
com.ctc.wstx provides org.codehaus.stax2.validation.XMLValidationSchemaFactory$dtd not used by any observable module
com.ctc.wstx provides org.codehaus.stax2.validation.XMLValidationSchemaFactory$relaxng not used by any observable module
com.ctc.wstx provides org.codehaus.stax2.validation.XMLValidationSchemaFactory$w3c not used by any observable module
java.desktop provides sun.datatransfer.DesktopDatatransferService used by java.datatransfer
jdk.management provides sun.management.spi.PlatformMBeanProvider used by java.management
jdk.unsupported.desktop provides sun.swing.InteropProvider used by java.desktop
Error: signed modular JAR D:\my-project\build\jlinkbase\jlinkjars\bcpkix-jdk18on-1.76.jar is currently not supported, use --ignore-signing-information to suppress error
and I have tried --ignore-signing-information
that is too not working noir:
implementation('com.github.pcorless.icepdf:icepdf-core:7.2.0') {
exclude module: 'bcprov-jdk18on'
exclude module: 'bcpkix-jdk18on'
}
implementation('com.github.pcorless.icepdf:icepdf-viewer:7.2.0') {
exclude module: 'bcprov-jdk18on'
exclude module: 'bcpkix-jdk18on'
}
Anyway I have to exclude both bcprov-ext-jdk18on and bcpkix-jdk18on to solve my problem!
implementation('com.github.pcorless.icepdf:icepdf-core:7.2.0') {
exclude module: 'bcprov-ext-jdk18on'
exclude module: 'bcpkix-jdk18on'
}
implementation('com.github.pcorless.icepdf:icepdf-viewer:7.2.0') {
exclude module: 'bcprov-ext-jdk18on'
exclude module: 'bcpkix-jdk18on'
}
Still working on testing this for some reflective loading corners cases but the above branch should provide basic module support and address some of the dependency issue you saw. Let me know how it goes.
Can run the viewer RI with
java --module-path ./libs/ --module org.icepdf.ri.viewer
I am trying to convert my project to modular e.g. with
module-info.java
but there is an issue when i try to execute jLink task!Now
com.github.pcorless.icepdf:icepdf-viewer:7.2.0
depedencies:The libs bcprov-ext-jdk18on and bcprov-jdk18on have same module e.g.
org.bouncycastle.provider
how to solve the prblem. e.g. which lib should be excluded?