IntelliJ with JBoss Integration Plugin 1.3 deployment

When I try deploying an application with the Intellij IDE, I get an error stating
" The requested resource (/sample/greeting) is not available.".
I figured that IntelliJ doesn't map the created EAR file to the Jboss deployment service so I copied the EAR file to the "...\deploy\" directory. I get the following error message:


ERROR Could not initialise deployment: file:/C:/MyWork/J2EE/O'Reilly EJB's/sample/app/app.ear
org.jboss.deployment.DeploymentException: Error in accessing application metadata: ; - nested throwable: (javax.management.InstanceAlreadyExistsException: jboss.j2ee:service=EARDeployment,url='app.ear' already registered.)
at org.jboss.deployment.EARDeployer.init(EARDeployer.java:270)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:799)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:736)
...etc


I hope you'd help me with this. Thanks!

12 comments

The JBoss plugin deploys applications through JMX, not by copying files into the server directory tree - the latter wouldn't work for remote deployment. So if you copy your EAR manually into the deploy directory after having deployed it by the plugin then in fact your app is indeed already registered.

But back to your first error: it's quite hard to figure out the problem without knowing anything about your application. Could you send me your sample project for further analyzis?

0

Thank you for the answer. I guess you are the author of the tutorial that creates a stateless session bean which sends a Hello World message. This is exactly the application I'm trying to do and I get the error I was talking about. i do all the steps according the tutorial exactly as shown. (I'm using Jboss 4.0.0).
As an observation, I found the 2.3 version of the JBoss Integration plugin on the Intellij Plugin page, but the latest version of the plugin I could install from the IntelliJ software was 1.3 .

0

Nevertheless a copy of your sample project would help, or at least the generated EAR file. At a first glance it seems to be something wrong in there.

Version 2.3 of the plugin is adapted for the latest EAP versions of IDEA 5.0. The most recent version for IDEA 4.5 is 1.3.

0

The attachment contains all files that I use for the project (The ejb files aren't included in a different directory so it looks a bit messy).

0

Your project just runs fine here. Could you please describe exactly how you are deploying the app, what's happening when, and where exactly you get the error. Please also attach your JBoss log file.

By the way: there's a configuration error in the web module. The web module is associated to generic application server instead of JBoss server. But that's not the cause of the problem.

0

I observed it works only the first time I deploy the application after I boot my computer. For subsequent deployments I get the "The requested resource (/sample/greeting) is not available. error".

I deploy the application with IntelliJ, exactly as in your tutorial. (C:\jboss-4.0.0\bin\run.bat -c default). The logs from the ..\server\default\log are attached.



Attachment(s):
log.rar
0

I don't see anything going wrong in the log file. But there's something coming to my mind: did you ever try to reload the page after getting the error message in the browser? Sometimes there's a timing issue, i.e. the url is sent to the browser before the application has finished deploying. Especially the effect of working only for the first time points in this direction. Apparently launching the browser for the first time needs some more time, giving the application enough time to deploy completely. But on subsequent starts the browser launch is somewhat faster, leading exactly to the unavailable resource error.

0

That's it..I never though of that. Thanks for all the support.

0

You're very wellcome. I should have thought about that earlier... :)

0

Being a begginer with J2EE applications I needed badly to see that example work. Do you by any chance have some other examples (with entity beans or other types of beans)?

0

Currently there are some plans to create a more elaborate sample project, but it will take some time until it's ready.
Right now I don't have anything out of the shelf, but if you have any specific questions just feel free to ask.

0

Please sign in to leave a comment.