[jboss-jira] [JBoss JIRA] (JGRP-1440) JDBC_PING java.sql.SQLException: ORA-00001: unique constraint violated

Sanne Grinovero (JIRA) jira-events at lists.jboss.org
Sun Apr 1 18:00:47 EDT 2012


    [ https://issues.jboss.org/browse/JGRP-1440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680804#comment-12680804 ] 

Sanne Grinovero commented on JGRP-1440:
---------------------------------------

I've proposed a fix: https://github.com/belaban/JGroups/pull/35

As mentioned in the comments of the patch, I've preferred to just synchronize the methods rather than introduce per-database exotic SQL syntax, which would necessarily have been different per database hence introducing the need to test on multiple databases, and include complexity in the form of either a database auto-detection routine or more mandatory configuration properties.

BTW, it seems you're stressing it a lot, since I think that even without the patch this is very unlikely! Thanks for the debug, that was very helpfull.
                
> JDBC_PING java.sql.SQLException: ORA-00001: unique constraint violated
> ----------------------------------------------------------------------
>
>                 Key: JGRP-1440
>                 URL: https://issues.jboss.org/browse/JGRP-1440
>             Project: JGroups
>          Issue Type: Bug
>    Affects Versions: 2.12.1
>         Environment: windows xp, oracle 11G
>            Reporter: freeliuade freeliuade
>            Assignee: Sanne Grinovero
>              Labels: JDBC_PING,
>             Fix For: 3.1
>
>   Original Estimate: 1 week
>  Remaining Estimate: 1 week
>
> using JDBC_PING, create a very simple JChannel, unique constraint violated exception will throw sometimes.
> it's a occationally issue. to easy reproduce it, using debug to let threads hold on JDBC_PING.writeToFile(...). line insert(...) (JDBC_PING line 246 in JGroups2.12.1.Final) you can find three threads will be hold on here. then using debug to step over this line, the unique constraint violated exception will throw.
> I uploaded a debug diagram in here http://ww2.sinaimg.cn/mw600/649a9869jw1dr8m399uqdj.jpg 
> following is the exception stack:
> SEVERE: Error updating JDBC_PING table
> java.sql.SQLException: ORA-00001: unique constraint (HLIUCLUSTER.SYS_C0038277) violated
>         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
>         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
>         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219)
>         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:970)
>         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1190)
>         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370)
>         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3454)
>         at org.jgroups.protocols.JDBC_PING.insert(JDBC_PING.java:265)
>         at org.jgroups.protocols.JDBC_PING.writeToFile(JDBC_PING.java:246)
>         at org.jgroups.protocols.FILE_PING.sendGetMembersRequest(FILE_PING.java:115)
>         at org.jgroups.protocols.Discovery$PingSenderTask$1.run(Discovery.java:527)
>         at org.jgroups.util.TimeScheduler2$RecurringTask.run(TimeScheduler2.java:592)
>         at org.jgroups.util.TimeScheduler2$MyTask.run(TimeScheduler2.java:524)
>         at org.jgroups.util.TimeScheduler2$Entry.execute(TimeScheduler2.java:429)
>         at org.jgroups.util.TimeScheduler2$1.run(TimeScheduler2.java:295)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list