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 64637 - [50cat] Exception when creating new J2EE blueprint sample project
Summary: [50cat] Exception when creating new J2EE blueprint sample project
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: blueprints (show other bugs)
Version: 6.x
Hardware: All Windows ME/2000
: P3 blocker (vote)
Assignee: Yutaka Yoshida
URL:
Keywords:
: 56134 63038 64743 64814 65067 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-19 10:37 UTC by host
Modified: 2013-02-13 10:20 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description host 2005-09-19 10:37:11 UTC
Shouldn't there be a warning instead of the exception. ...or even better, it
would be good if the Server-Manager window pops up automatically if no valid
server is there.


java.lang.IllegalStateException
	at
org.netbeans.modules.j2ee.deployment.impl.Server.getDisconnectedDeploymentManager(Server.java:141)
	at
org.netbeans.modules.j2ee.deployment.impl.Server.getDisconnectedDeploymentManager(Server.java:132)
	at
org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getDeploymentConfiguration(ConfigSupportImpl.java:287)
	at
org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getWebContextRoot(ConfigSupportImpl.java:191)
	at
org.netbeans.modules.web.project.ProjectWebModule.getContextPath(ProjectWebModule.java:93)
	at
org.netbeans.modules.web.project.ui.customizer.WebProjectProperties.init(WebProjectProperties.java:326)
	at
org.netbeans.modules.web.project.ui.customizer.WebProjectProperties.<init>(WebProjectProperties.java:260)
	at
org.netbeans.modules.web.project.WebProject.getWebProjectProperties(WebProject.java:412)
	at
org.netbeans.modules.web.project.WebProject$ProjectOpenedHookImpl.projectOpened(WebProject.java:706)
	at
org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:50)
	at
org.netbeans.modules.project.ui.OpenProjectList.notifyOpened(OpenProjectList.java:417)
	at org.netbeans.modules.project.ui.OpenProjectList.open(OpenProjectList.java:171)
	at org.netbeans.modules.project.ui.OpenProjectList.open(OpenProjectList.java:135)
[catch] at
org.netbeans.modules.project.ui.actions.NewProject$2.run(NewProject.java:145)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by:
javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException: The
Application Server installation directory is not correctly set up. (Use the
Tools>Options>IDE Configuration menu enter a correct value.)
	at
org.netbeans.modules.j2ee.sun.ide.Installer$FacadeDeploymentFactory.getDisconnectedDeploymentManager(Installer.java:201)
	at
org.netbeans.modules.j2ee.deployment.impl.Server.getDisconnectedDeploymentManager(Server.java:139)
	... 20 more
Comment 1 Petr Blaha 2005-09-19 11:55:02 UTC
High visible issue, I'm changing priority to P2.
Comment 2 Petr Blaha 2005-09-19 11:56:20 UTC
Please, fix the issue in Beta release.
Comment 3 Petr Blaha 2005-09-19 17:13:53 UTC
Due this issue user can't work with samples projects without installed Sun App
server.
Comment 4 _ ludo 2005-09-19 23:17:52 UTC
The app server is correctly sendin an exception:
               throw new
DeploymentManagerCreationException(NbBundle.getMessage(PluginProperties.class,
"MSG_WrongInstallDir"));
 

when there is valid deployment manager (connected or not)

So the caller (i.e j2eeserver plugin) has to nicely recover from this state.
Not by dumping the stack trace...

Ludo
Comment 5 Yutaka Yoshida 2005-09-19 23:27:13 UTC
This happens not only the blueprints solutions catalog but also
other regular sample projects, i.e. web application.
1. install appserver
2. projectize web app
3. remove appserver
4. close the projectized web app
Then you see the same exception. So I suppose this bug should be
fixed on the higher level of j2ee project management.

Comment 6 Sherold Dev 2005-09-20 14:06:44 UTC
The exception is caught and handled in a polite way now. User can continue in
his work. The informational message will be, however, still printed in the log.

Decrease priority from P1 to P3

