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 52345 - NPE and server instance still exists after deleting plugin
Summary: NPE and server instance still exists after deleting plugin
Status: RESOLVED DUPLICATE of bug 69055
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 4.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Sherold Dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-13 17:09 UTC by L Martinek
Modified: 2006-01-24 13:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NullPointerException (1.83 KB, text/plain)
2004-12-13 17:11 UTC, L Martinek
Details
another exception (2.30 KB, text/plain)
2005-01-05 03:21 UTC, Pavel Buzek
Details
another exception (2.39 KB, text/plain)
2005-01-28 04:35 UTC, Pavel Buzek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description L Martinek 2004-12-13 17:09:49 UTC
[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.
Comment 1 L Martinek 2004-12-13 17:11:19 UTC
Created attachment 19261 [details]
NullPointerException
Comment 2 _ ludo 2004-12-13 21:57:09 UTC
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?
Comment 3 Nam Nguyen 2004-12-13 22:32:07 UTC
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.
Comment 4 Pavel Buzek 2005-01-05 03:21:14 UTC
Created attachment 19479 [details]
another exception
Comment 5 Pavel Buzek 2005-01-05 03:26:31 UTC
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.
Comment 6 Pavel Buzek 2005-01-05 03:34:48 UTC
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.
Comment 7 Sherold Dev 2005-01-18 12:59:34 UTC
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 
Comment 8 Pavel Buzek 2005-01-28 04:35:45 UTC
Created attachment 20024 [details]
another exception
Comment 9 Pavel Buzek 2005-01-28 04:40:03 UTC
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.
Comment 10 Sherold Dev 2005-01-28 15:44:21 UTC
The blank line belongs to Generic server. It seems that the j2eeserver
does not remove respective server instances when plugin is being removed.
Comment 11 zikmund 2005-02-15 10:10:45 UTC
This scenario is not critical for 4.1. Downgrading to P3.
Comment 12 Pavel Buzek 2005-02-22 00:10:44 UTC
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 :-)
Comment 13 Pavel Buzek 2005-08-25 04:20:22 UTC
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."
Comment 14 Sherold Dev 2005-12-14 16:22:56 UTC

*** This issue has been marked as a duplicate of 69055 ***