cancel
Showing results for 
Search instead for 
Did you mean: 

how to configure Deployment?

xexiz
Champ in-the-making
Champ in-the-making
Hello! I found some configuration in alfresco files to configure the Deployment but, I can't find THE spot where we can define the Deployment target. I'm running Alfresco 2.1 with the Web Content Management, but i would like to deploy the websites to the same server but.. in another Apache instance. So, alfresco is started, virtual-tomcat is started, AND tomcat 6 is started on 8081. Now.. do I have to configure this new tomcat Instance to listen (RMI port i think) of all the configuration has to be done directly in the alfresco extension custom properties files? (shared/classes/alfresco/extension)

tomcat (alfresco)
virtual-tomcat (wcm)
cda-tomcat/webapps (brand new clean tomcat 6… the target I would like to deploy my websites)

Thanks!

By the way, is there something on the wiki about this? Because the only thing I found is http://217.174.252.22/wiki/Deployment explaining where is the default config of RMI port..
15 REPLIES 15

vijay_alfresco
Champ in-the-making
Champ in-the-making
The deployment target is "default". We can define various targets in the application-context.xml but its of no use currently.

I have a similar requirement and have done the following workaround.

1. Modified the logic to change "ROOT" (webproject create wizard) readonly text box to editable so that i can enter my own webfolder.

2. I have 4 webprojects and all has their own webfolders, but when i try to deploy the projects. The deployment is working good, but it deletes the other project deployment did previously. I have to check for a workaround .

3. The other option is to run 4 deployment receivers with different ports writing to different folders within the staging server.

Please let me know if this is helpful.

Thanks,
Vijay

xexiz
Champ in-the-making
Champ in-the-making
Actually, I just found the deployment package.. installed it and configure it changing the target but well, the deployment is crashing with this exception and I can't find why

Nov 30, 2007 8:11:09 AM org.springframework.remoting.support.RemoteInvocationTraceInterceptor invoke
WARNING: Processing of RmiServiceExporter remote call resulted in fatal exception: org.alfresco.deployment.DeploymentReceiverService.getListing
org.alfresco.deployment.impl.DeploymentException: Could not get listing for /. Aborted.
        at org.alfresco.deployment.impl.server.DeploymentReceiverServiceImpl.getListing(DeploymentReceiverServiceImpl.java:426)
        at org.alfresco.deployment.impl.server.DeploymentReceiverTransportImpl.getListing(DeploymentReceiverTransportImpl.java:163)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
        at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:70)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
        at $Proxy0.getListing(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:181)
        at org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:38)
        at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:76)
        at org.springframework.remoting.rmi.RmiBasedExporter.invoke(RmiBasedExporter.java:72)
        at org.springframework.remoting.rmi.RmiInvocationWrapper.invoke(RmiInvocationWrapper.java:62)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.alfresco.deployment.impl.DeploymentException: Could not read metadata file depmetadata/default.md/.md.
        at org.alfresco.deployment.impl.server.Target.getDirectory(Target.java:386)
        at org.alfresco.deployment.impl.server.Target.getListing(Target.java:264)
        at org.alfresco.deployment.impl.server.Deployment.getListing(Deployment.java:307)
        at org.alfresco.deployment.impl.server.DeploymentReceiverServiceImpl.getListing(DeploymentReceiverServiceImpl.java:421)
        … 32 more
