AnsweredAssumed Answered

error in cmis

Question asked by priyankasoni on Jul 25, 2013
Latest reply on Jul 29, 2013 by jpotts
hi  i write a application in java and calling that java class from a jsp page like

vaultsafe folder=new vaultsafe();
folder.create_folder("jeely","jellyfish",null);

public void create_folder(String Name, String description,String title)
   {
      Map<String, String> parameter = new HashMap<String, String>();

      // user credentials
      parameter.put(SessionParameter.USER, "admin");
      parameter.put(SessionParameter.PASSWORD, "admin");

      // connection settings
      parameter.put(SessionParameter.ATOMPUB_URL, "http://localhost:8080/alfresco/cmisatom");
      parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());

      // set the alfresco object factory
      parameter.put(SessionParameter.OBJECT_FACTORY_CLASS, "org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl");

      // create session
      SessionFactory factory = SessionFactoryImpl.newInstance();
      Session session = factory.getRepositories(parameter).get(0).createSession();
      Map<String, Object> properties = new HashMap<String, Object>();
      properties.put(PropertyIds.NAME, Name);
      properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:folder,P:cm:titled");
      properties.put("cm:description", description);

      //Document doc = session.getRootFolder().createDocument(properties,null,null);
   Folder folder=session.getRootFolder().createFolder(properties,null,null, null, null);
   }


it give me error

javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/chemistry/opencmis/client/api/SessionFactory
Can u tell me where i am wrong plz help me i have aatched all jar file

Outcomes