cancel
Showing results for 
Search instead for 
Did you mean: 

Remote Alfresco API rivet

rivetlogic
Champ on-the-rise
Champ on-the-rise
RAAr

RAAr is an abstraction layer for remote communication with Alfresco ECM. RAAr provides a simple, Java-based local library that may be used by one or more content rich applications and allows these applications to interface to Alfresco (including multiple Alfresco repositories from the same application). RAAr's lower layers handle communication to remote Alfresco instances over ReSTful calls to Alfresco that get mapped to calls to the Alfresco Foundation Services (AFS) API.

Motivation for RAAr

Certain classes of content rich applications require one or more of the following:

    * Remote full coverage of the AFS API (e.g., version management and version history traversal, dictionary services for model introspection, multi-store access, etc.)
    * Streaming content directly from the application and not from Alfresco (i.e., not using download servlet)
    * SSO support
    * Middle-tier business logic within the application where not all processing is done on Alfresco app server
    * Support for un-marshalling of result sets
RAAr lives here:
http://wiki.rivetlogic.org/display/RAAR/

Feel free to ask questions about RAAr in this thread.

–Sumer
112 REPLIES 112

rivetlogic
Champ on-the-rise
Champ on-the-rise
Yes you can.

–Sumer

toppac
Champ in-the-making
Champ in-the-making
Hi

I am relatively new to Alfresco and Rivetlogic so bare with me. I have a customer content type created that inherits from cm:folder. On my custom type I have a new property that is of type d:content. I am trying to figure out how I go about setting that property with content from a web ui (straight text, don't really need it to be a file). What I have now is this

<type name="my:meeting">
                        <title>Meeting</title>
                        <parent>my:folder</parent>
                        <properties>
                                <property name="my:meetingDate">
                                        <title>Meeting Date</title>
                                        <type>d:datetime</type>
                                        <mandatory enforced="true">true</mandatory>
                                </property>                               
                                <property name="my:agenda">
                                        <type>d:content</type>
                                        <mandatory>false</mandatory>
                                        <!— Index content in the background –>
                                        <index enabled="true">
                                                <atomic>true</atomic>
                                                <stored>false</stored>
                                                <tokenised>true</tokenised>
                                        </index>
                                </property>
                        </properties>
                </type>

contentService.writeContentFromStream(authTicket, ref, name, stream);

where ref is the NodeRef to my node of type meeting, name is the QName of the property agenda and the stream is a String converted into a ByteArrayInputStream.

The problem I am running into is that when I call writeContent I get the following exception

Caused by: java.lang.IllegalArgumentException:
The content mimetype must be set whenever the URL is set:
   content URL: store://2009/8/11/23/35/c2e2257d-8c11-4616-a355-b0f58edb4609.bin
   mimetype: null
        at org.alfresco.service.cmr.repository.ContentData.checkContentUrl(ContentData.java:282)
        at org.alfresco.service.cmr.repository.ContentData.<init>(ContentData.java:198)
        at org.alfresco.repo.content.AbstractContentAccessor.getContentData(AbstractContentAccessor.java:129)
        at org.alfresco.repo.content.RoutingContentService$WriteStreamListener.contentStreamClosed(RoutingContentService.java:589)
        … 39 more

I do not see a way to set the mimetype. I assumed it would guess the mimetype as text/plain.

I have a similar error when I try to read the content using the readContentIntoStream, passing similar information as far as NodeRef and QName. That error breaks in the ContentService getting the ContentReader, it comes back as null.

So I am wondering if my model is invalid or if I am going about reading and writing the content incorrectly. Any help would be appreciated. Thanks

mattek
Champ in-the-making
Champ in-the-making
Hello,

I really apreciade this Alfresco extension that permits remote integration from external aplicactions, that's quite complete and fast respect to standard Alfresco WebServices. Do you plan to make it work with Alfreco 3.2?

rivetlogic
Champ on-the-rise
Champ on-the-rise
Thank you Mattek.

We do plan on doing so, but we've just been very busy.

Here is the JIRA ticket for the update:

http://issues.rivetlogic.com/browse/CMA-43

Please vote for it there.

–Sumer

igarcia
Champ in-the-making
Champ in-the-making
Hi,

I've been using Alfresco Raar version 1.9.0 with Alfresco 3.0.0 (Stable 1526). It's been really a helpfull API and has make my life easier.
But now I'm stuck trying to resolve an error getting the assined workflow tasks of an user.

It seems that cma has some problems parsing the response of Alfreco.

My Stacktrace is as follows:

java.io.EOFException
   at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
   at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
   at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
   at java.io.ObjectInputStream.<init>(Unknown Source)
   at com.rivetlogic.crypto.Base64.decodeToObject(Base64.java:1044)
   at com.rivetlogic.core.cma.mapping.handler.SerializableMappingHandler.convertUponSet(SerializableMappingHandler.java:64)
   at org.exolab.castor.mapping.GeneralizedFieldHandler.setValue(GeneralizedFieldHandler.java:274)
   at org.exolab.castor.mapping.loader.FieldHandlerImpl.setValue(FieldHandlerImpl.java:474)
   at org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:1068)
   at org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:1159)
   at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:585)
   at org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java:647)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1008)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1469)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
   at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
   at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
   at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
   at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:715)
   at com.rivetlogic.core.cma.mapping.impl.CmaCastorUnmarshaller.unmarshal(CmaCastorUnmarshaller.java:55)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.processResponse(RestExecuterImpl.java:378)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.processResponse(RestExecuterImpl.java:306)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.execute(RestExecuterImpl.java:113)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.execute(RestExecuterImpl.java:95)
   at com.rivetlogic.core.cma.impl.WorkflowServiceImpl.execute(WorkflowServiceImpl.java:563)
   at com.rivetlogic.core.cma.impl.WorkflowServiceImpl.getAssignedTasks(WorkflowServiceImpl.java:260)
   at com.cpa.spi.alfresco.service.util.WorkflowServiceUtil.getAssignedTasks(WorkflowServiceUtil.java:38)
   at com.cpa.spi.alfresco.service.util.WorkflowServiceUtil.main(WorkflowServiceUtil.java:94)
