Move server to linux from windows, get error
Asked by bestlong168:

Originally in win7 environment trial, use atlassian-confluence-4.2.11.zip.

then try move to CentOS 6.1, use atlassian-confluence-4.2.11.tar.gz and copy confluence-home from win7.

in confluence-home/log/atlassian-confluence.log get error info:

2012-08-07 13:27:57,573 ERROR main springframework.web.context.ContextLoader initWebApplicationContext Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'macroIconManager' defined in class path resource services/pluginServiceContext.xml : Cannot resolve reference to bean 'httpRetrievalService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpRetrievalService' defined in class path resource applicationContext.xml : Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'settingsManager' defined in class path resource applicationContext.xml : Cannot resolve reference to bean 'upgradeManager' while setting bean property 'upgradeManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'upgradeManager' defined in class path resource upgradeSubsystemContext.xml : Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemInformationService' defined in class path resource services/statusServiceContext.xml : Cannot resolve reference to bean 'luceneConnection' while setting bean property 'luceneConnection'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luceneConnection' defined in class path resource indexingSubsystemContext.xml : Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class com.atlassian.bonnie.LuceneConnection : Constructor threw exception; nested exception is com.atlassian.bonnie.LuceneException: java.io.IOException: Unable to create index directory '/opt/atlassian/confluence-home\\index'

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)

at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:495)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:162)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

at java.security.AccessController.doPrivileged(Native Method)


Answers:
author: Pranjal Shukla
body: OK, there could be numerous reasons for this:

* Did you install Confluence earlier via Installer?? Was it for 64bit or 32bit?
* Moreover, check the permissions in Unix on all the directories, it seems to be more of a permission issue rather than any other problem.


author: bestlong168
body: edit confluence-home/confluence.cfg.xml

\<property name="lucene.index.dir"\>${confluenceHome}\\index\</property\>

\<property name="webwork.multipart.saveDir"\>${confluenceHome}\\temp\</property\>  
change to  
\<property name="lucene.index.dir"\>${confluenceHome}/index\</property\>

\<property name="webwork.multipart.saveDir"\>${confluenceHome}/temp\</property\>