Checking in src/org/netbeans/modules/j2ee/deployment/config/ConfigSupportImpl.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/config/ConfigSupportImpl.java,v
 <--  ConfigSupportImpl.java
new revision: 1.42; previous revision: 1.41
done
Checking in
src/org/netbeans/modules/j2ee/deployment/devmodules/spi/J2eeModuleProvider.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/devmodules/spi/J2eeModuleProvider.java,v
 <--  J2eeModuleProvider.java
new revision: 1.50; previous revision: 1.49
done
Checking in src/org/netbeans/modules/j2ee/deployment/impl/Server.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/Server.java,v  <--
 Server.java
new revision: 1.35; previous revision: 1.34
done
Checking in src/org/netbeans/modules/j2ee/deployment/impl/ServerInstance.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ServerInstance.java,v
 <--  ServerInstance.java
new revision: 1.63; previous revision: 1.62
done
Checking in
src/org/netbeans/modules/j2ee/deployment/impl/ui/RegistryNodeProvider.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/RegistryNodeProvider.java,v
 <--  RegistryNodeProvider.java
new revision: 1.15; previous revision: 1.14
done
Comment 7 Sherold Dev 2005-09-20 14:18:07 UTC
*** Issue 64743 has been marked as a duplicate of this issue. ***
Comment 8 Sherold Dev 2005-09-20 14:40:38 UTC
Ludo, I have fixed the impact of this issue, so that only an information message
is printed in the log now.

We should, however, fix also the cause, which is an assumption of the j2eeserver
that you can always create an instance of disconnected deployment manager from
the url that the plugin provides through the netbeans-deployment file.

See serverplugins/sun/appsrv81/src/org/netbeans/modules/j2ee/sun/ide/j2ee/nbdep.xml

<disconnected-string>deployer:Sun:AppServer::localhost:4849</disconnected-string>

Is the appserver plugin able to fulfill this contract, in case that the
installation directory has not been set yet? If not, I will probably have to
hide the informational message.
Comment 9 _ ludo 2005-09-20 19:03:15 UTC
chicken and egg problem.
We register via static layer file (for optimal start up time) the factory.
But this factory can return as expected exception in case off missing server.

We could add the entry in the layer file dynamically only when the server is
there, but this would not solve the 
issue that sometimes it is valid to throw an exception at DM creation (the spec
allows that)...
Comment 10 Sherold Dev 2005-09-21 09:58:13 UTC
I don't think the j2eeserver is listening to netbeans-deployment file changes
and thus the dynamic registration will most likely not work.

Hiding the informational message is also not an option here, since the
DeploymentManagerCreationException might also mean other problems that we should
know about.

I spoke with QE and everybody agrees that the fix should be now done in the
blueprint sample projects. Wizard should offer a combo box with all registered
servers and it should not be possible to finish the wizard unless a valid server
is selected.

This is most likely not doable for 5.0

Reassigning to j2ee/blueprints
Comment 11 Petr Blaha 2005-09-21 11:10:32 UTC
*** Issue 64814 has been marked as a duplicate of this issue. ***
Comment 12 Sherold Dev 2005-09-21 12:11:21 UTC
*** Issue 56134 has been marked as a duplicate of this issue. ***
Comment 13 Sherold Dev 2005-10-05 17:40:03 UTC
*** Issue 65067 has been marked as a duplicate of this issue. ***
Comment 14 Yutaka Yoshida 2005-11-22 23:25:03 UTC
as of 051122 build, this is not reproducable.
Comment 15 Petr Jiricka 2005-11-23 12:41:41 UTC
QE confirmed that this is indeed fixed - marking as FIXED. Thanks.
Comment 16 Petr Blaha 2005-11-23 12:50:30 UTC
[build 20051122] User doesn't get exception and resolve server dialog is opened.
New Sun App server instance can be added here.
Comment 17 Thuy.d Nguyen 2008-12-23 21:53:37 UTC
*** Issue 63038 has been marked as a duplicate of this issue. ***