Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-9440

MalformedURLException if malformed url

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: mantis-plugin
    • Labels:
      None
    • Environment:
      Firefox 3.6
    • Similar Issues:

      Description

      Jenkins 1.408
      Mantis plugin 0.10.1

      If I set in the "URL" field a non-valid URL (my mistake), I got a 500 error with the following stacktrace :

       
      java.net.MalformedURLException: no protocol: Foo
      	at java.net.URL.(URL.java:567)
      	at java.net.URL.(URL.java:464)
      	at java.net.URL.(URL.java:413)
      	at hudson.plugins.mantis.MantisProjectProperty$DescriptorImpl.doCheckLogin(MantisProjectProperty.java:172)
      	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.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:282)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
      	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:103)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
      	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:233)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
      	at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
      	at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
      	at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
      	at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
      	at java.lang.Thread.run(Thread.java:662)

      Expected: I think the plugin should have a Jenkins's standard red error in this case.

      And, by the way, thanks for this plugin!

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Seiji Sogabe
          Path:
          src/main/java/hudson/plugins/mantis/MantisProjectProperty.java
          src/main/resources/hudson/plugins/mantis/Messages.properties
          src/main/resources/hudson/plugins/mantis/Messages_ja.properties
          http://jenkins-ci.org/commit/mantis-plugin/36da2ae04c9101f5b4a181c4b01a882e67471b7d
          Log:
          [FIXED JENKINS-9440] MalformedURLException if malformed url.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Seiji Sogabe Path: src/main/java/hudson/plugins/mantis/MantisProjectProperty.java src/main/resources/hudson/plugins/mantis/Messages.properties src/main/resources/hudson/plugins/mantis/Messages_ja.properties http://jenkins-ci.org/commit/mantis-plugin/36da2ae04c9101f5b4a181c4b01a882e67471b7d Log: [FIXED JENKINS-9440] MalformedURLException if malformed url.
          Hide
          turb Sylvain Veyrié added a comment -

          It works! Thanks.

          Show
          turb Sylvain Veyrié added a comment - It works! Thanks.

            People

            Assignee:
            sogabe sogabe
            Reporter:
            turb Sylvain Veyrié
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: