-
1. Re: Problems deploying exploded .war, deploying zipped .war works fine (JBoss 4.2.3.GA)
wolfgangknauf Apr 12, 2010 5:13 AM (in response to anon137564)Hi,
first thing: I would delete the old directory and wait some seconds so that JBoss can undeploy the old stuff. Copying things over an existing deployment might cause problems.
I read somewhere that a "move" operation is much faster than a "copy". So, place your exploded deployment somewhere else on the same disc as jboss, then MOVE it to the deploy directory.
Hope this helps
Wolfgang
-
2. Re: Problems deploying exploded .war, deploying zipped .war works fine (JBoss 4.2.3.GA)
anon137564 Jan 3, 2011 1:25 AM (in response to wolfgangknauf)Thank you for your quick answer, Wolfgang.
When I'm deploying either the zipped or the exploded war file, I haven't deployed it before. So there's no directory with it's name in the deploy directory and nothing to undeploy.
I'm working with Windows Vista and I copy the files using the Windows Explorer. So I don't know if I can speed up this process.
Isn't there a way to tell the TomcatDeployer to wait for the file transfer to be completed? Is such a thing feasible with an Ant script?
Guy
-
3. Re: Problems deploying exploded .war, deploying zipped .war works fine (JBoss 4.2.3.GA)
anon137564 Jan 3, 2011 1:25 AM (in response to anon137564)Ok, maybe the problems has nothing to do with the duration of the file copying.
I have now changed the EnhancedSuffixOrder in the MainDeployer-xmbean.xml to deploy .war files after .ear files. Now I can start the JBoss with the .war file already in the deploy directory.
With this setting the zipped .war still works fine, but with the exploded .war I'm again getting an error. It says that it's unable to initialize group definition. The whole log file is appended to the post.
This is the same application, once zipped and once exploded. Are they treated in any way different by JBoss? Cause if they weren't, there wouldn't be any error, or am I wrong?
Guy
-
4. Re: Problems deploying exploded .war, deploying zipped .war works fine (JBoss 4.2.3.GA)
wolfgangknauf Apr 12, 2010 7:06 AM (in response to anon137564)1 of 1 people found this helpfulHi Bernhard,
{quote}I'm working with Windows Vista and I copy the files using the Windows Explorer. So I don't know if I can speed up this process.{quote}
how do you copy? If you use drag&drop, it should by default MOVE the files, while copy/paste performs a file COPY. Make sure that the files are on the same disk.
I would advice you to use the command line and the "MOVE" command.
Hopefully, your deployment errors are only a timing issue.
By the way: you could stop JBoss, copy the exploded deployment and start the server afterwards. Now it should deploy without errors. If it does not, there is a problem with your EAR ;-).
Hope this helps
Wolfgang
-
5. Re: Problems deploying exploded .war, deploying zipped .war works fine (JBoss 4.2.3.GA)
anon137564 Jan 3, 2011 1:28 AM (in response to wolfgangknauf)As I've written above, there seems to be another error too.
When I copy the zipped war in the deploy directory and then start JBoss, everything is working fine.
When I copy the exploded war in the deploy directory and then start the JBoss, I'm getting the following error.
org.springframework.beans.factory.access.BootstrapException: Unable to initialize group definition. Group resource name [classpath*:frontend.xml], factory key [service-context]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'service-context' defined in URL [file:/C:/jboss-4.2.3.GA/server/default/deploy/frontend.war/WEB-INF/classes/frontend.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rules' defined in file [C:\jboss-4.2.3.GA\server\default\deploy\frontend.war\WEB-INF\classes\package\Rules.class]: Invocation of init method failed; nested exception is java.lang.NullPointerException
The exploded and the zipped war should be identical to JBoss, or are there any differences how JBoss is treating them?
-
6. Re: Problems deploying exploded .war, deploying zipped .war works fine (JBoss 4.2.3.GA)
anon137564 Apr 12, 2010 9:22 AM (in response to anon137564)It seems to me now, that the problem lies elsewhere. The maven goal war:explode, with which I'm assembling the exploded war, doesn't include the pom.xml and the pom.properties. The goal war:war, which creates the zipped war, does include these two files.
With these files everything is working fine, but without them I'm getting the errors.
-
7. Re: Problems deploying exploded .war, deploying zipped .war works fine (JBoss 4.2.3.GA)
anon137564 Apr 13, 2010 3:47 AM (in response to anon137564)As I've found out, the projects needs the pom.properties file to run, which is not included in an exploded war by maven's default settings. So this problem has got nothing to do with JBoss.
Of course the timing problem still exists, but if I'm deploying the war within a deploy.last directory in the deploy directory, I can bypass this nuisance.
Thank you for your help, Wolfgang.