com.atlassian.streams.api.common.uri.Uri$UriException: java.lang.IllegalArgumentException: java.net.URISyntaxException: Expected scheme name at index 0: ://:443/activity?local=true&use-accept-lang=true&maxResults=7

Atlassian JIRA | Andrew Myers [Atlassian] | 6 years ago
  1. 0

    This breaks login with errors such as: {noformat}java.lang.IllegalArgumentException: :///admin/admin.do at org.mortbay.jetty.HttpURI.parse2(HttpURI.java:166) at org.mortbay.jetty.HttpURI.parse(HttpURI.java:109) at org.mortbay.jetty.HttpURI.<init>(HttpURI.java:91) at org.mortbay.jetty.Response.sendRedirect(Response.java:406) at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:136) at org.mortbay.servlet.GzipFilter$GZIPResponseWrapper.sendRedirect(GzipFilter.java:331) at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:136) at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:136) at com.opensymphony.module.sitemesh.filter.PageResponseWrapper.sendRedirect(PageResponseWrapper.java:181) at org.apache.taglibs.standard.tag.common.core.RedirectSupport.doEndTag(RedirectSupport.java:148) at org.apache.jsp.admin.index_jsp._jspx_meth_c_redirect_0(index_jsp.java:80) at org.apache.jsp.admin.index_jsp._jspService(index_jsp.java:55) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109){noformat} or {noformat} com.atlassian.streams.api.common.uri.Uri$UriException: java.lang.IllegalArgumentException: java.net.URISyntaxException: Expected scheme name at index 0: ://:443/activity?local=true&use-accept-lang=true&maxResults=7 at com.atlassian.streams.api.common.uri.Uri.parse(Uri.java:110) at com.atlassian.streams.internal.atom.abdera.AbderaAtomFeedParser.readFeed(AbderaAtomFeedParser.java:60) at com.atlassian.streams.internal.AppLinksActivityProvider$FeedResponseHandler.readStream(AppLinksActivityProvider.java:570) at com.atlassian.streams.internal.AppLinksActivityProvider$FeedResponseHandler.handle(AppLinksActivityProvider.java:551) at com.atlassian.streams.internal.AppLinksActivityProvider$FeedResponseHandler.handle(AppLinksActivityProvider.java:531) at com.atlassian.applinks.core.auth.ApplicationLinkRequestAdaptor$1.handle(ApplicationLinkRequestAdaptor.java:87) at com.atlassian.plugins.rest.module.jersey.JerseyRequest$2.handle(JerseyRequest.java:166) at com.atlassian.sal.core.net.HttpClientRequest.executeAndReturn(HttpClientRequest.java:336) at com.atlassian.plugins.rest.module.jersey.JerseyRequest.executeAndReturn(JerseyRequest.java:161) at com.atlassian.applinks.core.auth.ApplicationLinkRequestAdaptor.execute(ApplicationLinkRequestAdaptor.java:84) at com.atlassian.streams.internal.AppLinksActivityProvider.fetch(AppLinksActivityProvider.java:425) at com.atlassian.streams.internal.AppLinksActivityProvider.access$200(AppLinksActivityProvider.java:96) at com.atlassian.streams.internal.AppLinksActivityProvider$1.call(AppLinksActivityProvider.java:179) at com.atlassian.streams.internal.AppLinksActivityProvider$1.call(AppLinksActivityProvider.java:171) at com.atlassian.streams.internal.FeedBuilder$ToFeedCallable$1.call(FeedBuilder.java:112) at com.atlassian.streams.internal.FeedBuilder$ToFeedCallable$1.call(FeedBuilder.java:107) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at com.atlassian.util.concurrent.LimitedExecutor$Runner.run(LimitedExecutor.java:93) at com.atlassian.sal.core.executor.ThreadLocalDelegateRunnable.run(ThreadLocalDelegateRunnable.java:38) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) Caused by: java.lang.IllegalArgumentException: java.net.URISyntaxException: Expected scheme name at index 0: ://:443/activity?local=true&use-accept-lang=true&maxResults=7 at com.atlassian.streams.api.common.uri.DefaultUriParser.parse(DefaultUriParser.java:44) at com.atlassian.streams.api.common.uri.Uri.parse(Uri.java:102) ... 23 more Caused by: java.net.URISyntaxException: Expected scheme name at index 0: ://:443/activity?local=true&use-accept-lang=true&maxResults=7 at java.net.URI$Parser.fail(URI.java:2829) at java.net.URI$Parser.parse(URI.java:3027) at java.net.URI.<init>(URI.java:595) at com.atlassian.streams.api.common.uri.DefaultUriParser.parse(DefaultUriParser.java:40) ... 24 more {noformat} To replicate add the following to config.xml: {code:xml} <proxy-info proxy-host="" proxy-scheme=""/> {code} We should constrain the scheme such that proxy scheme is one of \[http,https\]. We should validate the proxy host does not consist only of whitespace and is not 0 characters long. The admin UI (Adminsitration -> Global Settings -> Server) allows you to enter only spaces (but doesn't allow the empty strings above) to there needs to be validation there as well. The fix for this should be constrained to the UI and only allowing users to save proxy-hosts and proxy-schemes which form a valid URL. We need not do any extra checking on startup, other than failing to start and logging a helpful error message, which is currently the case, I believe ?

    Atlassian JIRA | 6 years ago | Andrew Myers [Atlassian]
    com.atlassian.streams.api.common.uri.Uri$UriException: java.lang.IllegalArgumentException: java.net.URISyntaxException: Expected scheme name at index 0: ://:443/activity?local=true&use-accept-lang=true&maxResults=7
  2. 0

    This breaks login with errors such as: {noformat}java.lang.IllegalArgumentException: :///admin/admin.do at org.mortbay.jetty.HttpURI.parse2(HttpURI.java:166) at org.mortbay.jetty.HttpURI.parse(HttpURI.java:109) at org.mortbay.jetty.HttpURI.<init>(HttpURI.java:91) at org.mortbay.jetty.Response.sendRedirect(Response.java:406) at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:136) at org.mortbay.servlet.GzipFilter$GZIPResponseWrapper.sendRedirect(GzipFilter.java:331) at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:136) at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:136) at com.opensymphony.module.sitemesh.filter.PageResponseWrapper.sendRedirect(PageResponseWrapper.java:181) at org.apache.taglibs.standard.tag.common.core.RedirectSupport.doEndTag(RedirectSupport.java:148) at org.apache.jsp.admin.index_jsp._jspx_meth_c_redirect_0(index_jsp.java:80) at org.apache.jsp.admin.index_jsp._jspService(index_jsp.java:55) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109){noformat} or {noformat} com.atlassian.streams.api.common.uri.Uri$UriException: java.lang.IllegalArgumentException: java.net.URISyntaxException: Expected scheme name at index 0: ://:443/activity?local=true&use-accept-lang=true&maxResults=7 at com.atlassian.streams.api.common.uri.Uri.parse(Uri.java:110) at com.atlassian.streams.internal.atom.abdera.AbderaAtomFeedParser.readFeed(AbderaAtomFeedParser.java:60) at com.atlassian.streams.internal.AppLinksActivityProvider$FeedResponseHandler.readStream(AppLinksActivityProvider.java:570) at com.atlassian.streams.internal.AppLinksActivityProvider$FeedResponseHandler.handle(AppLinksActivityProvider.java:551) at com.atlassian.streams.internal.AppLinksActivityProvider$FeedResponseHandler.handle(AppLinksActivityProvider.java:531) at com.atlassian.applinks.core.auth.ApplicationLinkRequestAdaptor$1.handle(ApplicationLinkRequestAdaptor.java:87) at com.atlassian.plugins.rest.module.jersey.JerseyRequest$2.handle(JerseyRequest.java:166) at com.atlassian.sal.core.net.HttpClientRequest.executeAndReturn(HttpClientRequest.java:336) at com.atlassian.plugins.rest.module.jersey.JerseyRequest.executeAndReturn(JerseyRequest.java:161) at com.atlassian.applinks.core.auth.ApplicationLinkRequestAdaptor.execute(ApplicationLinkRequestAdaptor.java:84) at com.atlassian.streams.internal.AppLinksActivityProvider.fetch(AppLinksActivityProvider.java:425) at com.atlassian.streams.internal.AppLinksActivityProvider.access$200(AppLinksActivityProvider.java:96) at com.atlassian.streams.internal.AppLinksActivityProvider$1.call(AppLinksActivityProvider.java:179) at com.atlassian.streams.internal.AppLinksActivityProvider$1.call(AppLinksActivityProvider.java:171) at com.atlassian.streams.internal.FeedBuilder$ToFeedCallable$1.call(FeedBuilder.java:112) at com.atlassian.streams.internal.FeedBuilder$ToFeedCallable$1.call(FeedBuilder.java:107) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at com.atlassian.util.concurrent.LimitedExecutor$Runner.run(LimitedExecutor.java:93) at com.atlassian.sal.core.executor.ThreadLocalDelegateRunnable.run(ThreadLocalDelegateRunnable.java:38) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) Caused by: java.lang.IllegalArgumentException: java.net.URISyntaxException: Expected scheme name at index 0: ://:443/activity?local=true&use-accept-lang=true&maxResults=7 at com.atlassian.streams.api.common.uri.DefaultUriParser.parse(DefaultUriParser.java:44) at com.atlassian.streams.api.common.uri.Uri.parse(Uri.java:102) ... 23 more Caused by: java.net.URISyntaxException: Expected scheme name at index 0: ://:443/activity?local=true&use-accept-lang=true&maxResults=7 at java.net.URI$Parser.fail(URI.java:2829) at java.net.URI$Parser.parse(URI.java:3027) at java.net.URI.<init>(URI.java:595) at com.atlassian.streams.api.common.uri.DefaultUriParser.parse(DefaultUriParser.java:40) ... 24 more {noformat} To replicate add the following to config.xml: {code:xml} <proxy-info proxy-host="" proxy-scheme=""/> {code} We should constrain the scheme such that proxy scheme is one of \[http,https\]. We should validate the proxy host does not consist only of whitespace and is not 0 characters long. The admin UI (Adminsitration -> Global Settings -> Server) allows you to enter only spaces (but doesn't allow the empty strings above) to there needs to be validation there as well. The fix for this should be constrained to the UI and only allowing users to save proxy-hosts and proxy-schemes which form a valid URL. We need not do any extra checking on startup, other than failing to start and logging a helpful error message, which is currently the case, I believe ?

    Atlassian JIRA | 6 years ago | Andrew Myers [Atlassian]
    com.atlassian.streams.api.common.uri.Uri$UriException: java.lang.IllegalArgumentException: java.net.URISyntaxException: Expected scheme name at index 0: ://:443/activity?local=true&use-accept-lang=true&maxResults=7
  3. 0

    SequenceFileLoader fails if given comma-separated list of files

    GitHub | 5 years ago | keolson
    org.apache.pig.backend.executionengine.ExecException: ERROR 2118: java.net.URISyntaxException: Illegal character in scheme name at index 0: 23,hdfs:
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    ERA/O 1750 & console

    dell.com | 8 months ago
    java.net.URISyntaxException: Expected scheme-specific part at index 5: http:
  6. 0

    PERC3/Di failure workaround hypothesis

    dell.com | 8 months ago
    java.net.URISyntaxException: Expected scheme-specific part at index 5: http:
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.URISyntaxException

    Expected scheme name at index 0: ://:443/activity?local=true&use-accept-lang=true&maxResults=7

    at java.net.URI$Parser.fail()
  2. Java RT
    URI.<init>
    1. java.net.URI$Parser.fail(URI.java:2829)
    2. java.net.URI$Parser.parse(URI.java:3027)
    3. java.net.URI.<init>(URI.java:595)
    3 frames
  3. com.atlassian.streams
    AppLinksActivityProvider$FeedResponseHandler.handle
    1. com.atlassian.streams.api.common.uri.DefaultUriParser.parse(DefaultUriParser.java:40)
    2. com.atlassian.streams.api.common.uri.Uri.parse(Uri.java:102)
    3. com.atlassian.streams.internal.atom.abdera.AbderaAtomFeedParser.readFeed(AbderaAtomFeedParser.java:60)
    4. com.atlassian.streams.internal.AppLinksActivityProvider$FeedResponseHandler.readStream(AppLinksActivityProvider.java:570)
    5. com.atlassian.streams.internal.AppLinksActivityProvider$FeedResponseHandler.handle(AppLinksActivityProvider.java:551)
    6. com.atlassian.streams.internal.AppLinksActivityProvider$FeedResponseHandler.handle(AppLinksActivityProvider.java:531)
    6 frames
  4. com.atlassian.applinks
    ApplicationLinkRequestAdaptor$1.handle
    1. com.atlassian.applinks.core.auth.ApplicationLinkRequestAdaptor$1.handle(ApplicationLinkRequestAdaptor.java:87)
    1 frame
  5. com.atlassian.plugins
    JerseyRequest$2.handle
    1. com.atlassian.plugins.rest.module.jersey.JerseyRequest$2.handle(JerseyRequest.java:166)
    1 frame
  6. com.atlassian.sal
    HttpClientRequest.executeAndReturn
    1. com.atlassian.sal.core.net.HttpClientRequest.executeAndReturn(HttpClientRequest.java:336)
    1 frame
  7. com.atlassian.plugins
    JerseyRequest.executeAndReturn
    1. com.atlassian.plugins.rest.module.jersey.JerseyRequest.executeAndReturn(JerseyRequest.java:161)
    1 frame
  8. com.atlassian.applinks
    ApplicationLinkRequestAdaptor.execute
    1. com.atlassian.applinks.core.auth.ApplicationLinkRequestAdaptor.execute(ApplicationLinkRequestAdaptor.java:84)
    1 frame
  9. com.atlassian.streams
    FeedBuilder$ToFeedCallable$1.call
    1. com.atlassian.streams.internal.AppLinksActivityProvider.fetch(AppLinksActivityProvider.java:425)
    2. com.atlassian.streams.internal.AppLinksActivityProvider.access$200(AppLinksActivityProvider.java:96)
    3. com.atlassian.streams.internal.AppLinksActivityProvider$1.call(AppLinksActivityProvider.java:179)
    4. com.atlassian.streams.internal.AppLinksActivityProvider$1.call(AppLinksActivityProvider.java:171)
    5. com.atlassian.streams.internal.FeedBuilder$ToFeedCallable$1.call(FeedBuilder.java:112)
    6. com.atlassian.streams.internal.FeedBuilder$ToFeedCallable$1.call(FeedBuilder.java:107)
    6 frames
  10. Java RT
    FutureTask.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:262)
    2. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    3. java.util.concurrent.FutureTask.run(FutureTask.java:262)
    3 frames
  11. com.atlassian.util
    LimitedExecutor$Runner.run
    1. com.atlassian.util.concurrent.LimitedExecutor$Runner.run(LimitedExecutor.java:93)
    1 frame
  12. com.atlassian.sal
    ThreadLocalDelegateRunnable.run
    1. com.atlassian.sal.core.executor.ThreadLocalDelegateRunnable.run(ThreadLocalDelegateRunnable.java:38)
    1 frame
  13. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    3. java.lang.Thread.run(Thread.java:724)
    3 frames