[jbosscache-issues] [JBoss JIRA] Commented: (JBCACHE-1410) JDBCCacheLoader may attempt to create a node entry in the DB twice
Tomas Frastia (JIRA)
jira-events at lists.jboss.org
Fri Mar 12 04:08:38 EST 2010
[ https://jira.jboss.org/jira/browse/JBCACHE-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12519564#action_12519564 ]
Tomas Frastia commented on JBCACHE-1410:
----------------------------------------
Hi
I have the same problem and I think I managed to get it fixed. The problem was in class org.jboss.cache.loader.AdjListJDBCCacheLoader in method populatePreparedStatementForInsert(). A wrong SQL insert query is used when saving a business-object. If the business-object is larger than 4000 bytes then the SQL insert query fails and returns an error code ORA-01461.
My fix:
I changed the SQL insert query by replacing the second parameter from '?' to 'empty_blob()' and after a successfull insert into the DB I have selected the inesrted row and put it into blob data via java.sql.ResultSet.
I uploaded corrected class and simple to http://community.jboss.org/message/531561#531561
Tomas,
> JDBCCacheLoader may attempt to create a node entry in the DB twice
> ------------------------------------------------------------------
>
> Key: JBCACHE-1410
> URL: https://jira.jboss.org/jira/browse/JBCACHE-1410
> Project: JBoss Cache
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Cache loaders
> Affects Versions: 2.0.0.GA, 2.1.0.GA, 2.1.1.GA, 2.2.0.GA
> Reporter: Manik Surtani
> Assignee: Mircea Markus
> Fix For: 3.3.0.GA
>
>
> This is due to inadequate synchronization in the addNewSubtree() method in the JDBCCacheLoader.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosscache-issues
mailing list