java.io.StreamCorruptedException: invalid stream header
   at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
   at java.io.ObjectInputStream.<init>(Unknown Source)
   at com.rivetlogic.crypto.Base64.decodeToObject(Base64.java:1044)
   at com.rivetlogic.core.cma.mapping.handler.SerializableMappingHandler.convertUponSet(SerializableMappingHandler.java:64)
   at org.exolab.castor.mapping.GeneralizedFieldHandler.setValue(GeneralizedFieldHandler.java:274)
   at org.exolab.castor.mapping.loader.FieldHandlerImpl.setValue(FieldHandlerImpl.java:474)
   at org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:1068)
   at org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:1159)
   at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:585)
   at org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java:647)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1008)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1469)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
   at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
   at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
   at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
   at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:715)
   at com.rivetlogic.core.cma.mapping.impl.CmaCastorUnmarshaller.unmarshal(CmaCastorUnmarshaller.java:55)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.processResponse(RestExecuterImpl.java:378)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.processResponse(RestExecuterImpl.java:306)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.execute(RestExecuterImpl.java:113)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.execute(RestExecuterImpl.java:95)
   at com.rivetlogic.core.cma.impl.WorkflowServiceImpl.execute(WorkflowServiceImpl.java:563)
   at com.rivetlogic.core.cma.impl.WorkflowServiceImpl.getAssignedTasks(WorkflowServiceImpl.java:260)
   at com.cpa.spi.alfresco.service.util.WorkflowServiceUtil.getAssignedTasks(WorkflowServiceUtil.java:38)
   at com.cpa.spi.alfresco.service.util.WorkflowServiceUtil.main(WorkflowServiceUtil.java:94)
19/11/2009 17:07:49 org.exolab.castor.xml.UnmarshalHandler endElement
INFO: Ignoring id no descriptor was found
java.io.StreamCorruptedException: invalid stream header
   at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
   at java.io.ObjectInputStream.<init>(Unknown Source)
   at com.rivetlogic.crypto.Base64.decodeToObject(Base64.java:1044)
   at com.rivetlogic.core.cma.mapping.handler.SerializableMappingHandler.convertUponSet(SerializableMappingHandler.java:64)
   at org.exolab.castor.mapping.GeneralizedFieldHandler.setValue(GeneralizedFieldHandler.java:274)
   at org.exolab.castor.mapping.loader.FieldHandlerImpl.setValue(FieldHandlerImpl.java:474)
   at org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:1068)
   at org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:1159)
   at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:585)
   at org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java:647)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1008)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1469)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
   at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
   at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
   at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
   at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:715)
   at com.rivetlogic.core.cma.mapping.impl.CmaCastorUnmarshaller.unmarshal(CmaCastorUnmarshaller.java:55)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.processResponse(RestExecuterImpl.java:378)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.processResponse(RestExecuterImpl.java:306)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.execute(RestExecuterImpl.java:113)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.execute(RestExecuterImpl.java:95)
   at com.rivetlogic.core.cma.impl.WorkflowServiceImpl.execute(WorkflowServiceImpl.java:563)
   at com.rivetlogic.core.cma.impl.WorkflowServiceImpl.getAssignedTasks(WorkflowServiceImpl.java:260)
   at com.cpa.spi.alfresco.service.util.WorkflowServiceUtil.getAssignedTasks(WorkflowServiceUtil.java:38)
   at com.cpa.spi.alfresco.service.util.WorkflowServiceUtil.main(WorkflowServiceUtil.java:94)
