Bug 836585 - Service Category with spaces causing WSDL deployment issues
Summary: Service Category with spaces causing WSDL deployment issues
Keywords:
Status: NEW
Alias: None
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossAS
Version: 5.3.0 GA
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: CR1
: 5.3.0 GA
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-29 15:00 UTC by tcunning
Modified: 2021-10-15 11:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description tcunning 2012-06-29 15:00:11 UTC
Description of problem:

Cannot deploy ESB QS after changing service category to have a space in it :

10:57:49,713 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/Users/tcunning/demo/jboss-soa-p-5/jboss-as/server/default/tmp/esbwarfiles/Quickstart_publish_as_webservice.war/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error during deploy: vfszip:/Users/tcunning/demo/jboss-soa-p-5/jboss-as/server/default/tmp/esbwarfiles/Quickstart_publish_as_webservice.war/
	at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:185)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1454)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1172)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1113)
	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:789)
	at org.jboss.deployers.plugins.main.MainDeployerImpl.deploy(MainDeployerImpl.java:549)
	at org.jboss.soa.esb.listeners.deployers.mc.EsbDeployment.create(EsbDeployment.java:198)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
	at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
	at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:243)
	at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:111)
	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72)
	at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
	at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
	at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
	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.dependency.plugins.AbstractController.install(AbstractController.java:1652)
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)
	at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
	at org.jboss.system.ServiceController.start(ServiceController.java:460)
	at org.jboss.system.microcontainer.jmx.ServiceControllerStartStopLifecycleCallback.install(ServiceControllerStartStopLifecycleCallback.java:44)
	at sun.reflect.GeneratedMethodAccessor240.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
	at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
	at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
	at org.jboss.beans.info.plugins.AbstractBeanInfo.invoke(AbstractBeanInfo.java:300)
	at org.jboss.kernel.plugins.dependency.AbstractKernelControllerContext.invoke(AbstractKernelControllerContext.java:291)
	at org.jboss.dependency.plugins.AbstractLifecycleCallbackItem.install(AbstractLifecycleCallbackItem.java:87)
	at org.jboss.dependency.plugins.AbstractController.handleLifecycleCallbacks(AbstractController.java:1589)
	at org.jboss.dependency.plugins.AbstractController.handleInstallLifecycleCallbacks(AbstractController.java:1554)
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:947)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:778)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)
	at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:125)
	at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:52)
	at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)
	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1454)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1172)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1193)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1113)
	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:789)
	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:699)
	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:403)
	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:778)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)
	at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
	at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
	at org.jboss.Main.boot(Main.java:223)
	at org.jboss.Main$1.run(Main.java:574)
	at java.lang.Thread.run(Thread.java:680)
Caused by: org.jboss.ws.WSException: Cannot publish wsdl to: /Users/tcunning/demo/jboss-soa-p-5/jboss-as/server/default/data/wsdl/Quickstart_publish_as_webservice.war/ESB Service Sample/HelloWorldPubService.wsdl
	at org.jboss.wsf.stack.jbws.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:145)
	at org.jboss.wsf.stack.jbws.PublishContractDeploymentAspect.start(PublishContractDeploymentAspect.java:50)
	at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:129)
	at org.jboss.wsf.container.jboss50.deployer.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:76)
	at org.jboss.wsf.container.jboss50.deployer.AbstractWebServiceDeployer.internalDeploy(AbstractWebServiceDeployer.java:60)
	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)
	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
	... 91 more
Caused by: java.io.IOException
	at org.jboss.net.protocol.file.FileURLConnection.<init>(FileURLConnection.java:67)
	at org.jboss.net.protocol.file.Handler.openConnection(Handler.java:40)
	at java.net.URL.openConnection(URL.java:945)
	at java.net.URL.openStream(URL.java:1010)
	at org.jboss.wsf.stack.jbws.WSDLFilePublisher.publishSchemaImports(WSDLFilePublisher.java:270)
	at org.jboss.wsf.stack.jbws.WSDLFilePublisher.publishSchemaImports(WSDLFilePublisher.java:277)
	at org.jboss.wsf.stack.jbws.WSDLFilePublisher.publishSchemaImports(WSDLFilePublisher.java:277)
	at org.jboss.wsf.stack.jbws.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:132)
	... 97 more
Caused by: java.net.URISyntaxException: Illegal character in path at index 114: file:/Users/tcunning/demo/jboss-soa-p-5/jboss-as/server/default/data/wsdl/Quickstart_publish_as_webservice.war/ESB Service Sample/request.xsd
	at java.net.URI$Parser.fail(URI.java:2810)
	at java.net.URI$Parser.checkChars(URI.java:2983)
	at java.net.URI$Parser.parseHierarchical(URI.java:3067)
	at java.net.URI$Parser.parse(URI.java:3015)
	at java.net.URI.<init>(URI.java:577)
	at java.net.URL.toURI(URL.java:918)
	at org.jboss.net.protocol.file.FileURLConnection.<init>(FileURLConnection.java:62)
	... 104 more


How reproducible:


Steps to Reproduce:
1. Edit quickstarts/publish_as_webservice/jboss-esb.xml
2. Change         <service 
        	category="ESBServiceSample" 

to
        <service 
        	category="ESB Service Sample" 
3. ant deploy

Comment 1 tcunning 2012-06-29 15:01:41 UTC
Please note - this worked on SOA-P 5.2.0 GA, and works on ESB 4.11CP1 branch + 5.1.0.GA, but does not work on SOA-P 5.3.    My guess is JBossWS patches.

Comment 2 tcunning 2012-06-29 15:02:33 UTC
This issue is blocking the verification of https://bugzilla.redhat.com/show_bug.cgi?id=788609.

Comment 4 Rick Wagner 2012-07-24 14:10:37 UTC
GSS has KCS'ed this at [1].

[1] https://access.redhat.com/knowledge/solutions/170543

Comment 5 tcunning 2012-07-31 20:25:25 UTC
Does not look like this is jbossws-related - tried switching out the version in 5.1.1 into jboss AS 5.1.0.GA and could not reproduce the issue.     vfs implementation related?

Comment 6 tcunning 2012-08-01 18:25:00 UTC
Tracked this down to a change in jboss-common-core :

------------------------------------------------------------------------
r4029 | alesj | 2010-02-10 07:11:40 -0500 (Wed, 10 Feb 2010) | 1 line

[JBCOMMON-106]; fix File path decoding on Mac OS.

dhcp-187-169:2.2.18.GA tcunning$ svn diff -r 4028 src/main/java/org/jboss/net/protocol/file/FileURLConnection.java  
Index: src/main/java/org/jboss/net/protocol/file/FileURLConnection.java
===================================================================
--- src/main/java/org/jboss/net/protocol/file/FileURLConnection.java	(.../trunk/src/main/java/org/jboss/net/protocol/file/FileURLConnection.java)	(revision 4028)
+++ src/main/java/org/jboss/net/protocol/file/FileURLConnection.java	(.../tags/2.2.18.GA/src/main/java/org/jboss/net/protocol/file/FileURLConnection.java(working copy)
@@ -31,10 +31,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLDecoder;
+import java.net.*;
 import java.security.Permission;
 import java.text.SimpleDateFormat;
 import java.util.Arrays;
@@ -49,36 +46,28 @@
  * @author  <a href="jason">Jason Dillon</a>
  * @author  <a href="scott.stark">Scott Stark</a>
  * @author  <a href="dimitris">Dimitris Andreadis</a>
+ * @author  <a href="ales.justin">Ales Justin</a>
  * @version $Revision$
  */
 public class FileURLConnection extends URLConnection
 {
-   static boolean decodeFilePaths = true;
-   static
-   {
-      String flag = System.getProperty("org.jboss.net.protocol.file.decodeFilePaths");
-      if (flag != null)
-      {
-         decodeFilePaths = Boolean.valueOf(flag).booleanValue();
-      }
-   }
-   
    /** The underlying file */
-   protected File file;
+   protected final File file;
 
-   public FileURLConnection(final URL url) throws MalformedURLException, IOException
+   public FileURLConnection(final URL url) throws IOException
    {
       super(url);
-      
-      String path = url.getPath();
-      if (decodeFilePaths)
+      try
       {
-         path = URLDecoder.decode(path, "UTF-8");
+         file = new File(url.toURI());
+         super.doOutput = false;
       }
-      // Convert the url '/' to the os file separator
-      file = new File(path.replace('/', File.separatorChar).replace('|', ':'));
-
-      super.doOutput = false;
+      catch (URISyntaxException e)
+      {
+         IOException ioe = new IOException();
+         ioe.initCause(e);
+         throw ioe;
+      }
    }
 

I'm guessing somewhere we expected an IOException and we're now getting a URISyntaxException.     More digging..

Comment 7 tcunning 2012-08-01 23:41:35 UTC
So the issue seems to be that the change above cannot handle spaces when converting url.toURI().    

In org.jboss.wsf.stack.jbws.WSDLFilePublisher.publishSchemaImports, a URL is created for the xsd location :

                  URL xsdURL = new URL(baseURI.substring(0, baseURI.lastIndexOf("/") + 1) + schemaLocation);

However, there's no guards there against characters which could be illegal in URI format, so when DOMUtils.parse is called on the xsdURL, FileURLConnection.<init> blows up on :

+         file = new File(url.toURI());

I think the solution should be that in xsdURL creation in WSDLFilePublisher.publishSchemaImports, we encode unsafe URI characters.


Note You need to log in before you can comment on or make changes to this bug.