2 Replies Latest reply on Jul 26, 2010 4:39 PM by jaikiran pai

    jboss web service deployment

    Williams Dev Team Newbie

      Hi,

       

      I'm new to developing Java web services and was able to get a "hello world" web service working and deployed to JBoss 5.1ga.  However, this web service ultimately must reside in a already developed web application in our company.  I'm able to get the app deployed successfully and working as normal with JBoss 5.1ga.  However, once I add the web service to the web.xml I get the following errors:

       

      20:53:08,917 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/P:/jboss-5.1.0.GA/server/default/deploy/ewf.war/ state=PreReal mode=Manual requiredState=Real
      org.jboss.deployers.spi.DeploymentException: Error during deploy: vfsfile:/P:/jboss-5.1.0.GA/server/default/deploy/ewf.war/
              at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:177)
              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.hotdeploy.HDScanner.scan(HDScanner.java:362)
              at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
              at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.IllegalArgumentException: Prefix string too short
              at java.io.File.createTempFile(File.java:1782)
              at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.writeWsdl(JAXWSWebServiceMetaDataBuilder.java:516)
              at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.generateWSDL(JAXWSWebServiceMetaDataBuilder.java:490)
              at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.buildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:188)
              at org.jboss.ws.metadata.builder.jaxws.JAXWSServerMetaDataBuilder.setupProviderOrWebService(JAXWSServerMetaDataBuilder.java:50)
              at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE.buildMetaData(JAXWSMetaDataBuilderJSE.java:62)
              at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.start(UnifiedMetaDataDeploymentAspect.java:64)
              at org.jboss.webservices.integration.deployers.WSDeploymentAspectDeployer.internalDeploy(WSDeploymentAspectDeployer.java:107)
              at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
              ... 24 more
      20:53:09,104 WARN  [HDScanner] Failed to process changes
      org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

      *** DEPLOYMENTS IN ERROR: Name -> Error

      vfsfile:/P:/jboss-5.1.0.GA/server/default/deploy/ewf.war/ -> org.jboss.deployers.spi.DeploymentException: Error during deploy: vfsfile:/P:/jboss-5.1.0.GA/server/default/deploy/ewf.war/


      DEPLOYMENTS IN ERROR:
        Deployment "vfsfile:/P:/jboss-5.1.0.GA/server/default/deploy/ewf.war/" is in error due to the following reason(s): java.lang.IllegalArgumentException: Prefix string too short

              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
              at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
              at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
              at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)
              at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
              at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:619)

       

      I have done some research and saw the post @ this link:  https://jira.jboss.org/browse/JBAS-5089.  I changed my war file to "ewfextend" to see if it made a difference but that was unsuccessful.  I also saw that in the link above he added a context root node, which assuming he is referring to adding it in the jboss-web.xml, I already have one.  I changed that to /ewfextend to see if it made a difference but I still got an error.  Below are the entries for the web service in my web.xml file:

       

      <servlet>

      <servlet-name>LeaseWebService</servlet-name>

      <servlet-class>com.williams.ewf.lease.LeaseWS</servlet-class>

      </servlet>

       

      <servlet-mapping>

      <servlet-name>LeaseWebService</servlet-name>

      <url-pattern>LeaseWebService/*</url-pattern>

      </servlet-mapping>

       

      I'm not sure if this information is relevant but our war file is actually a war folder.  When we deploy a folder instead of a file.  I mention this as when I was working on getting the "hello world" example working, the war was a file and not a folder.  I'm not sure if that matters or not but I want to mention it as I noticed in getting the example working the war is placed in the jboss_home\server\default\data folder for the wsdl creation.  I'm not sure how jboss will know how to find the web service amonst other files that are for the web application and the files that are needed for the web service.

       

      Any ideas how to resolve this issue?  Please let me know.  Thanks

       

      FYI...I'm a currently using jdk 1.6, Eclipse Ganymede, jbossws 3.3.1.

        • 1. Re: jboss web service deployment
          jaikiran pai Master

          Like I mentioned in your other thread in a different forum, the issue is in the JBossWS code where the temp file creation is happening:

           

           

          String wsdlName = ToolsUtils.firstLetterUpperCase(serviceMetaData.getServiceName().getLocalPart());
               ...
                if (wsdlDirectory != null)
                {
                   dir = wsdlDirectory;
                   wsdlFile = new File(dir, wsdlName + ".wsdl");
                }
                else
                {
                   dir = IOUtils.createTempDirectory();
                   wsdlFile = File.createTempFile(wsdlName, ".wsdl", dir);
                   wsdlFile.deleteOnExit();
                }

           

          If you have a sample app which can reproduce this, then please create a JIRA and attach it there.

           

          The workaround, I guess is to configure a longer name for the "local part of the service name", although I don't know how to do that or whether it can be done.

          • 2. Re: jboss web service deployment
            jaikiran pai Master

            Moving this to JBossWS forum.