Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] export with Java 17

Hi,

Don't understand me wrong, but wouldn't it be better to actually get rid
of old code accessing internal APIs and rather change to use public APIs
and also update then to newer dependencies? (see below the excerpt from
JEP-403)

I mean, with all the changes now in Java11 and Java17 (didn't they
actually remove some libs in Java17, which have been kept in Java11),
and looking at the state of Eclipse and all the plugins, and especially
getting these problems of age-old XML stuff causing this OSGi problems
of multiple chains of accessing libs.

I'm getting actually a (underestimated) bit frustrated about installing
plugins from the standard release train, and ending up with tons of
errors in the .log file about FRAMEWORK ERRORS especially regarding the
java.xml.

https://openjdk.org/jeps/403

> Risks and Assumptions
> The primary risk of this proposal is that existing Java code will
fail to run. The kinds of code that will fail include, but are not
limited, to:
> ...
> * Code that uses the JDK’s internal copy of the Xerces XML processor.
Such code should instead use a standalone copy of the Xerces library,
available from Maven Central.
> * Code that uses the JDK's internal version of the ASM bytecode
library. Such code should instead use a standalone copy of the ASM
library, available from Maven Central.

Regards,
kesselhaus

Am 20.07.2022 um 16:46 schrieb Jonah Graham:
Thanks Dominic! I will try that.

Jonah
~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com <http://www.kichwacoders.com>


On Wed, 20 Jul 2022 at 10:32, Dominic Scharfe
<dominic.scharfe@xxxxxxxxxxxxxxx
<mailto:dominic.scharfe@xxxxxxxxxxxxxxx>> wrote:

    Hi,


    add this to the bundle which depends on
    com.sun.org.apache.xerces.internal.dom.ParentNode (there should be
    an import statement somewhere in the code).


    Hope this helps,

    Dominic


    On 7/20/22 16:25, Jonah Graham wrote:
    Thanks,

    To which bundle's MANIFEST.MF does this need to be added? The one
    in Orbit, or the consuming one?

    Thanks,
    Jonah


    ~~~
    Jonah Graham
    Kichwa Coders
    www.kichwacoders.com <http://www.kichwacoders.com>


    On Wed, 20 Jul 2022 at 10:22, Dominic Scharfe
    <dominic.scharfe@xxxxxxxxxxxxxxx
    <mailto:dominic.scharfe@xxxxxxxxxxxxxxx>> wrote:

        Hi Jonah,


        try to add the following to the MANIFEST.MF file:

        Java-Module-AddExports:
        java.xml/com.sun.org.apache.xerces.internal.dom=.


        Best regards,

        Dominic


        On 7/20/22 15:56, Jonah Graham wrote:
        Hi Jeff / cdt-devers

        With the upgrade to Java 17 some of CDT's (very) old code
        fails with exceptions like:

        Caused by: java.lang.IllegalAccessException: class org.eclipse.cdt.internal.core.CConfigBasedDescriptor$1 cannot access class com.sun.org.apache.xerces.internal.dom.ParentNode (in module java.xml) because module java.xml does not export com.sun.org.apache.xerces.internal.dom to unnamed module @3157e4c0


        This looked familiar, and perhaps related to
        https://bugs.eclipse.org/bugs/show_bug.cgi?id=578660
        <https://bugs.eclipse.org/bugs/show_bug.cgi?id=578660>

        Does anyone know how to resolve this, especially with
        Tycho-Surefire tests?

        Thanks
        Jonah


        ~~~
        Jonah Graham
        Kichwa Coders
        www.kichwacoders.com <http://www.kichwacoders.com>

        _______________________________________________
        cdt-dev mailing list
        cdt-dev@xxxxxxxxxxx  <mailto:cdt-dev@xxxxxxxxxxx>
        To unsubscribe from this list, visithttps://www.eclipse.org/mailman/listinfo/cdt-dev  <https://www.eclipse.org/mailman/listinfo/cdt-dev>

        _______________________________________________
        cdt-dev mailing list
        cdt-dev@xxxxxxxxxxx <mailto:cdt-dev@xxxxxxxxxxx>
        To unsubscribe from this list, visit
        https://www.eclipse.org/mailman/listinfo/cdt-dev
        <https://www.eclipse.org/mailman/listinfo/cdt-dev>


    _______________________________________________
    cdt-dev mailing list
    cdt-dev@xxxxxxxxxxx  <mailto:cdt-dev@xxxxxxxxxxx>
    To unsubscribe from this list, visithttps://www.eclipse.org/mailman/listinfo/cdt-dev  <https://www.eclipse.org/mailman/listinfo/cdt-dev>
    _______________________________________________
    cdt-dev mailing list
    cdt-dev@xxxxxxxxxxx <mailto:cdt-dev@xxxxxxxxxxx>
    To unsubscribe from this list, visit
    https://www.eclipse.org/mailman/listinfo/cdt-dev
    <https://www.eclipse.org/mailman/listinfo/cdt-dev>


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev


Back to the top