java.lang.NullPointerException: null

Sakai JIRA | Ben Pennell | 4 years 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

    According to the documentation, supplying purgeRelationship with an "object" of null should result in purging all relations which match http://www.fedora-commons.org/documentation/3.0/userdocs/server/webservices/apim/index.html#methods.purgeRelationship However, when I supply it with null, I get the following: INFO 2012-11-30 11:11:59.763 [ajp-bio-8009-exec-2] (DefaultManagement) Completed purgeRelationship(pid: uuid:4ecc25e9-cc02-4191-8589-ffbaecac258f, relationship: http://cdr.unc.edu/definitions/1.0/bas e-model.xml#isPublished, object: null, isLiteral: true, datatype: null) ERROR 2012-11-30 11:11:59.764 [ajp-bio-8009-exec-2] (FedoraAPIMBindingSOAPHTTPImpl) Error purging relationships java.lang.IllegalArgumentException: Null "newLexicalForm" parameter at org.jrdf.graph.AbstractLiteral.<init>(AbstractLiteral.java:109) [mulgara-core-2.1.11.jar:na] at org.fcrepo.common.rdf.SimpleLiteral.<init>(SimpleLiteral.java:22) [fcrepo-common-3.5.jar:na] at org.fcrepo.server.storage.SimpleDOWriter.createTriple(SimpleDOWriter.java:484) [fcrepo-server-3.5.jar:na] ... Setting object to not be a literal also fails, although slightly differently: INFO 2012-11-30 11:07:46.931 [ajp-bio-8009-exec-6] (DefaultManagement) Completed purgeRelationship(pid: uuid:4ecc25e9-cc02-4191-8589-ffbaecac258f, relationship: http://cdr.unc.edu/definitions/1.0/base-model.xml#isPublished, object: null, isLiteral: false, datatype: null) ERROR 2012-11-30 11:07:46.933 [ajp-bio-8009-exec-6] (FedoraAPIMBindingSOAPHTTPImpl) Error purging relationships java.lang.NullPointerException: null at java.net.URI$Parser.parse(URI.java:3004) [na:1.6.0_37] at java.net.URI.<init>(URI.java:577) [na:1.6.0_37] at org.fcrepo.server.storage.SimpleDOWriter.createTriple(SimpleDOWriter.java:489) [fcrepo-server-3.5.jar:na] at org.fcrepo.server.storage.SimpleDOWriter.purgeRelationship(SimpleDOWriter.java:406) [fcrepo-server-3.5.jar:na] at org.fcrepo.server.storage.SimpleDOWriter.purgeRelationship(SimpleDOWriter.java:391) [fcrepo-server-3.5.jar:na] at org.fcrepo.server.management.DefaultManagement.purgeRelationship(DefaultManagement.java:1755) [fcrepo-server-3.5.jar:na] ... Looking at the source for SimpleDOWriter, there does not seem to be any case to check for the "object" being set to null, and AbstractLiteral doesn't seem to care for that: https://github.com/fcrepo/fcrepo/blob/master/fcrepo-server/src/main/java/org/fcrepo/server/storage/SimpleDOWriter.java#L474 The matching method, FilteredTripleIterator.matches(), also doesn't allow for a positive match when the searching for a null from what I can tell, so if it weren't excepting out earlier it would probably still not purge any relations: https://github.com/fcrepo/fcrepo/blob/master/fcrepo-server/src/main/java/org/fcrepo/server/utilities/FilteredTripleIterator.java#L99 Our setup is with an external mulgara triple store, running 3.6.1 at the moment

    Sakai JIRA | 4 years ago | Ben Pennell
    java.lang.NullPointerException: null
  2. 0

    According to the documentation, supplying purgeRelationship with an "object" of null should result in purging all relations which match http://www.fedora-commons.org/documentation/3.0/userdocs/server/webservices/apim/index.html#methods.purgeRelationship However, when I supply it with null, I get the following: INFO 2012-11-30 11:11:59.763 [ajp-bio-8009-exec-2] (DefaultManagement) Completed purgeRelationship(pid: uuid:4ecc25e9-cc02-4191-8589-ffbaecac258f, relationship: http://cdr.unc.edu/definitions/1.0/bas e-model.xml#isPublished, object: null, isLiteral: true, datatype: null) ERROR 2012-11-30 11:11:59.764 [ajp-bio-8009-exec-2] (FedoraAPIMBindingSOAPHTTPImpl) Error purging relationships java.lang.IllegalArgumentException: Null "newLexicalForm" parameter at org.jrdf.graph.AbstractLiteral.<init>(AbstractLiteral.java:109) [mulgara-core-2.1.11.jar:na] at org.fcrepo.common.rdf.SimpleLiteral.<init>(SimpleLiteral.java:22) [fcrepo-common-3.5.jar:na] at org.fcrepo.server.storage.SimpleDOWriter.createTriple(SimpleDOWriter.java:484) [fcrepo-server-3.5.jar:na] ... Setting object to not be a literal also fails, although slightly differently: INFO 2012-11-30 11:07:46.931 [ajp-bio-8009-exec-6] (DefaultManagement) Completed purgeRelationship(pid: uuid:4ecc25e9-cc02-4191-8589-ffbaecac258f, relationship: http://cdr.unc.edu/definitions/1.0/base-model.xml#isPublished, object: null, isLiteral: false, datatype: null) ERROR 2012-11-30 11:07:46.933 [ajp-bio-8009-exec-6] (FedoraAPIMBindingSOAPHTTPImpl) Error purging relationships java.lang.NullPointerException: null at java.net.URI$Parser.parse(URI.java:3004) [na:1.6.0_37] at java.net.URI.<init>(URI.java:577) [na:1.6.0_37] at org.fcrepo.server.storage.SimpleDOWriter.createTriple(SimpleDOWriter.java:489) [fcrepo-server-3.5.jar:na] at org.fcrepo.server.storage.SimpleDOWriter.purgeRelationship(SimpleDOWriter.java:406) [fcrepo-server-3.5.jar:na] at org.fcrepo.server.storage.SimpleDOWriter.purgeRelationship(SimpleDOWriter.java:391) [fcrepo-server-3.5.jar:na] at org.fcrepo.server.management.DefaultManagement.purgeRelationship(DefaultManagement.java:1755) [fcrepo-server-3.5.jar:na] ... Looking at the source for SimpleDOWriter, there does not seem to be any case to check for the "object" being set to null, and AbstractLiteral doesn't seem to care for that: https://github.com/fcrepo/fcrepo/blob/master/fcrepo-server/src/main/java/org/fcrepo/server/storage/SimpleDOWriter.java#L474 The matching method, FilteredTripleIterator.matches(), also doesn't allow for a positive match when the searching for a null from what I can tell, so if it weren't excepting out earlier it would probably still not purge any relations: https://github.com/fcrepo/fcrepo/blob/master/fcrepo-server/src/main/java/org/fcrepo/server/utilities/FilteredTripleIterator.java#L99 Our setup is with an external mulgara triple store, running 3.6.1 at the moment

    Sakai JIRA | 4 years ago | Ben Pennell
    java.lang.NullPointerException: null
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Re: Using the Airavata API

    airavata-users | 4 years ago | Raminderjeet Singh
    java.lang.NullPointerException

  1. Alireza Mohamadi 1012 times, last 5 months ago
3 unregistered visitors
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

    null

    at java.net.URI$Parser.parse()
  2. Java RT
    URI.<init>
    1. java.net.URI$Parser.parse(URI.java:3004)[na:1.6.0_37]
    2. java.net.URI.<init>(URI.java:577)[na:1.6.0_37]
    2 frames
  3. org.fcrepo.server
    DefaultManagement.purgeRelationship
    1. org.fcrepo.server.storage.SimpleDOWriter.createTriple(SimpleDOWriter.java:489)[fcrepo-server-3.5.jar:na]
    2. org.fcrepo.server.storage.SimpleDOWriter.purgeRelationship(SimpleDOWriter.java:406)[fcrepo-server-3.5.jar:na]
    3. org.fcrepo.server.storage.SimpleDOWriter.purgeRelationship(SimpleDOWriter.java:391)[fcrepo-server-3.5.jar:na]
    4. org.fcrepo.server.management.DefaultManagement.purgeRelationship(DefaultManagement.java:1755)[fcrepo-server-3.5.jar:na]
    4 frames