java.lang.IllegalArgumentException: Null "newLexicalForm" parameter

Sakai JIRA | Ben Pennell | 4 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded 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.IllegalArgumentException: Null "newLexicalForm" parameter
  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.IllegalArgumentException: Null "newLexicalForm" parameter

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Null "newLexicalForm" parameter

      at org.jrdf.graph.AbstractLiteral.<init>()
    2. org.jrdf.graph
      AbstractLiteral.<init>
      1. org.jrdf.graph.AbstractLiteral.<init>(AbstractLiteral.java:109)[mulgara-core-2.1.11.jar:na]
      1 frame
    3. org.fcrepo.common
      SimpleLiteral.<init>
      1. org.fcrepo.common.rdf.SimpleLiteral.<init>(SimpleLiteral.java:22)[fcrepo-common-3.5.jar:na]
      1 frame
    4. org.fcrepo.server
      SimpleDOWriter.createTriple
      1. org.fcrepo.server.storage.SimpleDOWriter.createTriple(SimpleDOWriter.java:484)[fcrepo-server-3.5.jar:na]
      1 frame