cancel
Showing results for 
Search instead for 
Did you mean: 

can't start the WCM Deployment Engine

yahoon
Champ in-the-making
Champ in-the-making
I am debuging my WCM Deployment .
My alfresco 3.2 is running on linux ,ip 10.1.1.5

I am installing WCM Deployment Engine on linux, ip 10.1.1.6.
I downloaded the zip file alfresco-community-deployment-3.2.zip
extract it to the dir /opt/deployment

then edit the start script 'deploy_start.sh'
#!/bin/sh
nohup java -server -Djava.rmi.server.hostname=10.1.1.6 -Djava.ext.dirs=. org.alfresco.deployment.Main application-context.xml
just addd -Djava.rmi.server.hostname=10.1.1.6 in the java command

then I run
./deploy_start.sh under the installation dir.
fails, here is the log in nohup.out
log4j:WARN No appenders could be found for logger (org.alfresco.deployment.Main).
log4j:WARN Please initialize the log4j system properly.
Unable to start deployment receiver
org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNot
FoundException: class path resource [deployment.properties] cannot be opened because it does not exist
Caused by: java.io.FileNotFoundException: class path resource [deployment.properties] cannot be opened because it does not ex
ist
        at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:135)
        at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:179)
        at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:158)
        at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigu
rer.java:68)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplication
Context.java:472)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:334)
        at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:12
4)
        at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:68
)
        at org.alfresco.deployment.Main.main(Main.java:54)

strangely ,if I moved the installation zip file  into this dir , it goes well.
I don't why, is it necessary to keep the installation zip file under the installation dir ?
any ideas ? thanks
4 REPLIES 4

mrogers
Star Contributor
Star Contributor
The error reported is that it can't find your deployment.properties file.

Does the file exist in /opt/deployment?

Is it readable by your java process.

yahoon
Champ in-the-making
Champ in-the-making
these are all the files under this dir

-rwxr-xr-x 1 root root 9543307 08-11 10:05 alfresco-community-deployment-3.2.zip
-rwxr-xr-x 1 root root  204450 07-03 15:53 alfresco-core-3.2.jar
-rwxr-xr-x 1 root root   89559 07-03 15:53 alfresco-deployment-3.2.jar
-rwxr-xr-x 1 root root 7105435 07-03 15:53 alfresco-repository-3.2.jar
-rwxr-xr-x 1 root root     753 07-03 15:53 application-context.xml
-rwxr-xr-x 1 root root   52915 07-03 15:53 commons-logging-1.1.jar
drwxr-xr-x 2 root root    4096 08-11 16:09 depdata
drwxr-xr-x 2 root root    4096 08-11 16:09 deplog
drwxr-xr-x 2 root root    4096 07-03 15:53 deployment
-rwxr-xr-x 1 root root     611 07-03 15:53 deployment.properties
-rwxr-xr-x 1 root root    1260 07-03 15:53 deploy_start.bat
-rwxr-xr-x 1 root root     158 08-11 15:59 deploy_start.sh
-rwxr-xr-x 1 root root    1224 07-03 15:53 deploy_stop.bat
-rwxr-xr-x 1 root root      90 08-11 16:14 deploy_stop.sh
drwxr-xr-x 3 root root    4096 08-11 16:09 depmetadata
-rwxr-xr-x 1 root root   37328 07-03 15:53 jug-lgpl-2.0.0.jar
-rwxr-xr-x 1 root root  391834 07-03 15:53 log4j-1.2.15.jar
-rwxr-xr-x 1 root root    1436 07-03 15:53 log4j.properties
drwxr-xr-x 2 root root    4096 08-11 16:09 logs
-rw——- 1 root root    7131 08-11 16:14 nohup.out
-rwxr-xr-x 1 root root    3354 07-03 15:53 readme.txt
-rwxr-xr-x 1 root root     977 07-03 15:53 shutdown-context.xml
-rwxr-xr-x 1 root root 2708329 07-03 15:53 spring-2.0.8.jar
drwxr-xr-x 2 root root    4096 08-11 16:09 target

I run ./deploy_start.sh as root.
now the program can be started well ,but if I moved alfresco-community-deployment-3.2.zip out, the error come out.

