Skip to content

Null Exception when I set a_storage_type to some other location #15

@jbleeok

Description

@jbleeok
    RestObject tempCabinet = client.getCabinet(ms_link); // "Temp");
    Map<String, Object> o = new HashMap<String, Object>();

            o.put("object_name", ms_filename);
            o.put("u_doc_flag","9");
            o.put("a_content_type", contentFormat);
            o.put("a_storage_type", ms_storage); // this line make null exception in uploadDistributedContent

    RestObject newObjectWithoutContent = new PlainRestObject("dm_document", o);
    
    RestObject created =
                client.createDocument(tempCabinet, (RestObject)newObjectWithoutContent, (Object)null, null,
                    "require-dc-write", "true", 
                    "format", "crtext", 
                    "content-length", "" + target_file.length(), 
                    "network-location", netloc,
                );
    String s = created.getHref(LinkRelation.DISTRIBUTED_UPLOAD);
    client.uploadDistributedContent(created.getHref(LinkRelation.DISTRIBUTED_UPLOAD), new FileInputStream(target_file));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions