AnsweredAssumed Answered

Error while uploading using WebServices API

Question asked by chapeaurouge on Oct 7, 2008
Latest reply on Oct 7, 2008 by chapeaurouge
Hello all,

I have custom extensions, and I am using the webservices API to upload docs. This all worked well with 2.9B. I have now deployed the 3.0B war file, and copied over my custom extensions, which load without errors.

I have downloaded the relevant updated API to 3.0B to be up-to-date.

I get the following error when trying to upload through the API (I have no problem when doing it manually, all with custom aspects and the like). The user is owner of the space where I am trying to upload and create my documents.

Error writing content to repository server
java.lang.RuntimeException: Error writing content to repository server
   at org.alfresco.webservice.util.ContentUtils.putContent(
   at org.alfresco.webservice.util.ContentUtils.putContent(
   at xx.xx.xx.print2file.Uploader.create(
   at xx.xx.xx.print2file.ArcParser.main(
Caused by: java.lang.RuntimeException: Content could not be uploaded because user does not have sufficient priveledges.
   at org.alfresco.webservice.util.ContentUtils.putContent(
   … 3 more

After setting up the specific type and aspects, the code actually doing the uploading is the following:

    private void createCML(CMLCreate id) throws RepositoryFault, java.rmi.RemoteException {
        CML cml = new CML();
        cml.setCreate(new CMLCreate[] {id});
        UpdateResult[] f = WebServiceFactory.getRepositoryService().update(cml);

Don't really know where to look for that one..

Pointers greatly appreciated.

Thank you.