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 191869 - not finding windowmanager due to weight attribute
Summary: not finding windowmanager due to weight attribute
Status: RESOLVED WORKSFORME
Alias: None
Product: apisupport
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.0
Hardware: PC Other
: P2 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-11 19:08 UTC by simpatico
Modified: 2010-11-16 20:16 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
doesn't give errors, but doesn't result in expected behavior (92.71 KB, application/x-zip-compressed)
2010-11-12 01:54 UTC, simpatico
Details
Working sample (146.07 KB, application/zip)
2010-11-16 20:14 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description simpatico 2010-11-11 19:08:35 UTC
In one of my modules layer:

<folder name="Windows2">
        <file name="WindowManager.wswmgr" url="WindowManager.wswmgr">
            <attr name="weight" intvalue="100"/>
        </file>

However run as a JWS application I get the following exception. I'm not sure how it works, but it's not looking for it in the right position (or not moving it).

Can reproduce with sample project referenced in http://netbeans.org/bugzilla/show_bug.cgi?id=191868

msg
Caused: java.io.FileNotFoundException: JAR entry org/netbeans/core/windows/resources/WindowManager.wswmgr not found in C:\Users\kahloutg\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\48\7efbd070-75d2f225
	at com.sun.jnlp.JNLPCachedJarURLConnection.connect(Unknown Source)
	at com.sun.jnlp.JNLPCachedJarURLConnection.getInputStream(Unknown Source)
	at java.net.URL.openStream(Unknown Source)
	at org.openide.filesystems.XMLFileSystem$FileObjRef.getInputStream(XMLFileSystem.java:986)
Caused: java.io.FileNotFoundException: Windows2/WindowManager.wswmgr
	at org.openide.filesystems.XMLFileSystem$FileObjRef.getInputStream(XMLFileSystem.java:988)
	at org.openide.filesystems.XMLFileSystem.getInputStream(XMLFileSystem.java:406)
	at org.openide.filesystems.XMLFileSystem.access$500(XMLFileSystem.java:167)
	at org.openide.filesystems.XMLFileSystem$Impl.inputStream(XMLFileSystem.java:785)
	at org.openide.filesystems.StreamPool.createInputStream(StreamPool.java:105)
	at org.openide.filesystems.AbstractFileObject.getInputStream(AbstractFileObject.java:215)
	at org.openide.filesystems.MultiFileObject.getInputStream(MultiFileObject.java:645)
	at org.openide.filesystems.MultiFileObject.getInputStream(MultiFileObject.java:645)
	at org.netbeans.core.windows.persistence.WindowManagerParser$PropertyHandler.readData(WindowManagerParser.java:880)
	at org.netbeans.core.windows.persistence.WindowManagerParser.readProperties(WindowManagerParser.java:365)
	at org.netbeans.core.windows.persistence.WindowManagerParser.load(WindowManagerParser.java:110)
	at org.netbeans.core.windows.persistence.PersistenceManager.loadWindowSystem(PersistenceManager.java:1118)
	at org.netbeans.core.windows.PersistenceHandler.load(PersistenceHandler.java:120)
	at org.netbeans.core.windows.WindowSystemImpl.load(WindowSystemImpl.java:73)
	at org.netbeans.core.GuiRunLevel$2.run(GuiRunLevel.java:181)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:137)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
[catch] at java.awt.EventDispatchThread.run(Unknown Source)
ALL [null]: Cannot load window system persistent data, user directory content is broken. Resetting to default layout...
WARNING [org.netbeans.core.windows.PersistenceHandler]
Comment 1 Jesse Glick 2010-11-11 19:20:38 UTC
Reporter: the "Java Webstart" component should be used only for j2seproject's. TBD what the actual component at fault here is (or if user error).
Comment 2 Jesse Glick 2010-11-11 19:46:26 UTC
Probably same root cause as bug #191868. Solve that and try again.

*** This bug has been marked as a duplicate of bug 191868 ***
Comment 3 simpatico 2010-11-12 01:54:04 UTC
Created attachment 102932 [details]
doesn't give errors, but doesn't result in expected behavior

will not print any exception trace but the app will open in a window size different from the specified in the windowmanager file. Using the weight attribute the user dir starts containing a WindowManager file(notice the capitalized W and M) that contains the default NB settings (1).
Without the weight attribute the user dir will not contain a windowmanager file to start with, and the app will display as per defaults (2).

Capitalizing W and M in the filename but not in the layer.xml results in the following exception (3). Using default configuration, but not with jws. With jws (2) occurs.

Caused: java.io.FileNotFoundException: jar:file:/C:/Users/kahloutg/Documents/NetBeansProjects/MavenCRUDSample/application/target/foo/foobar/modules/org-netbeans-crudsample.jar!/org/netbeans/modules/crudsampleapplication/viewer/windowmanager.wswmgr
	at org.netbeans.JarClassLoader$NbJarURLConnection.connect(JarClassLoader.java:919)
as expected.
Doing
Comment 4 Jesse Glick 2010-11-12 21:49:48 UTC
Sounds like a simple duplicate of bug #191545. I don't see anything wrong in this sample, and I don't see any reason to believe that your issue has anything to do with Maven or nbm-maven-plugin.

*** This bug has been marked as a duplicate of bug 191545 ***
Comment 5 simpatico 2010-11-13 23:02:39 UTC
http://netbeans.org/bugzilla/show_bug.cgi?id=191545 is a wishlist (that's why it's not acted upon, maybe) but here I'm talking of a bug.
The sample is wrong in that when you launch the application the set initial windows sizes will be ignored and the defaults will be used.
Comment 6 simpatico 2010-11-13 23:03:25 UTC
http://netbeans.org/bugzilla/show_bug.cgi?id=191545 is a wishlist (that's why it's not acted upon, maybe) but here I'm talking of a bug.
The sample is wrong in that when you launch the application the set initial windows sizes will be ignored and the defaults will be used.
Comment 7 Jesse Glick 2010-11-16 20:13:58 UTC
(In reply to comment #5)
> #191545 is a wishlist

Then I guess I don't understand what it is asking for, exactly. You can already resize the main window - and it works for me from Maven.

*** This bug has been marked as a duplicate of bug 191545 ***
Comment 8 Jesse Glick 2010-11-16 20:14:12 UTC
Sorry, wrong resolution.
Comment 9 Jesse Glick 2010-11-16 20:14:29 UTC
Created attachment 103020 [details]
Working sample
Comment 10 Jesse Glick 2010-11-16 20:16:59 UTC
Your ZIPped app also shows up in what looks like the intended size when I run it.