You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(21) |
Jun
(56) |
Jul
(6) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
|
Feb
(10) |
Mar
(11) |
Apr
(8) |
May
(4) |
Jun
(10) |
Jul
(15) |
Aug
(5) |
Sep
(2) |
Oct
(12) |
Nov
|
Dec
|
| 2004 |
Jan
(18) |
Feb
(33) |
Mar
(7) |
Apr
(3) |
May
(3) |
Jun
|
Jul
(3) |
Aug
(3) |
Sep
(17) |
Oct
(17) |
Nov
(6) |
Dec
(1) |
| 2005 |
Jan
|
Feb
|
Mar
(1) |
Apr
(8) |
May
(4) |
Jun
(2) |
Jul
|
Aug
(15) |
Sep
(5) |
Oct
(11) |
Nov
(5) |
Dec
|
| 2006 |
Jan
(10) |
Feb
(4) |
Mar
|
Apr
(3) |
May
(13) |
Jun
(1) |
Jul
(1) |
Aug
(9) |
Sep
(1) |
Oct
(1) |
Nov
(4) |
Dec
(32) |
| 2007 |
Jan
(15) |
Feb
(10) |
Mar
(9) |
Apr
(4) |
May
(9) |
Jun
(8) |
Jul
(8) |
Aug
(4) |
Sep
(43) |
Oct
(12) |
Nov
(8) |
Dec
(11) |
| 2008 |
Jan
(7) |
Feb
(52) |
Mar
(92) |
Apr
(19) |
May
(101) |
Jun
(212) |
Jul
(136) |
Aug
(102) |
Sep
(53) |
Oct
(58) |
Nov
(115) |
Dec
(122) |
| 2009 |
Jan
(58) |
Feb
(66) |
Mar
(82) |
Apr
(29) |
May
(27) |
Jun
(13) |
Jul
(27) |
Aug
(59) |
Sep
(104) |
Oct
(111) |
Nov
(77) |
Dec
(31) |
| 2010 |
Jan
(79) |
Feb
(52) |
Mar
(18) |
Apr
(19) |
May
(18) |
Jun
(10) |
Jul
(7) |
Aug
(45) |
Sep
(50) |
Oct
(36) |
Nov
(11) |
Dec
(36) |
| 2011 |
Jan
(10) |
Feb
(26) |
Mar
(11) |
Apr
(5) |
May
(6) |
Jun
(2) |
Jul
(8) |
Aug
(6) |
Sep
(6) |
Oct
(5) |
Nov
(2) |
Dec
(5) |
| 2012 |
Jan
(4) |
Feb
(1) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(16) |
Jul
(10) |
Aug
(1) |
Sep
(17) |
Oct
(22) |
Nov
(2) |
Dec
(5) |
| 2013 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
(5) |
Dec
(3) |
| 2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
(3) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(16) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
(11) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
(2) |
Dec
(4) |
| 2022 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
|
| 2024 |
Jan
(4) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: SourceForge.net <no...@so...> - 2012-09-25 03:50:21
|
Feature Requests item #564041, was opened at 2002-06-03 13:06 Message generated for change (Comment added) made by oman002 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449494&aid=564041&group_id=47439 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Jeremy Stein (jeremystein) Assigned to: Manuel Laflamme (mlaflamm) Summary: Share transaction with InsertIdentityOp. Initial Comment: Please change InsertIdentityOperation to allow it to share an existing transaction rather than assume that autocommit is on. One database testing technique is to do the following: 1) Begin a transaction 2) Set up test data (with DbUnit!) 3) Call the tested method 4) Verify the results (with DbUnit!) 5) Rollback the transaction A rollback ensures that all data changes are correctly removed even if the tested method made unexpected data changes. And it can be faster than deleting the records. (For example, when a table has many unindexed foreign keys pointing to it.) This technique cannot currently be used with InsertIdentityOperation because this operation expects to control the transaction itself. It would be nice if there was a switch of some sort that would cause it to use the existing transaction without comitting or changing the autocommit flag. ---------------------------------------------------------------------- Comment By: Oliver (oman002) Date: 2012-09-24 20:50 Message: NB: The fix by gomma in rev 860 doesn't work - but I have a patch that does. ---------------------------------------------------------------------- Comment By: Oliver (oman002) Date: 2012-09-24 20:44 Message: Hi - I have the problem in current trunk (v2.4.9-SNAPSHOT). I have a patch that fixes this as described by james_a_woods. How can I get it into trunk? ---------------------------------------------------------------------- Comment By: SourceForge Robot (sf-robot) Date: 2008-11-21 18:20 Message: This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). ---------------------------------------------------------------------- Comment By: matthias g (gommma) Date: 2008-11-02 11:46 Message: Hi there, I committed the change as proposed by james in rev. 860/trunk for the next 2.4 release. Could please somebody having a running MSSQL server test this feature? You can get the latest dbunit build from the parabuild server in the section "Results" (see http://parabuild.viewtier.com:8080/parabuild/index.htm?view=detailed&buildid=30 ). Thanks and regards, mat ---------------------------------------------------------------------- Comment By: James Woods (james_a_woods) Date: 2005-06-01 01:25 Message: Logged In: YES user_id=1200768 Sorry, cut and paste problem. I copied the original code. Here is the real version. I appologise for the formatting, but this input box wraps lines a bit short. public void execute(IDatabaseConnection connection, IDataSet dataSet) throws DatabaseUnitException, SQLException { Connection jdbcConnection = connection.getConnection(); Statement statement = jdbcConnection.createStatement(); boolean wasAutoCommit = false; try { IDataSet databaseDataSet = connection.createDataSet(); // INSERT_IDENTITY need to be enabled/disabled inside the // same transaction if (jdbcConnection.getAutoCommit() == true) { wasAutoCommit = true; jdbcConnection.setAutoCommit(false); } // Execute decorated operation one table at a time ITableIterator iterator = dataSet.iterator(); while (iterator.next()) { ITable table = iterator.getTable(); String tableName = table.getTableMetaData().getTableName(); ITableMetaData metaData = databaseDataSet.getTableMetaData(tableName); // enable identity insert boolean hasIdentityColumn = hasIdentityColumn(metaData, connection); if (hasIdentityColumn) { StringBuffer sqlBuffer = new StringBuffer(128); sqlBuffer.append("SET IDENTITY_INSERT "); sqlBuffer.append(getQualifiedName(connection.getSchema(), metaData .getTableName(), connection)); sqlBuffer.append(" ON"); statement.execute(sqlBuffer.toString()); } try { _operation.execute(connection, new DefaultDataSet(table)); } finally { // disable identity insert if (hasIdentityColumn) { StringBuffer sqlBuffer = new StringBuffer(128); sqlBuffer.append("SET IDENTITY_INSERT "); sqlBuffer.append(getQualifiedName(connection.getSchema(), metaData .getTableName(), connection)); sqlBuffer.append(" OFF"); statement.execute(sqlBuffer.toString()); } if (wasAutoCommit) jdbcConnection.commit(); } } } finally { if (wasAutoCommit) jdbcConnection.setAutoCommit(true); statement.close(); } } ---------------------------------------------------------------------- Comment By: James Woods (james_a_woods) Date: 2005-06-01 01:23 Message: Logged In: YES user_id=1200768 I have run into the same problem using version 2.1, so I am assuming that you havn't had a time to look at this yet. I have had some success by copying the InsertIdentityOperation class into my own source code and changing the execute method as shown below. Feel free to do with this as you like if you find it useful. public void execute(IDatabaseConnection connection, IDataSet dataSet) throws DatabaseUnitException, SQLException { Connection jdbcConnection = connection.getConnection(); Statement statement = jdbcConnection.createStatement(); try { IDataSet databaseDataSet = connection.createDataSet(); // INSERT_IDENTITY need to be enabled/disabled inside the // same transaction if (jdbcConnection.getAutoCommit() == false) { throw new ExclusiveTransactionException(); } jdbcConnection.setAutoCommit(false); // Execute decorated operation one table at a time ITableIterator iterator = dataSet.iterator(); while(iterator.next()) { ITable table = iterator.getTable(); String tableName = table.getTableMetaData().getTableName(); ITableMetaData metaData = databaseDataSet.getTableMetaData(tableName); // enable identity insert boolean hasIdentityColumn = hasIdentityColumn(metaData, connection); if (hasIdentityColumn) { StringBuffer sqlBuffer = new StringBuffer(128); sqlBuffer.append("SET IDENTITY_INSERT "); sqlBuffer.append(getQualifiedName(connection.getSchema(), metaData.getTableName(), connection)); sqlBuffer.append(" ON"); statement.execute(sqlBuffer.toString()); } try { _operation.execute(connection, new DefaultDataSet(table)); } finally { // disable identity insert if (hasIdentityColumn) { StringBuffer sqlBuffer = new StringBuffer(128); sqlBuffer.append("SET IDENTITY_INSERT "); sqlBuffer.append(getQualifiedName(connection.getSchema(), metaData.getTableName(), connection)); sqlBuffer.append(" OFF"); statement.execute(sqlBuffer.toString()); } jdbcConnection.commit(); } } } finally { jdbcConnection.setAutoCommit(true); statement.close(); } } ---------------------------------------------------------------------- Comment By: Manuel Laflamme (mlaflamm) Date: 2002-06-13 05:57 Message: Logged In: YES user_id=466344 This fix/functionality should be available for version 1.5 ---------------------------------------------------------------------- Comment By: Jeremy Stein (jeremystein) Date: 2002-06-03 13:12 Message: Logged In: YES user_id=492988 Or, rather than using a switch, the operation could determine its behavior based on the value of autocommit when it starts. If autocommit is already off, then it doesn't commit or set autocommit. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449494&aid=564041&group_id=47439 |
|
From: SourceForge.net <no...@so...> - 2012-09-25 03:44:29
|
Feature Requests item #564041, was opened at 2002-06-03 13:06 Message generated for change (Comment added) made by oman002 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449494&aid=564041&group_id=47439 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Jeremy Stein (jeremystein) Assigned to: Manuel Laflamme (mlaflamm) Summary: Share transaction with InsertIdentityOp. Initial Comment: Please change InsertIdentityOperation to allow it to share an existing transaction rather than assume that autocommit is on. One database testing technique is to do the following: 1) Begin a transaction 2) Set up test data (with DbUnit!) 3) Call the tested method 4) Verify the results (with DbUnit!) 5) Rollback the transaction A rollback ensures that all data changes are correctly removed even if the tested method made unexpected data changes. And it can be faster than deleting the records. (For example, when a table has many unindexed foreign keys pointing to it.) This technique cannot currently be used with InsertIdentityOperation because this operation expects to control the transaction itself. It would be nice if there was a switch of some sort that would cause it to use the existing transaction without comitting or changing the autocommit flag. ---------------------------------------------------------------------- Comment By: Oliver (oman002) Date: 2012-09-24 20:44 Message: Hi - I have the problem in current trunk (v2.4.9-SNAPSHOT). I have a patch that fixes this as described by james_a_woods. How can I get it into trunk? ---------------------------------------------------------------------- Comment By: SourceForge Robot (sf-robot) Date: 2008-11-21 18:20 Message: This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). ---------------------------------------------------------------------- Comment By: matthias g (gommma) Date: 2008-11-02 11:46 Message: Hi there, I committed the change as proposed by james in rev. 860/trunk for the next 2.4 release. Could please somebody having a running MSSQL server test this feature? You can get the latest dbunit build from the parabuild server in the section "Results" (see http://parabuild.viewtier.com:8080/parabuild/index.htm?view=detailed&buildid=30 ). Thanks and regards, mat ---------------------------------------------------------------------- Comment By: James Woods (james_a_woods) Date: 2005-06-01 01:25 Message: Logged In: YES user_id=1200768 Sorry, cut and paste problem. I copied the original code. Here is the real version. I appologise for the formatting, but this input box wraps lines a bit short. public void execute(IDatabaseConnection connection, IDataSet dataSet) throws DatabaseUnitException, SQLException { Connection jdbcConnection = connection.getConnection(); Statement statement = jdbcConnection.createStatement(); boolean wasAutoCommit = false; try { IDataSet databaseDataSet = connection.createDataSet(); // INSERT_IDENTITY need to be enabled/disabled inside the // same transaction if (jdbcConnection.getAutoCommit() == true) { wasAutoCommit = true; jdbcConnection.setAutoCommit(false); } // Execute decorated operation one table at a time ITableIterator iterator = dataSet.iterator(); while (iterator.next()) { ITable table = iterator.getTable(); String tableName = table.getTableMetaData().getTableName(); ITableMetaData metaData = databaseDataSet.getTableMetaData(tableName); // enable identity insert boolean hasIdentityColumn = hasIdentityColumn(metaData, connection); if (hasIdentityColumn) { StringBuffer sqlBuffer = new StringBuffer(128); sqlBuffer.append("SET IDENTITY_INSERT "); sqlBuffer.append(getQualifiedName(connection.getSchema(), metaData .getTableName(), connection)); sqlBuffer.append(" ON"); statement.execute(sqlBuffer.toString()); } try { _operation.execute(connection, new DefaultDataSet(table)); } finally { // disable identity insert if (hasIdentityColumn) { StringBuffer sqlBuffer = new StringBuffer(128); sqlBuffer.append("SET IDENTITY_INSERT "); sqlBuffer.append(getQualifiedName(connection.getSchema(), metaData .getTableName(), connection)); sqlBuffer.append(" OFF"); statement.execute(sqlBuffer.toString()); } if (wasAutoCommit) jdbcConnection.commit(); } } } finally { if (wasAutoCommit) jdbcConnection.setAutoCommit(true); statement.close(); } } ---------------------------------------------------------------------- Comment By: James Woods (james_a_woods) Date: 2005-06-01 01:23 Message: Logged In: YES user_id=1200768 I have run into the same problem using version 2.1, so I am assuming that you havn't had a time to look at this yet. I have had some success by copying the InsertIdentityOperation class into my own source code and changing the execute method as shown below. Feel free to do with this as you like if you find it useful. public void execute(IDatabaseConnection connection, IDataSet dataSet) throws DatabaseUnitException, SQLException { Connection jdbcConnection = connection.getConnection(); Statement statement = jdbcConnection.createStatement(); try { IDataSet databaseDataSet = connection.createDataSet(); // INSERT_IDENTITY need to be enabled/disabled inside the // same transaction if (jdbcConnection.getAutoCommit() == false) { throw new ExclusiveTransactionException(); } jdbcConnection.setAutoCommit(false); // Execute decorated operation one table at a time ITableIterator iterator = dataSet.iterator(); while(iterator.next()) { ITable table = iterator.getTable(); String tableName = table.getTableMetaData().getTableName(); ITableMetaData metaData = databaseDataSet.getTableMetaData(tableName); // enable identity insert boolean hasIdentityColumn = hasIdentityColumn(metaData, connection); if (hasIdentityColumn) { StringBuffer sqlBuffer = new StringBuffer(128); sqlBuffer.append("SET IDENTITY_INSERT "); sqlBuffer.append(getQualifiedName(connection.getSchema(), metaData.getTableName(), connection)); sqlBuffer.append(" ON"); statement.execute(sqlBuffer.toString()); } try { _operation.execute(connection, new DefaultDataSet(table)); } finally { // disable identity insert if (hasIdentityColumn) { StringBuffer sqlBuffer = new StringBuffer(128); sqlBuffer.append("SET IDENTITY_INSERT "); sqlBuffer.append(getQualifiedName(connection.getSchema(), metaData.getTableName(), connection)); sqlBuffer.append(" OFF"); statement.execute(sqlBuffer.toString()); } jdbcConnection.commit(); } } } finally { jdbcConnection.setAutoCommit(true); statement.close(); } } ---------------------------------------------------------------------- Comment By: Manuel Laflamme (mlaflamm) Date: 2002-06-13 05:57 Message: Logged In: YES user_id=466344 This fix/functionality should be available for version 1.5 ---------------------------------------------------------------------- Comment By: Jeremy Stein (jeremystein) Date: 2002-06-03 13:12 Message: Logged In: YES user_id=492988 Or, rather than using a switch, the operation could determine its behavior based on the value of autocommit when it starts. If autocommit is already off, then it doesn't commit or set autocommit. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449494&aid=564041&group_id=47439 |
|
From: SourceForge.net <no...@so...> - 2012-09-17 10:39:23
|
Bugs item #3568363, was opened at 2012-09-17 03:10 Message generated for change (Comment added) made by chrisphe You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=3568363&group_id=47439 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bug Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Luigi (luigiiannone) Assigned to: matthias g (gommma) Summary: Timestamp export Initial Comment: I observed while exporting to an XML data set, but it seems it affects more than that,. I noticed that Timestamp is serialised using its toString() method. However for instances corrsponding to 1347785687750L the corresponding string is 2012-09-16 09:54:47.75 When the latter is parsed back the milliseconds are 75 instead of 750 (the result of the parsing is 1347785687075L) so the dates are not the same. ---------------------------------------------------------------------- Comment By: Chris Pheby (chrisphe) Date: 2012-09-17 03:39 Message: I think this is a duplicate of 'Problem with DATE, TIME and TIMESTAMP - ID: 533540', so this should be fixed on trunk. Any chance of a release with the fix? Thanks Chris ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=3568363&group_id=47439 |
|
From: SourceForge.net <no...@so...> - 2012-09-17 10:10:15
|
Bugs item #3568363, was opened at 2012-09-17 03:10 Message generated for change (Tracker Item Submitted) made by luigiiannone You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=3568363&group_id=47439 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bug Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Luigi (luigiiannone) Assigned to: matthias g (gommma) Summary: Timestamp export Initial Comment: I observed while exporting to an XML data set, but it seems it affects more than that,. I noticed that Timestamp is serialised using its toString() method. However for instances corrsponding to 1347785687750L the corresponding string is 2012-09-16 09:54:47.75 When the latter is parsed back the milliseconds are 75 instead of 750 (the result of the parsing is 1347785687075L) so the dates are not the same. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=3568363&group_id=47439 |
|
From: Jeff J. <jj...@ap...> - 2012-09-05 13:37:13
|
Roberto, where did you commit this? I don't see it in the svn repo. On Mon, Jul 23, 2012 at 4:02 AM, SourceForge.net <no...@so...> wrote: > Feature Requests item #3546128, was opened at 2012-07-19 15:15 > Message generated for change (Settings changed) made by rlogiacco > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=449494&aid=3546128&group_id=47439 > > Please note that this message will contain a full copy of the comment thread, > including the initial issue submission, for this request, > not just the latest update. >>Category: None > Group: Next Release >>Status: Closed >>Resolution: Accepted > Priority: 5 > Private: No > Submitted By: Karsten Ohme (k_o_) >>Assigned to: Roberto Lo Giacco (rlogiacco) > Summary: Support encoding for CSV files > > Initial Comment: > Currently only the default platform encoding is supported when parsing CSV files. This breaks almost always if other languages with a wider character set than latin are used. The attached patch introduced a method setEncoding on the CsvDataFileLoader. > > ---------------------------------------------------------------------- > >>Comment By: Roberto Lo Giacco (rlogiacco) > Date: 2012-07-23 02:02 > > Message: > The fix has been applied and will be part of next release. Thanks for your > contribution! > > ---------------------------------------------------------------------- > > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=449494&aid=3546128&group_id=47439 > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > dbunit-developer mailing list > dbu...@li... > https://lists.sourceforge.net/lists/listinfo/dbunit-developer |
|
From: SourceForge.net <no...@so...> - 2012-09-03 12:17:14
|
Feature Requests item #3564413, was opened at 2012-09-03 05:13 Message generated for change (Comment added) made by l0co You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449494&aid=3564413&group_id=47439 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: l0co (l0co) Assigned to: Nobody/Anonymous (nobody) Summary: Few remarks about dbunit Initial Comment: Hello. I've been using dbunit from three days for my own purpose, which is moving the configuration tables between the test and production environment, and I have few remarks to share about this tool. First one is that this is really cool and I've finally achieved my goal on this, thanks! The remarks: 1. The operation classes design is really ugly, with package method visibility. You cannot use this code to derive your classes, to extend base functionality. I'd recommend to redesign this and allow people to make subclasses with own code (currently you cannot do anything but copy a lot of classes code into your application, and change it). 2. The restriction of working with primary key tables only is easy to overcome, in such scenario you can treat all columns as primary keys, and make update of all columns with (also) all columns-where. This works fine for me. 3. The FlatXmlDataset has a bug, or I did something badly. The scenario: * export table A with some column X * first exported row has X=null, so it's not contained in Flat XML * second one has X=1, and is contained in Flat XML * on the import, the importer (probably) analyses the first row, and decides that the table A doesn't have X column (because first row doesn't have it), so the import of the second row doesn't consider importing of X=1 column ---------------------------------------------------------------------- >Comment By: l0co (l0co) Date: 2012-09-03 05:17 Message: One more I've forgotten ;) 4. It would be nice to add some "connection customizer" that customizes the database Connection before data import, and provide some native implementation for common drivers. This could be used to disable constraints check during the import. The exemplary implementation of my one for Mysql driver: @Override public void onImportStart(Connection connection) throws SQLException { connection.prepareStatement("SET foreign_key_checks = 0").executeUpdate(); } @Override public void onImportEnd(Connection connection) throws SQLException { connection.prepareStatement("SET foreign_key_checks = 1").executeUpdate(); } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449494&aid=3564413&group_id=47439 |
|
From: SourceForge.net <no...@so...> - 2012-09-03 12:13:46
|
Feature Requests item #3564413, was opened at 2012-09-03 05:13 Message generated for change (Tracker Item Submitted) made by l0co You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449494&aid=3564413&group_id=47439 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: l0co (l0co) Assigned to: Nobody/Anonymous (nobody) Summary: Few remarks about dbunit Initial Comment: Hello. I've been using dbunit from three days for my own purpose, which is moving the configuration tables between the test and production environment, and I have few remarks to share about this tool. First one is that this is really cool and I've finally achieved my goal on this, thanks! The remarks: 1. The operation classes design is really ugly, with package method visibility. You cannot use this code to derive your classes, to extend base functionality. I'd recommend to redesign this and allow people to make subclasses with own code (currently you cannot do anything but copy a lot of classes code into your application, and change it). 2. The restriction of working with primary key tables only is easy to overcome, in such scenario you can treat all columns as primary keys, and make update of all columns with (also) all columns-where. This works fine for me. 3. The FlatXmlDataset has a bug, or I did something badly. The scenario: * export table A with some column X * first exported row has X=null, so it's not contained in Flat XML * second one has X=1, and is contained in Flat XML * on the import, the importer (probably) analyses the first row, and decides that the table A doesn't have X column (because first row doesn't have it), so the import of the second row doesn't consider importing of X=1 column ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449494&aid=3564413&group_id=47439 |
|
From: SourceForge.net <no...@so...> - 2012-08-04 15:15:39
|
Bugs item #3554287, was opened at 2012-08-04 08:15 Message generated for change (Tracker Item Submitted) made by statalex You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=3554287&group_id=47439 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bug Group: v2.4.* Status: Open Resolution: None Priority: 5 Private: No Submitted By: Stathis Alexopoulos (statalex) Assigned to: matthias g (gommma) Summary: NoSuchColumnException in CSV. Initial Comment: If the field name has trailing white spaces in CSV header then CsvProducer raises a NoSuchColumnException, If the header line of your CSV file is one of the following 1 "ID,NAME" 2 " ID,NAME" 3 "ID ,NAME" then the third one produces a NoSuchColumnException all it needs to fix it is to replace the line 117 of CsvProducer class from columns[i] = new Column((String) readColumns.get(i), DataType.UNKNOWN); to columns[i] = new Column(((String) readColumns.get(i)).trim(), DataType.UNKNOWN); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=3554287&group_id=47439 |
|
From: SourceForge.net <no...@so...> - 2012-07-23 09:06:04
|
Feature Requests item #3471931, was opened at 2012-01-10 09:04 Message generated for change (Settings changed) made by rlogiacco You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449494&aid=3471931&group_id=47439 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Pending Resolution: None Priority: 5 Private: No Submitted By: Ignacio Alvarez (ialvarez79) Assigned to: Nobody/Anonymous (nobody) Summary: Avoid CyclicTablesDependencyException Initial Comment: I found a way to avoid CyclicTablesDependencyException (maybe I'm missing some part of the problem). This could be as simple (maybe some configurable item), to split the dataset in two datasets. The first will do the inserts, having problematic fields in null. The second dataset will then update the records, defining dependencies according to our needs. (This is the natural way I do this stuff when I have to insert cyclic data manually) ---------------------------------------------------------------------- Comment By: Roberto Lo Giacco (rlogiacco) Date: 2012-07-23 02:05 Message: Your approach is correct, the problem would be to do it automatically. We have an implementation strategy for dbUnit 3 using EL, but we don't feel it practical for dbUnit 2 and dbUnit 3 is in it's early development stage. Unless you can provide a patch and relative unit tests I'll have to close this as not applicable. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449494&aid=3471931&group_id=47439 |
|
From: SourceForge.net <no...@so...> - 2012-07-23 09:05:44
|
Feature Requests item #3471931, was opened at 2012-01-10 09:04 Message generated for change (Comment added) made by rlogiacco You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449494&aid=3471931&group_id=47439 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ignacio Alvarez (ialvarez79) Assigned to: Nobody/Anonymous (nobody) Summary: Avoid CyclicTablesDependencyException Initial Comment: I found a way to avoid CyclicTablesDependencyException (maybe I'm missing some part of the problem). This could be as simple (maybe some configurable item), to split the dataset in two datasets. The first will do the inserts, having problematic fields in null. The second dataset will then update the records, defining dependencies according to our needs. (This is the natural way I do this stuff when I have to insert cyclic data manually) ---------------------------------------------------------------------- >Comment By: Roberto Lo Giacco (rlogiacco) Date: 2012-07-23 02:05 Message: Your approach is correct, the problem would be to do it automatically. We have an implementation strategy for dbUnit 3 using EL, but we don't feel it practical for dbUnit 2 and dbUnit 3 is in it's early development stage. Unless you can provide a patch and relative unit tests I'll have to close this as not applicable. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449494&aid=3471931&group_id=47439 |
|
From: SourceForge.net <no...@so...> - 2012-07-23 09:02:44
|
Feature Requests item #3546128, was opened at 2012-07-19 15:15 Message generated for change (Settings changed) made by rlogiacco You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449494&aid=3546128&group_id=47439 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: None Group: Next Release >Status: Closed >Resolution: Accepted Priority: 5 Private: No Submitted By: Karsten Ohme (k_o_) >Assigned to: Roberto Lo Giacco (rlogiacco) Summary: Support encoding for CSV files Initial Comment: Currently only the default platform encoding is supported when parsing CSV files. This breaks almost always if other languages with a wider character set than latin are used. The attached patch introduced a method setEncoding on the CsvDataFileLoader. ---------------------------------------------------------------------- >Comment By: Roberto Lo Giacco (rlogiacco) Date: 2012-07-23 02:02 Message: The fix has been applied and will be part of next release. Thanks for your contribution! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449494&aid=3546128&group_id=47439 |
|
From: SourceForge.net <no...@so...> - 2012-07-19 22:15:20
|
Feature Requests item #3546128, was opened at 2012-07-19 15:15 Message generated for change (Tracker Item Submitted) made by k_o_ You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449494&aid=3546128&group_id=47439 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Interface Improvements (example) Group: Next Release Status: Open Resolution: None Priority: 5 Private: No Submitted By: Karsten Ohme (k_o_) Assigned to: Nobody/Anonymous (nobody) Summary: Support encoding for CSV files Initial Comment: Currently only the default platform encoding is supported when parsing CSV files. This breaks almost always if other languages with a wider character set than latin are used. The attached patch introduced a method setEncoding on the CsvDataFileLoader. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449494&aid=3546128&group_id=47439 |
|
From: SourceForge.net <no...@so...> - 2012-07-19 12:33:00
|
Bugs item #3545861, was opened at 2012-07-19 05:32 Message generated for change (Tracker Item Submitted) made by artbristol You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=3545861&group_id=47439 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bug Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Art (artbristol) Assigned to: matthias g (gommma) Summary: CsvURLProducer swallows exception stack Initial Comment: This code catch (CsvParserException e) { throw new DataSetException("error parsing CSV for URL: '" + url + "'"); doesn't chain the exception so the stack trace is lost. Patch attached. [Code review hat on] This class is copy/pasted from CsvProducer and ought to have the duplication refactored out ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=3545861&group_id=47439 |
|
From: Frank I. <pus...@go...> - 2012-07-11 13:57:32
|
Hello John, first of all thanks for the quick response. I already publish my project to google code http://code.google.com/p/dbunit-mongodb/. I also writte a little blog post about this project see http://no-fiction.blogspot.de/2012/07/mongodb-modul-for-dbunit.html. The DbUnit main abstraction was designed for relational database but could also be used for non relation database like mongo. To get a quick start i use the dbunit abstraction layer (DataSet, ITable and so on) and it feel that it could also work for mongo and it integrates very well in the dbunit process to load the dataset data into the mongodb. have a nice day Frank Ittermann 2012/7/11 John Hurst <joh...@gm...> > Hi, > > I've been a little interested in NoSQL support for DbUnit, and Mongo seems > like a great one to start with. > > Did you find that DbUnit's main abstractions (IDataSet, ITable, > ITableMetaData) work OK for MongoDB? > > I would be worried that DbUnit is too tied to tabular data. But perhaps I > am wrong. > > As to the best way to share -- do you use GitHub? That's a great way to > get your project out there for people (like me) to look at. I notice there > is a growing number of DbUnit-related projects popping up on GitHub. > > Regards > > John Hurst > > On Tue, Jul 10, 2012 at 7:23 PM, Frank Ittermann < > pus...@go...> wrote: > >> Hello guys, >> >> i started to develop mongodb support for dbunit to support our >> developer team to write simpler mongodb database backed tests. >> >> I've a working prototype on my local system and i want to share that >> stuff with the dbunit community. Here my questions. >> >> How ? :-) >> >> I could upload the little maven project to my personal site or if you >> have so what calling incubator for dbunit than i could also upload the >> code to that one. >> >> have a nice day >> the fit >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> dbunit-developer mailing list >> dbu...@li... >> https://lists.sourceforge.net/lists/listinfo/dbunit-developer >> >> > > > -- > Life is interfering with my game > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > dbunit-developer mailing list > dbu...@li... > https://lists.sourceforge.net/lists/listinfo/dbunit-developer > > |
|
From: SourceForge.net <no...@so...> - 2012-07-11 13:50:30
|
Bugs item #3542576, was opened at 2012-07-11 06:47 Message generated for change (Comment added) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=3542576&group_id=47439 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bug Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: https://www.google.com/accounts () Assigned to: matthias g (gommma) Summary: calls to JdbcDatabaseTester getConnection return new connect Initial Comment: calls to JdbcDatabaseTester getConnection return new connection on every call. As a result it is not possible to setProperty on the config as the connection object is never used again The following code will always fail if the schema contains BLOBS DatabaseConfig config = databaseTester.getConnection().getConfig(); config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new Oracle10DataTypeFactory()); // initialize your dataset here XmlDataSet dataSet = new XmlDataSet(new FileReader("./src/test/resources/test1_dataset.xml")); databaseTester.setDataSet( dataSet ); // will call default setUpOperation databaseTester.onSetup(); ---------------------------------------------------------------------- >Comment By: https://www.google.com/accounts () Date: 2012-07-11 06:50 Message: Fixed implementation attached ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=3542576&group_id=47439 |
|
From: SourceForge.net <no...@so...> - 2012-07-11 13:47:18
|
Bugs item #3542576, was opened at 2012-07-11 06:47 Message generated for change (Tracker Item Submitted) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=3542576&group_id=47439 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bug Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: https://www.google.com/accounts () Assigned to: matthias g (gommma) Summary: calls to JdbcDatabaseTester getConnection return new connect Initial Comment: calls to JdbcDatabaseTester getConnection return new connection on every call. As a result it is not possible to setProperty on the config as the connection object is never used again The following code will always fail if the schema contains BLOBS DatabaseConfig config = databaseTester.getConnection().getConfig(); config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new Oracle10DataTypeFactory()); // initialize your dataset here XmlDataSet dataSet = new XmlDataSet(new FileReader("./src/test/resources/test1_dataset.xml")); databaseTester.setDataSet( dataSet ); // will call default setUpOperation databaseTester.onSetup(); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=3542576&group_id=47439 |
|
From: John H. <joh...@gm...> - 2012-07-10 22:23:32
|
Hi, I've been a little interested in NoSQL support for DbUnit, and Mongo seems like a great one to start with. Did you find that DbUnit's main abstractions (IDataSet, ITable, ITableMetaData) work OK for MongoDB? I would be worried that DbUnit is too tied to tabular data. But perhaps I am wrong. As to the best way to share -- do you use GitHub? That's a great way to get your project out there for people (like me) to look at. I notice there is a growing number of DbUnit-related projects popping up on GitHub. Regards John Hurst On Tue, Jul 10, 2012 at 7:23 PM, Frank Ittermann < pus...@go...> wrote: > Hello guys, > > i started to develop mongodb support for dbunit to support our > developer team to write simpler mongodb database backed tests. > > I've a working prototype on my local system and i want to share that > stuff with the dbunit community. Here my questions. > > How ? :-) > > I could upload the little maven project to my personal site or if you > have so what calling incubator for dbunit than i could also upload the > code to that one. > > have a nice day > the fit > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > dbunit-developer mailing list > dbu...@li... > https://lists.sourceforge.net/lists/listinfo/dbunit-developer > > -- Life is interfering with my game |
|
From: Frank I. <pus...@go...> - 2012-07-10 07:24:04
|
Hello guys, i started to develop mongodb support for dbunit to support our developer team to write simpler mongodb database backed tests. I've a working prototype on my local system and i want to share that stuff with the dbunit community. Here my questions. How ? :-) I could upload the little maven project to my personal site or if you have so what calling incubator for dbunit than i could also upload the code to that one. have a nice day the fit |
|
From: Charles C. <cch...@ya...> - 2012-06-24 13:56:52
|
For anyone who is interested in the outcome, here is link back to question posted in the Ant developer list: http://marc.info/?l=ant-dev&m=134052751515974&w=2 Cheers, Charles |
|
From: Charles C. <cch...@ya...> - 2012-06-22 20:52:29
|
Thank you for your assistance! I was able to recompile and try out the changes, but the problem did not go away. After a closer look at the stacktrace, it is looking more like it's an Ant problem. I even upgraded to the latest Ant (1.8.4), but the problem still persists. I am going to try and ask the Ant developers to see if they have any clue to the problem, and try to use fork as a last resort. Charles |
|
From: Roberto Lo G. <rlo...@gm...> - 2012-06-22 15:51:07
|
Or forking the execution, which starts a new separate JVM :-)
On Fri, Jun 22, 2012 at 2:01 PM, Shijun Kong <sk...@in...>wrote:
> As John and Roberto pointed out, PermGen is different from heap, a
> quick dirty way to fix the problem could be increase max PermGen size, -XX:MaxPermSize=512m.
> But per my experience, you won't get much after 512m.
>
> The root cause looks like in the way how ant execute task, seems like
> ant uses a new class loader for each call (<dbunit>) (see the exception
> trace). You should dig more in ant source code or move the looping into a
> shell script / junit test so as to manage the class loading by yourself.
>
> *
> __________________________
> *
> Shijun
>
> From: Roberto Lo Giacco <rlo...@gm...>
> Reply-To: "dbu...@li..." <
> dbu...@li...>
> To: "dbu...@li..." <
> dbu...@li...>
> Subject: Re: [dbunit-developer] Possible memory leak with DbUnitTask.java?
>
> John is right, the PermGen issue is not related to connection leak and
> if the connection variable is reused there is no leak: the heavyweight part
> of the connection is released within the close() method, the object itself,
> once closed, is lightweight and is marked for garbage collection once the
> variable is reused.
>
> The PermGen space is more probably related to the Ant task itself on
> which I'm not really expert as I do not use Ant since 2001... Can you
> create a pastebin with your Ant build script? I guess that if you are
> trying to run an external build without forking the JVM than your problem
> is related to Ant rather than dbUnit.
>
> Another check you can do is trying to execute the same amount of times
> in the same manner any other non trivial Ant task: if you have the same
> issue than you have the proof it's not a dbUnit problem.
>
> Cheers,
> Roberto
>
> On Fri, Jun 22, 2012 at 12:19 AM, John Hurst <joh...@gm...>wrote:
>
>> I thought that PermGen was used mostly for classes, rather than objects
>> such as Connections, which are stored on the normal heap. Actually I think
>> that traditionally -Xmx would not help with PermGen issues. But I vaguely
>> recall that some changes have occurred in the relationship between PermGen
>> and heap in recent years.
>>
>> Seems rather odd to me that leaking a IDatabaseConnection would really
>> cause this much harm. It's a rather trival resource.
>>
>> Most important thing is: Did your patch fix the issue for you? If so it
>> would tend to imply that the Connection leak was the problem...
>>
>> Regards
>>
>> John Hurst
>>
>> On Fri, Jun 22, 2012 at 10:04 AM, Charles Chan <cch...@ya...>wrote:
>>
>>> Hello,
>>>
>>> I was using dbunit's Ant integration and have a for loop that exports a
>>> bunch of dataset into many small xml files (less than 5-50kb each).
>>> After repeating <dbunit> for ~50 times, I got an OutOfMemoryException:
>>> PermGen space.
>>>
>>> (v2.4.8)
>>> C:\test\build.xml:364: java.lang.OutOfMemoryError: PermGen space
>>> at java.lang.ClassLoader.defineClass1(Native Method)
>>> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
>>> at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
>>> at
>>> org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
>>> at
>>> org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
>>> at
>>> org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1351)
>>> at
>>> org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
>>> at
>>> org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>>> at java.lang.ClassLoader.defineClass1(Native Method)
>>> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
>>> at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
>>> at
>>> org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
>>> at
>>> org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
>>> at
>>> org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1351)
>>> at
>>> org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
>>> at
>>> org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>>> at java.lang.ClassLoader.defineClass1(Native Method)
>>> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
>>> at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
>>> at
>>> org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
>>> at
>>> org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
>>> at
>>> org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1351)
>>> at
>>> org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
>>> at
>>> org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>>> at java.lang.ClassLoader.defineClass1(Native Method)
>>> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
>>> at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
>>> at
>>> org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
>>> at
>>> org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
>>>
>>> Although I can use -Xmx256m to increase the maximum heap space, I am
>>> curious why this problem occurred? I am able to import a 50MB xml file
>>> without specifying -Xmx option, so in theory, exporting 100 50kb xml
>>> files should NOT cause any problems. Also, the problem can be simulated
>>> by repeating the following ~100 times in a single Ant task.
>>>
>>> <target name="test-dbunit-export>
>>>
>>> <!-- export individual dataset -->
>>> <dbunit driver="${mysql.driver}"
>>> url="${mysql.url}/database"
>>> userid="${mysql.userid}"
>>> password="${mysql.password}"
>>> classpath="${mysql.classpath}">
>>> <export format="xml"
>>> dest="${dbunit.data.dir}/test1.xml">
>>> <query name="tableQuery" sql="SELECT * FROM table
>>> WHERE column=''"/>
>>> </export>
>>> </dbunit>
>>>
>>> <dbunit> ... </dbunit>
>>> <dbunit> ... </dbunit>
>>> <dbunit> ... </dbunit>
>>> ... <!-- repeat dbunit many times! -->
>>> <dbunit> ... </dbunit>
>>>
>>> </target>
>>>
>>> ----------
>>>
>>> Looking at the code, I noticed DbUnitTasks.java, in the method
>>> execute(), it
>>> only call "conn.close()", but what about "connection" object? Wouldn't
>>> that cause a leak if "connection" is holding a reference to "conn"?
>>> Should that be closed as well?
>>>
>>> I am not sure if I am on the right path, but have included a patch for
>>> review as well.
>>>
>>> Thank you!
>>> Charles
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond. Discussions
>>> will include endpoint security, mobile security and the latest in malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> dbunit-developer mailing list
>>> dbu...@li...
>>> https://lists.sourceforge.net/lists/listinfo/dbunit-developer
>>>
>>>
>>
>>
>> --
>> Life is interfering with my game
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> dbunit-developer mailing list
>> dbu...@li...
>> https://lists.sourceforge.net/lists/listinfo/dbunit-developer
>>
>>
>
> ------------------------------
> This email message and any attachments may contain legally privileged or
> confidential information intended solely for the use of the individual or
> entity to whom it is addressed. If the reader of this message is not the
> intended recipient, you are hereby notified that any reading,
> dissemination, distribution or copying of this message or its attachments
> is strictly prohibited. If you have received this message in error, please
> notify us immediately by telephone, fax or email and delete the message and
> all attachments to the message. Any views or opinions expressed are solely
> those of the author and do not necessarily represent those of Investor
> Analytics LLC.
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> dbunit-developer mailing list
> dbu...@li...
> https://lists.sourceforge.net/lists/listinfo/dbunit-developer
>
>
|
|
From: Shijun K. <sk...@in...> - 2012-06-22 13:02:07
|
As John and Roberto pointed out, PermGen is different from heap, a quick dirty way to fix the problem could be increase max PermGen size, -XX:MaxPermSize=512m. But per my experience, you won't get much after 512m.
The root cause looks like in the way how ant execute task, seems like ant uses a new class loader for each call (<dbunit>) (see the exception trace). You should dig more in ant source code or move the looping into a shell script / junit test so as to manage the class loading by yourself.
__________________________
Shijun
From: Roberto Lo Giacco <rlo...@gm...<mailto:rlo...@gm...>>
Reply-To: "dbu...@li...<mailto:dbu...@li...>" <dbu...@li...<mailto:dbu...@li...>>
To: "dbu...@li...<mailto:dbu...@li...>" <dbu...@li...<mailto:dbu...@li...>>
Subject: Re: [dbunit-developer] Possible memory leak with DbUnitTask.java?
John is right, the PermGen issue is not related to connection leak and if the connection variable is reused there is no leak: the heavyweight part of the connection is released within the close() method, the object itself, once closed, is lightweight and is marked for garbage collection once the variable is reused.
The PermGen space is more probably related to the Ant task itself on which I'm not really expert as I do not use Ant since 2001... Can you create a pastebin with your Ant build script? I guess that if you are trying to run an external build without forking the JVM than your problem is related to Ant rather than dbUnit.
Another check you can do is trying to execute the same amount of times in the same manner any other non trivial Ant task: if you have the same issue than you have the proof it's not a dbUnit problem.
Cheers,
Roberto
On Fri, Jun 22, 2012 at 12:19 AM, John Hurst <joh...@gm...<mailto:joh...@gm...>> wrote:
I thought that PermGen was used mostly for classes, rather than objects such as Connections, which are stored on the normal heap. Actually I think that traditionally -Xmx would not help with PermGen issues. But I vaguely recall that some changes have occurred in the relationship between PermGen and heap in recent years.
Seems rather odd to me that leaking a IDatabaseConnection would really cause this much harm. It's a rather trival resource.
Most important thing is: Did your patch fix the issue for you? If so it would tend to imply that the Connection leak was the problem...
Regards
John Hurst
On Fri, Jun 22, 2012 at 10:04 AM, Charles Chan <cch...@ya...<mailto:cch...@ya...>> wrote:
Hello,
I was using dbunit's Ant integration and have a for loop that exports a bunch of dataset into many small xml files (less than 5-50kb each).
After repeating <dbunit> for ~50 times, I got an OutOfMemoryException: PermGen space.
(v2.4.8)
C:\test\build.xml:364: java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1351)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1351)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1351)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
Although I can use -Xmx256m to increase the maximum heap space, I am curious why this problem occurred? I am able to import a 50MB xml file
without specifying -Xmx option, so in theory, exporting 100 50kb xml files should NOT cause any problems. Also, the problem can be simulated
by repeating the following ~100 times in a single Ant task.
<target name="test-dbunit-export>
<!-- export individual dataset -->
<dbunit driver="${mysql.driver}"
url="${mysql.url}/database"
userid="${mysql.userid}"
password="${mysql.password}"
classpath="${mysql.classpath}">
<export format="xml" dest="${dbunit.data.dir}/test1.xml">
<query name="tableQuery" sql="SELECT * FROM table WHERE column=''"/>
</export>
</dbunit>
<dbunit> ... </dbunit>
<dbunit> ... </dbunit>
<dbunit> ... </dbunit>
... <!-- repeat dbunit many times! -->
<dbunit> ... </dbunit>
</target>
----------
Looking at the code, I noticed DbUnitTasks.java, in the method execute(), it
only call "conn.close()", but what about "connection" object? Wouldn't
that cause a leak if "connection" is holding a reference to "conn"?
Should that be closed as well?
I am not sure if I am on the right path, but have included a patch for review as well.
Thank you!
Charles
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
dbunit-developer mailing list
dbu...@li...<mailto:dbu...@li...>
https://lists.sourceforge.net/lists/listinfo/dbunit-developer
--
Life is interfering with my game
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
dbunit-developer mailing list
dbu...@li...<mailto:dbu...@li...>
https://lists.sourceforge.net/lists/listinfo/dbunit-developer
________________________________
This email message and any attachments may contain legally privileged or confidential information intended solely for the use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution or copying of this message or its attachments is strictly prohibited. If you have received this message in error, please notify us immediately by telephone, fax or email and delete the message and all attachments to the message. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Investor Analytics LLC.
|
|
From: Roberto Lo G. <rlo...@gm...> - 2012-06-22 07:48:36
|
John is right, the PermGen issue is not related to connection leak and if
the connection variable is reused there is no leak: the heavyweight part of
the connection is released within the close() method, the object itself,
once closed, is lightweight and is marked for garbage collection once the
variable is reused.
The PermGen space is more probably related to the Ant task itself on which
I'm not really expert as I do not use Ant since 2001... Can you create a
pastebin with your Ant build script? I guess that if you are trying to run
an external build without forking the JVM than your problem
is related to Ant rather than dbUnit.
Another check you can do is trying to execute the same amount of times in
the same manner any other non trivial Ant task: if you have the same issue
than you have the proof it's not a dbUnit problem.
Cheers,
Roberto
On Fri, Jun 22, 2012 at 12:19 AM, John Hurst <joh...@gm...> wrote:
> I thought that PermGen was used mostly for classes, rather than objects
> such as Connections, which are stored on the normal heap. Actually I think
> that traditionally -Xmx would not help with PermGen issues. But I vaguely
> recall that some changes have occurred in the relationship between PermGen
> and heap in recent years.
>
> Seems rather odd to me that leaking a IDatabaseConnection would really
> cause this much harm. It's a rather trival resource.
>
> Most important thing is: Did your patch fix the issue for you? If so it
> would tend to imply that the Connection leak was the problem...
>
> Regards
>
> John Hurst
>
> On Fri, Jun 22, 2012 at 10:04 AM, Charles Chan <cch...@ya...> wrote:
>
>> Hello,
>>
>> I was using dbunit's Ant integration and have a for loop that exports a
>> bunch of dataset into many small xml files (less than 5-50kb each).
>> After repeating <dbunit> for ~50 times, I got an OutOfMemoryException:
>> PermGen space.
>>
>> (v2.4.8)
>> C:\test\build.xml:364: java.lang.OutOfMemoryError: PermGen space
>> at java.lang.ClassLoader.defineClass1(Native Method)
>> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
>> at
>> org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
>> at
>> org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
>> at
>> org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1351)
>> at
>> org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
>> at
>> org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>> at java.lang.ClassLoader.defineClass1(Native Method)
>> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
>> at
>> org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
>> at
>> org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
>> at
>> org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1351)
>> at
>> org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
>> at
>> org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>> at java.lang.ClassLoader.defineClass1(Native Method)
>> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
>> at
>> org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
>> at
>> org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
>> at
>> org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1351)
>> at
>> org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
>> at
>> org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>> at java.lang.ClassLoader.defineClass1(Native Method)
>> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
>> at
>> org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
>> at
>> org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
>>
>> Although I can use -Xmx256m to increase the maximum heap space, I am
>> curious why this problem occurred? I am able to import a 50MB xml file
>> without specifying -Xmx option, so in theory, exporting 100 50kb xml
>> files should NOT cause any problems. Also, the problem can be simulated
>> by repeating the following ~100 times in a single Ant task.
>>
>> <target name="test-dbunit-export>
>>
>> <!-- export individual dataset -->
>> <dbunit driver="${mysql.driver}"
>> url="${mysql.url}/database"
>> userid="${mysql.userid}"
>> password="${mysql.password}"
>> classpath="${mysql.classpath}">
>> <export format="xml"
>> dest="${dbunit.data.dir}/test1.xml">
>> <query name="tableQuery" sql="SELECT * FROM table
>> WHERE column=''"/>
>> </export>
>> </dbunit>
>>
>> <dbunit> ... </dbunit>
>> <dbunit> ... </dbunit>
>> <dbunit> ... </dbunit>
>> ... <!-- repeat dbunit many times! -->
>> <dbunit> ... </dbunit>
>>
>> </target>
>>
>> ----------
>>
>> Looking at the code, I noticed DbUnitTasks.java, in the method execute(),
>> it
>> only call "conn.close()", but what about "connection" object? Wouldn't
>> that cause a leak if "connection" is holding a reference to "conn"?
>> Should that be closed as well?
>>
>> I am not sure if I am on the right path, but have included a patch for
>> review as well.
>>
>> Thank you!
>> Charles
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> dbunit-developer mailing list
>> dbu...@li...
>> https://lists.sourceforge.net/lists/listinfo/dbunit-developer
>>
>>
>
>
> --
> Life is interfering with my game
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> dbunit-developer mailing list
> dbu...@li...
> https://lists.sourceforge.net/lists/listinfo/dbunit-developer
>
>
|
|
From: John H. <joh...@gm...> - 2012-06-21 23:19:07
|
I thought that PermGen was used mostly for classes, rather than objects
such as Connections, which are stored on the normal heap. Actually I think
that traditionally -Xmx would not help with PermGen issues. But I vaguely
recall that some changes have occurred in the relationship between PermGen
and heap in recent years.
Seems rather odd to me that leaking a IDatabaseConnection would really
cause this much harm. It's a rather trival resource.
Most important thing is: Did your patch fix the issue for you? If so it
would tend to imply that the Connection leak was the problem...
Regards
John Hurst
On Fri, Jun 22, 2012 at 10:04 AM, Charles Chan <cch...@ya...> wrote:
> Hello,
>
> I was using dbunit's Ant integration and have a for loop that exports a
> bunch of dataset into many small xml files (less than 5-50kb each).
> After repeating <dbunit> for ~50 times, I got an OutOfMemoryException:
> PermGen space.
>
> (v2.4.8)
> C:\test\build.xml:364: java.lang.OutOfMemoryError: PermGen space
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
> at
> org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
> at
> org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
> at
> org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1351)
> at
> org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
> at
> org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
> at
> org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
> at
> org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
> at
> org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1351)
> at
> org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
> at
> org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
> at
> org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
> at
> org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
> at
> org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1351)
> at
> org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
> at
> org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
> at
> org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
> at
> org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
>
> Although I can use -Xmx256m to increase the maximum heap space, I am
> curious why this problem occurred? I am able to import a 50MB xml file
> without specifying -Xmx option, so in theory, exporting 100 50kb xml files
> should NOT cause any problems. Also, the problem can be simulated
> by repeating the following ~100 times in a single Ant task.
>
> <target name="test-dbunit-export>
>
> <!-- export individual dataset -->
> <dbunit driver="${mysql.driver}"
> url="${mysql.url}/database"
> userid="${mysql.userid}"
> password="${mysql.password}"
> classpath="${mysql.classpath}">
> <export format="xml"
> dest="${dbunit.data.dir}/test1.xml">
> <query name="tableQuery" sql="SELECT * FROM table
> WHERE column=''"/>
> </export>
> </dbunit>
>
> <dbunit> ... </dbunit>
> <dbunit> ... </dbunit>
> <dbunit> ... </dbunit>
> ... <!-- repeat dbunit many times! -->
> <dbunit> ... </dbunit>
>
> </target>
>
> ----------
>
> Looking at the code, I noticed DbUnitTasks.java, in the method execute(),
> it
> only call "conn.close()", but what about "connection" object? Wouldn't
> that cause a leak if "connection" is holding a reference to "conn"?
> Should that be closed as well?
>
> I am not sure if I am on the right path, but have included a patch for
> review as well.
>
> Thank you!
> Charles
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> dbunit-developer mailing list
> dbu...@li...
> https://lists.sourceforge.net/lists/listinfo/dbunit-developer
>
>
--
Life is interfering with my game
|
|
From: Charles C. <cch...@ya...> - 2012-06-21 22:04:35
|
Hello,
I was using dbunit's Ant integration and have a for loop that exports a bunch of dataset into many small xml files (less than 5-50kb each).
After repeating <dbunit> for ~50 times, I got an OutOfMemoryException: PermGen space.
(v2.4.8)
C:\test\build.xml:364: java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1351)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1351)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1351)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
Although I can use -Xmx256m to increase the maximum heap space, I am curious why this problem occurred? I am able to import a 50MB xml file
without specifying -Xmx option, so in theory, exporting 100 50kb xml files should NOT cause any problems. Also, the problem can be simulated
by repeating the following ~100 times in a single Ant task.
<target name="test-dbunit-export>
<!-- export individual dataset -->
<dbunit driver="${mysql.driver}"
url="${mysql.url}/database"
userid="${mysql.userid}"
password="${mysql.password}"
classpath="${mysql.classpath}">
<export format="xml" dest="${dbunit.data.dir}/test1.xml">
<query name="tableQuery" sql="SELECT * FROM table WHERE column=''"/>
</export>
</dbunit>
<dbunit> ... </dbunit>
<dbunit> ... </dbunit>
<dbunit> ... </dbunit>
... <!-- repeat dbunit many times! -->
<dbunit> ... </dbunit>
</target>
----------
Looking at the code, I noticed DbUnitTasks.java, in the method execute(), it
only call "conn.close()", but what about "connection" object? Wouldn't
that cause a leak if "connection" is holding a reference to "conn"?
Should that be closed as well?
I am not sure if I am on the right path, but have included a patch for review as well.
Thank you!
Charles
|