AnsweredAssumed Answered

CIFS on Linux

Question asked by townxelliot on Sep 12, 2005
I managed to install an earlier version of Alfresco on Linux, using the Tomcat bundle (I think it was version 0.2.1 - suggestion: put the version number somewhere obvious in the distribution). This entailed fiddling with file-servers.xml to get it running.

When I tried the same thing with version 0.6, I had what looked like the same problem. However, after following the CIFS suggestions in the README (i.e. replacing <host name="${localname}_H"/> with <host name="${localname}_H" domain="localdomain"/>), it still didn't work. (NB the default configuration is at odds with the documentation: the latter specifies that the <host> element should contain the host name with _A appended to it, while the default configuration file uses host name with _H appended. I've tried both, by the way.) I was getting this error message (among others) in catalina.out:

16:08:03,689 ERROR [alfresco.smb.protocol] CIFS server configuration error, Failed to determine local domain/workgroup
org.alfresco.error.AlfrescoRuntimeException: Failed to determine local domain/workgroup
        at org.alfresco.filesys.server.config.ServerConfiguration.getLocalDomainName(ServerConfiguration.java:2081)
        at org.alfresco.filesys.server.config.ServerConfiguration.processCIFSServerConfig(ServerConfiguration.java:537)
        at org.alfresco.filesys.server.config.ServerConfiguration.init(ServerConfiguration.java:379)
        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:971)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:941)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:334)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:146)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:277)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:310)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:133)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:156)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48)


(truncated for brevity).

My /etc/hosts contains the line:
127.0.0.1   localhost localhost.localdomain

which presumably should work with this configuration.

I think I fixed this by editing the source file org.alfresco.filesys.server.config.ServerConfiguration and changing the getLocalDomain method so that it didn't throw an error and instead returned a hard-coded domain. I then recompiled the war file and redeployed it, which seemed to fix this first error. (By the way, I'm not sure that relying on browsing the local network for the host name and domain is a good idea.)

But I got this error instead:

ERROR [alfresco.smb.protocol] CIFS server configuration error, Null value was assigned to a property of primitive type setter of org.alfresco.repo.domain.hibernate.ChildAssocImpl.index
org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of org.alfresco.repo.domain.hibernate.ChildAssocImpl.index
        at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:59)
        at org.hibernate.tuple.AbstractTuplizer.setPropertyValues(AbstractTuplizer.java:207)
        at org.hibernate.tuple.PojoTuplizer.setPropertyValues(PojoTuplizer.java:176)
        at org.hibernate.persister.entity.BasicEntityPersister.setPropertyValues(BasicEntityPersister.java:2919)
        at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:113)
        at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:530)
        at org.hibernate.loader.Loader.doQuery(Loader.java:436)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
        at org.hibernate.loader.Loader.loadCollection(Loader.java:1434)
        at org.hibernate.loader.collection.OneToManyLoader.initialize(OneToManyLoader.java:111)
        at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:488)
        at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
        at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1430)
        at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:176)
        at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:48)
        at org.hibernate.collection.PersistentSet.size(PersistentSet.java:110)
        at org.alfresco.repo.node.db.DbNodeServiceImpl.getChildAssocs(DbNodeServiceImpl.java:775)
        at org.alfresco.repo.node.AbstractNodeServiceImpl.getChildAssocs(AbstractNodeServiceImpl.java:513)
        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:287)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:163)
        at $Proxy6.getChildAssocs(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.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:212)
        at $Proxy7.getChildAssocs(Unknown Source)
… etc.

I take it this is a problem with the file-servers.xml file, maybe not containing an element/attribute which is expected?

Can someone give me some idea of how to fix this please? Perhaps a file-servers.xml file which works on Linux for localhost configuration?

Thanks.

Outcomes