[ 
https://issues.apache.org/jira/browse/NETBEANS-229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Laszlo Kishalmi resolved NETBEANS-229.
--------------------------------------
       Resolution: Fixed
    Fix Version/s: 9.0

The corresponding PR has been merged into the master.

> Failing of package as Installers on Netbeans Platform applications [NPE]
> ------------------------------------------------------------------------
>
>                 Key: NETBEANS-229
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-229
>             Project: NetBeans
>          Issue Type: Bug
>          Components: platform - Launchers&CLI
>    Affects Versions: 8.2, 9.0
>         Environment: Product Version         = Apache NetBeans IDE Dev (Build 
> 20171227-unknown-revn)
> Operating System        = Linux version 4.13.0-21-generic running on amd64
> Java; VM; Vendor        = 1.8.0_151; Java HotSpot(TM) 64-Bit Server VM 
> 25.151-b12; Oracle Corporation
> Runtime                 = Java(TM) SE Runtime Environment 1.8.0_151-b12
> Java Home               = /usr/lib/jvm/java-8-oracle/jre
> System Locale; Encoding = en_US (nb); UTF-8
> Home Directory          = /home/thilina
>            Reporter: Thilina Ranathunga
>            Assignee: Thilina Ranathunga
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 9.0
>
>         Attachments: code.png, errjava.png, output.png, packageas.png, sout, 
> xmler.png
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Build failed performing *Package as -> Installers* on *Netbeans Platform 
> application*.
> !packageas.png|thumbnail!
> *Environment and setup details*:
>       OS: Linux mint 18.3 - 64bit
>       incubator-netbeans repo status: Pull on same day
>       Installers to generate: windows
> *Exception Details*: 
> /home/thilina/github/incubator-netbeans/nbbuild/netbeans/harness/nbi/stub/template.xml:66:
>  The following error occurred while executing this line:
> /mnt/DATA/Documents/GitHubOff/nbiz/NbizApp/build/installer/build.xml:185: 
> org.netbeans.installer.infra.lib.registries.ManagerException: Could not 
> create bundle - error in running the engine
> !xmler.png|thumbnail!
> [2017-12-27 12:05:34.811]:         An unexpected exception happened in thread 
> Thread-5
> [2017-12-27 12:05:34.812]:         java.lang.NullPointerException
> [2017-12-27 12:05:34.812]:            at 
> org.netbeans.installer.utils.FileUtils.getCrc32(FileUtils.java:418)
> [2017-12-27 12:05:34.812]:            at 
> org.netbeans.installer.utils.system.launchers.impl.ExeLauncher.addFileSection(ExeLauncher.java:359)
> [2017-12-27 12:05:34.812]:            at 
> org.netbeans.installer.utils.system.launchers.impl.ExeLauncher.create(ExeLauncher.java:145)
> [2017-12-27 12:05:34.812]:            at 
> org.netbeans.installer.utils.SystemUtils.createLauncher(SystemUtils.java:470)
> [2017-12-27 12:05:34.812]:            at 
> org.netbeans.installer.wizard.components.actions.CreateNativeLauncherAction.execute(CreateNativeLauncherAction.java:97)
> [2017-12-27 12:05:34.812]:            at 
> org.netbeans.installer.wizard.components.WizardAction$1.run(WizardAction.java:103)
> !errjava.png|thumbnail!
> *Traced originate location *
>       class: org.netbeans.installer.utils.system.launchers.impl.ExeLauncher
>       method:  create
>       line number: 145
>       line code: addFileSection(fos, testJVMFile, progress,total);
>       
> *Invistigation*: 
>       
>       added println to inspect values above the suspected line (145)
>       
>       code:
>               System.out.println("thilina01:create[145]@"+getClass());
>               System.out.println(testJVMFile);
>               System.out.println(testJVMFile.getPath());
>               System.out.println(testJVMFile.getAbsolutePath());
>               System.out.println(testJVMFile.getPathType());
>               addFileSection(fos, testJVMFile, progress,total);
> !code.png|thumbnail!
>       output: 
>               thilina01:create[145]@class 
> org.netbeans.installer.utils.system.launchers.impl.ExeLauncher
>               
> org.netbeans.installer.utils.system.launchers.LauncherResource@5433a1a1
>               org/netbeans/installer/utils/applications/TestJDK.class
>               $L{nbi.launcher.tmp.dir}/TestJDK.class
>               nbi.launcher.tmp.dir
> !output.png|thumbnail!
>       *Note*: According to the output there should be a file named 
> TestJDK.class at org/netbeans/installer/utils/applications/
>               But the file is not present at the location. 
>       
> +Fix attempts+:       
>       _Skip error: [Failed]_
>               tried skipping the null pointer by using if statement, it 
> completes the build and displays "Build Success"
>               but generated installer is corrupted
>       _{color:#14892c}Externally provide the missing resource: 
> [Success]{color}_
>       
>               on old netbeans hg repo, noticed the needed binary file is 
> present, Downloaded and placed the file.
>               Link:   
>               
> http://hg.netbeans.org/main/file/tip/nbi/engine/src/org/netbeans/installer/utils/applications/TestJDK.class
>       Location placed: 
> incubator-netbeans/nbi/engine/src/org/netbeans/installer/utils/applications/TestJDK.class
>       Full path (on my PC): 
> /home/thilina/github/incubator-netbeans/nbi/engine/src/org/netbeans/installer/utils/applications/TestJDK.class
>               Result: 
>                       Build Success
>                       
>                       Generated installer is fine, successfully installed on 
> windows 10 64bit PC
> *Summary*:
>       Failing of package as Installers on Netbeans Platform applications can 
> be fixed by adding the missing binary file TestJDK.class to the 
> /incubator-netbeans/nbi/engine/src/org/netbeans/installer/utils/applications/ 
> folder. 
> *Discussion*: 
>       Is the file skipped intentionally in the process of transition due to 
> any issue in licensing or other reason? Please explain
>       Is it okay to add the file and submit PR? If not, What would be the 
> applicable fix? Happy to help. 
> Thanks,
> Thilina Ranathunga (thilina01)
>       
>       



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
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

Reply via email to