Community
Participate
Working Groups
Created attachment 169239 [details] test case +++ This bug was initially created as a clone of Bug #313408 +++ Attached is the package 'eclnew' which loads the package 'testpkg'. The package 'testpkg' is located in the directory 'eclnew/testpkg', and when 'eclnew' is being built, the repository directory for 'testpkg' is the current working directory. To replicate the bug, unzip the attached file and build 'eclnew', without specifying XDCPATH. If XDCPATH is not being set to include the current working directory, this physical organization causes NullPointer exception. The exception is caused by the difference between the path used by xdc.findFile and the path used by BrowserSession. When the schema for 'testpkg' is loaded, xdc.findFile automatically adds the current working directory to the search path, and 'testpkg' is found and processed correctly. However, when BrowserSession searches for the spec for 'testpkg' at the time when the config files are generated, only the package path is searched. Here is the relevant part of the error output: configuring test.x64P from package/cfg/test_x64P.cfg ... java.lang.NullPointerException at xdc.services.intern.gen.Config.pkgSpec(Config.java:2739) at xdc.services.intern.gen.Config.getPkgAliases(Config.java:1765) at xdc.services.intern.gen.Config.gen(Config.java:251) at xdc.services.intern.gen.Prog.gen(Prog.java:63) at xdc.services.intern.gen.Prog.gen(Prog.java:40) ... js: "/db/rtree/install/trees/products/xdcprod/xdcprod-m36/product/Linux/xdctools_3_20_00_36_eng/packages/xdc/cfg/Main.xs", line 31: XDC runtime exception: java.lang.NullPointerException The original bug 313408 was fixed by recognizing that NullPointerException happened and displaying an error message. The real solution should be to fix the inconsistency in search paths between xdc.findFile and findPkg() in BrowserSession.
*** This bug has been marked as a duplicate of bug 291126 ***