java.lang.IllegalArgumentException: java.net.URISyntaxException: Illegal charact

Splash Forums PrettyFaces Users java.lang.IllegalArgumentException: java.net.URISyntaxException: Illegal charact

This topic contains 3 replies, has 2 voices, and was last updated by  Christian Kaltepoth 1 year, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #27092

    kumar
    Participant

    Hi All,
    We have recently migrated to wildfly-8.2.0, We are getting Illegal Argument Exception from production frequently. Please advise us how to resolve this issue.

    2015-04-20 10:25:14,227 ERROR [io.undertow.request] (default task-57) UT005023: Exception handling request to /hotels/united states/selma-ca.en.html: java.lang.IllegalArgumentException: java.net.URISyntaxException: Illegal character in path at index 29: http://0.0.0.0//hotels/united states/selma-ca.en.html
    	at org.ocpsoft.urlbuilder.util.Decoder.path(Decoder.java:19) [rewrite-servlet-2.0.12.Final.jar:2.0.12.Final]
    	at org.ocpsoft.urlbuilder.AddressBuilder.pathEncoded(AddressBuilder.java:147) [rewrite-servlet-2.0.12.Final.jar:2.0.12.Final]
    	at org.ocpsoft.urlbuilder.AddressBuilderPort.pathEncoded(AddressBuilderPort.java:54) [rewrite-servlet-2.0.12.Final.jar:2.0.12.Final]
    	at org.ocpsoft.rewrite.servlet.impl.BaseHttpRewrite.getInboundAddress(BaseHttpRewrite.java:88) [rewrite-servlet-2.0.12.Final.jar:2.0.12.Final]
    	at org.ocpsoft.rewrite.servlet.impl.HttpInboundRewriteImpl.getAddress(HttpInboundRewriteImpl.java:149) [rewrite-servlet-2.0.12.Final.jar:2.0.12.Final]
    	at org.ocpsoft.rewrite.faces.FacesRewriteLifecycleListener.beforeInboundLifecycle(FacesRewriteLifecycleListener.java:32) [rewrite-integration-faces-2.0.12.Final.jar:2.0.12.Final]
    	at org.ocpsoft.rewrite.faces.FacesRewriteLifecycleListener.beforeInboundLifecycle(FacesRewriteLifecycleListener.java:20) [rewrite-integration-faces-2.0.12.Final.jar:2.0.12.Final]
    	at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:175) [rewrite-servlet-2.0.12.Final.jar:2.0.12.Final]
    	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
    	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
    	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_20]
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_20]
    	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_20]
    Caused by: java.net.URISyntaxException: Illegal character in path at index 29: http://0.0.0.0//hotels/united states/selma-ca.en.html
    	at java.net.URI$Parser.fail(URI.java:2848) [rt.jar:1.8.0_20]
    	at java.net.URI$Parser.checkChars(URI.java:3021) [rt.jar:1.8.0_20]
    	at java.net.URI$Parser.parseHierarchical(URI.java:3105) [rt.jar:1.8.0_20]
    	at java.net.URI$Parser.parse(URI.java:3053) [rt.jar:1.8.0_20]
    	at java.net.URI.<init>(URI.java:588) [rt.jar:1.8.0_20]
    	at org.ocpsoft.urlbuilder.util.Decoder.path(Decoder.java:14) [rewrite-servlet-2.0.12.Final.jar:2.0.12.Final]
    
    #27093

    Looks like Rewrite receives and invalid URL:

    /hotels/united states/selma-ca.en.html

    The space in the path segment is not valid. It should be encoded with %20. Is this request created by a browser?

    However, the next version of Rewrite will be more fault tolerant with things like this:

    https://github.com/ocpsoft/rewrite/issues/197

    #27095

    kumar
    Participant

    Thank you Christian for your reply,

    Currently we are using rewrite-servlet-2.0.12.Final,rewrite-config-prettyfaces-2.0.12.Final
    Please advise us what is the fix version.

    #27097

    Where does the space in the URL come from? As I said, spaces are not valid in paths. They must be encoded to “%20”.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Comments are closed.