7 Replies Latest reply on Mar 5, 2010 5:08 PM by Peter Johnson

    Problem creating a JAX-WS web service

    Frank Lawlor Newbie

      I created a simple JAX-WS web service using MyEclipse.

      All it does is take a string, invoke twiddle and return the string result.

      It contains twiddle.jar.

       

      When I deploy it and start JBOSS 5.1.0.GA I get the error below.

      Any idea why and how to prevent this?

       

      10:13:47,354 ERROR [AbstractKernelController] Error installing to Instantiated: name=jboss.jacc:id="vfsfile:/C:/JBoss/jboss-5.1.0.GA2/server/default/deploy/WsNsTwiddle.war/",service=jacc state=Described mode=Manual requiredState=Configured

      java.lang.NoSuchMethodException

       

       

      Class.java:2706)

      at java.lang.Class.getConstructor(

      Class.java:1657)

      at org.jboss.mx.server.MBeanServerImpl.instantiate(

      MBeanServerImpl.java:1241)

      at org.jboss.mx.server.MBeanServerImpl.instantiate(

      MBeanServerImpl.java:286)

      at org.jboss.mx.server.MBeanServerImpl.createMBean(

      MBeanServerImpl.java:344)

      at org.jboss.system.ServiceCreator.installPlainMBean(

      ServiceCreator.java:211)

      at org.jboss.system.ServiceCreator.install(

      ServiceCreator.java:130)

      at org.jboss.system.microcontainer.InstantiateAction.installAction(

      InstantiateAction.java:45)

      at org.jboss.system.microcontainer.InstantiateAction.installAction(

      InstantiateAction.java:37)

      at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(

      SimpleControllerContextAction.java:62)

      at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(

      AccessControllerContextAction.java:71)

      at org.jboss.dependency.plugins.AbstractControllerContextActions.install(

      AbstractControllerContextActions.java:51)

      at org.jboss.dependency.plugins.AbstractControllerContext.install(

      AbstractControllerContext.java:348)

      at org.jboss.system.microcontainer.ServiceControllerContext.install(

      ServiceControllerContext.java:286)

      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.ServiceController.doChange(

      ServiceController.java:688)

      at org.jboss.system.ServiceController.install(

      ServiceController.java:274)

      at org.jboss.system.deployers.ServiceDeployer.deploy(

      ServiceDeployer.java:90)

      at org.jboss.system.deployers.ServiceDeployer.deploy(

      ServiceDeployer.java:46)

      at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(

      AbstractSimpleRealDeployer.java:62)

      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(

      AbstractRealDeployer.java:50)

      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.doInstallParentFirst(

      DeployersImpl.java:1178)

      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(

      Thread.java:619)

      10:13:47,354 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/C:/JBoss/jboss-5.1.0.GA2/server/default/deploy/WsNsTwiddle.war/ state=PreReal mode=Manual requiredState=Real

      org.jboss.deployers.spi.DeploymentException

       

       

      DeploymentException.java:49)

      at org.jboss.system.deployers.ServiceDeployer.deploy(

      ServiceDeployer.java:118)

      at org.jboss.system.deployers.ServiceDeployer.deploy(

      ServiceDeployer.java:46)

      at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(

      AbstractSimpleRealDeployer.java:62)

      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(

      AbstractRealDeployer.java:50)

      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.doInstallParentFirst(

      DeployersImpl.java:1178)

      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(

      Thread.java:619)

      Caused by:

      java.lang.NoSuchMethodException: org.jboss.deployment.security.WarJaccPolicy.<init>(java.lang.String, org.jboss.metadata.web.jboss.JBossWebMetaData, java.lang.Boolean)

      at java.lang.Class.getConstructor0(

      Class.java:2706)

      at java.lang.Class.getConstructor(

      Class.java:1657)

      at org.jboss.mx.server.MBeanServerImpl.instantiate(

      MBeanServerImpl.java:1241)

      at org.jboss.mx.server.MBeanServerImpl.instantiate(

      MBeanServerImpl.java:286)

      at org.jboss.mx.server.MBeanServerImpl.createMBean(

      MBeanServerImpl.java:344)

      at org.jboss.system.ServiceCreator.installPlainMBean(

      ServiceCreator.java:211)

      at org.jboss.system.ServiceCreator.install(

      ServiceCreator.java:130)

      at org.jboss.system.microcontainer.InstantiateAction.installAction(

      InstantiateAction.java:45)

      at org.jboss.system.microcontainer.InstantiateAction.installAction(

      InstantiateAction.java:37)

      at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(

      SimpleControllerContextAction.java:62)

      at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(

      AccessControllerContextAction.java:71)

      at org.jboss.dependency.plugins.AbstractControllerContextActions.install(

      AbstractControllerContextActions.java:51)

      at org.jboss.dependency.plugins.AbstractControllerContext.install(

      AbstractControllerContext.java:348)

      at org.jboss.system.microcontainer.ServiceControllerContext.install(

      ServiceControllerContext.java:286)

      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.ServiceController.doChange(

      ServiceController.java:688)

      at org.jboss.system.ServiceController.install(

      ServiceController.java:274)

      at org.jboss.system.deployers.ServiceDeployer.deploy(

      ServiceDeployer.java:90)

      ... 34 more

      : Error deploying: jboss.jacc:service=jacc,id="vfsfile:/C:/JBoss/jboss-5.1.0.GA2/server/default/deploy/WsNsTwiddle.war/"

      at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(

      : org.jboss.deployment.security.WarJaccPolicy.<init>(java.lang.String, org.jboss.metadata.web.jboss.JBossWebMetaData, java.lang.Boolean)

      at java.lang.Class.getConstructor0(

        • 1. Re: Problem creating a JAX-WS web service
          Francesco Marchioni Apprentice

          Hello,

          The error is very generic and doesn' provide useful information. However many problems found with client JAX WS Web services are due to the libraries you are using for build/running the client.

          The safest way to run a ws client is using the wsrunclient shell to run your web service client- as an alternative try downloading JBossWS latest stable release and add these libraries in your Eclipse rather then the JBoss Server runtime libraries.

          Hope it helps

          Francesco

          • 2. Re: Problem creating a JAX-WS web service
            Peter Johnson Master

            Perhaps you should post your web service class.

             

            It might also help if you attempted to do this outside of Eclipse - adding the screwing things that Eclipse does to your apps will only make this issue harder to resolve. Once we get the web service deployed successfully without using Eclipse we can then look at what to do within Eclipse. You can still edit and compile the web service in Eclipse. But when you go to deploy you should manually run JBoss AS from a command line and manually copy the resulting web service JAR or WAR file to the deploy directory.

            • 3. Re: Problem creating a JAX-WS web service
              Frank Lawlor Newbie

              I don't understand this response.

              The error occurs when deploying the web service.

              There is no client involved.

              • 4. Re: Problem creating a JAX-WS web service
                Frank Lawlor Newbie

                I deployed the war manually with the same result.

                 

                The only jar in the project is twiddle.jar.

                 

                The main web service classes are:

                 

                package com.netspend.nstwiddle;

                @javax.jws.WebService(targetNamespace = "http://nstwiddle.netspend.com/", serviceName = "NsTwiddleReqService", portName = "NsTwiddleReqPort", wsdlLocation = "WEB-INF/wsdl/NsTwiddleReqService.wsdl")
                public class NsTwiddleReqDelegate {
                com.netspend.nstwiddle.NsTwiddleReq nsTwiddleReq = new com.netspend.nstwiddle.NsTwiddleReq();
                public String execute(String args) {
                  return nsTwiddleReq.execute(args);
                }
                }

                package com.netspend.nstwiddle;

                public class NsTwiddleReq {
                public String execute(String args) {
                  String result = NsTwiddle.execute(args);
                  return result;
                }

                • 5. Re: Problem creating a JAX-WS web service
                  Peter Johnson Master
                  Wow, this editor-from-hell is really butchering your posts! (I had to write this response 3 times to get the formatting right...)

                  Your web service looks fine, as far as I can tell. So I extracted and reformatted the stack trace you posted. And found this root cause:

                  Caused by java.lang.NoSuchMethodException: org.jboss.deployment.security.WarJaccPolicy.<init>(java.lang.String, org.jboss.metadata.web.jboss.JBossWebMetaData, java.lang.Boolean)

                  I suspect that the wrong JAR file containing the WarJaccPolicy class is being loaded. Did you package any JAR files with your WAR? I know you said that the only JAR in the project is the twiddle JAR, but Eclipse often screws things up in its attempts to be helpful, so make sure you check the contents of the WAR that was actually deployed.
                  1 of 1 people found this helpful
                  • 6. Re: Problem creating a JAX-WS web service
                    Frank Lawlor Newbie

                    You are right.

                     

                    I have a class in there that was extracted from the twiddle jar.  In order for it to compile in my project I had to reference a couple of external jars from JBoss.  When the war was packaged it included those jars and this lead to the problem.

                     

                    When I deleted the JBoss jars from the war, all was fine.

                     

                    Thanks for everyones help on this.

                     

                    It seems that as these environments get more complex, more and more of the problems I run into are jar-related issues.

                     

                      -- Frank

                    • 7. Re: Problem creating a JAX-WS web service
                      Peter Johnson Master
                      This is why I never let Eclipse build or package anything. I always use Maven or Ant to do my builds and packaging.