emacarron / mybatis

Automatically exported from code.google.com/p/mybatis
0 stars 0 forks source link

Migration: FileInputStrem not closed. #76

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using MyBatis v3.0.1.

I ran migration with a very large script repository and I experienced this 
exception:

org.apache.ibatis.migration.MigrationException: Error undoing last migration.  
Cause: org.apache.ibatis.migration.MigrationException: Error loading 
environment properties.  Cause: java.io.FileNotFoundException: 
environments/test.properties (Too many open files)
    at org.apache.ibatis.migration.commands.DownCommand.execute(DownCommand.java:53)

The problem is that the method Command#execute() invokes 
BaseCommand#environmentProperties(), this method opens a new 
FileInputStream(file) but does not close it. 

I attached the patch to resolve this problem.

tnx a lot.
Marco

Original issue reported on code.google.com by marco.sp...@gmail.com on 5 Aug 2010 at 3:21

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by nathan.m...@gmail.com on 5 Aug 2010 at 3:33

GoogleCodeExporter commented 9 years ago

Original comment by nathan.m...@gmail.com on 5 Aug 2010 at 4:44

GoogleCodeExporter commented 9 years ago

Original comment by eduardo.macarron on 4 Apr 2012 at 10:40