As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
#!/bin/sh # Create Alfresco export script # Peter Löfgren, Redpill Linpro SCRIPTNAME="export.sh" ALF_HOME=. cd "$ALF_HOME" APPSERVER="${ALF_HOME}/tomcat" # Add the basics echo "#!/bin/sh" > $SCRIPTNAME # make the export dir echo "if [ ! -d ./export ]; then" >> $SCRIPTNAME echo "mkdir export" >> $SCRIPTNAME echo "fi" >> $SCRIPTNAME # Add Java options to script echo "export JAVA_HOME=/usr/lib/jvm/java-6-sun" >> $SCRIPTNAME #echo "export JAVA_OPTS='-Xms128m -Xmx1024m -XX:MaxPermSize=128m -server'" >> $SCRIPTNAME # Add classpath to the script echo -n "java -classpath $APPSERVER/webapps/alfresco/WEB-INF/classes/alfresco/module:" >> $SCRIPTNAME echo -n "$APPSERVER/shared/classes:" >> $SCRIPTNAME echo -n "$APPSERVER/webapps/alfresco/WEB-INF/classes:" >> $SCRIPTNAME # List all libs for FILE in $APPSERVER/webapps/alfresco/WEB-INF/lib/* do echo -n $FILE: >> $SCRIPTNAME done # This is to get your db jar, you may hav to include other locations for FILE in $APPSERVER/lib/* do echo -n $FILE: >> $SCRIPTNAME done # Add the final export commands echo -n -e " org.alfresco.tools.Export -user admin -pwd admin -zip -dir export -verbose -store \0044\0061 \0044\0062" >> $SCRIPTNAME
8:07am dinsmore@foobar # ./export.sh workspace://myspace myspace.acp Alfresco Repository Exporter log4j:WARN No appenders could be found for logger (org.springframework.core.CollectionFactory). log4j:WARN Please initialize the log4j system properly. The following error has occurred: Error creating bean with name 'serverConnector' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverConnector' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi] Caused by: java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi] at javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:804) at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:417) at org.springframework.jmx.support.ConnectorServerFactoryBean.afterPropertiesSet(ConnectorServerFactoryBean.java:168) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1118) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1085) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:429) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:250) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:270) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77) at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:55) at org.alfresco.tools.Tool.initialiseRepository(Tool.java:246) at org.alfresco.tools.Tool.start(Tool.java:212) at org.alfresco.tools.Export.main(Export.java:65) Caused by: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi] at com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:122) at com.sun.jndi.toolkit.url.GenericURLContext.bind(GenericURLContext.java:208) at javax.naming.InitialContext.bind(InitialContext.java:400) at javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:625) at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:412) … 16 more Caused by: java.rmi.AlreadyBoundException: alfresco/jmxrmi at sun.rmi.registry.RegistryImpl.bind(RegistryImpl.java:123) at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source) at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:386) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250) at sun.rmi.transport.Transport$1.run(Transport.java:159) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:155) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359) at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source) at com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:120) … 20 more 27.507u 0.937s 0:17.08 166.4% 0+0k 0+0io 38pf+0w