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 247344

Summary: Import for prior NB version clobbers settings that shouldn't be overwritten
Product: serverplugins Reporter: brettryan <brettryan>
Component: GlassFishAssignee: Petr Hejl <phejl>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0.1   
Hardware: PC   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:

Description brettryan 2014-09-22 01:58:40 UTC
When installing an upgraded version of netbeans and accepting the migrate from prior version tool, settings such as bundled tomcat/glassfish server get clobbered by settings from prior installation version.

This can result in drivers no longer working (JavaDB) or app-servers no longer being available in the freshly installed IDE.


Steps to reproduce:

1. Install NB 8.0
2. Launch NB 8.0
3. Shut down NB 8.0
4. Uninstall NB 8.0
   - On Mac, delete the whole "NetBeans" folder from the Applications folder
   - On Windows, uninstall NetBeans, glassfish and Tomcat
5. Install NB 8.0.1
6. Launch NB 8.0.1
7. Accept prior version migration
8. Check Services > Drivers > Java DB (Embedded)
   - Right Click > Customize
   - Path will be to prior installation (/Application/NetBeans/glassfish-4.0)
   - Path should be (/Application/NetBeans/glassfish-4.1)
9. glassfish server will not be added to NetBeans as incorrect version would have resulted in it being removed.

Note: this is not just limited to app-servers, it also affects configured libraries too.


Suggested Fix:

There's a few ways this could be addressed, having certain settings annotated to hint the IDE not to import them, however it may be desirable to migrate older app-servers for user-installed servers or where the user did not uninstall that app-server.

What I suggest could be done is to perform a sanity check against certain settings that are to be imported, such as an app-server path, one could verify the path exists before importing.

Another basic workaround would be to quite simply ignore settings which are known to the IDE at install time, such as glassfish and tomcat server related services and resources.
Comment 1 Theofanis Oikonomou 2015-09-04 09:21:43 UTC
During the settings import at first launch no module is active so the process is done by reading the <INSTALL_DIR>/etc/netbeans.import file. I am not able to make such a decision that you are proposing at this stage. Re-assigning to proper component for evaluation of whether the import/export options regexp should be modified. Thank you