java.lang.NullPointerException

Sakai JIRA | Ivan Masár | 1 year ago
  1. 0

    After schema migration, trying to log in results in a stacktrace. The reason is that all eperson metadata have NULL values in metadatavalue.metadata_field_id. Newly registered epersons will have metadata_field_id correctly filled in. This must be because DB migration occurs before registries are loaded, so there's no eperson schema (which didn't exist before 5.x) loaded at the time of DB migration. XMLUI: java.lang.NullPointerException at org.dspace.content.DSpaceObjectServiceImpl.match(DSpaceObjectServiceImpl.java:419) at org.dspace.content.DSpaceObjectServiceImpl.getMetadata(DSpaceObjectServiceImpl.java:125) at org.dspace.content.DSpaceObjectServiceImpl.getMetadataFirstValue(DSpaceObjectServiceImpl.java:358) at org.dspace.eperson.EPerson.getFirstName(EPerson.java:241) at org.dspace.eperson.EPerson.getFullName(EPerson.java:217) at org.dspace.eperson.EPerson.equals(EPerson.java:122) at org.dspace.eperson.GroupServiceImpl.allMemberGroups(GroupServiceImpl.java:177) at org.dspace.eperson.GroupServiceImpl.epersonInGroup(GroupServiceImpl.java:411) at org.dspace.eperson.GroupServiceImpl.isMember(GroupServiceImpl.java:159) at org.dspace.authorize.AuthorizeServiceImpl.isAdmin(AuthorizeServiceImpl.java:420) at org.dspace.app.xmlui.utils.AuthenticationUtil.logIn(AuthenticationUtil.java:198) at org.dspace.app.xmlui.utils.AuthenticationUtil.authenticate(AuthenticationUtil.java:129) at org.dspace.app.xmlui.aspect.eperson.AuthenticateAction.act(AuthenticateAction.java:77) at org.apache.cocoon.sitemap.impl.DefaultExecutor.invokeAction(DefaultExecutor.java:55) JSPUI: java.lang.NullPointerException at org.dspace.content.DSpaceObjectServiceImpl.match(DSpaceObjectServiceImpl.java:419) at org.dspace.content.DSpaceObjectServiceImpl.getMetadata(DSpaceObjectServiceImpl.java:125) at org.dspace.content.DSpaceObjectServiceImpl.getMetadataFirstValue(DSpaceObjectServiceImpl.java:358) at org.dspace.eperson.EPerson.getFirstName(EPerson.java:241) at org.dspace.eperson.EPerson.getFullName(EPerson.java:217) at org.dspace.eperson.EPerson.equals(EPerson.java:122) at org.dspace.eperson.GroupServiceImpl.allMemberGroups(GroupServiceImpl.java:177) at org.dspace.eperson.GroupServiceImpl.epersonInGroup(GroupServiceImpl.java:411) at org.dspace.eperson.GroupServiceImpl.isMember(GroupServiceImpl.java:159) at org.dspace.authorize.AuthorizeServiceImpl.isAdmin(AuthorizeServiceImpl.java:420) at org.dspace.app.webui.util.Authenticate.loggedIn(Authenticate.java:310) at org.dspace.app.webui.servlet.PasswordServlet.doDSPost(PasswordServlet.java:79) at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:125) at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:83) at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)

    Sakai JIRA | 1 year ago | Ivan Masár
    java.lang.NullPointerException
  2. 0

    After schema migration, trying to log in results in a stacktrace. The reason is that all eperson metadata have NULL values in metadatavalue.metadata_field_id. Newly registered epersons will have metadata_field_id correctly filled in. This must be because DB migration occurs before registries are loaded, so there's no eperson schema (which didn't exist before 5.x) loaded at the time of DB migration. XMLUI: java.lang.NullPointerException at org.dspace.content.DSpaceObjectServiceImpl.match(DSpaceObjectServiceImpl.java:419) at org.dspace.content.DSpaceObjectServiceImpl.getMetadata(DSpaceObjectServiceImpl.java:125) at org.dspace.content.DSpaceObjectServiceImpl.getMetadataFirstValue(DSpaceObjectServiceImpl.java:358) at org.dspace.eperson.EPerson.getFirstName(EPerson.java:241) at org.dspace.eperson.EPerson.getFullName(EPerson.java:217) at org.dspace.eperson.EPerson.equals(EPerson.java:122) at org.dspace.eperson.GroupServiceImpl.allMemberGroups(GroupServiceImpl.java:177) at org.dspace.eperson.GroupServiceImpl.epersonInGroup(GroupServiceImpl.java:411) at org.dspace.eperson.GroupServiceImpl.isMember(GroupServiceImpl.java:159) at org.dspace.authorize.AuthorizeServiceImpl.isAdmin(AuthorizeServiceImpl.java:420) at org.dspace.app.xmlui.utils.AuthenticationUtil.logIn(AuthenticationUtil.java:198) at org.dspace.app.xmlui.utils.AuthenticationUtil.authenticate(AuthenticationUtil.java:129) at org.dspace.app.xmlui.aspect.eperson.AuthenticateAction.act(AuthenticateAction.java:77) at org.apache.cocoon.sitemap.impl.DefaultExecutor.invokeAction(DefaultExecutor.java:55) JSPUI: java.lang.NullPointerException at org.dspace.content.DSpaceObjectServiceImpl.match(DSpaceObjectServiceImpl.java:419) at org.dspace.content.DSpaceObjectServiceImpl.getMetadata(DSpaceObjectServiceImpl.java:125) at org.dspace.content.DSpaceObjectServiceImpl.getMetadataFirstValue(DSpaceObjectServiceImpl.java:358) at org.dspace.eperson.EPerson.getFirstName(EPerson.java:241) at org.dspace.eperson.EPerson.getFullName(EPerson.java:217) at org.dspace.eperson.EPerson.equals(EPerson.java:122) at org.dspace.eperson.GroupServiceImpl.allMemberGroups(GroupServiceImpl.java:177) at org.dspace.eperson.GroupServiceImpl.epersonInGroup(GroupServiceImpl.java:411) at org.dspace.eperson.GroupServiceImpl.isMember(GroupServiceImpl.java:159) at org.dspace.authorize.AuthorizeServiceImpl.isAdmin(AuthorizeServiceImpl.java:420) at org.dspace.app.webui.util.Authenticate.loggedIn(Authenticate.java:310) at org.dspace.app.webui.servlet.PasswordServlet.doDSPost(PasswordServlet.java:79) at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:125) at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:83) at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)

    Sakai JIRA | 1 year ago | Ivan Masár
    java.lang.NullPointerException
  3. 0

    After migrating a 3.x database to the master branch (6.0), I'm unable to login using password authentication with an existing account (administrator). I get the following stacktrace both in XMLUI and JSPUI. A newly created account can log in just fine. java.lang.NullPointerException at org.dspace.content.DSpaceObjectServiceImpl.match(DSpaceObjectServiceImpl.java:419) at org.dspace.content.DSpaceObjectServiceImpl.getMetadata(DSpaceObjectServiceImpl.java:125) at org.dspace.content.DSpaceObjectServiceImpl.getMetadataFirstValue(DSpaceObjectServiceImpl.java:358) at org.dspace.eperson.EPerson.getFirstName(EPerson.java:241) at org.dspace.eperson.EPerson.getFullName(EPerson.java:217) at org.dspace.eperson.EPerson.equals(EPerson.java:122) at org.dspace.eperson.GroupServiceImpl.allMemberGroups(GroupServiceImpl.java:177) at org.dspace.eperson.GroupServiceImpl.epersonInGroup(GroupServiceImpl.java:411) at org.dspace.eperson.GroupServiceImpl.isMember(GroupServiceImpl.java:159) at org.dspace.authorize.AuthorizeServiceImpl.isAdmin(AuthorizeServiceImpl.java:420) at org.dspace.app.webui.util.Authenticate.loggedIn(Authenticate.java:310) at org.dspace.app.webui.servlet.PasswordServlet.doDSPost(PasswordServlet.java:79) at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:125) at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:83) at javax.servlet.http.HttpServlet.service(HttpServlet.java:646) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.dspace.utils.servlet.DSpaceWebappServletFilter.doFilter(DSpaceWebappServletFilter.java:78) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)

    Sakai JIRA | 1 year ago | Ivan Masár
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    After migrating a 3.x database to the master branch (6.0), I'm unable to login using password authentication with an existing account (administrator). I get the following stacktrace both in XMLUI and JSPUI. A newly created account can log in just fine. java.lang.NullPointerException at org.dspace.content.DSpaceObjectServiceImpl.match(DSpaceObjectServiceImpl.java:419) at org.dspace.content.DSpaceObjectServiceImpl.getMetadata(DSpaceObjectServiceImpl.java:125) at org.dspace.content.DSpaceObjectServiceImpl.getMetadataFirstValue(DSpaceObjectServiceImpl.java:358) at org.dspace.eperson.EPerson.getFirstName(EPerson.java:241) at org.dspace.eperson.EPerson.getFullName(EPerson.java:217) at org.dspace.eperson.EPerson.equals(EPerson.java:122) at org.dspace.eperson.GroupServiceImpl.allMemberGroups(GroupServiceImpl.java:177) at org.dspace.eperson.GroupServiceImpl.epersonInGroup(GroupServiceImpl.java:411) at org.dspace.eperson.GroupServiceImpl.isMember(GroupServiceImpl.java:159) at org.dspace.authorize.AuthorizeServiceImpl.isAdmin(AuthorizeServiceImpl.java:420) at org.dspace.app.webui.util.Authenticate.loggedIn(Authenticate.java:310) at org.dspace.app.webui.servlet.PasswordServlet.doDSPost(PasswordServlet.java:79) at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:125) at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:83) at javax.servlet.http.HttpServlet.service(HttpServlet.java:646) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.dspace.utils.servlet.DSpaceWebappServletFilter.doFilter(DSpaceWebappServletFilter.java:78) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)

    Sakai JIRA | 1 year ago | Ivan Masár
    java.lang.NullPointerException
  6. 0

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.dspace.content.DSpaceObjectServiceImpl.match()
    2. DSpace Kernel :: API and Implementation
      AuthorizeServiceImpl.isAdmin
      1. org.dspace.content.DSpaceObjectServiceImpl.match(DSpaceObjectServiceImpl.java:419)
      2. org.dspace.content.DSpaceObjectServiceImpl.getMetadata(DSpaceObjectServiceImpl.java:125)
      3. org.dspace.content.DSpaceObjectServiceImpl.getMetadataFirstValue(DSpaceObjectServiceImpl.java:358)
      4. org.dspace.eperson.EPerson.getFirstName(EPerson.java:241)
      5. org.dspace.eperson.EPerson.getFullName(EPerson.java:217)
      6. org.dspace.eperson.EPerson.equals(EPerson.java:122)
      7. org.dspace.eperson.GroupServiceImpl.allMemberGroups(GroupServiceImpl.java:177)
      8. org.dspace.eperson.GroupServiceImpl.epersonInGroup(GroupServiceImpl.java:411)
      9. org.dspace.eperson.GroupServiceImpl.isMember(GroupServiceImpl.java:159)
      10. org.dspace.authorize.AuthorizeServiceImpl.isAdmin(AuthorizeServiceImpl.java:420)
      10 frames
    3. org.dspace.app
      DSpaceServlet.doPost
      1. org.dspace.app.webui.util.Authenticate.loggedIn(Authenticate.java:310)
      2. org.dspace.app.webui.servlet.PasswordServlet.doDSPost(PasswordServlet.java:79)
      3. org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:125)
      4. org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:83)
      4 frames
    4. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
      1 frame