[jira] [Commented] (NETBEANS-3234) Apache NetBeans running on JDK 11 cannot access package classes
[ https://issues.apache.org/jira/browse/NETBEANS-3234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17031353#comment-17031353 ] Boris Heithecker commented on NETBEANS-3234: Yes, it is. > Apache NetBeans running on JDK 11 cannot access package classes > --- > > Key: NETBEANS-3234 > URL: https://issues.apache.org/jira/browse/NETBEANS-3234 > Project: NetBeans > Issue Type: Bug >Affects Versions: 11.1 >Reporter: Boris Heithecker >Priority: Critical > Labels: pull-request-available > Fix For: 11.3 > > Time Spent: 2h 40m > Remaining Estimate: 0h > > If a package-info element is defined in some package, it cannot be properly > accessed at runtime: > > java.lang.Package p = AnyClass.class.getPackage(); > > should return a package object representing the actual package-info element > of that package. It is, for example, used by the JAXB runtime to read > XmlSchema annotations at package level. > > This has been tested in oracle jdk11.0.4. Class java.lang.Package in Java 11 > has a private field called "packageInfo" of type "Class", which should > hold a reference to the actual package-info class object, i.e. > AnyPackage.package-info. In NetBeans, always wrongly references > "java.lang.Package$1PackageInfoProxy", which is a fallback reference set if > no actual package-info could be found. > > The reason is most likely that neither > > org.netbeans.JarClassLoader > nor org.netbeans.ProxyClassLoader > nor org.netbeans.StandardModule$OneModuleClassLoader (all in > platform/o.n.bootstrap) > > override method "java.lang.ClassLoader.findClass(String name)". The default > implementation throws an exceptions which causes the above fallback reference > to be set. > > This is a serious issue. If it is not fixed, the platform will not be fully > comptabile, among others, with the JAXB RI and also JAX-WS RI. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Commented] (NETBEANS-3234) Apache NetBeans running on JDK 11 cannot access package classes
[ https://issues.apache.org/jira/browse/NETBEANS-3234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17030643#comment-17030643 ] Peter Hull commented on NETBEANS-3234: -- Is this now fixed by Github PR #1565? > Apache NetBeans running on JDK 11 cannot access package classes > --- > > Key: NETBEANS-3234 > URL: https://issues.apache.org/jira/browse/NETBEANS-3234 > Project: NetBeans > Issue Type: Bug >Affects Versions: 11.1 >Reporter: Boris Heithecker >Priority: Critical > Labels: pull-request-available > Fix For: 11.3 > > Time Spent: 2h 40m > Remaining Estimate: 0h > > If a package-info element is defined in some package, it cannot be properly > accessed at runtime: > > java.lang.Package p = AnyClass.class.getPackage(); > > should return a package object representing the actual package-info element > of that package. It is, for example, used by the JAXB runtime to read > XmlSchema annotations at package level. > > This has been tested in oracle jdk11.0.4. Class java.lang.Package in Java 11 > has a private field called "packageInfo" of type "Class", which should > hold a reference to the actual package-info class object, i.e. > AnyPackage.package-info. In NetBeans, always wrongly references > "java.lang.Package$1PackageInfoProxy", which is a fallback reference set if > no actual package-info could be found. > > The reason is most likely that neither > > org.netbeans.JarClassLoader > nor org.netbeans.ProxyClassLoader > nor org.netbeans.StandardModule$OneModuleClassLoader (all in > platform/o.n.bootstrap) > > override method "java.lang.ClassLoader.findClass(String name)". The default > implementation throws an exceptions which causes the above fallback reference > to be set. > > This is a serious issue. If it is not fixed, the platform will not be fully > comptabile, among others, with the JAXB RI and also JAX-WS RI. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Commented] (NETBEANS-3234) Apache NetBeans running on JDK 11 cannot access package classes
[ https://issues.apache.org/jira/browse/NETBEANS-3234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16957328#comment-16957328 ] Boris Heithecker commented on NETBEANS-3234: Are your sure your solution passes with the fix and does not without it? I've tried it and changed my test case according to your suggestion. If I comment out the ProxyClassLoader.findClass(String name) override, the test still passes, regardless if run with java 8 or 11.0.4. (I did some digging in the existing sources before as well, and, though I may not have been thorough enough, it seems to me that you can't easily create a unit test for this fix. You'd have have to change more code in ProxyClassLoader only for the sake of testing.) > Apache NetBeans running on JDK 11 cannot access package classes > --- > > Key: NETBEANS-3234 > URL: https://issues.apache.org/jira/browse/NETBEANS-3234 > Project: NetBeans > Issue Type: Bug >Affects Versions: 11.1 >Reporter: Boris Heithecker >Priority: Critical > Labels: pull-request-available > Fix For: 11.3 > > Time Spent: 1h 40m > Remaining Estimate: 0h > > If a package-info element is defined in some package, it cannot be properly > accessed at runtime: > > java.lang.Package p = AnyClass.class.getPackage(); > > should return a package object representing the actual package-info element > of that package. It is, for example, used by the JAXB runtime to read > XmlSchema annotations at package level. > > This has been tested in oracle jdk11.0.4. Class java.lang.Package in Java 11 > has a private field called "packageInfo" of type "Class", which should > hold a reference to the actual package-info class object, i.e. > AnyPackage.package-info. In NetBeans, always wrongly references > "java.lang.Package$1PackageInfoProxy", which is a fallback reference set if > no actual package-info could be found. > > The reason is most likely that neither > > org.netbeans.JarClassLoader > nor org.netbeans.ProxyClassLoader > nor org.netbeans.StandardModule$OneModuleClassLoader (all in > platform/o.n.bootstrap) > > override method "java.lang.ClassLoader.findClass(String name)". The default > implementation throws an exceptions which causes the above fallback reference > to be set. > > This is a serious issue. If it is not fixed, the platform will not be fully > comptabile, among others, with the JAXB RI and also JAX-WS RI. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Commented] (NETBEANS-3234) Apache NetBeans running on JDK 11 cannot access package classes
[ https://issues.apache.org/jira/browse/NETBEANS-3234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16951090#comment-16951090 ] Neil C Smith commented on NETBEANS-3234: I don't believe this classes as a blocker for 11.2 at this late stage. Have marked it as a critical against 11.3 and should probably consider early in the cycle. It is workaround-able, if in not so nice ways. > Apache NetBeans running on JDK 11 cannot access package classes > --- > > Key: NETBEANS-3234 > URL: https://issues.apache.org/jira/browse/NETBEANS-3234 > Project: NetBeans > Issue Type: Bug >Affects Versions: 11.1 >Reporter: Boris Heithecker >Priority: Critical > Fix For: 11.3 > > > If a package-info element is defined in some package, it cannot be properly > accessed at runtime: > > java.lang.Package p = AnyClass.class.getPackage(); > > should return a package object representing the actual package-info element > of that package. It is, for example, used by the JAXB runtime to read > XmlSchema annotations at package level. > > This has been tested in oracle jdk11.0.4. Class java.lang.Package in Java 11 > has a private field called "packageInfo" of type "Class", which should > hold a reference to the actual package-info class object, i.e. > AnyPackage.package-info. In NetBeans, always wrongly references > "java.lang.Package$1PackageInfoProxy", which is a fallback reference set if > no actual package-info could be found. > > The reason is most likely that neither > > org.netbeans.JarClassLoader > nor org.netbeans.ProxyClassLoader > nor org.netbeans.StandardModule$OneModuleClassLoader (all in > platform/o.n.bootstrap) > > override method "java.lang.ClassLoader.findClass(String name)". The default > implementation throws an exceptions which causes the above fallback reference > to be set. > > This is a serious issue. If it is not fixed, the platform will not be fully > comptabile, among others, with the JAXB RI and also JAX-WS RI. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Commented] (NETBEANS-3234) Apache NetBeans running on JDK 11 cannot access package classes
[ https://issues.apache.org/jira/browse/NETBEANS-3234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16949996#comment-16949996 ] Matthias Bläsing commented on NETBEANS-3234: The call-chain on JDK 11 is this: * Package.getAnnotation(Class) * Package.getPackageInfo() * ClassLoader.loadClass(Module, String) (JDK9+) * ClassLoader.findClass(String, String) (JDK9+) * ClassLoader.findClass(String) A naive suggestion: Why not move everything that is currently located in org.netbeans.ProxyClassLoader.loadClass(String, boolean), apart from the ClassLoader.resolveClass(Class) calls to a new org.netbeans.ProxyClassLoader.findClass(String), which delivers the missing override. Then org.netbeans.ProxyClassLoader.loadClass(String, boolean) would first call into the new findClass method and optionally resolve the returned class. > Apache NetBeans running on JDK 11 cannot access package classes > --- > > Key: NETBEANS-3234 > URL: https://issues.apache.org/jira/browse/NETBEANS-3234 > Project: NetBeans > Issue Type: Bug >Affects Versions: 11.1 >Reporter: Boris Heithecker >Priority: Blocker > > If a package-info element is defined in some package, it cannot be properly > accessed at runtime: > > java.lang.Package p = AnyClass.class.getPackage(); > > should return a package object representing the actual package-info element > of that package. It is, for example, used by the JAXB runtime to read > XmlSchema annotations at package level. > > This has been tested in oracle jdk11.0.4. Class java.lang.Package in Java 11 > has a private field called "packageInfo" of type "Class", which should > hold a reference to the actual package-info class object, i.e. > AnyPackage.package-info. In NetBeans, always wrongly references > "java.lang.Package$1PackageInfoProxy", which is a fallback reference set if > no actual package-info could be found. > > The reason is most likely that neither > > org.netbeans.JarClassLoader > nor org.netbeans.ProxyClassLoader > nor org.netbeans.StandardModule$OneModuleClassLoader (all in > platform/o.n.bootstrap) > > override method "java.lang.ClassLoader.findClass(String name)". The default > implementation throws an exceptions which causes the above fallback reference > to be set. > > This is a serious issue. If it is not fixed, the platform will not be fully > comptabile, among others, with the JAXB RI and also JAX-WS RI. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Commented] (NETBEANS-3234) Apache NetBeans running on JDK 11 cannot access package classes
[ https://issues.apache.org/jira/browse/NETBEANS-3234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16949989#comment-16949989 ] Geertjan Wielenga commented on NETBEANS-3234: - And are you sure this should be a blocker for the release of 11.2? > Apache NetBeans running on JDK 11 cannot access package classes > --- > > Key: NETBEANS-3234 > URL: https://issues.apache.org/jira/browse/NETBEANS-3234 > Project: NetBeans > Issue Type: Bug >Affects Versions: 11.1 >Reporter: Boris Heithecker >Priority: Blocker > > If a package-info element is defined in some package, it cannot be properly > accessed at runtime: > > java.lang.Package p = AnyClass.class.getPackage(); > > should return a package object representing the actual package-info element > of that package. It is, for example, used by the JAXB runtime to read > XmlSchema annotations at package level. > > This has been tested in oracle jdk11.0.4. Class java.lang.Package in Java 11 > has a private field called "packageInfo" of type "Class", which should > hold a reference to the actual package-info class object, i.e. > AnyPackage.package-info. In NetBeans, always wrongly references > "java.lang.Package$1PackageInfoProxy", which is a fallback reference set if > no actual package-info could be found. > > The reason is most likely that neither > > org.netbeans.JarClassLoader > nor org.netbeans.ProxyClassLoader > nor org.netbeans.StandardModule$OneModuleClassLoader (all in > platform/o.n.bootstrap) > > override method "java.lang.ClassLoader.findClass(String name)". The default > implementation throws an exceptions which causes the above fallback reference > to be set. > > This is a serious issue. If it is not fixed, the platform will not be fully > comptabile, among others, with the JAXB RI and also JAX-WS RI. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Commented] (NETBEANS-3234) Apache NetBeans running on JDK 11 cannot access package classes
[ https://issues.apache.org/jira/browse/NETBEANS-3234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16949987#comment-16949987 ] Geertjan Wielenga commented on NETBEANS-3234: - {quote}//Fails in NetBeans 11.1 on oracle jdk11.0.4 //Succeeds with NetBeans platform 8.2 on oracle jdk1.8.0_162 assert annot != null;{quote} I can reproduce, but not when I run NetBeans 11.1 on JDK 8. > Apache NetBeans running on JDK 11 cannot access package classes > --- > > Key: NETBEANS-3234 > URL: https://issues.apache.org/jira/browse/NETBEANS-3234 > Project: NetBeans > Issue Type: Bug >Affects Versions: 11.1 >Reporter: Boris Heithecker >Priority: Blocker > > If a package-info element is defined in some package, it cannot be properly > accessed at runtime: > > java.lang.Package p = AnyClass.class.getPackage(); > > should return a package object representing the actual package-info element > of that package. It is, for example, used by the JAXB runtime to read > XmlSchema annotations at package level. > > This has been tested in oracle jdk11.0.4. Class java.lang.Package in Java 11 > has a private field called "packageInfo" of type "Class", which should > hold a reference to the actual package-info class object, i.e. > AnyPackage.package-info. In NetBeans, always wrongly references > "java.lang.Package$1PackageInfoProxy", which is a fallback reference set if > no actual package-info could be found. > > The reason is most likely that neither > > org.netbeans.JarClassLoader > nor org.netbeans.ProxyClassLoader > nor org.netbeans.StandardModule$OneModuleClassLoader (all in > platform/o.n.bootstrap) > > override method "java.lang.ClassLoader.findClass(String name)". The default > implementation throws an exceptions which causes the above fallback reference > to be set. > > This is a serious issue. If it is not fixed, the platform will not be fully > comptabile, among others, with the JAXB RI and also JAX-WS RI. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists