tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Romain Manni-Bucau (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENEJB-1986) Deployment of web application with white spaces in its name fails due to unencoded characters
Date Thu, 01 May 2014 12:21:15 GMT

    [ https://issues.apache.org/jira/browse/OPENEJB-1986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13986537#comment-13986537
] 

Romain Manni-Bucau commented on OPENEJB-1986:
---------------------------------------------

hi

is it fixed for you on trunk at least?

> Deployment of web application with white spaces in its name fails due to unencoded characters
> ---------------------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1986
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1986
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: configuration, deployment
>            Reporter: Polina Genova
>            Assignee: Romain Manni-Bucau
>             Fix For: 4.5.2, 4.6.0.beta1
>
>         Attachments: Space AppTest.war
>
>
> Hi, 
> The deployment of web applications with special characters (such as white spaces) in
the name fails with  the following exception (tested on Tomee Webprofile 1.5.1).
> To reproduce simply deploy the attached test application:
> SEVERE: Unable to deploy collapsed ear in war StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Space
AppTest]
> java.lang.IllegalArgumentException
> 	at java.net.URI.create(URI.java:842)
> 	at org.apache.openejb.config.AutoConfig.resolveDestinationLinks(AutoConfig.java:582)
> 	at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:183)
> 	at org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:338)
> 	at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:827)
> 	at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:974)
> 	at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:901)
> 	at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
> 	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> 	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
> 	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
> 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> 	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
> 	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
> 	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
> 	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
> 	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> 	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:662)
> Caused by: java.net.URISyntaxException: Illegal character in path at index 5: Space AppTest
> 	at java.net.URI$Parser.fail(URI.java:2809)
> 	at java.net.URI$Parser.checkChars(URI.java:2982)
> 	at java.net.URI$Parser.parseHierarchical(URI.java:3066)
> 	at java.net.URI$Parser.parse(URI.java:3024)
> 	at java.net.URI.<init>(URI.java:578)
> 	at java.net.URI.create(URI.java:840)
> 	... 22 more
> The exception is due to incorrect construction of URL in org.apache.openejb.config.AutoConfig
class.
> To make special characters legal in this case, they need to be first encoded before passing
them to the URI factory method create. 
> For example:
> URI.create(URLEncoder.encode(webModule.getModuleId()));
> I’ve successfully tested this fix using the standard java.net.Encoder (as I could not
find any other internal encoding utility).
> Thanks and regards,
> Polina



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message