cancel
Showing results for 
Search instead for 
Did you mean: 

CmisInMemoryRunner not starting up

kartech11
Confirmed Champ
Confirmed Champ

I am trying to use the CMIS Junit runner from the below github location . 

import com.github.gsdenys.CmisInMemoryRunner;
import com.github.gsdenys.runner.Configure;
import org.apache.chemistry.opencmis.client.api.Session;
import org.apache.chemistry.opencmis.commons.enums.CmisVersion;
import org.junit.Test;
import org.junit.runner.RunWith;

@RunWith(CmisInMemoryRunner.class)
@Configure(
        port = 9090,
        cmisVersion = CmisVersion.CMIS_1_1
)
public class FolderServiceTest
{
    @Test
    public void someTest() throws Exception {
        Session session = CmisInMemoryRunner.getSession();
        String url = CmisInMemoryRunner.getCmisURI().toURL().toString();
        //FolderService.createFolder(session, "/Sites","test-folder");
    }
}

1. Below is the error I get when I run my tests, Do I need to configure anything further for it to run using the runner? It doesn't seem to start a jetty server automatically. Should I setup any plugin  in my maven project for it to start a jetty server using the runner?

Aug 27, 2018 4:06:43 AM org.eclipse.jetty.webapp.WebInfConfiguration getCanonicalNameForWebAppTmpDir
WARNING: Can't generate resourceBase as part of webapp tmp dir name: java.lang.IllegalStateException: No resourceBase or war set for context
Aug 27, 2018 4:06:43 AM org.eclipse.jetty.webapp.WebAppContext doStart
WARNING: Failed startup of context o.e.j.w.WebAppContext@2e4b8173{/cmis,null,null}
java.lang.IllegalStateException: No resourceBase or war set for context

2. How do I mimic the creation of a site or creation of a folder within a site with my inmemory runner tests? I would like to create a folder within a site and test it out using the inmemory runner?

1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator

I am not familiar with the CMISInMemoryRunner as this is not related to Alfresco (other than Alfresco providing CMIS URLs), and I never came across it. You should ask on the GitHub project itself with regards to any issues,

Second of all, there is no way using CMIS only to execute a proper creation of a site. You have to use the ReST API provided by Alfresco for this. Additionally, you have to correctly create the Surf page / component XML files that are associated with a particular site preset (check out-of-the-box presets.xml and any custom preset files you may have in your system), which require dealing with some "non-public" Surf ReST APIs.