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 209459 - Exception after platform-based application start
Summary: Exception after platform-based application start
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Module System (show other bugs)
Version: 7.2
Hardware: PC Linux
: P1 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 209128 209271 209655 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-12 11:50 UTC by igor_nikiforov
Modified: 2012-03-22 11:15 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log with exception (16.75 KB, application/octet-stream)
2012-03-12 11:50 UTC, igor_nikiforov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description igor_nikiforov 2012-03-12 11:50:16 UTC
Created attachment 116598 [details]
messages.log with exception

The platform application (Oracle Solaris Studio) displays the exception indicator just after any menu item is used. Here is exception:

java.lang.NullPointerException
	at org.netbeans.core.startup.NbInstaller$CacheFlusher.flushCaches(NbInstaller.java:1205)
	at org.netbeans.Stamps$Store.store(Stamps.java:604)
[catch] at org.netbeans.Stamps$Worker.run(Stamps.java:769)
Comment 1 soldatov 2012-03-13 08:22:53 UTC
on Windows a lot of automatic tests fails with:

    [junit] WARNING [org.netbeans.Stamps]: Error saving cache C:\hudson\workspace\win7-cygwin\testbase\tests\build\test\qa-functional\work\userdir0\var\cache\localeVariants
    [junit] INFO [org.netbeans.Stamps]: Can't find relative path for 'C:\hudson\workspace\win7-cygwin\netbeans\platform\modules\org-openide-explorer.jar'
    [junit] java.io.IOException: Can't find relative path for 'C:\hudson\workspace\win7-cygwin\netbeans\platform\modules\org-openide-explorer.jar'
    [junit] 	at org.netbeans.Stamps.produceRelativePath(Stamps.java:854)
    [junit] 	at org.netbeans.Stamps.writeRelativePath(Stamps.java:830)
    [junit] 	at org.netbeans.LocaleVariants.flushCaches(LocaleVariants.java:103)
    [junit] [catch] at org.netbeans.Stamps$Store.store(Stamps.java:604)
    [junit] 	at org.netbeans.Stamps$Worker.run(Stamps.java:769)
    [junit] WARNING [org.netbeans.TopSecurityManager]: use of system property netbeans.user has been obsoleted in favor of InstalledFileLocator/Places at org.netbeans.core.startup.preferences.RelPaths.findRelativePath(RelPaths.java:75)
    [junit] SEVERE [global]
    [junit] java.lang.NullPointerException
    [junit] 	at org.netbeans.core.startup.NbInstaller$CacheFlusher.flushCaches(NbInstaller.java:1205)
    [junit] 	at org.netbeans.Stamps$Store.store(Stamps.java:604)
    [junit] [catch] at org.netbeans.Stamps$Worker.run(Stamps.java:769)
Comment 2 Vladimir Voskresensky 2012-03-13 09:05:44 UTC
150 failed tests.
Jarda, can you evaluate, please?
Comment 3 Jaroslav Tulach 2012-03-13 13:53:40 UTC
Is there a simple way to reproduce the problem?
Comment 4 Vladimir Voskresensky 2012-03-16 12:10:56 UTC
Jarda, the situations is following:
Stamps.produceRelativePath uses testWritePath in loop
        for (String p : dirs()) {
            if (testWritePath(path, p, "" + cnt, out)) {
                return;
            }
            cnt++;
        }
in case of 
path = /export/tmp/tmp/oss/lib/solstudio/solstudio/modules/locale/org-netbeans-core_solstudio.jar!/
and 
p = /export/tmp/tmp/oss/lib/solstudio/bin/../solstudio
testWritePath returns FALSE 
Looks lke ".." causes problem (btw, I have seen .. in "path" as well and then such jars are handled)

Btw, NbInstaller has own impl of testWritePath 
=> modification is needed in both places
Comment 5 Vladimir Voskresensky 2012-03-16 12:12:15 UTC
(In reply to comment #4) 
> Btw, NbInstaller has own impl of testWritePath 
> => modification is needed in both places
the right comment is;
NbInstaller uses
RelPaths.findRelativePath which has own impl of testWritePath
=> fix is needed in both testWritePath copies if you can use the same
Comment 6 Jaroslav Tulach 2012-03-16 13:01:09 UTC
OK, I am writing test.
Comment 7 Jaroslav Tulach 2012-03-16 13:38:35 UTC
ergonomics#742dad1d4ce9
Comment 8 Jaroslav Tulach 2012-03-16 13:42:52 UTC
*** Bug 209271 has been marked as a duplicate of this bug. ***
Comment 9 Jaroslav Tulach 2012-03-16 15:29:18 UTC
*** Bug 209655 has been marked as a duplicate of this bug. ***
Comment 10 Jaroslav Tulach 2012-03-16 15:29:52 UTC
*** Bug 209128 has been marked as a duplicate of this bug. ***
Comment 12 Quality Engineering 2012-03-22 11:15:12 UTC
Integrated into 'main-golden', will be available in build *201203220400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/742dad1d4ce9
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #209459: Support for absolute paths is still needed