After extracting the install zip file , I didn't make any changes to other files except adding  " -Djava.rmi.server.hostname=xxxx " to ./deploy_start.sh
why it can't be ran directly ? need to change other things?

yahoon
Champ in-the-making
Champ in-the-making
here is what I am confused about:
if the alfresco-community-deployment-3.2.zip under the dir , start is OK , see nohup.out
10:16:47,727 INFO  [alfresco.deployment.Main] Alfresco Deployment Receiver Starting
10:16:47,765 INFO  [context.support.FileSystemXmlApplicationContext] Refreshing org.springframework.context.support.FileSystemXmlApplicationContext@1193779: display name [org.springframework.context.support.FileSystemXmlApplicationContext@1193779]; startup date [Tue Aug 11 10:16:47 CDT 2009]; root of context hierarchy
10:16:47,813 INFO  [factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from file [/opt/deployment/application-context.xml]
10:16:47,958 INFO  [factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from URL [jar:file:/opt/deployment/alfresco-community-deployment-3.2.zip!/deployment/deployment-receiver-context.xml]
10:16:47,982 INFO  [factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from URL [jar:file:/opt/deployment/alfresco-community-deployment-3.2.zip!/deployment/default-target.xml]
10:16:47,998 INFO  [context.support.FileSystemXmlApplicationContext] Bean factory for application context [org.springframework.context.support.FileSystemXmlApplicationContext@1193779]: org.springframework.beans.factory.support.DefaultListableBeanFactory@b76fa
10:16:48,052 INFO  [factory.config.PropertyPlaceholderConfigurer] Loading properties file from class path resource [deployment.properties]
10:16:48,059 INFO  [factory.support.DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@b76fa: defining beans [properties,deploymentReceiverCommandQueue,deploymentReaderManagement,fileSystemReceiverService,fileSystemReceiverHousekeeper,commandQueueHousekeeper,deploymentReceiverEngine,deploymentReceiverTransportRMI,org.alfresco.deployment.impl.server.DeploymentTargetRegistrationBean]; root of factory hierarchy
10:16:48,106 INFO  [remoting.rmi.RmiServiceExporter] Looking for RMI registry at port '44100'
10:16:48,126 INFO  [remoting.rmi.RmiServiceExporter] Could not detect RMI registry - creating new one
10:16:48,129 INFO  [impl.server.DeploymentReceiverEngineImpl] Alfresco Deployment Receiver Engine Started
10:16:48,171 INFO  [remoting.rmi.RmiServiceExporter] Binding service 'deployment' to RMI registry: RegistryImpl[UnicastServerRef [liveRef: [endpoint:[10.1.7.33:44100](local),objID:[0:0:0, 0]]]]
10:16:48,188 INFO  [impl.server.DeploymentReceiverEngineImpl] deployment target registered, name=default
10:16:53,134 INFO  [impl.fsr.ValidateCommand] Validation starting for target:default
10:16:53,141 INFO  [impl.fsr.ValidateCommand] Validation finished

if the zip file is not under the dir ,the start fails ,see nohup.out
log4j:WARN No appenders could be found for logger (org.alfresco.deployment.Main).
log4j:WARN Please initialize the log4j system properly.
Unable to start deployment receiver
org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundEx
ception: class path resource [deployment.properties] cannot be opened because it does not exist
Caused by: java.io.FileNotFoundException: class path resource [deployment.properties] cannot be opened because it does not exist
        at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:135)
        at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:179)
        at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:158)
        at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.jav
a:68)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext
.java:472)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:334)
        at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:124)
        at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:68)
        at org.alfresco.deployment.Main.main(Main.java:54)

why this happen ?
it seems it can't load the deployment.properties file under the dir ,but can load the one in the zip file .
confuse a lot.

ludrik
Champ in-the-making
Champ in-the-making
We solved the same problem by adding a classpath argument "-cp ." to the java process in deploy_start.sh and deploy_stop.sh


#!/bin/sh
nohup java -server -cp . -Djava.ext.dirs=. org.alfresco.deployment.Main application-context.xml
It seems like that on some systems, the "-Djava.ext.dirs=." only loads the zip and jar files (and in this case not deployment.properties)