由MySQLIntegrityConstraintViolationException引起的Alfresco异常:重复条目...等

时间:2011-08-16 11:44:53

标签: mysql exception glassfish alfresco cluster-computing

我有一个glassfish 3.1.1 Web服务器,我在其上创建了2个实例,我部署了Alfresco Explorer 3.4e,并且在一个实例中一切顺利,但是当我尝试启动另一个实例时,我收到了错误,那个场景中的露天不起作用。

我的设置&环境规格是:

  • JDK 1.7
  • Glassfish 3.1.1
  • 使用glassfish 创建的群集环境(有2个实例) 同一台机器)
  • MySQL:Ver 14.14 Distrib 5.1.52,for Win64
  • Alfresco Explorer 3.4e(我从webapps文件夹获得了war文件 tomcat捆绑版)
  • Windows 7 64bit !!

例外情况是:

glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=1;_ThreadName=Thread-2;|14:07:26,077  ERROR [web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 07150002 Failed to write property deltas: 

.
.
.

Caused by: org.springframework.dao.DuplicateKeyException: SqlMapClient operation; SQL ;   
--- The error occurred in alfresco/ibatis/#resource.dialect#/node-common-SqlMap.xml. 
--- The error occurred while applying a parameter map. 
--- Check the alfresco.node.parameter_NodeProperty. 
--- Check the statement (update failed). 
--- Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '542-69--1-2' for key 'PRIMARY'; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:   

我对配置的参考:

注意:此异常记录在无法运行的第二个实例中,因为此异常,但第一个实例正在运行,如果我关闭第一个并重新启动第二个实例,则不会发生异常,该实例将毫无问题地运行。

您可以看到我的问题的详细信息。我的配置http://forums.alfresco.com/en/viewtopic.php?f=9&t=40252&p=118012#p118012

1 个答案:

答案 0 :(得分:0)

我认为问题在于,当我在“New& Clean”架构上同时启动2个实例导致此问题时,现在我停止所有实例后,先启动第一个,然后关闭它,然后更改“Quick”服务器“&第二个实例的“Vti”端口,然后同时启动2个实例,两个实例成功运行。

请注意,第二个实例可以在Glassfish 3.1.1中拥有自己的属性文件,但在Glassfish 2.1.1中,您将无法执行此操作。

如果你用“--sync full”重新启动第二个实例,你需要再次重置端口并重新启动第二个实例,不知何故我认为端口可以在domain.xml文件中设置并从属性文件中调用它,所以每个实例单独保存,“--sync full”不会有问题。

此致