Uploaded image for project: 'Marmotta (Retired)'
  1. Marmotta (Retired)
  2. MARMOTTA-91

NPE when PUTting metadata through the REST webservice

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6
    • 3.0-incubating
    • Web Services
    • None
    • OpenJDK Runtime Environment (IcedTea7 2.3.6) (7u13-2.3.6-0ubuntu0.12.10.1)
      Apache Tomcat/7.0.35

    Description

      Fresh install of LMF 2.6.0 going through the "First Steps" with the curl commands.
      After running the first one (`curl -i -X POST http://localhost:8080/LMF/resource/1234`), the second one throws a NPE:

      ```
      curl -X PUT -i -H "Content-Type: text/rdf+n3; rel=meta" \
      -d '<http://localhost:8080/LMF/resource/1234> <http://www.w3.org/2000/01/rdf-schema#label> "Test Resource".' \
      http://localhost:8080/LMF/resource/1234

      Server: Apache-Coyote/1.1
      Content-Type: text/html;charset=utf-8
      Transfer-Encoding: chunked
      Date: Mon, 18 Feb 2013 13:37:52 GMT
      Connection: close

      <html><head><title>Apache Tomcat/7.0.35 - Error report</title><style><!--H1

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}

      H2

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}

      H3

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}

      BODY

      {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}

      B

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}

      P

      {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}

      A

      {color : black;}

      A.name

      {color : black;}

      HR

      {color : #525D76;}

      -></style> </head><body><h1>HTTP Status 500 - java.lang.NullPointerException</h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>java.la100 8396 0 8293 100 103 934k 11882 --::- -::- -::- 1012k
      ng.NullPointerException</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
      org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:365)
      org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:233)
      org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:209)
      org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:557)
      org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
      org.jboss.resteasy.core.SynchronousDispatcher.invokePropagateNotFound(SynchronousDispatcher.java:169)
      org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:212)
      org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:59)
      kiwi.core.servlet.KiWiResourceFilter$LMFFilterChain.doFilter(KiWiResourceFilter.java:184)
      kiwi.core.filters.ModuleResourceFilter.doFilter(ModuleResourceFilter.java:161)
      kiwi.core.filters.ModuleResourceFilter$Proxy$$$_WeldClientProxy.doFilter(ModuleResourceFilter$Proxy$$$_WeldClientProxy.java)
      kiwi.core.servlet.KiWiResourceFilter$LMFFilterChain.doFilter(KiWiResourceFilter.java:179)
      kiwi.core.filters.TemplatingFilter.doFilter(TemplatingFilter.java:173)
      kiwi.core.filters.TemplatingFilter$Proxy$$$_WeldClientProxy.doFilter(TemplatingFilter$Proxy$$$_WeldClientProxy.java)
      kiwi.core.servlet.KiWiResourceFilter$LMFFilterChain.doFilter(KiWiResourceFilter.java:179)
      kiwi.core.filters.LMFServerNameFilter.doFilter(LMFServerNameFilter.java:102)
      kiwi.core.servlet.KiWiResourceFilter$LMFFilterChain.doFilter(KiWiResourceFilter.java:179)
      at.newmedialab.lmf.versioning.filter.MementoFilter.doFilter(MementoFilter.java:104)
      at.newmedialab.lmf.versioning.filter.MementoFilter$Proxy$$$_WeldClientProxy.doFilter(MementoFilter$Proxy$$$_WeldClientProxy.java)
      kiwi.core.servlet.KiWiResourceFilter$LMFFilterChain.doFilter(KiWiResourceFilter.java:179)
      kiwi.core.servlet.KiWiResourceFilter$LMFFilterChain.doFilter(KiWiResourceFilter.java:181)
      kiwi.core.servlet.KiWiResourceFilter$LMFFilterChain.doFilter(KiWiResourceFilter.java:181)
      at.newmedialab.lmf.security.filters.LMFAccessControlFilter.doFilter(LMFAccessControlFilter.java:140)
      at.newmedialab.lmf.security.filters.LMFAccessControlFilter$Proxy$$$_WeldClientProxy.doFilter(LMFAccessControlFilter$Proxy$$$_WeldClientProxy.java)
      kiwi.core.servlet.KiWiResourceFilter$LMFFilterChain.doFilter(KiWiResourceFilter.java:179)
      at.newmedialab.lmf.user.filters.LMFAuthenticationFilter.doFilter(LMFAuthenticationFilter.java:161)
      at.newmedialab.lmf.user.filters.LMFAuthenticationFilter$Proxy$$$_WeldClientProxy.doFilter(LMFAuthenticationFilter$Proxy$$$_WeldClientProxy.java)
      kiwi.core.servlet.KiWiResourceFilter$LMFFilterChain.doFilter(KiWiResourceFilter.java:179)
      kiwi.core.servlet.KiWiResourceFilter.doFilter(KiWiResourceFilter.java:130)
      kiwi.core.servlet.LMFOptionsFilter.doFilter(LMFOptionsFilter.java:94)
      kiwi.core.servlet.KiWiPreStartupFilter.doFilter(KiWiPreStartupFilter.java:108)
      </pre></p><p><b>root cause</b> <pre>java.lang.NullPointerException
      kiwi.core.webservices.resource.MetaWebService.putMeta(MetaWebService.java:351)
      kiwi.core.webservices.resource.MetaWebService.putMeta(MetaWebService.java:325)
      kiwi.core.webservices.resource.MetaWebService$Proxy$$$_WeldClientProxy.putMeta(MetaWebService$Proxy$$$_WeldClientProxy.java)
      kiwi.core.webservices.resource.ResourceWebService.put(ResourceWebService.java:519)
      kiwi.core.webservices.resource.ResourceWebService.putLocal(ResourceWebService.java:434)
      kiwi.core.webservices.resource.ResourceWebService$Proxy$$$_WeldClientProxy.putLocal(ResourceWebService$Proxy$$$_WeldClientProxy.java)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      java.lang.reflect.Method.invoke(Method.java:601)
      org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
      org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
      org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
      org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
      org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542)
      org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
      org.jboss.resteasy.core.SynchronousDispatcher.invokePropagateNotFound(SynchronousDispatcher.java:169)
      org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:212)
      org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:59)
      kiwi.core.servlet.KiWiResourceFilter$LMFFilterChain.doFilter(KiWiResourceFilter.java:184)
      kiwi.core.filters.ModuleResourceFilter.doFilter(ModuleResourceFilter.java:161)
      kiwi.core.filters.ModuleResourceFilter$Proxy$$$_WeldClientProxy.doFilter(ModuleResourceFilter$Proxy$$$_WeldClientProxy.java)
      ```

      Attachments

        Issue Links

          Activity

            People

              wikier Sergio Fernández
              szabyg Szaby Grünwald
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: