Details

    • Type: Defect (bug)
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.1-ALPHA-18
    • Fix Version/s: 1.1-ALPHA-20
    • Component/s: None
    • Labels:
      None

      Description

      They return status 500 instead.

        Activity

        Hide
        fabrizio.giudici Fabrizio Giudici added a comment -
        The stack trace is below. Looking at what was done with 1-1-ALPHA-17, the last version where it worked, it comes out that there's no MIME type associated to the file. This was tolerated by the NetBeans Platform FileSystem implementation, but no more after the refactoring for NW-144 as the MIME type is passed to a Spring library that causes the error.

        [Mistral-MacOSX:~] fritz% curl -o x -v http://localhost:8080/media/movies/800/20071209-0076.mp4
        * About to connect() to localhost port 8080 (#0)
        * Trying ::1... % Total % Received % Xferd Average Speed Time Time Time Current
                                         Dload Upload Total Spent Left Speed
          0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected
        * Connected to localhost (::1) port 8080 (#0)
        > GET /media/movies/800/20071209-0076.mp4 HTTP/1.1
        > User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
        > Host: localhost:8080
        > Accept: */*
        >
        < HTTP/1.1 200 OK
        < X-NorthernWind-Version: 1.1-ALPHA-17
        < Content-Type: content/unknown
        < Content-Length: 2107122
        < Last-Modified: Mon, 06 Feb 2012 19:05:42 CET
        < ETag: "1328551542000"
        < Expires: Mon, 13 Aug 2012 12:31:02 CEST
        < Server: Jetty(6.1.24)
        <
        { [data not shown]
        100 2057k 100 2057k 0 0 24.7M 0 --:--:-- --:--:-- --:--:-- 25.7M* Connection #0 to host localhost left intact




        java.lang.IllegalArgumentException: 'mediaType' must not be empty
        at org.springframework.util.Assert.hasLength(Assert.java:136)
        at org.springframework.http.MediaType.parseMediaType(MediaType.java:630)
        at it.tidalwave.northernwind.frontend.springmvc.ResponseEntityHolder$ResponseBuilder.withContentType(ResponseEntityHolder.java:57)
        at it.tidalwave.northernwind.frontend.springmvc.ResponseEntityHolder$ResponseBuilder.withContentType(ResponseEntityHolder.java:42)
        at it.tidalwave.northernwind.core.model.spi.ResponseHolder$ResponseBuilderSupport.fromFile(ResponseHolder.java:131)
        at it.tidalwave.northernwind.core.model.spi.DefaultMediaRequestProcessor.process(DefaultMediaRequestProcessor.java:115)
        at it.tidalwave.northernwind.frontend.ui.spi.DefaultSiteViewController.processRequest_aroundBody0(DefaultSiteViewController.java:86)
        at it.tidalwave.northernwind.frontend.ui.spi.DefaultSiteViewController.processRequest_aroundBody1$advice(DefaultSiteViewController.java:77)
        at it.tidalwave.northernwind.frontend.ui.spi.DefaultSiteViewController.processRequest(DefaultSiteViewController.java:1)
        at it.tidalwave.northernwind.frontend.springmvc.SpringMvcRestController.get_aroundBody0(SpringMvcRestController.java:54)
        at it.tidalwave.northernwind.frontend.springmvc.SpringMvcRestController.get_aroundBody1$advice(SpringMvcRestController.java:53)
        at it.tidalwave.northernwind.frontend.springmvc.SpringMvcRestController.get(SpringMvcRestController.java:1)
        at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
        at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)
        at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at it.tidalwave.northernwind.frontend.util.InitializationDiagnosticsDispatcherServletDecorator.service(InitializationDiagnosticsDispatcherServletDecorator.java:86)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
        at it.tidalwave.northernwind.frontend.util.NorthernWindResponseHeaderFilter.doFilter(NorthernWindResponseHeaderFilter.java:63)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at org.mortbay.servlet.UserAgentFilter.doFilter(UserAgentFilter.java:78)
        at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter.java:131)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
        Show
        fabrizio.giudici Fabrizio Giudici added a comment - The stack trace is below. Looking at what was done with 1-1-ALPHA-17, the last version where it worked, it comes out that there's no MIME type associated to the file. This was tolerated by the NetBeans Platform FileSystem implementation, but no more after the refactoring for NW-144 as the MIME type is passed to a Spring library that causes the error. [Mistral-MacOSX:~] fritz% curl -o x -v http://localhost:8080/media/movies/800/20071209-0076.mp4 * About to connect() to localhost port 8080 (#0) * Trying ::1... % Total % Received % Xferd Average Speed Time Time Time Current                                  Dload Upload Total Spent Left Speed   0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected * Connected to localhost (::1) port 8080 (#0) > GET /media/movies/800/20071209-0076.mp4 HTTP/1.1 > User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5 > Host: localhost:8080 > Accept: */* > < HTTP/1.1 200 OK < X-NorthernWind-Version: 1.1-ALPHA-17 < Content-Type: content/unknown < Content-Length: 2107122 < Last-Modified: Mon, 06 Feb 2012 19:05:42 CET < ETag: "1328551542000" < Expires: Mon, 13 Aug 2012 12:31:02 CEST < Server: Jetty(6.1.24) < { [data not shown] 100 2057k 100 2057k 0 0 24.7M 0 --:--:-- --:--:-- --:--:-- 25.7M* Connection #0 to host localhost left intact java.lang.IllegalArgumentException: 'mediaType' must not be empty at org.springframework.util.Assert.hasLength(Assert.java:136) at org.springframework.http.MediaType.parseMediaType(MediaType.java:630) at it.tidalwave.northernwind.frontend.springmvc.ResponseEntityHolder$ResponseBuilder.withContentType(ResponseEntityHolder.java:57) at it.tidalwave.northernwind.frontend.springmvc.ResponseEntityHolder$ResponseBuilder.withContentType(ResponseEntityHolder.java:42) at it.tidalwave.northernwind.core.model.spi.ResponseHolder$ResponseBuilderSupport.fromFile(ResponseHolder.java:131) at it.tidalwave.northernwind.core.model.spi.DefaultMediaRequestProcessor.process(DefaultMediaRequestProcessor.java:115) at it.tidalwave.northernwind.frontend.ui.spi.DefaultSiteViewController.processRequest_aroundBody0(DefaultSiteViewController.java:86) at it.tidalwave.northernwind.frontend.ui.spi.DefaultSiteViewController.processRequest_aroundBody1$advice(DefaultSiteViewController.java:77) at it.tidalwave.northernwind.frontend.ui.spi.DefaultSiteViewController.processRequest(DefaultSiteViewController.java:1) at it.tidalwave.northernwind.frontend.springmvc.SpringMvcRestController.get_aroundBody0(SpringMvcRestController.java:54) at it.tidalwave.northernwind.frontend.springmvc.SpringMvcRestController.get_aroundBody1$advice(SpringMvcRestController.java:53) at it.tidalwave.northernwind.frontend.springmvc.SpringMvcRestController.get(SpringMvcRestController.java:1) at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at it.tidalwave.northernwind.frontend.util.InitializationDiagnosticsDispatcherServletDecorator.service(InitializationDiagnosticsDispatcherServletDecorator.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at it.tidalwave.northernwind.frontend.util.NorthernWindResponseHeaderFilter.doFilter(NorthernWindResponseHeaderFilter.java:63) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.servlet.UserAgentFilter.doFilter(UserAgentFilter.java:78) at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter.java:131) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
        Hide
        fabrizio.giudici Fabrizio Giudici added a comment -
        The problem is specific to .mp4 as jetty 6.1.24 doesn't define the MIME mapping for .mp4. Indeed the main problem is with the jetty configuration, but we should keep on returning content/unknown in this case.
        Show
        fabrizio.giudici Fabrizio Giudici added a comment - The problem is specific to .mp4 as jetty 6.1.24 doesn't define the MIME mapping for .mp4. Indeed the main problem is with the jetty configuration, but we should keep on returning content/unknown in this case.

          People

          • Assignee:
            fabrizio.giudici Fabrizio Giudici
            Reporter:
            fabrizio.giudici Fabrizio Giudici
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: