java.lang.NullPointerException

Sakai JIRA | Ondřej Košarko | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I'm seeing a NPE when I try to harvest a collection with current master (008ad12). Java stacktrace: java.lang.NullPointerException at org.dspace.core.AbstractHibernateDAO.getHibernateSession(AbstractHibernateDAO.java:48) at org.dspace.core.AbstractHibernateDAO.findByID(AbstractHibernateDAO.java:75) at org.dspace.content.CollectionServiceImpl.find(CollectionServiceImpl.java:243) at org.dspace.content.CollectionServiceImpl.find(CollectionServiceImpl.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155) ... The actual error seems to be that the instance I am harvesting from has some extra schemas. 2016-09-30 08:44:34,476 ERROR org.dspace.harvest.OAIHarvester @ Error occurred while generating an OAI response: The 'xxx' schema has not been defined in this DSpace instance. null org.dspace.content.crosswalk.CrosswalkException: The 'xxx' schema has not been defined in this DSpace instance. at org.dspace.content.crosswalk.CrosswalkMetadataValidator.checkMetadata(CrosswalkMetadataValidator.java:81) at org.dspace.content.crosswalk.DIMIngestionCrosswalk.ingest(DIMIngestionCrosswalk.java:73) at org.dspace.harvest.OAIHarvester.processRecord(OAIHarvester.java:547) at org.dspace.harvest.OAIHarvester.runHarvest(OAIHarvester.java:367) This is kind of not surprising...otherwise harvesting DIM metadata format would mean potentially creating missing schemas/elements. That's not supposed to be happening, or is it?

    Sakai JIRA | 8 months ago | Ondřej Košarko
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.dspace.core.AbstractHibernateDAO.getHibernateSession()
    2. DSpace Kernel :: API and Implementation
      CollectionServiceImpl.find
      1. org.dspace.core.AbstractHibernateDAO.getHibernateSession(AbstractHibernateDAO.java:48)
      2. org.dspace.core.AbstractHibernateDAO.findByID(AbstractHibernateDAO.java:75)
      3. org.dspace.content.CollectionServiceImpl.find(CollectionServiceImpl.java:243)
      4. org.dspace.content.CollectionServiceImpl.find(CollectionServiceImpl.java:43)
      4 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    4. Rhino
      MemberBox.invoke
      1. org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)
      1 frame