fedora.server.errors.StorageDeviceException: Unexpected error from SQL database while registering object: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Something ending in a slash \')' at line 1

Sakai JIRA | Chris Wilper | 6 years ago
  1. 0

    Reported by Nicholas W on fcrepo-user list: Just discovered this by accident. I am not sure if this is a known problem or not. In Fedora 3.3 If a label ends in a \ (blackslash) the ingest of an object fails with an SQL error. Ingesting this example: <?xml version="1.0" encoding="UTF-8"?> <foxml:digitalObject xmlns:foxml="info:fedora/fedora-system:def/foxml#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1" PID="changeme:9688" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd"> <foxml:objectProperties> <foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active" /> <foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Something ending in a slash \" /> </foxml:objectProperties> <foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true"> <foxml:datastreamVersion ID="DC.0" LABEL="DC" MIMETYPE="text/xml;charset=utf-8"> <foxml:xmlContent><oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:title xml:lang="en">DC Title</dc:title> <dc:type>http://purl.org/vocab/frbr/core#Expression</dc:type><dc:identifier>changeme:9688</dc:identifier></oai_dc:dc></foxml:xmlContent> </foxml:datastreamVersion> </foxml:datastream> </foxml:digitalObject> I get the following error: Object ingest failed due to: Error (500): <pre>javax.ws.rs.WebApplicationException: fedora.server.errors.StorageDeviceException: Unexpected error from SQL database while registering object: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Something ending in a slash \')' at line 1 at fedora.server.rest.BaseRestResource.handleException(BaseRestResource.java:162) at fedora.server.rest.FedoraObjectResource.createObject(FedoraObjectResource...

    Sakai JIRA | 6 years ago | Chris Wilper
    fedora.server.errors.StorageDeviceException: Unexpected error from SQL database while registering object: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Something ending in a slash \')' at line 1
  2. 0

    Reported by Nicholas W on fcrepo-user list: Just discovered this by accident. I am not sure if this is a known problem or not. In Fedora 3.3 If a label ends in a \ (blackslash) the ingest of an object fails with an SQL error. Ingesting this example: <?xml version="1.0" encoding="UTF-8"?> <foxml:digitalObject xmlns:foxml="info:fedora/fedora-system:def/foxml#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1" PID="changeme:9688" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd"> <foxml:objectProperties> <foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active" /> <foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Something ending in a slash \" /> </foxml:objectProperties> <foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true"> <foxml:datastreamVersion ID="DC.0" LABEL="DC" MIMETYPE="text/xml;charset=utf-8"> <foxml:xmlContent><oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:title xml:lang="en">DC Title</dc:title> <dc:type>http://purl.org/vocab/frbr/core#Expression</dc:type><dc:identifier>changeme:9688</dc:identifier></oai_dc:dc></foxml:xmlContent> </foxml:datastreamVersion> </foxml:datastream> </foxml:digitalObject> I get the following error: Object ingest failed due to: Error (500): <pre>javax.ws.rs.WebApplicationException: fedora.server.errors.StorageDeviceException: Unexpected error from SQL database while registering object: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Something ending in a slash \')' at line 1 at fedora.server.rest.BaseRestResource.handleException(BaseRestResource.java:162) at fedora.server.rest.FedoraObjectResource.createObject(FedoraObjectResource...

    Sakai JIRA | 6 years ago | Chris Wilper
    fedora.server.errors.StorageDeviceException: Unexpected error from SQL database while registering object: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Something ending in a slash \')' at line 1

    Root Cause Analysis

    1. fedora.server.errors.StorageDeviceException

      Unexpected error from SQL database while registering object: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Something ending in a slash \')' at line 1

      at fedora.server.rest.BaseRestResource.handleException()
    2. fedora.server.rest
      BaseRestResource.handleException
      1. fedora.server.rest.BaseRestResource.handleException(BaseRestResource.java:162)
      1 frame