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

发布于 2024-11-30 08:01:44 字数 2176 浏览 1 评论 0原文

我有一个 glassfish 3.1.1 Web 服务器,我在上面创建了 2 个实例,我部署了 Alfresco Explorer 3.4e,在一个实例中一切进展顺利,但是当我尝试启动另一个实例时,出现错误并且 alfresco该实例不工作。

我的设置和环境规格是:

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

例外是:

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

I have a glassfish 3.1.1 web server, and I create 2 instances on it, I deploy Alfresco Explorer 3.4e and everything was going well in one instance, but when I try to start the other instance, I got error and the alfresco in that instance not working.

My settings & Specs of Env. are :

  • JDK 1.7
  • Glassfish 3.1.1
  • Cluster Environment created with glassfish (have 2 instance on
    the same machine)
  • MySQL : Ver 14.14 Distrib 5.1.52, for Win64
  • Alfresco Explorer 3.4e (I got war file from webapps folder of
    tomcat bundled version)
  • Windows 7 64bit !!

The exception is:

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:   

My reference of configurations:

Note: This exception logged in the second instance that unable to run because this exception, but the first instance is working, if I shutdown the first and restart the second, the exception will not happen and the instance will run without problems.

You can see full details of my problem & my Configuration here: http://forums.alfresco.com/en/viewtopic.php?f=9&t=40252&p=118012#p118012

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

看海 2024-12-07 08:01:44

我认为问题是,当我在导致此问题的“新建和清理”模式上同时启动 2 个实例时,现在在我停止所有实例后,启动第一个实例,然后关闭它,然后更改“快速服务器”和;第二个实例的“Vti”端口,然后同时启动2个实例,两个实例运行成功。

请注意,第二个实例在 Glassfish 3.1.1 中可以拥有自己的属性文件,但在 Glassfish 2.1.1 中您将无法这样做。

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

问候,

I Think the problem was that when i start 2 instances on the same time on "New & Clean" schema that cause this problem, Now after I stop all instances, start first one, then shutdown it, then change "Quick Server" & "Vti" ports of second instance, then start 2 instances at the same time, the two instances running successfully.

Please note that 2nd instance can have his own property file in Glassfish 3.1.1 but in Glassfish 2.1.1 you will unable to do that.

And If you restart 2nd instance with "--sync full" you need to reset the ports again and restart 2nd instance again, somehow I think the port can be set in domain.xml file and call it from property file, so each instance save it alone and "--sync full" will not be a problem.

Regards,

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文