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.

Bug 267677 - jfx-impl.xml java.lang.RuntimeException: org.apache.tools.ant.taskdefs.ManifestException: The attribute "Trusted-Library" may not occur more than once in the same section
Summary: jfx-impl.xml java.lang.RuntimeException: org.apache.tools.ant.taskdefs.Manife...
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.2
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-22 19:14 UTC by JTD
Modified: 2017-02-27 15:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Build Console Output (6.33 KB, text/plain)
2016-08-22 19:14 UTC, JTD
Details
jfx-impl.xml Build File (221.54 KB, text/xml)
2016-08-22 19:21 UTC, JTD
Details

Note You need to log in before you can comment on or make changes to this bug.
Description JTD 2016-08-22 19:14:50 UTC
Created attachment 161747 [details]
Build Console Output

Previously using Build 201606090002 with JDK8u92 without issue. Today Downloaded and installed Build 201608220022 as well as JDK8u102 and attempted build of project and received below errors, complete Output log is attached:

Launching <fx:jar> task from C:\Program Files\Java\jdk1.8.0_102\jre\..\lib\ant-javafx.jar
C:\Dev\AgentToolBox\nbproject\jfx-impl.xml:1487: The following error occurred while executing this line:
C:\Dev\AgentToolBox\nbproject\jfx-impl.xml:3008: The following error occurred while executing this line:
C:\Dev\AgentToolBox\nbproject\jfx-impl.xml:1658: 
java.lang.RuntimeException: org.apache.tools.ant.taskdefs.ManifestException: The attribute "Trusted-Library" may not occur more than once in the same section
Comment 1 JTD 2016-08-22 19:21:57 UTC
Created attachment 161748 [details]
jfx-impl.xml Build File
Comment 2 JTD 2017-02-27 14:04:33 UTC
Since this bug has occurred in Build 201608220022 and ALL FUTURE BUILDS I have been stuck using Build 201606090002 with JDK8u92 and although I have attempted later nightly ide installations they all exhibit this same ant error therefore I have been stuck using the June 9, 2016 build. Can someone please advise a workaround or if this is a problem on my part explain what I must change?

According to what I understand, in order for a library jar to be trusted it must contain the "Trusted-Library: true" property and I have more than one library jar that must contain trusted code therefore I have in the Manifest.mf of three jars the following and the error occurs when ant sees the second jars Manifest.mf during jar signing.


Manifest-Version: 1.0
Trusted-Library: true
Application-Name: NTA Agent e-App
Permissions: all-permissions
Codebase: http://the path to main jar
Comment 3 JTD 2017-02-27 15:39:56 UTC
Please disregard this as a bug. The problem was older versions of NetBeans did not support some of the required Manifest Attributes so I had created a template manifest with the below attributes and had the project.properties manifest.file=manifest.mf pointing to it. The later IDE's have separate project.properties attributes such as “Trusted-Library:”. “Application-Name:”, etc. and ant was complaining that these were duplicated because it found them both in the template Manifest.mf and defined in the project.properties. The solution was to clear out these attributes from the template Manifest.mf and now the exceptions no longer occur.


Manifest-Version: 1.0
Trusted-Library: true
Application-Name: NTA Agent e-App
Permissions: all-permissions
Codebase: http://paths to main jar http://paths to main jar  https://paths to main jar  https://paths to main jar 
X-COMMENT: Main-Class will be added automatically by build