java.io.EOFException
   at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
   at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
   at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
   at java.io.ObjectInputStream.<init>(Unknown Source)
   at com.rivetlogic.crypto.Base64.decodeToObject(Base64.java:1044)
   at com.rivetlogic.core.cma.mapping.handler.SerializableMappingHandler.convertUponSet(SerializableMappingHandler.java:64)
   at org.exolab.castor.mapping.GeneralizedFieldHandler.setValue(GeneralizedFieldHandler.java:274)
   at org.exolab.castor.mapping.loader.FieldHandlerImpl.setValue(FieldHandlerImpl.java:474)
   at org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:1068)
   at org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:1159)
   at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:585)
   at org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java:647)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1008)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1469)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
   at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
   at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
   at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
   at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:715)
   at com.rivetlogic.core.cma.mapping.impl.CmaCastorUnmarshaller.unmarshal(CmaCastorUnmarshaller.java:55)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.processResponse(RestExecuterImpl.java:378)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.processResponse(RestExecuterImpl.java:306)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.execute(RestExecuterImpl.java:113)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.execute(RestExecuterImpl.java:95)
   at com.rivetlogic.core.cma.impl.WorkflowServiceImpl.execute(WorkflowServiceImpl.java:563)
   at com.rivetlogic.core.cma.impl.WorkflowServiceImpl.getAssignedTasks(WorkflowServiceImpl.java:260)
   at com.cpa.spi.alfresco.service.util.WorkflowServiceUtil.getAssignedTasks(WorkflowServiceUtil.java:38)
   at com.cpa.spi.alfresco.service.util.WorkflowServiceUtil.main(WorkflowServiceUtil.java:94)
Bad Base64 input character at 6: 95(decimal)

I've also tried cma 1.11.0 and still getting the same error.
All the other methods of workflowService are working ok (getDefinitions, getActiveWorkflows,..) and  all the other cma services (nodeservice, personService, ..) are working fine.
Could it be caused by Alfresco? shoud I change to 3.2?

Has anyone faced some similar problem?

igarcia
Champ in-the-making
Champ in-the-making
Hello,

After many hours of debugging I have been able to get the getAssignedTasks funtion working.
Cma-impl was trying to base64 decode the "value" property of the properties of workflowTaskDefinition as it is indicated by the xml : cma-impl/src/castor/mapping/workflowservice.gettasks.mapping.xml (line 43) :

      
      <field name="properties" type="org.exolab.castor.mapping.MapItem" collection="map" set-method="addItemtoProperties">
         <bind-xml name="property" location="properties">
            <class name="org.exolab.castor.mapping.MapItem">
               <field name="key" type="java.lang.String"
                   handler="com.rivetlogic.core.cma.mapping.handler.QNameMappingHandler">
                  <bind-xml name="propertyName" node="element"/>
               </field>
               <field name="value" type="java.lang.String"
                         ——-> handler="com.rivetlogic.core.cma.mapping.handler.SerializableMappingHandler">   <———
                  <bind-xml name="propertyValue" node="element"/>
               </field>
            </class>
         </bind-xml>
      </field>

So after deleting the handler property in the xml, the function is working and the WorkflowTask object is created properly.
I do not really understand why the mapping was not working, but this change solved my problem.

My properties section of workflowservice.gettasks.mapping.xml now is :
      
      <field name="properties" type="org.exolab.castor.mapping.MapItem" collection="map" set-method="addItemtoProperties">
         <bind-xml name="property" location="properties">
            <class name="org.exolab.castor.mapping.MapItem">
               <field name="key" type="java.lang.String"
                   handler="com.rivetlogic.core.cma.mapping.handler.QNameMappingHandler">
                  <bind-xml name="propertyName" node="element"/>
               </field>
               <field name="value" type="java.lang.String">
                  <bind-xml name="propertyValue" node="element"/>
               </field>
            </class>
         </bind-xml>
      </field>

mahdi
Champ in-the-making
Champ in-the-making
Hi

I'm trying to use this api to create new categories.
i used the Raar example and introduced the method  createCategory() but i have some errors
here is my code


package org.alfresco.categorie;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Vector;

import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.namespace.QName;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.rivetlogic.core.cma.api.SearchService;
import com.rivetlogic.core.cma.api.SecurityService;
import com.rivetlogic.core.cma.exception.AuthenticationFailure;
import com.rivetlogic.core.cma.exception.AuthorityExistsException;
import com.rivetlogic.core.cma.exception.CmaRuntimeException;
import com.rivetlogic.core.cma.exception.InvalidTicketException;
import com.rivetlogic.core.cma.impl.AuthenticationServiceImpl;
import com.rivetlogic.core.cma.impl.ClassificationServiceImpl;
import com.rivetlogic.core.cma.impl.ContentServiceImpl;
import com.rivetlogic.core.cma.impl.PeopleServiceImpl;
import com.rivetlogic.core.cma.impl.SearchServiceImpl;
import com.rivetlogic.core.cma.repo.Node;
import com.rivetlogic.core.cma.repo.SortDefinition;
import com.rivetlogic.core.cma.repo.Ticket;

import org.exolab.castor.mapping.Mapping;

public class mainClass {

   private static final String APPLICATION_CONTEXT = "classpath*:core/cma-core-context.xml";


   public static void main(String[] args) {
      ConfigurableApplicationContext configurationApplicationContext = null;
      AuthenticationServiceImpl authenticationService = null;
      SearchServiceImpl searchService = null;
   
      ClassificationServiceImpl classificationService;
      Ticket ticket = null;
   
      QName name = QName.createQName("{http://www.alfresco.org/model/content/1.0}name");
      QName created = QName.createQName("{http://www.alfresco.org/model/content/1.0}created");

      List<QName> properties = new Vector<QName>();
      properties.add(name);
      properties.add(created);

      List<String> requiredPermissions = new ArrayList<String>(4);
      requiredPermissions.add(SecurityService.READ_CONTENT);
      requiredPermissions.add(SecurityService.WRITE_CONTENT);
      requiredPermissions.add(SecurityService.WRITE_PROPERTIES);
      requiredPermissions.add(SecurityService.DELETE);

      QName nodeTypeQName = QName.createQName("{http://www.alfresco.org/model/content/1.0}content");

      String spacesStore = "workspace://SpacesStore";
      String repositoryUri = "http://192.168.1.12:8080/alfresco/service";
      String password = "admin";
      String userid= "admin";
   
      String catName ="cat_test";
   
   

      configurationApplicationContext = new ClassPathXmlApplicationContext(APPLICATION_CONTEXT);

      authenticationService = (AuthenticationServiceImpl) configurationApplicationContext.getBean("authenticationService");
      searchService = (SearchServiceImpl) configurationApplicationContext.getBean("searchService");
      
      classificationService=(ClassificationServiceImpl) configurationApplicationContext.getBean("classificationService");
      
      
      List<SortDefinition> sortDefinitions = new Vector<SortDefinition>();
      sortDefinitions.add(new SortDefinition(SortDefinition.SortType.FIELD, "@{http://www.alfresco.org/model/content/1.0}name", false));

      try {
         // Validate userid and password
         ticket = authenticationService.authenticate(repositoryUri, userid, password.toCharArray());

         
         System.out.println("rrr");
         //classificationService.createClassification(ticket, storeRef, aspectName, name)
         List<Node> nodes = searchService.query(ticket, new StoreRef(spacesStore), SearchService.QueryLanguage.lucene, "@cm\\:name:\"config\"",
               properties, true, true, true, true, requiredPermissions, 100, sortDefinitions);
         System.out.println(nodes);

      if (nodes != null) {
            // file found
            for (Node node: nodes) {
               System.out.println("node: " + node);
               System.out.println("name" +node.getProperties());

            
      NodeRef nodeRef = node.getNodeRef();
         
      classificationService.createCategory(ticket, nodeRef, catName);
            }
         }
         

      } catch (AuthenticationFailure e) {
         e.printStackTrace();
      } catch (InvalidTicketException e) {
         e.printStackTrace();
      } catch (CmaRuntimeException e) {
         e.printStackTrace();
   
      }      
   }

}



