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 46136

Summary: VSS: Strange warning from project customizer when META-INF/context.xml is not writable
Product: serverplugins Reporter: Marek Fukala <mfukala>
Component: InfrastructureAssignee: Sherold Dev <sherold>
Status: RESOLVED FIXED    
Severity: blocker CC: mkuchtiak
Priority: P3    
Version: 4.x   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: The dialog screenshot
This is one of possible solutions
This is one of possible solutions (cont.)

Description Marek Fukala 2004-07-14 13:25:10 UTC
[20040713]
When an user does not have his
/META-INF/context.xml made writable uder the VSS
versioning system then only opening of project
customizer/run panel causes a strange dialog
message to appear.

The dialog says:
Cannot save configuration data for {0} to {1}

This is likely cause by the fact that the
context.xml  file is in read-only form and the
customizer tries to open it for writing. Strange
thing is that the customizer causes the message
even if you do not modify any value.

To reproduce:
1) create a WP under a VSS workdir
2) setup the VSS in the IDE
3) ensure you do not have the context.xml file
checked out
4) open project customizer
5) click to Running Project node
6) click to general node
7) click to Runninf project node again

=> the mentioned dialog appears (a screenshot is
attached - just for sure).
Comment 1 Marek Fukala 2004-07-14 13:25:37 UTC
Created attachment 16248 [details]
The dialog screenshot
Comment 2 Pavel Fiala 2004-08-23 13:41:19 UTC
Pavel, I have fixed saving META-INF/context.xml - it is saved together
with whole project configuration only if the context path is modified.
The another problem - strange warning when the file is read only -
should be fixed in  method save() in
j2ee.deployment.config.ConfigurationStorage. I think in this case the
method should throw IOException with appropriate error message and it
should be caught and processed in some of higher levels. As the change
could cause unwanted consequences or side-effects please make
necessary changes in ConfigurationStorage according to your
consideration. Then a shall finish the fix.
Comment 3 Pavel Fiala 2004-09-17 08:45:18 UTC
Created attachment 17705 [details]
This is one of possible solutions
Comment 4 Pavel Fiala 2004-09-17 08:46:21 UTC
Created attachment 17706 [details]
This is one of possible solutions (cont.)
Comment 5 Pavel Fiala 2004-09-17 08:49:15 UTC
The problem was caused by apostrophe in message (Can't ...) placed in
Bundle.properties that caused improper handling of parameters of the
message.
Comment 6 Petr Jiricka 2004-09-17 09:22:04 UTC
Pavle F, it would be more useful if you attached the diff for the
solution, not the whole source files. Can you please do that? Thanks.
Comment 7 Pavel Fiala 2005-02-22 10:16:48 UTC
Already fixed
Comment 8 Pavel Fiala 2005-02-22 10:20:39 UTC
Previous message was added by mistake.
Comment 9 Sherold Dev 2005-03-16 16:27:39 UTC
F.

Checking in ConfigSupportImpl.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/config/ConfigSupportImpl.java,v
 <--  ConfigSupportImpl.java
new revision: 1.32; previous revision: 1.31
done
Checking in ConfigurationStorage.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/config/ConfigurationStorage.java,v
 <--  ConfigurationStorage.java
new revision: 1.40; previous revision: 1.39
done