aspose file tools*
The moose likes JBoss/WildFly and the fly likes How to deploy GWT web application in JBoss? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How to deploy GWT web application in JBoss?" Watch "How to deploy GWT web application in JBoss?" New topic
Author

How to deploy GWT web application in JBoss?

Bhavesh Dak
Ranch Hand

Joined: Jun 27, 2009
Posts: 93

Currently I am using Tomcat Container to deploy GWT application.

Now, I want to deploy my GWT web application in JBoss Web Server?

How can I achieve it?

Please provide me any simple tutorial available for it..

Thanks in advance


SCJP 6(83%), SCWCD 5.0(100%)
Bhavesh Dak
Ranch Hand

Joined: Jun 27, 2009
Posts: 93
I have copied the war folder after compiling gwt application to the C:\jboss-5.1.0.GA\jboss-5.1.0.GA\server\default\deploy folder.

But I am getting

HTTP Status 404 - /gwtjboss

type Status report

message /gwtjboss

description The requested resource (/gwtjboss) is not available.
JBoss Web/2.1.3.GA


Am I doing right about the copying war folder in the deploy directory of JBoss ?

Please help me out in this.

Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10210
    
166

Post the logs from the console (not server.log) which show that your application is being picked up for deployment. Logs like this:




Also, what's the file name of the war that you deployed?

[My Blog] [JavaRanch Journal]
Bhavesh Dak
Ranch Hand

Joined: Jun 27, 2009
Posts: 93
While adding my Gwtjboss.war file through "JBoss AS Administration Console" but not able to deploy it successfully.

The error I got is:

Failed to create Resource Gwtjboss.war - cause: java.lang.Exception:Failed to remove deployment [vfszip:/C:/jboss-5.1.0.GA/jboss-5.1.0.GA/server/default/deploy/Gwtjboss.war/] after start failure. -> java.lang.RuntimeException:java.io.IOException: Failed to delete: DelegatingHandler@10833135[path=Gwtjboss.war context=file:/C:/jboss-5.1.0.GA/jboss-5.1.0.GA/server/default/deploy/ real=file:/C:/jboss-5.1.0.GA/jboss-5.1.0.GA/server/default/deploy/Gwtjboss.war] -> java.io.IOException:Failed to delete: DelegatingHandler@10833135[path=Gwtjboss.war context=file:/C:/jboss-5.1.0.GA/jboss-5.1.0.GA/server/default/deploy/ real=file:/C:/jboss-5.1.0.GA/jboss-5.1.0.GA/server/default/deploy/Gwtjboss.war]

Please let me know if it strikes anything.
Bhavesh Dak
Ranch Hand

Joined: Jun 27, 2009
Posts: 93
Can any body provide me all the necessary steps required to deploy gwt application into JBoss 5.1 server ?

I am using eclipse 3.4 and JBoss 5.1.

Please take an example of default gwt application.


This would be better help me than I do trial and error....

Thanks in Advance with lot of appreciations .
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10210
    
166

Let's try this without the IDE or admin console for the moment. Just place that war in the server/default/deploy folder and start the server. Does it start cleanly or do you see any errors/exception stacktraces? Post the relevant exception stacktraces from the console.
Bhavesh Dak
Ranch Hand

Joined: Jun 27, 2009
Posts: 93
After place Gwtjboss.war file in to the /server/default/deploy folder,

While starting server I am getting some exception.

I have attached the log file please check it out.


Stack Trace:

