Archiva
  1. Archiva
  2. MRM-853

HTTP Error 500 when uploading artifact with Windows OS

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Win XP Pro
      Browser: Firefox
    • Number of attachments :
      1

      Description

      Artifact Repository > Upload Artifact

      Group Id: junit
      Artifact Id: junit
      Version: 4.4
      Packaging: jar
      Classifier:
      set Generate Maven 2 POM
      Artifact File: [I was pointing this to my junit-4.4.jar]
      Repository Id: releases

      Click "Submit" button

      Actual Result:
      HTTP Error 500 page
      String index out of range: -1

      Here's the log:
      jvm 1 | 2008-06-30 17:43:15,140 [SocketListener0-1] INFO FreemarkerManager - Instantiating Freemarker ConfigManager!, com.opensymphon
      y.webwork.views.freemarker.FreemarkerManager
      jvm 1 | 2008-06-30 17:49:41,812 [SocketListener0-1] INFO DispatcherUtils - Unable to find 'webwork.multipart.saveDir' property sett
      ing. Defaulting to javax.servlet.context.tempdir
      jvm 1 | 2008-06-30 17:49:42,000 [SocketListener0-1] WARN MultiPartRequest - Item is a file upload of 0 size, ignoring
      jvm 1 | 2008-06-30 17:49:42,000 [SocketListener0-1] ERROR DispatcherUtils - Error setting character encoding to 'UTF-8' - ignoring.
      jvm 1 | java.lang.IllegalStateException: getReader() or getInputStream() called
      jvm 1 | at org.mortbay.jetty.servlet.ServletHttpRequest.setCharacterEncoding(ServletHttpRequest.java:602)
      jvm 1 | at javax.servlet.ServletRequestWrapper.setCharacterEncoding(ServletRequestWrapper.java:112)
      jvm 1 | at com.opensymphony.webwork.dispatcher.DispatcherUtils.prepare(DispatcherUtils.java:438)
      jvm 1 | at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:160)
      jvm 1 | at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
      jvm 1 | at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
      jvm 1 | at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
      jvm 1 | at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
      jvm 1 | at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88)
      jvm 1 | at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
      jvm 1 | at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
      jvm 1 | at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
      jvm 1 | at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
      jvm 1 | at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
      jvm 1 | at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
      jvm 1 | at org.mortbay.http.HttpServer.service(HttpServer.java:909)
      jvm 1 | at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
      jvm 1 | at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
      jvm 1 | at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
      jvm 1 | at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
      jvm 1 | at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
      jvm 1 | at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
      jvm 1 | 2008-06-30 17:49:42,062 [SocketListener0-1] INFO FileUploadInterceptor - File artifact application/java-archive junit-4.4.jar D:\
      Maestro\1.6.2\maestro-1.6.2\project-server\bin\windows-x86-32\..\..\temp\Jetty_0_0_0_0_8080_archiva\upload6a57e3dd_11ad8bd9bf7_7fcc_00000006.tmp
      jvm 1 | 2008-06-30 17:49:42,937 [SocketListener0-1] INFO FileUploadInterceptor - File artifact application/java-archive junit-4.4.jar D:\
      Maestro\1.6.2\maestro-1.6.2\project-server\bin\windows-x86-32\..\..\temp\Jetty_0_0_0_0_8080_archiva\upload6a57e3dd_11ad8bd9bf7_7fcc_00000006.tmp
      jvm 1 | Jun 30, 2008 5:49:46 PM org.mortbay.jetty.servlet.ServletHandler handle
      jvm 1 | WARNING: /archiva/upload!doUpload.action:
      jvm 1 | java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      jvm 1 | at java.lang.String.substring(String.java:1768)
      jvm 1 | at org.apache.maven.archiva.web.action.UploadAction.getMetadata(UploadAction.java:467)
      jvm 1 | at org.apache.maven.archiva.web.action.UploadAction.doUpload(UploadAction.java:398)
      jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      jvm 1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      jvm 1 | at java.lang.reflect.Method.invoke(Method.java:585)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:358)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:218)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:192)
      jvm 1 | at com.opensymphony.webwork.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:238)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:175)
      jvm 1 | at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.xwork.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:115)
      jvm 1 | at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at org.apache.maven.archiva.web.interceptor.ConfigurationInterceptor.intercept(ConfigurationInterceptor.java:67)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at org.codehaus.plexus.redback.xwork.interceptor.PolicyEnforcementInterceptor.intercept(PolicyEnforcementInterceptor.java:165)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at org.codehaus.plexus.redback.xwork.interceptor.SecureActionInterceptor.intercept(SecureActionInterceptor.java:194)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.xwork.interceptor.ParameterFilterInterceptor.intercept(ParameterFilterInterceptor.java:124)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:175)
      jvm 1 | at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.xwork.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:115)
      jvm 1 | at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.webwork.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:238)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.webwork.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:169)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.xwork.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:151)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.xwork.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:186)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at org.codehaus.plexus.redback.xwork.interceptor.AutoLoginInterceptor.intercept(AutoLoginInterceptor.java:172)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at org.codehaus.plexus.redback.xwork.interceptor.ForceAdminUserInterceptor.intercept(ForceAdminUserInterceptor.java:92)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
      jvm 1 | at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
      jvm 1 | at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:116)
      jvm 1 | at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:273)
      jvm 1 | at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202)
      jvm 1 | at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
      jvm 1 | at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
      jvm 1 | at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
      jvm 1 | at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
      jvm 1 | at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88)
      jvm 1 | at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
      jvm 1 | at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
      jvm 1 | at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
      jvm 1 | at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
      jvm 1 | at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
      jvm 1 | at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
      jvm 1 | at org.mortbay.http.HttpServer.service(HttpServer.java:909)
      jvm 1 | at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
      jvm 1 | at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
      jvm 1 | at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
      jvm 1 | at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
      jvm 1 | at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
      jvm 1 | at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

      1. MRM-853.patch
        0.8 kB
        John Michael Luy

        Activity

        Brett Porter made changes -
        Field Original Value New Value
        Fix Version/s 1.1 [ 13861 ]
        Brett Porter made changes -
        Assignee Brett Porter [ brettporter ]
        Hide
        John Michael Luy added a comment -

        Attached patch that uses system name separator.

        Show
        John Michael Luy added a comment - Attached patch that uses system name separator.
        John Michael Luy made changes -
        Attachment MRM-853.patch [ 35528 ]
        James William Dumay made changes -
        Assignee Brett Porter [ brettporter ] James William Dumay [ james.w.dumay ]
        James William Dumay made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        James William Dumay added a comment -

        Committed in r673277.

        Thanks for the patch Marecor!

        Show
        James William Dumay added a comment - Committed in r673277. Thanks for the patch Marecor!
        James William Dumay made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Closed [ 6 ]
        Hide
        Brett Porter added a comment -

        I think John submitted the patch, so I updated the log. Thanks both

        Show
        Brett Porter added a comment - I think John submitted the patch, so I updated the log. Thanks both

          People

          • Assignee:
            James William Dumay
            Reporter:
            Marecor M. Baclay
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: