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.
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
Created attachment 30046 [details] Exception
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).
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?
> 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.
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.
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.
Verified
commit the fix also to beta branch, thanks.
I've just check it and it's already done (by me or someone else).
I've also backported part of 75574 which is interconnected with this P2.