2 Replies Latest reply on Oct 29, 2004 5:31 AM by miles1

    Problem deploying web service on Jboss 4.0.0

    miles1 Newbie

      Hello all,

      I am using the following web.xml in my web service war:

      <?xml version="1.0"?>
      <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

      <web-app>

      <servlet-name>omutilServlet</servlet-name>
      <servlet-class>omservice.OmutilSoapBindingImpl</servlet-class>


      <servlet-mapping>
      <servlet-name>omutilServlet</servlet-name>
      <url-pattern>/omutilServlet</url-pattern>
      </servlet-mapping>
      </web-app>

      When I first startup jboss 4, my web service is deployed and functions correctly. However, if I shutdown jboss and then restart it, the above file gets renamed to web.xml.org and jboss replaces it with..

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

      <web-app>

      <servlet-name>omutilServlet</servlet-name>
      org.jboss.webservice.server.ServiceEndpointServletJSE</servlet-class>
      <init-param>
      <param-name>ws4ee-service-name</param-name>
      <param-value>omutilService</param-value>
      </init-param>

      <servlet-mapping>
      <servlet-name>omutilServlet</servlet-name>
      <url-pattern>/omutilServlet</url-pattern>
      </servlet-mapping>
      </web-app>

      As jboss has changed the definition, my webservice no longer loads. Does anyone know what is going on?

      Thanks,

      Miles Henderson

        • 1. Re: Problem deploying web service on Jboss 4.0.0
          Thomas Diesler Master

          jboss must always (not just after restart) replace the <servlet-class> element, because tomcat will not accept a pojo there.

          Is it true, that the start element is missing? It should be

          <servlet-class> org.jboss.webservice.server.ServiceEndpointServletJSE</servlet-class>
          


          Is there a stacktrace at startup time?


          • 2. Re: Problem deploying web service on Jboss 4.0.0
            miles1 Newbie

            The of code that you highlighted is correct in the Web.xml that jboss generated. Something appears to have happaned when I pasted the text into the post.

            I have attached the start up backtrace to the end of this post. Every time I startup jboss, it attempts to rename web.xml to web.xml.org. This causes an exception. If I manually delete web.xml.org, then jboss will start and install my webservice. However, because it has changed my servlet definition from

            <servlet-class>omservice.OmutilSoapBindingImpl</servlet-class>

            to

            org.jboss.webservice.server.ServiceEndpointServletJSE</servlet-class>
            <init-param>
            <param-name>ws4ee-service-name</param-name>
            <param-value>omutilService</param-value>
            </init-param>

            my webservice no longer works.

            10:16:36,828 ERROR [ServiceDeployer] Cannot startup webservice for: omutil.war
            org.jboss.deployment.DeploymentException: Cannot rename web.xml: C:\jboss-4.0.0\
            server\default\deploy\omutil.war\WEB-INF\web.xml.org
            at org.jboss.webservice.ServiceDeployerJSE.modifyWebXML(ServiceDeployerJ
            SE.java:129)
            at org.jboss.webservice.ServiceDeployerJSE.createWebservice(ServiceDeplo
            yerJSE.java:98)
            at org.jboss.webservice.ServiceDeployer.handleNotification(ServiceDeploy
            er.java:111)
            at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.notification.NotificationListenerProxy.invoke(Notificati
            onListenerProxy.java:138)
            at $Proxy25.handleNotification(Unknown Source)
            at javax.management.NotificationBroadcasterSupport.handleNotification(No
            tificationBroadcasterSupport.java:104)
            at javax.management.NotificationBroadcasterSupport.sendNotification(Noti
            ficationBroadcasterSupport.java:87)
            at org.jboss.deployment.SubDeployerSupport.create(SubDeployerSupport.jav
            a:163)
            at org.jboss.web.AbstractWebContainer.create(AbstractWebContainer.java:3
            43)
            at org.jboss.deployment.MainDeployer.create(MainDeployer.java:889)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:745)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
            at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
            er.java:141)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
            at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
            or.java:119)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
            at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
            BeanOperationInterceptor.java:131)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
            java:242)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
            at $Proxy8.deploy(Unknown Source)
            at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
            tScanner.java:305)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
            canner.java:481)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
            doScan(AbstractDeploymentScanner.java:204)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
            bstractDeploymentScanner.java:277)
            at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
            upport.java:271)
            at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
            eanSupport.java:221)
            at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
            er.java:141)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
            java:242)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
            ler.java:891)
            at $Proxy0.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:416)
            at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
            er.java:141)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
            java:242)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
            at $Proxy4.start(Unknown Source)
            at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:693)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
            java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
            er.java:141)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
            at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
            or.java:119)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
            at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
            BeanOperationInterceptor.java:131)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
            java:242)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
            at $Proxy5.deploy(Unknown Source)
            at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:396)
            at org.jboss.system.server.ServerImpl.start(ServerImpl.java:293)
            at org.jboss.Main.boot(Main.java:151)
            at org.jboss.Main$1.run(Main.java:405)
            at java.lang.Thread.run(Thread.java:534)