java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • If somehow you ended up with a Collection with no title in DSpace 1.5, SWORD will fail to generate a Service Document for anyone with submit access to that untitled Collection. Obviously, most DSpace Collections *should* have a title. However, it is possible to generate a Collection without a title. Either way, the DSpace SWORD Server should probably be smart enough to still generate a valid Service Document if it encounters a Collection without a title. The following error is generated when a collection without a title is encountered: SEVERE: Servlet.service() for servlet servicedocument threw exception java.lang.NullPointerException at org.purl.sword.base.Collection.marshall(Collection.java:367) at org.purl.sword.base.Workspace.marshall(Workspace.java:176) at org.purl.sword.base.Service.marshall(Service.java:299) at org.purl.sword.base.ServiceDocument.marshall(ServiceDocument.java:260) at org.purl.sword.server.ServiceDocumentServlet.doGet(ServiceDocumentServlet.j ava:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio nFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC hain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j ava:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j ava:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12 8) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10 4) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav a:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697 ) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.jav a:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja va:686) at java.lang.Thread.run(Thread.java:619)
    via by Charles Kiplagat,
  • If somehow you ended up with a Collection with no title in DSpace 1.5, SWORD will fail to generate a Service Document for anyone with submit access to that untitled Collection. Obviously, most DSpace Collections *should* have a title. However, it is possible to generate a Collection without a title. Either way, the DSpace SWORD Server should probably be smart enough to still generate a valid Service Document if it encounters a Collection without a title. The following error is generated when a collection without a title is encountered: SEVERE: Servlet.service() for servlet servicedocument threw exception java.lang.NullPointerException at org.purl.sword.base.Collection.marshall(Collection.java:367) at org.purl.sword.base.Workspace.marshall(Workspace.java:176) at org.purl.sword.base.Service.marshall(Service.java:299) at org.purl.sword.base.ServiceDocument.marshall(ServiceDocument.java:260) at org.purl.sword.server.ServiceDocumentServlet.doGet(ServiceDocumentServlet.j ava:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio nFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC hain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j ava:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j ava:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12 8) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10 4) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav a:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697 ) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.jav a:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja va:686) at java.lang.Thread.run(Thread.java:619)
    via by Charles Kiplagat,
    • java.lang.NullPointerException at org.purl.sword.base.Collection.marshall(Collection.java:367) at org.purl.sword.base.Workspace.marshall(Workspace.java:176) at org.purl.sword.base.Service.marshall(Service.java:299)
    No Bugmate found.