and here the execution result



rrr
[workspace://SpacesStore/0d25d117-b166-4fd2-8caf-a29114af29d4, workspace://SpacesStore/042e0ad4-1075-4a4c-9d8b-0015518a761e]
node: workspace://SpacesStore/0d25d117-b166-4fd2-8caf-a29114af29d4
name{{http://www.alfresco.org/model/content/1.0}name=config-commentaire.txt, {http://www.alfresco.org/model/content/1.0}created=Tue Nov 17 08:48:06 CET 2009}
com.rivetlogic.core.cma.exception.CmaRuntimeException: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.alfresco.repo.node.integrity.IntegrityRecord
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.execute(RestExecuterImpl.java:115)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.execute(RestExecuterImpl.java:95)
   at com.rivetlogic.core.cma.impl.ClassificationServiceImpl.execute(ClassificationServiceImpl.java:276)
   at com.rivetlogic.core.cma.impl.ClassificationServiceImpl.createCategory(ClassificationServiceImpl.java:80)
   at org.alfresco.categorie.mainClass.main(mainClass.java:111)
Caused by: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.alfresco.repo.node.integrity.IntegrityRecord
   at java.io.ObjectInputStream.readObject0(Unknown Source)
   at java.io.ObjectInputStream.readObject(Unknown Source)
   at java.util.ArrayList.readObject(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
   at java.io.ObjectInputStream.readSerialData(Unknown Source)
   at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
   at java.io.ObjectInputStream.readObject0(Unknown Source)
   at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
   at java.io.ObjectInputStream.readSerialData(Unknown Source)
   at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
   at java.io.ObjectInputStream.readObject0(Unknown Source)
   at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
   at java.io.ObjectInputStream.readSerialData(Unknown Source)
   at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
   at java.io.ObjectInputStream.readObject0(Unknown Source)
   at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
   at java.io.ObjectInputStream.readSerialData(Unknown Source)
   at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
   at java.io.ObjectInputStream.readObject0(Unknown Source)
   at java.io.ObjectInputStream.readObject(Unknown Source)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.deserializeObject(RestExecuterImpl.java:621)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.processResponse(RestExecuterImpl.java:385)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.processResponse(RestExecuterImpl.java:306)
   at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.execute(RestExecuterImpl.java:113)
   … 4 more
Caused by: java.io.NotSerializableException: org.alfresco.repo.node.integrity.IntegrityRecord
   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
   at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
   at java.util.ArrayList.writeObject(ArrayList.java:570)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
   at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
   at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
   at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
   at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
   at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
   at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
   at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:416)
   at java.lang.Throwable.writeObject(Throwable.java:648)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
   at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
   at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
   at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
   at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:416)
   at java.lang.Throwable.writeObject(Throwable.java:648)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
   at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
   at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
   at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
   at com.rivetlogic.core.cma.alfresco.webscripts.bean.AbstractCmaWebScript.sendSerializable(AbstractCmaWebScript.java:441)
   at com.rivetlogic.core.cma.alfresco.webscripts.bean.AbstractCmaWebScript.sendError(AbstractCmaWebScript.java:417)
   at com.rivetlogic.core.cma.alfresco.webscripts.bean.AbstractCmaWebScript.execute(AbstractCmaWebScript.java:160)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:305)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:390)
   at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:238)
   at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:261)
   at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:139)
   at org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:116)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Thread.java:619)




can you show me what's wrong in my code or give me an example to create categories?

thanks

johnpneal
Champ in-the-making
Champ in-the-making
Hi:

I am brand new to Alfresco and Rivet, we are starting a project from scratch and trying to determine the best way to proceed.  Can someone point me to a developers guide for the Rivet Logic Remote API or some sort of starting point where I can figure out how to get going?  This is greatly appreciated.

John

rivetlogic
Champ on-the-rise
Champ on-the-rise
Support for Alfresco 3.2.r Community, 3.2.0 Enterprise, and 3.1.0 Enterprise is now ready. You can download it here: http://raar.rivetlogic.com

–sumer

rivetlogic
Champ on-the-rise
Champ on-the-rise
Support for Alfresco 3.3.0 Community, and 3.3.0 Enterprise is now ready. You can download it here: http://raar.rivetlogic.com

–sumer