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 75518 - Can't create Enterprise Application targeted WebLogic server
Summary: Can't create Enterprise Application targeted WebLogic server
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: WebLogic (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Krauskopf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-25 18:05 UTC by Alexander Kouznetsov
Modified: 2006-05-03 10:53 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Exception (14.81 KB, text/plain)
2006-04-25 18:06 UTC, Alexander Kouznetsov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kouznetsov 2006-04-25 18:05:21 UTC
Reproducible with EntPack TPR3 20060424 build on both WinXP and Linux Red Hat Fedore Core3.

Steps to reproduce:
- Register WebLogic server
- Try to create New Enterprise Application targeting to WebLogic server
- RESULT: UndeclaredThrowable exception is thrown
Comment 1 Alexander Kouznetsov 2006-04-25 18:06:05 UTC
Created attachment 30046 [details]
Exception
Comment 2 Libor Kotouc 2006-04-26 09:52:27 UTC
EarProjectProperties.setACPrivateProperties() did not follow the Javadoc of
J2eePlatform.getToolProperty() which can return null. This is fixed now.

Checking in EarProjectProperties.java;
/cvs/j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/ui/customizer/EarProjectProperties.java,v
 <--  EarProjectProperties.java
new revision: 1.20.2.2.2.8; previous revision: 1.20.2.2.2.7
done

However, EarProjectProperties.setACPrivateProperties() should be called only
when it makes sense, i.e. when an application client is supported by the server
plugin, see EarProjectGenerator:427 (1.21.2.2.2.6).
Comment 3 Martin Krauskopf 2006-04-26 14:44:43 UTC
And shouldn't we disable a creation of application client at all when the target
server does not support it? Otherwise the generated Eneterprise App. could be
somehow confusing, not sure. The same would apply to Application Client wizard.
Since it does not make sense to create app. client when it can't be used?

PS: Is j2eePlatform.isToolSupported(J2eePlatform.TOOL_APP_CLIENT_RUNTIME)
sufficient as a check?
Comment 4 Lukas Jungmann 2006-04-26 15:26:28 UTC
> And shouldn't we disable a creation of application client at all when the
target server does not support it?

That would be the best solution

> Otherwise the generated Eneterprise App. could be
somehow confusing, not sure.

> The same would apply to Application Client wizard.
Since it does not make sense to create app. client when it can't be used?

new app-client prj wizard relies on
j2eePlatform.getSupportedModuleTypes().contains(J2eeModule.CLIENT) when showing
available server(s) in the server combo-box, if there's no available server then
there's error message being shown in the wizard

> PS: Is j2eePlatform.isToolSupported(J2eePlatform.TOOL_APP_CLIENT_RUNTIME)
sufficient as a check?

If only for now then yes otherwise no. There might be case (in future) when some
server support development/deployment/running of appclient but does not need any
additional/special environment.
Comment 5 Martin Krauskopf 2006-04-26 17:20:34 UTC
Presumably EarProjectProperties.setACProperties() should not be called as well
in the case AC is not supported. We should put the check into those method
directly since it should not be possible to add AC to EA at all from any place
in the GUI. Or maybe handle it outside of methods and put an assertion into the
methods, but -> then we would have to handle somehow the case when the user
creates EA with AC module on e.g. Glassfish and then switches the server to e.g.
Weblogic which does not support AC, or the user will edit properties by hand....
and similar cases. 

But it is probably for another issue. I'll use a simplefix for this one and file
another one where we may discuss and handle all those cases.
Comment 6 Martin Krauskopf 2006-04-26 17:46:27 UTC
ui/customizer/EarProjectProperties.java 1.20.2.2.2.8 -> 1.20.2.2.2.9;

This is just a temporary "fix". Please CC yourselves to issue #75574 if you want so.
Comment 7 Michal Mocnak 2006-04-28 14:55:14 UTC
Verified
Comment 8 Lukas Jungmann 2006-05-03 10:06:06 UTC
commit the fix also to beta branch, thanks.
Comment 9 Martin Krauskopf 2006-05-03 10:15:12 UTC
I've just check it and it's already done (by me or someone else).
Comment 10 Martin Krauskopf 2006-05-03 10:53:18 UTC
I've also backported part of 75574 which is interconnected with this P2.