[jboss-jira] [JBoss JIRA] Closed: (JBAS-3534) "javax.ejb.EJBException: Error performing store" in test org.jboss.test.hibernate.test.HibernateIntgUnitTestCase
Shelly McGowan (JIRA)
jira-events at lists.jboss.org
Mon Jan 12 13:38:04 EST 2009
[ https://jira.jboss.org/jira/browse/JBAS-3534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shelly McGowan closed JBAS-3534.
--------------------------------
Resolution: Cannot Reproduce Bug
Tests are passing with 5.0.0.GA and the behavior as described is no longer reproducable.
> "javax.ejb.EJBException: Error performing store" in test org.jboss.test.hibernate.test.HibernateIntgUnitTestCase
> ----------------------------------------------------------------------------------------------------------------
>
> Key: JBAS-3534
> URL: https://jira.jboss.org/jira/browse/JBAS-3534
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Test Suite
> Affects Versions: JBossAS-5.0.0.Beta1
> Environment: win xp
> Reporter: Jaroslaw Kijanowski
>
> This test contains two methods ( testRedeployment() and testCurrentSession() ). The first one creates an user with a handle "myHandle" and stores him in a database. The second one creates a user too, with the same handle. This is the reason for the EJBException. Deeper in the stacktrace there is an "org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update" so it's is not an JBAS issue, right? If yes here's the fix for the testsuite test, so it can run successfully:
> In the testCurrentSession() method replace following lines of code:
> ***************
> current:
> user.setHandle("myHandle");
> has to be:
> user.setHandle("myHandle-testCurrentSession");
> ***************
> current:
> assertEquals( "Incorrect result size", 1, users.size() );
> has to be:
> assertEquals( "Incorrect result size", 2, users.size() );
> // This is because we have now two users in the database, one created with the first method, and a second one created inside this method
> ***************
> current:
> Long userId = ( ( User ) users.get( 0 ) ).getId();
> assertEquals( "Saved used not returned", savedUserId, userId );
> has to be:
> Long userId = ( ( User ) users.get( 1 ) ).getId();
> assertEquals( "Saved user not returned", savedUserId, userId );
> // We need the second user from the database, to comapare his id with that one returned by the method getId()
--
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 jboss-jira
mailing list