Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Same struts application deploys on tomcat but not on wildfly

 
ramgorur drighanchu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a struts application that deploys (and run) on tomcat but the same thing does not deploy on WildFly, the error log message is like this --

21:18:50,756 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "swe645assignment02.war" (runtime-name: "swe645assignment02.war")
21:18:52,279 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.undertow.deployment.default-host./swe645assignment02.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-host./swe645assignment02.UndertowDeploymentInfoService: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1900) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]
Caused by: java.lang.NumberFormatException: For input string: "s"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) [rt.jar:1.7.0_03]
at java.lang.Integer.parseInt(Integer.java:492) [rt.jar:1.7.0_03]
at java.lang.Integer.parseInt(Integer.java:527) [rt.jar:1.7.0_03]
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:385)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:209)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1944) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1877) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
... 3 more

21:18:52,284 ERROR [org.jboss.as.controller.management-operation] (XNIO-1 task-9) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "swe645assignment02.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-host./swe645assignment02.UndertowDeploymentInfoService" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-host./swe645assignment02.UndertowDeploymentInfoService: Failed to start service
Caused by: java.lang.NumberFormatException: For input string: \"s\""}}
21:18:52,302 ERROR [org.jboss.as.server] (XNIO-1 task-9) JBAS015870: Deploy of deployment "swe645assignment02.war" was rolled back with the following failure message:
{"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-host./swe645assignment02.UndertowDeploymentInfoService" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-host./swe645assignment02.UndertowDeploymentInfoService: Failed to start service
Caused by: java.lang.NumberFormatException: For input string: \"s\""}}

The name of the app is "swe645assignment02", please also note that in the message --

"org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-host./swe645assignment02.UndertowDeploymentInfoService: Failed to start service"

The name of the service is "jboss.undertow.deployment.default-host./swe645assignment02.UndertowDeploymentInfoService"

why there is a slash "/" in the class (service) name above ?

Any idea ?
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-host./swe645assignment02.UndertowDeploymentInfoService: Failed to start service"

The name of the service is "jboss.undertow.deployment.default-host./swe645assignment02.UndertowDeploymentInfoService"

why there is a slash "/" in the class (service) name above ?


The service name isn't a class name. It's just some characters and that's not a problem.

I think the real problem is in your web.xml file. What does it look like? Some element which is expecting a number is using some string value instead. error-code element maybe?
 
ramgorur drighanchu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you are right !!

I had a typo in the "version" argument in the web.xml's "<web-app/>" tag

<web-app id="swe645assignment02"
version="s2.4" <-- !!!
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

fixed, it. It's working now.

Thank you very much !!


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic