AnsweredAssumed Answered

Import/Export from command line

Question asked by mhoyosga on Jun 12, 2015
Latest reply on Jun 12, 2015 by cristinamr
Hello

I'm trying to make a .acp import a file using the console with the command:

java -XX: MaxPermSize = 512m -classpath classes / alfresco / module: classes: lib / * org.alfresco.tools.Import -user admin admin -s -pwd workspace: // SpacesStore verbose file.acp

The process starts correctly but stops and displays the following error:

Alfresco Repository Importer
The following error has occurred: javax / servlet / ServletContext
java.lang.NoClassDefFoundError: javax / servlet / ServletContext
        at java.lang.Class.getDeclaredMethods0 (Native Method)
        at java.lang.Class.privateGetDeclaredMethods (Class.java:2427)
        at java.lang.Class.getDeclaredMethods (Class.java:1791)
        at org.springframework.util.ReflectionUtils.doWithMethods (ReflectionUtils.java:449)
        at org.springframework.util.ReflectionUtils.doWithMethods (ReflectionUtils.java:431)
        at org.springframework.util.ReflectionUtils.getAllDeclaredMethods (ReflectionUtils.java:473)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:626)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:565)
        at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1277)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:302)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:578)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:398)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
        at org.alfresco.util.BaseApplicationContextHelper.getApplicationContext(BaseApplicationContextHelper.java:67)
        at org.alfresco.util.ApplicationContextHelper.getApplicationContext (ApplicationContextHelper.java:46)
        at org.alfresco.tools.Tool.initialiseRepository (Tool.java:262)
        at org.alfresco.tools.Tool.start (Tool.java:222)
        at org.alfresco.tools.Import.main (Import.java:60)
Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContext
        java.net.URLClassLoader at $ 1.run (URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged (Native Method)
        at java.net.URLClassLoader.findClass (URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass (ClassLoader.java:306)
        sun.misc.Launcher at $ AppClassLoader.loadClass (Launcher.java:301)
        at java.lang.ClassLoader.loadClass (ClassLoader.java:247)
        … 19 more

Any idea what could be the problem.

I'm using Alfresco Enterprise 3.4.7

Thanks and regards.

Outcomes