Caused by: java.io.FileNotFoundException: depmetadata/default.md/.md. (No such file or directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
        at org.alfresco.deployment.impl.server.Target.getDirectory(Target.java:379)
        … 35 more

vijay_alfresco
Champ in-the-making
Champ in-the-making
Can you post your application-context.xml and deployment.properties

-Vijay

xexiz
Champ in-the-making
Champ in-the-making
deployment.properties is the default params
dep.datadir=depdata
dep.logdir=deplog
dep.metadatadir=depmetadata
dep.rmi.port=44100

application-context.xml

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
    <bean id="properties"
          class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="ignoreUnresolvablePlaceholders">
            <value>true</value>
        </property>
        <property name="locations">
            <list>
                <value>classpath:deployment.properties</value>
            </list>
        </property>
    </bean>

    <bean id="configuration" class="org.alfresco.deployment.config.Configuration"
          init-method="init">
        <property name="dataDirectory">
            <value>${dep.datadir}</value>
        </property>
        <property name="logDirectory">
            <value>${dep.logdir}</value>
        </property>
        <property name="metaDataDirectory">
            <value>${dep.metadatadir}</value>
        </property>
        <!– Target Configuration. Modify for your site. –>
        <property name="targetData">
            <map>
                <entry key="default">
                    <map>
                        <entry key="root"><value>~/cda-tomcat/webapps</value></entry>
                        <entry key="user"><value>admin</value></entry>
                        <entry key="password"><value>admin</value></entry>
                        <entry key="runnable"><value>org.alfresco.deployment.SampleRunnable</value></entry>
                        <!–
                        <entry key="program"><value>/path/to/program</value></entry>
                         –>
                    </map>
                </entry>
               <entry key="sampleTarget">
                   <map>
                     <entry key="root"><value>target</value></entry>
                     <entry key="user"><value>Giles</value></entry>
                     <entry key="password"><value>Watcher</value></entry>
                     <entry key="runnable"><value>org.alfresco.deployment.SampleRunnable</value></entry>
                     <!–
                     <entry key="program"><value>/path/to/program</value></entry>
                      –>
                   </map>
               </entry>
            </map>
        </property>
    </bean>

    <bean id="deploymentReceiverService" class="org.alfresco.deployment.impl.server.DeploymentReceiverServiceImpl"
          init-method="init">
        <property name="configuration">
            <ref bean="configuration"/>
</property>
    </bean>

    <bean id="deploymentReceiverTransport" class="org.alfresco.deployment.impl.server.DeploymentReceiverTransportImpl">
        <property name="deploymentReceiverService">
            <ref bean="deploymentReceiverService"/>
        </property>
    </bean>

        <bean id="deploymentReceiverTransportRMI" class="org.springframework.remoting.rmi.RmiServiceExporter">
                <property name="service">
                        <ref bean="deploymentReceiverTransport"/>
                </property>
                <property name="serviceInterface">
                        <value>org.alfresco.deployment.DeploymentReceiverTransport</value>
                </property>
                <property name="serviceName">
                        <value>deployment</value>
                </property>
                <property name="registryPort">
                        <value>${dep.rmi.port}</value>
                </property>
        </bean>
</beans>


installations folder look like this:

-tomcat
-virtual-tomcat
-extras
-alf_data
-bin
-deployment (including all the deployment zip)
——deployment.properties
——application-context.xml
——depmetadata
——deplog
——depdata
-cda-tomcat (a clean tomcat 6 version where I want to deploy the web projects)
——webapps

vijay_alfresco
Champ in-the-making
Champ in-the-making
The configuration looks good, but try this

1. Delete the following folder
——depmetadata
——deplog
——depdata

2. Remove the following entry from the application-context.xml for "default" entry
                    
<entry key="runnable"><value>org.alfresco.deployment.SampleRunnable</value></entry>

3. Just put

/cda-tomcat/webapps
instead
~/cda-tomcat/webapps

and let me know if this works

–Vijay

xexiz
Champ in-the-making
Champ in-the-making
Smiley Sad I'm still having the same error after the changes you ask me to do Smiley Sad
Cant believe it has to be that complicated to deploy a website.. hehe
I must get it functional before leaving in 2,5 hours! …

thx by the way for your time!



***Edit:***
When Im deleting the depdata, deplog and depmetadata and then im restarting deploy_start.sh, it's always tracing this error the first time
Nov 30, 2007 2:09:34 PM org.springframework.core.CollectionFactory <clinit>
INFO: JDK 1.4+ collections available
Nov 30, 2007 2:09:35 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from file [/vol0/home/cms/deployment/application-context.xml]
Nov 30, 2007 2:09:35 PM org.springframework.context.support.AbstractRefreshableApplicationContext refreshBeanFactory
INFO: Bean factory for application context [org.springframework.context.support.FileSystemXmlApplicationContext;hashCode=26680060]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [properties,configuration,deploymentReceiverService,deploymentReceiverTransport,deploymentReceiverTransportRMI]; root of BeanFactory hierarchy
Nov 30, 2007 2:09:35 PM org.springframework.context.support.AbstractApplicationContext refresh
INFO: 5 beans defined in application context [org.springframework.context.support.FileSystemXmlApplicationContext;hashCode=26680060]
Nov 30, 2007 2:09:35 PM org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
INFO: Loading properties file from class path resource [deployment.properties]
Nov 30, 2007 2:09:35 PM org.springframework.context.support.AbstractApplicationContext initMessageSource
INFO: Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@1a80a69]
Nov 30, 2007 2:09:35 PM org.springframework.context.support.AbstractApplicationContext initApplicationEventMulticaster
INFO: Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@cdb06e]
Nov 30, 2007 2:09:35 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [properties,configuration,deploymentReceiverService,deploymentReceiverTransport,deploymentReceiverTransportRMI]; root of BeanFactory hierarchy]
Nov 30, 2007 2:09:35 PM org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons
INFO: Destroying singletons in {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [properties,configuration,deploymentReceiverService,deploymentReceiverTransport,deploymentReceiverTransportRMI]; root of BeanFactory hierarchy}
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configuration' defined in file [/vol0/home/cms/deployment/application-context.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
Caused by: java.lang.NullPointerException
        at org.alfresco.deployment.impl.server.Target.recursiveInitialize(Target.java:150)
        at org.alfresco.deployment.impl.server.Target.initialize(Target.java:137)
        at org.alfresco.deployment.impl.server.Target.<init>(Target.java:125)
        at org.alfresco.deployment.config.Configuration.init(Configuration.java:133)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1160)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1122)
        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:273)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
        at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:89)
        at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:74)
        at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:65)
        at org.alfresco.deployment.Main.main(Main.java:47)
then I'm starting it againg and trace this, that look pretty good. Is it normal the crash on the first start?
Nov 30, 2007 2:13:38 PM org.springframework.core.CollectionFactory <clinit>
INFO: JDK 1.4+ collections available
Nov 30, 2007 2:13:38 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from file [/vol0/home/cms/deployment/application-context.xml]
Nov 30, 2007 2:13:39 PM org.springframework.context.support.AbstractRefreshableApplicationContext refreshBeanFactory
INFO: Bean factory for application context [org.springframework.context.support.FileSystemXmlApplicationContext;hashCode=26680060]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [properties,configuration,deploymentReceiverService,deploymentReceiverTransport,deploymentReceiverTransportRMI]; root of BeanFactory hierarchy
Nov 30, 2007 2:13:39 PM org.springframework.context.support.AbstractApplicationContext refresh
INFO: 5 beans defined in application context [org.springframework.context.support.FileSystemXmlApplicationContext;hashCode=26680060]
Nov 30, 2007 2:13:39 PM org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
INFO: Loading properties file from class path resource [deployment.properties]
Nov 30, 2007 2:13:39 PM org.springframework.context.support.AbstractApplicationContext initMessageSource
INFO: Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@1a80a69]
Nov 30, 2007 2:13:39 PM org.springframework.context.support.AbstractApplicationContext initApplicationEventMulticaster
INFO: Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@cdb06e]
Nov 30, 2007 2:13:39 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [properties,configuration,deploymentReceiverService,deploymentReceiverTransport,deploymentReceiverTransportRMI]; root of BeanFactory hierarchy]
Nov 30, 2007 2:13:39 PM org.springframework.remoting.rmi.RmiServiceExporter getRegistry
INFO: Looking for RMI registry at port '44100'
Nov 30, 2007 2:13:39 PM org.springframework.remoting.rmi.RmiServiceExporter getRegistry
WARNING: Could not detect RMI registry - creating new one
Nov 30, 2007 2:13:39 PM org.springframework.aop.framework.DefaultAopProxyFactory <clinit>
INFO: CGLIB2 not available: proxyTargetClass feature disabled
Nov 30, 2007 2:13:39 PM org.springframework.remoting.rmi.RmiServiceExporter prepare
INFO: Binding service 'deployment' to RMI registry: RegistryImpl[UnicastServerRef [liveRef: [endpoint:[10.3.17.23:44100](local),objID:[0:0:0, 0]]]]

vijay_alfresco
Champ in-the-making
Champ in-the-making
I am unable to understand what is happening, but, were you able to deploy?

xexiz
Champ in-the-making
Champ in-the-making
nope, wasnt able to deploy! still the same error as my first post

xexiz
Champ in-the-making
Champ in-the-making
:evil:  :?
I was tired to see this damn error and simply try to create his .md. directory but without success at all.. *** cant believe no one here had this trouble deploying a web project..

Dec 3, 2007 10:12:07 AM org.springframework.remoting.support.RemoteInvocationTraceInterceptor invoke
WARNING: Processing of RmiServiceExporter remote call resulted in fatal exception: org.alfresco.deployment.DeploymentReceiverService.getListing
org.alfresco.deployment.impl.DeploymentException: Could not get listing for /. Aborted.
        at org.alfresco.deployment.impl.server.DeploymentReceiverServiceImpl.getListing(DeploymentReceiverServiceImpl.java:426)
        at org.alfresco.deployment.impl.server.DeploymentReceiverTransportImpl.getListing(DeploymentReceiverTransportImpl.java:163)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
        at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:70)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
        at $Proxy0.getListing(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:181)
        at org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:38)
        at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:76)
        at org.springframework.remoting.rmi.RmiBasedExporter.invoke(RmiBasedExporter.java:72)
        at org.springframework.remoting.rmi.RmiInvocationWrapper.invoke(RmiInvocationWrapper.java:62)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.alfresco.deployment.impl.DeploymentException: Could not read metadata file metadata/default.md/.md.
        at org.alfresco.deployment.impl.server.Target.getDirectory(Target.java:386)
        at org.alfresco.deployment.impl.server.Target.getListing(Target.java:264)
        at org.alfresco.deployment.impl.server.Deployment.getListing(Deployment.java:307)
        at org.alfresco.deployment.impl.server.DeploymentReceiverServiceImpl.getListing(DeploymentReceiverServiceImpl.java:421)
        … 32 more
Caused by: java.io.FileNotFoundException: metadata/default.md/.md. (Is a directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
        at org.alfresco.deployment.impl.server.Target.getDirectory(Target.java:379)
        … 35 more