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.
[NetBeans 4.0 FCS, JDK 1.4.2_06, AppServer 8 Update 1] 1. Have plugin installed and create new web project. 2. Open Options, locate Modules -> J2EE -> AppServer plugin. 3. Delete plugin module, NullPointerException is thrown. 4. Look at Server Registry, appserver is still default server. 5. Open properties of web project. 'Running Project' node is not accessible, now I can't change target server.
Created attachment 19261 [details] NullPointerException
seems more a j2eeserver bug than a plugin bug... What does 'delete' suppose to do? Disable the module? Did you try to delete other modules? What is the side effect?
Disable a plugin should (1) promote a next available instance to be default instance. (2) set a module target instance to a default server instance. This should be bugs in j2eeserver.
Created attachment 19479 [details] another exception
When testing this I see a different exception (just attached). The 'default server' is not used any more (you have to select a server in project wizard) and the UI should be just removed. I do not agree we should just change the target server setting in open projects silently. We could either ask the user to approve the change or we can leave it as it is and the user will have to change it (we may show in project properties that the target server does not exist). It should not throw and exception, of course.
BTW: the delete action deletes the module registration file. This not only disables the module but it also makes it invisible in UI, although it does not delete the module jar files physically from netbeans install directory. This action just does not make any sense to me. The problem is that at least the second NPE happens even if you just disable the plugin and then righ-click a module project. The NPE comes from j2eeserver where it tests verifier support. This is a valid P2.
Exception reported by Pavel fixed. I don't know whether the first exception was already fixed and I don't have time for checking it out now - leaving status as new. Commit log: Checking in J2eeModuleProvider.java; /cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/devmodules/spi/J2eeModuleProvider.java,v <-- J2eeModuleProvider.java new revision: 1.39; previous revision: 1.38 done
Created attachment 20024 [details] another exception
When I delete the module now nothing happens, when I go to project properties, Run, I still see that original server instance there (and a blank line??). This belongs to Stepan. BUT, when I try to open the sun-application.xml I get an exception: http://www.netbeans.org/issues/showattachment.cgi?attach_id=20024&file=log.txt The DataObject should no longer exist at this point. Trying this with other modules that have loaders just changes the DOs to default DOs.
The blank line belongs to Generic server. It seems that the j2eeserver does not remove respective server instances when plugin is being removed.
This scenario is not critical for 4.1. Downgrading to P3.
I am removing "wrong default/target server " from summary. The default server concept was removed in 4.1. When I delete the plugin now I do not get any exception from server registry. I get had one server instance in registry. Strange thing is that I can still select the app server instance in wizards and I see it in Run panel of project properties. I would personally downgrade this to P4 or mark wontfix as I think the only user who will disable this module will not use it (other then QE :-)
Deleting plugin still does not delete server instance. Not sure of the Server Registry listens for removal of plugin folder. This is a problem for any plugin. After you disable plugin you can create project with server instance from this plugin. Deployment to it will fail with: "Deployment error: null. See the server log file for details."
*** This issue has been marked as a duplicate of 69055 ***