2009-08-18 09:55:17,887 INFO [org.jboss.web.WebService] (main) Using RMI server codebase: http://localhost:8083/
2009-08-18 09:55:25,258 INFO [org.jboss.wsf.stack.jbws.NativeServerConfig] (main) JBoss Web Services - Stack Native Core
2009-08-18 09:55:25,258 INFO [org.jboss.wsf.stack.jbws.NativeServerConfig] (main) 3.1.2.GA
2009-08-18 09:55:26,257 INFO [org.jboss.dependency.plugins.AttributeCallbackItem] (main) Owner callback not implemented.
2009-08-18 09:55:27,794 INFO [org.jboss.logbridge.LogNotificationListener] (main) Adding notification listener for logging mbean "jboss.system:service=Logging,type=Log4jService" to server org.jboss.mx.server.MBeanServerImpl@1e26e52[ defaultDomain='jboss' ]
2009-08-18 09:55:48,418 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Parse: name=vfszip:/C:/jboss-5.1.0.GA/jboss-5.1.0.GA/server/default/deploy/Gwtjboss.war/ state=Not Installed mode=Manual requiredState=Parse
org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfszip:/C:/jboss-5.1.0.GA/jboss-5.1.0.GA/server/default/deploy/Gwtjboss.war/
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:362)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:322)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:294)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:234)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Unknown Source)
Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)". @ vfszip:/C:/jboss-5.1.0.GA/jboss-5.1.0.GA/server/default/deploy/Gwtjboss.war/WEB-INF/web.xml[24,11]
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:189)
at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:166)
at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:137)
at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:121)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:256)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:188)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:348)
... 33 more
Caused by: org.xml.sax.SAXException: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)". @ vfszip:/C:/jboss-5.1.0.GA/jboss-5.1.0.GA/server/default/deploy/Gwtjboss.war/WEB-INF/web.xml[24,11]
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler.error(SaxJBossXBParser.java:426)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:199)
... 41 more
2009-08-18 09:55:48,449 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Parse: name=vfsfile:/C:/jboss-5.1.0.GA/jboss-5.1.0.GA/server/default/deploy/gwtjboss/WEB-INF/Gwtjboss.war/ state=Not Installed mode=Manual requiredState=Parse
org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfsfile:/C:/jboss-5.1.0.GA/jboss-5.1.0.GA/server/default/deploy/gwtjboss/WEB-INF/Gwtjboss.war/
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:362)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:322)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:294)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:234)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Unknown Source)
Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)". @ vfsfile:/C:/jboss-5.1.0.GA/jboss-5.1.0.GA/server/default/deploy/gwtjboss/WEB-INF/Gwtjboss.war/WEB-INF/web.xml[24,11]
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:189)
at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:166)
at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:137)
at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:121)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:256)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:188)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:348)
... 33 more
Caused by: org.xml.sax.SAXException: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)". @ vfsfile:/C:/jboss-5.1.0.GA/jboss-5.1.0.GA/server/default/deploy/gwtjboss/WEB-INF/Gwtjboss.war/WEB-INF/web.xml[24,11]
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler.error(SaxJBossXBParser.java:426)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:199)
... 41 more


Bhavesh Dak
Ranch Hand

Joined: Jun 27, 2009
Posts: 93
After removing Gwtjboss.war file I am able to start server successfully (No Exceptions occurred).

At this time there is only a single jsp application war file available.

Probably, It seems problem of dependencies of libraries here (I am not sure about it) as JSP application is successfully getting deployed.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10210
    
166

Your web.xml file - Gwtjboss.war/WEB-INF/web.xml contents are incorrect. It's not following the xsd/dtd definition:

Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)". @ vfszip:/C:/jboss-5.1.0.GA/jboss-5.1.0.GA/server/default/deploy/Gwtjboss.war/WEB-INF/web.xml[24,11]


An xml editor with validation enabled will be able to show you what exactly is wrong in that file.

While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.

Bhavesh Dak
Ranch Hand

Joined: Jun 27, 2009
Posts: 93
This is my web.xml file and this is generated by GWT by default.

Let me know if you find any defect in it.


Bhavesh Dak
Ranch Hand

Joined: Jun 27, 2009
Posts: 93
Hi, Jaikiran,

Do you find anything wrong with the above mentioned web.xml file ?

Issue is now about to address.

Thanks for help
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10210
    
166

I don't see anything wrong with the web.xml that you posted. Infact it deploys fine for me. Moreover line 24, character 11 is where the web-app element ends. Are you sure this is the exact file that you picked up from C:/jboss-5.1.0.GA/jboss-5.1.0.GA/server/default/deploy/Gwtjboss.war/WEB-INF/web.xml?
Bhavesh Dak
Ranch Hand

Joined: Jun 27, 2009
Posts: 93
Yes Jai,

The web.xml file I provided and actual deployed web.xml both are same.

When I deployed the war file of smargwt (showcase.war) which is also a gwt application, It is getting deployed successfully on JBoss.

The web.xml of this application is slightly different than the web.xml I want to deploy.

http://www.smartclient.com/smartgwtee/showcase/#hibernate_wizard

I also updated my web.xml as per above mentioned application but still not having luck to successfully deploy.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to deploy GWT web application in JBoss?