在window环境下安装Alfresco4.2,安装后启动服务,登录:
http://localhost:8080/share
一切OK。
在Linux下安装,启动服务后,无法登录,查看日志,发现“ObjID already in use”错误。日志截取如下:
ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avmRemoteService' defined in class path resource [alfresco/remote-services-context.xml]: Invocation of init method failed; nested exception is java.rmi.server.ExportException: internal error: ObjID already in use
分析错误原因,应该归属于linux环境下的rmi常见问题,出现这种问题及有可能是/etc/hosts文件中指定的IP并不是当前服务器的真实IP,RMI在初始化时注册服务失败。
解决方法:
修改/etc/hosts文件,在这个文件中增加一行,如下所示,192.168.67.129 alf1 localhost localhost.localdomain localhost4 localhost4.localdomain4就行,或者将/etc/hosts文件中默认的127.0.0.1改成当前机器的IP即可!
127.0.0.1 alf1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.67.129 alf1 localhost localhost.localdomain localhost4 localhost4.localdomain4
修改后,重新启动服务,登录成功: