[ 
https://issues.apache.org/jira/browse/PDFBOX-5687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17770782#comment-17770782
 ] 

Robert Munteanu commented on PDFBOX-5687:
-----------------------------------------

[~lehmi] - thanks for the quick turnaround. I see the following calls in the 
3.0 branch

{noformat}
debugger/src/main/java/org/apache/pdfbox/debugger/ui/OSXAdapter.java:           
     Class<?> filesHandlerClass = Class.forName("java.awt.desktop.QuitHandler");
debugger/src/main/java/org/apache/pdfbox/debugger/ui/OSXAdapter.java:           
     Class<?> filesHandlerClass = 
Class.forName("java.awt.desktop.OpenFilesHandler");
debugger/src/main/java/org/apache/pdfbox/debugger/ui/OSXAdapter.java:           
 Class<?> applicationClass = Class.forName("com.apple.eawt.Application");
debugger/src/main/java/org/apache/pdfbox/debugger/ui/OSXAdapter.java:           
 Class<?> applicationListenerClass = 
Class.forName("com.apple.eawt.ApplicationListener");
io/src/main/java/org/apache/pdfbox/io/IOUtils.java:                final 
Class<?> unsafeClass = Class.forName("sun.misc.Unsafe");
io/src/main/java/org/apache/pdfbox/io/IOUtils.java:                final 
Class<?> directBufferClass = Class.forName("java.nio.DirectByteBuffer");
{noformat}

We don't use the debugger and it's not an OSGi bundle so we can skip that one. 
The "io" bundle imports sun.misc and java.nio and both of these are typically 
provided by the JVM, so I would not worry about them so much.

Our application now starts with the 3.0-SNAPSHOT versions of the bundles, but 
some tests are failing. I don't think they are related to this issue, but I can 
only look more in depth in a couple of weeks.

> PDFBox 3.0 OSGi bundle requires sun.java2d.cmm.kcms package
> -----------------------------------------------------------
>
>                 Key: PDFBOX-5687
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5687
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 3.0.0 PDFBox
>            Reporter: Robert Munteanu
>            Assignee: Andreas Lehmkühler
>            Priority: Major
>             Fix For: 3.0.1 PDFBox, 4.0.0
>
>
> We consume PDFBox in the Apache Sling project and recently attempted to 
> upgrade to 3.0.0 . Sling uses OSGi and a new required import appeared in the 
> 3.0.0 bundles: sun.java2d.cmm.kcms .  Our PR is at 
> https://github.com/apache/sling-org-apache-sling-starter/pull/212 .
> This prevents us from on applying the update. I looked at the desired usage 
> for kcms and it seems like it is an optional feature.
> I suspect this addition was triggered by a version update of the 
> maven-bundle-plugin, which added support for transforming "Class.forName" 
> calls as OSGi package imports - 
> https://bnd.bndtools.org/instructions/noclassforname.html .
> I would suggest that this import is removed by disabling the specified bnd 
> instruction.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to