This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Build OSGi Bundle with java API level 8 | ||
---|---|---|---|
Product: | apisupport | Reporter: | heithecker <heithecker> |
Component: | Harness | Assignee: | pgebauer <pgebauer> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P1 | ||
Version: | 8.0.2 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
heithecker
2015-02-16 09:24:02 UTC
I can see the same issue :-( The message tells us that something related to JavaFX does not look right. [error] Exception in thread "main" /opt/developer/netbeans-8.0/harness/suite.xml:545: The following error occurred while executing this line: [error] /opt/developer/netbeans-8.0/harness/osgi.xml:63: Could not prescan /opt/developer/netbeans-8.0/platform/modules/org-netbeans-libs-javafx.jar: java.io.IOException: Unrecognized constant pool tag 18 at index 18; running UTF-8 strings: blah blah blah ... One way to circumvent the trouble is by disabling "JavaFX wrapper" (i.e: not including it!) as part of platform libraries. Projects/Feed Runner Application -> Properties -> Libraries -> (platform) -> (JavaFX wraper) [ ] included (i.e: not included!) Module JavaFXWrapper (org.netbeans.libs.javafx) is excluded in our platform app. The error keeps coming up when i try to build an OSGi bundle. As far as I've found out the issue is related to java 8 features, we can see that from "Unrecognized constant pool tag 18 at index 42" in the error message. However, I don't how to fix this. Boris Once I have excluded the JavaFX wraper module in the platform of my test application the issue disappeared. It can be used as a workaround for most affected applications.I'm downgrading the issue to P2. Not true. It won't compile with any piece of Java 8 code. How to reproduce: 1. Open the Felix OSGi Sample project. 2. Remove "platform/JavaFX Wrapper" from its platform modules. 3. In the suite's "Show OSGi Bundle" module, set the source level to 1.8. 4. Run "osgi-suite", it won't fail now. 5. Anywhere in the sample module, add some Java 8 feature (lambda exp., method reference). For example, I added: private void java8Code() { Stream.of("a", "b").forEach(System.out::println); } 6. Run "osgi-suite". It fails. This must be fixed. It's not a minor issue. Lots of applications use Java 8 code now. Fixed by: changeset: 302134:cf0e59156e65 user: Tomas Zezula <tzezula@netbeans.org> date: Tue Jan 10 16:12:28 2017 +0100 summary: Java8, Java9 constant pool constants. |