'dir.root' as a network shared folder

cancel
Showing results for 
Search instead for 
Did you mean: 
bartsat
Member II

'dir.root' as a network shared folder

Salve ragazzi,
Ho un problema che non riesco a risolvere da stamattina.

Ho sue macchine in rete. Su una ho alfresco e sull'altra voglio mettere la repository. come faccio a far puntare alfresco ad una repository in remoto?!
Molti dicono che bisogna creare un'unità di rete sulla macchina cn Alfresco che punta alla cartella repository sull' altra macchina. Ho provato ma qndo lancio tomcat mi da questi errori:

3-mag-2012 17.18.21 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
23-mag-2012 17.18.21 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
23-mag-2012 17.18.22 org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
23-mag-2012 17.18.22 org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
23-mag-2012 17.18.22 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2935 ms
23-mag-2012 17.18.23 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
23-mag-2012 17.18.23 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.26
23-mag-2012 17.18.23 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor alfresco.xml
23-mag-2012 17.18.30 org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
23-mag-2012 17.18.40 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
23-mag-2012 17.20.10 org.apache.catalina.core.StandardContext listenerStart
GRAVE: Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageService' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'SearchService' while setting bean property 'searchService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SearchService' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'searchService' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'searchService' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'indexerAndSearcherFactory' while setting bean property 'indexerAndSearcherFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'indexerAndSearcherFactory' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'admLuceneIndexerAndSearcherFactory' while setting bean property 'defaultBinding'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'admLuceneIndexerAndSearcherFactory' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'mlAwareNodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mlAwareNodeService' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'mtAwareNodeService' while setting bean property 'defaultBinding'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mtAwareNodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbNodeService' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'nodeDAO' while setting bean property 'nodeDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeDAO' defined in class path resource [alfresco/dao/dao-context.xml]: Cannot resolve reference to bean 'contentDataDAO' while setting bean property 'contentDataDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contentDataDAO' defined in class path resource [alfresco/dao/dao-context.xml]: Cannot resolve reference to bean 'eagerContentStoreCleaner' while setting bean property 'contentStoreCleaner'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eagerContentStoreCleaner' defined in class path resource [alfresco/content-services-context.xml]: Cannot resolve reference to bean 'fileContentStore' while setting bean property 'stores' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fileContentStore' defined in class path resource [alfresco/content-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.alfresco.repo.content.filestore.FileContentStore]: Constructor threw exception; nested exception is org.alfresco.service.cmr.repository.ContentIOException: 04230000 Failed to create store root: Z:\alf_data\contentstore
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1305)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1067)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:557)
   at
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'admLuceneIndexerAndSearcherFactory' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'mlAwareNodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mlAwareNodeService' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'mtAwareNodeService' while setting bean property 'defaultBinding'; nested exception is …
[…]
[…]
[…]
Caused by: org.alfresco.service.cmr.repository.ContentIOException: 04230000 Failed to create store root: Z:\alf_data\contentstore
   at org.alfresco.repo.content.filestore.FileContentStore.<init>(FileContentStore.java:99)
   at org.alfresco.repo.content.filestore.FileContentStore.<init>(FileContentStore.java:84)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
   … 151 more
23-mag-2012 17.20.11 org.apache.catalina.core.StandardContext start
GRAVE: Error listenerStart
23-mag-2012 17.20.11 org.apache.catalina.core.StandardContext start
GRAVE: Context [/alfresco] startup failed due to previous errors
23-mag-2012 17.20.11 org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
23-mag-2012 17.20.11 org.apache.catalina.core.ApplicationContext log
INFO: Shutting down log4j
23-mag-2012 17.20.11 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
GRAVE: A web application registered the JBDC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
23-mag-2012 17.20.11 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
GRAVE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@15c024c]) and a value of type [org.alfresco.util.CachingDateFormat] (value [yyyy-MM-dd]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
23-mag-2012 17.20.11 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
GRAVE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@19b08cc]) and a value of type [org.apache.cxf.bus.CXFBusImpl] (value [org.apache.cxf.bus.CXFBusImpl@15ea69f]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.

dove la cosa che subito noto è
…04230000 Failed to create store root: Z:\alf_data\contentstore  …

Premetto che da Windows Explorer riesco a scrivere e leggere dalla cartella in remoto. Sembra che tomcat non abbia i permessi per farlo….
4 Replies
openpj
Moderator
Moderator

Re: 'dir.root' as a network shared folder

Alfresco è il repository, non puoi avere la web application su una macchina e lo storage su un'altra.

Puoi invece fare in modo che l'applicazione client Alfresco Share sia remota rispetto all'applicazione Alfresco repository che può risiedere su un'altra macchina.

Intendi quest'ultima cosa?
bartsat
Member II

Re: 'dir.root' as a network shared folder

Si Si mi sono espresso male… Intendevo quest'ultima opzione.. hai dei consigli da darmi?

Grazie per l'aiuto… Smiley Happy
openpj
Moderator
Moderator

Re: 'dir.root' as a network shared folder

Allora quindi puoi avere alfresco.war su una macchina, poi share.war deployato su un'altra.

A questo punto devi configurare Share affinché l'endpoint di Alfresco sia quello giusto e non più quello riferito a localhost:8080.

Per fare questo devi copiarti le risorse da mettere nel classloader condiviso dell'application server di Share ed utilizzare il file share-config-custom.xml che trovi all'interno della distribuzione di Alfresco.

Devi praticamente scommentare la seguente sezione andando a cambiare i puntamenti ad Alfresco:

<!– example port config used to access remote Alfresco server (default is 8080) –>
   <!–
   <config evaluator="string-compare" condition="Remote">
      <remote>
         <endpoint>
            <id>alfresco-noauth</id>
            <name>Alfresco - unauthenticated access</name>
            <description>Access to Alfresco Repository WebScripts that do not require authentication</description>
            <connector-id>alfresco</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <identity>none</identity>
         </endpoint>

         <endpoint>
            <id>alfresco</id>
            <name>Alfresco - user access</name>
            <description>Access to Alfresco Repository WebScripts that require user authentication</description>
            <connector-id>alfresco</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <identity>user</identity>
         </endpoint>

         <endpoint>
            <id>alfresco-feed</id>
            <name>Alfresco Feed</name>
            <description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
            <connector-id>http</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <basic-auth>true</basic-auth>
            <identity>user</identity>
         </endpoint>
        
         <endpoint>
            <id>activiti-admin</id>
            <name>Activiti Admin UI - user access</name>
            <description>Access to Activiti Admin UI, that requires user authentication</description>
            <connector-id>activiti-admin-connector</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/activiti-admin</endpoint-url>
            <identity>user</identity>
         </endpoint>
      </remote>
   </config>
   –>
bartsat
Member II

Re: 'dir.root' as a network shared folder

Grazie per la tempestiva risposta. Un ultima domanda vorrei farti..
Se io invece volessi che i documenti caricati dall'interfaccia di alfresco venissero salvati su un hdd in rete e non in locale, come faccio?!

io sto cercando di modificare all'interno del file "alfresco-global.properties" la voce "dir.root" cosi da farla puntare ad un percorso di rete. Ma nessun risultato….


Grazie ancora.
Alessandro