Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8218435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:47:33+00:00 2026-06-07T12:47:33+00:00

I try to integrate dotcmis and alfresco into my application. When creating my unit

  • 0

I try to integrate dotcmis and alfresco into my application.
When creating my unit tests, I face this issue :
– I set up my test environment by deleting “myfolder” if any
– I create back myfolder and put a document into it

then I try to find the document :
– The first time (when myfolder does not exist before), Search returns 0 results
– Next times, when myfolder exists before and is deleted by my test setup, I get an exception :

Apache Chemistry OpenCMIS - runtime error
HTTP Status 500 - <!--exception-->runtime<!--/exception--><p><!--message-->Node does     not exist: missing://missing/missing(null)<!--/message--></p><hr noshade='noshade'/><!--    stacktrace--><pre>
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Node does not exist: missing://missing/missing(null)
at org.alfresco.opencmis.AlfrescoCmisExceptionInterceptor.invoke(AlfrescoCmisExceptionInterceptor.java:80)
at ...

When I go to Alfresco, the document exists.
It seems that the folder and document are not yet disponible for query, but why ?
If I put in comment the test environment init, the document is found

Maybe I do something wrong but what ?

Here is my code :

[TestMethod()]
[DeploymentItem(@"Files\SearchTest_1", @"Files\SearchTest_1")]
public void SearchTest_2()
{
    string myfoldername = "myfolder";

    // Session creation
    var p = new Dictionary<String, String>();
    p[SessionParameter.User] = _userName;
    p[SessionParameter.Password] = _userPassword;
    p[SessionParameter.BindingType] = BindingType.AtomPub;
    p[SessionParameter.AtomPubUrl] = _serverUrl;

    var session = DotCMIS.Client.Impl.SessionFactory.NewInstance().GetRepositories(p)[0].CreateSession();
    session.DefaultContext.CacheEnabled = false;
    var operationContext = session.CreateOperationContext();
    operationContext.IncludeAcls = true;

    // Delete and create back folder and document
    // /*
    DotCMIS.Client.IFolder rootFolder = this._testSession.GetRootFolder(operationContext);
    DotCMIS.Client.IFolder myFolder = null;
    Dictionary<String, Object> properties = null;

    // Le dossier de destination des tests existe-t-il ?
    var myFolderExists = rootFolder.GetChildren(operationContext).Any(child => child.Name.Equals(myfoldername));
    if (myFolderExists)
    {
        myFolder = (DotCMIS.Client.IFolder)session.GetObjectByPath(String.Format(@"/{0}", myfoldername), operationContext);
        myFolder.DeleteTree(true, DotCMIS.Enums.UnfileObject.Delete, true);
    }

    properties = new Dictionary<String, Object>();
    properties[PropertyIds.Name] = myfoldername;
    properties[PropertyIds.ObjectTypeId] = "cmis:folder";
    myFolder = rootFolder.CreateFolder(properties);
    rootFolder.Refresh();

    myFolder = (DotCMIS.Client.IFolder)session.GetObjectByPath(String.Format(@"/{0}", myfoldername), operationContext);

    FileInfo sourceFile = new FileInfo(@"Files\SearchTest_1\SearchTest_1.pdf");
    properties = new Dictionary<String, Object>();

    properties[PropertyIds.ObjectTypeId] = "cmis:document";
    properties[PropertyIds.Name] = sourceFile.Name;

    using (var fileStream = sourceFile.OpenRead())
    {
        var contentStream = new DotCMIS.Data.Impl.ContentStream();
        contentStream.MimeType = "application/pdf";
        contentStream.Stream = fileStream;
        contentStream.Length = fileStream.Length;
        //this._testSession.CreateDocument(properties, this._testSession.CreateObjectId(myFolder.Id), contentStream, null);
        DotCMIS.Client.IDocument createdDocument = myFolder.CreateDocument(properties, contentStream, null);
    }

    // */

    // Recherche
    string query = @"SELECT * FROM cmis:document WHERE cmis:name = 'SearchTest_1.pdf'";
    var results = this._testSession.Query(query, false, operationContext).ToArray();
    Assert.AreEqual(1, results.Length);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T12:47:34+00:00Added an answer on June 7, 2026 at 12:47 pm

    Are you using Alfresco 4.0 with Solr for indexing? The Solr index is eventually consistent, this means that it can take a while (up to 15 seconds in the default configuration) for updates to show up in search results.

    If you need updates to show up immediately you could switch to Lucene as the indexing subsystem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just try to integrate ImageMagick into my PHP project. I installed and just
I'm trying to integrate posting to one's wall from within my app.i try this
I’m trying to integrate OpenID into my MVC3 Razor application. The OpenID is working
I try to integrate Google's static Maps service in my C# application. It should
I am in the process of try to integrate some C# ASP.NET webservice into
All I am try to integrate twitter in Iphone application As twiiter not allow
I have been working three days straight to try and integrate ads into my
I am trying to integrate AdMob into my Android Application, and can get it
I need to integrate AJAX functionality into a Struts 2 web application. I was
I am trying to integrate Netbeans 6.9 or 7 into my development environment (Mac

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.