I'm trying to use the WebLogic support in IDEA 8.1.4. It's a regular web-application with a maven2 build. I've got things mostly working to the point that it's possible to build, deploy and debug the application (including JSPs) from within IDEA. I have some remaining issues that I'm looking for feedback on, however:
First off, I've been trying both local and remote WebLogic run configs, and I can't really see any advantage to using Local over Remote (remote but running on localhost still), aside from giving IDEA the ability to start and stop the server instance. I was hoping a local config would use an exploded deployment and enable the use of FastSwap or at least reload JSPs without a full redeploy required. However, I can't see that deploying a war or an exploded dir made any difference in a local config. Am I simply doing it wrong?
- Less important than the first point: I have not been able to find a setup that enables me to utilize WebLogic 10.3's FastSwap feature (basically limited and BEA-proprietary JavaRebel that reloads modified classes in WEB-INF/classes for an exploded application without the need to redeploy). Is it possible to get this working from within IDEA? The point about JSPs is more important to me as classes are easier to test outside the container with unit tests and whatnot, and there's always the real JavaRebel as an alternative, but it would be nice to have it working since it's there..
Lastly, some minor annoyances I've currently been more or less able to work around:
- I get the following warning: "Cannot debug Web facet 'Web': debugging is off. Clicking the FIX button injects an element into weblogic.xml that makes subsequent redeploys fail because of schema validation. A search of this list seems to indicate that this check may be based on this element being needed for JSP debugging in WLS8. This no longer seems to be the case as my weblogic.xml does not contain this element but JSP debugging is actually working. Not quite sure what enables it now - possibly running the server in devmode is sufficient.
- When I launch the WebLogic run config and the app redeploys, the Web Facet being deployed is displayed with an orange exclamation mark under IDEA's Console-tab. The message is "Error during facet deployment, see error-log for details". However, deployment seems to have gone fine. The final entry of the serverlog is typically something like "<BEA-149074> <Successfully completed deployment task: [Deployer:149026]deploy application myAppWeb on wlServer.>.
- A third issue is that the weblogic integration seems fairly fragile. I'm not sure if this is on the IDEA or the WebLogic side of things (I've been having simular issues in WebLogic Workshop), but I frequently run into issues where I have to manually clean up and restart the server with the WebLogic administration console due to a failed deployment that simply won't go away. A reasonably reproducible way to trigger such a "locked state" from IDEA seems to be clicking "Deploy all" under Console again while another deploy is running. It will basically cause this:
- The first time: "com.intellij.javaee.weblogic.runDebug.weblogicServerInstances.version9.mbeansModel.JMWrappedException: javax.management.MBeanException: MBean invoke failed: weblogic.management.provider.EditSaveChangesFailedException: Can not save changes while prepare changes are still in progress".
- So that was expected as the first redeploy is already running (and will also complete successfully). This is where the troubles begin however. From now on, all attempts to redeploy will fail with the following error until I manually clean up using the WebLogic admin console: com.intellij.javaee.weblogic.runDebug.weblogicServerInstances.version9.mbeansModel.JMWrappedException: javax.management.MBeanException: MBean invoke failed: weblogic.management.ManagementException: [Deployer:149001]No application named 'myAppWeb' exists for operation undeploy
The strange thing about #2 is that the deployment status gets a green "OK", as opposed to the orange exclamation mark/warning when it was actually successful