File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes JBoss deployment for Java Web Application and Web Service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss deployment for Java Web Application and Web Service" Watch "JBoss deployment for Java Web Application and Web Service" New topic
Author

JBoss deployment for Java Web Application and Web Service

Lydia Vaughan
Greenhorn

Joined: Jul 06, 2010
Posts: 14
Hello,


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.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10090
    
164

Lydia Vaughan wrote:
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)



The issue is actually not the same as the JIRA that you stumbled upon. It's similar though. This one's very specific to JBossWS implementation. Here's what it does:



It's the else block which is important and which is where it's creating the temp file. As you can see, the "prefix" part of that temp file represents the service name's local part. I am not an webservice expert, so I don't exactly know what the "service name's local part" maps to in terms of configuration. I can take a look to see what config it is, but if you know what it is, then change that local part to be more than three letters long.

By the way, this would classify as a bug, since this is an internal implementation issue in JBossWS. If you have a simple application which reproduces this, then please create a JIRA here and attach the app.


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JBoss deployment for Java Web Application and Web Service