Meaningless Drivel is fun!*
The moose likes JBoss/WildFly and the fly likes How to deploy a war folder in jboss AS7 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How to deploy a war folder in jboss AS7" Watch "How to deploy a war folder in jboss AS7" New topic
Author

How to deploy a war folder in jboss AS7

badri bouchra
Greenhorn

Joined: Mar 25, 2013
Posts: 4

Hello,

I want to deploy in Jboss 7 a folder which contain .zul files and two folders META-INF and WEB-INF.

So what should i do ?


thanks in advance

Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

Greetings Badri,
Before I tell you how to do it, can you first tell me how have you tried to deploy it and what issue are you facing ?


Muhammad Saif Asif Mirza
OCJA(5/6) OCJP(6) OCJWCD(6)
badri bouchra
Greenhorn

Joined: Mar 25, 2013
Posts: 4
Hello,
Thank you for your response.
when I pasted it in deployments nothing changed (the folder is names jawda.war ) so I tried to zip it into a war file (don't think it was a good idea, but it gave me an error log so ... )
Anyway here it is :

13:25:47,014 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) JBAS015051: Deployment content /opt/jboss-as/standalone/deployments/jawda.war appears to be incomplete and is not progressing toward completion. This content cannot be auto-deployed.



When I added a dodeploy file it returned this error:


13:35:48,727 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-36) MSC00001: Failed to start service jboss.deployment.unit."jawda.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."jawda.war".STRUCTURE: Failed to process phase STRUCTURE of deployment "jawda.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to mount deployment content
at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:91) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.7.0_17]
at java.util.zip.ZipFile.<init>(ZipFile.java:214) [rt.jar:1.7.0_17]
at java.util.zip.ZipFile.<init>(ZipFile.java:144) [rt.jar:1.7.0_17]
at java.util.zip.ZipFile.<init>(ZipFile.java:158) [rt.jar:1.7.0_17]
at org.jboss.vfs.VFSUtils.unzip(VFSUtils.java:845) [jboss-vfs-3.1.0.Final.jar:3.1.0.Final]
at org.jboss.vfs.VFS.mountZipExpanded(VFS.java:536) [jboss-vfs-3.1.0.Final.jar:3.1.0.Final]
at org.jboss.vfs.VFS.mountZipExpanded(VFS.java:567) [jboss-vfs-3.1.0.Final.jar:3.1.0.Final]
at org.jboss.as.server.deployment.DeploymentMountProvider$Factory$ServerDeploymentRepositoryImpl.mountDeploymentContent(DeploymentMountProvider.java:97) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:87) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 6 more

13:35:48,737 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"jawda.war\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jawda.war\".STRUCTURE: Failed to process phase STRUCTURE of deployment \"jawda.war\""}}}}
13:36:33,849 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-42) MSC00001: Failed to start service jboss.deployment.unit."jawda.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."jawda.war".STRUCTURE: Failed to process phase STRUCTURE of deployment "jawda.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to mount deployment content
at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:91) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.7.0_17]
at java.util.zip.ZipFile.<init>(ZipFile.java:214) [rt.jar:1.7.0_17]
at java.util.zip.ZipFile.<init>(ZipFile.java:144) [rt.jar:1.7.0_17]
at java.util.zip.ZipFile.<init>(ZipFile.java:158) [rt.jar:1.7.0_17]
at org.jboss.vfs.VFSUtils.unzip(VFSUtils.java:845)
at org.jboss.vfs.VFS.mountZipExpanded(VFS.java:536)
at org.jboss.vfs.VFS.mountZipExpanded(VFS.java:567)
at org.jboss.as.server.deployment.DeploymentMountProvider$Factory$ServerDeploymentRepositoryImpl.mountDeploymentContent(DeploymentMountProvider.java:97) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:87) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 6 more

13:36:33,857 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"jawda.war\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jawda.war\".STRUCTURE: Failed to process phase STRUCTURE of deployment \"jawda.war\""}}}}


Here's an attachement of the content of jawda.war folder

Thank you


[Thumbnail for Sans titre.png]

Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

How are you building your war file in the first place ?

when I pasted it in deployments nothing changed (the folder is names jawda.war ) so I tried to zip it into a war file (don't think it was a good idea, but it gave me an error log so ... )

Its a "folder" named jawda.war and not a war file ? You need to make a war first and I suggest you use some tool to get you a proper war file with the manifest and all. If you have eclipse, you can simply export the project as a war.
Now coming back to the jboss deployemnt, from the deployment readme.txt
you have two different modes : auto-deploy mode and manual deploy mode
for the manual deploy mode you have to placed a marker files as described in the others posts
for the autodeploy mode : This is done via the "auto-deploy" attributes on the deployment-scanner element in the standalone.xml configuration file:
<deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir"
path="deployments" auto-deploy-zipped="true" **auto-deploy-exploded="true"**/>


So for manual deployement , after making war file ( important ) , rename the war file with the trigger marker .dodeploy. So if your war file is named abc.war, you will rename it as abc.war.dodeploy to trigger the deployemnt.
badri bouchra
Greenhorn

Joined: Mar 25, 2013
Posts: 4
Thank you sir.

Well I might not've used a proper tool but I zipped the folder then named it jawda.war . The error became that the war file is incomplete ( even though it supposedly worked in a previous version of an AS ) . So I'll try to create a War properly (tomorrow, I don't have access to the server as I am not at work now) and I'll report to you any changes.

Best regards.
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

badri bouchra wrote:Thank you sir.

Well I might not've used a proper tool but I zipped the folder then named it jawda.war . The error became that the war file is incomplete ( even though it supposedly worked in a previous version of an AS ) . So I'll try to create a War properly (tomorrow, I don't have access to the server as I am not at work now) and I'll report to you any changes.

Best regards.

You used the same method to create a war file ( manuly zipping it ) and deployed it to a previous version of AS ?

Making a war manuly shouldn't have any issue if you know how to make it properly , this includes the placement of classloaders, WEB-INF, META-INF etc etc. So I would suggest you use some tool to do this for you so that it may rule out the doubt that the war file is proper or not. And I am only saying this since the logs clearly state that its a ZipException.

Also did you try to use the trigger markers ?

Do post back for any further queries .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to deploy a war folder in jboss AS7
 
Similar Threads
Configure Jboss in Ant???
weblogic
Deploying EAR files on JBOSS
Where to keep shared jar files of an ear file inside JBOSS
After WAS 7.0 to WAS 8.5: ScannerContextImpl getInputDataForClass Failed to open resource