Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimpleJdbcTestUtils.executeSqlScript doesn't close script InputStream [SPR-8872] #13513

Closed
spring-projects-issues opened this issue Nov 24, 2011 · 0 comments
Assignees
Labels
in: test Issues in the test module type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Mickaël LEDUQUE opened SPR-8872 and commented

I use this code in a EJB context in the glassfish 3.1 server

SimpleJdbcTestUtils.executeSqlScript(new SimpleJdbcTemplate(
new SingleConnectionDataSource(jdbcConnection, true)),
new ClassPathResource("script.sql"), false);

There is not failure, but the following warning :

24 nov. 2011 15:27:28 com.sun.enterprise.loader.ASURLClassLoader$SentinelInputStream report
ATTENTION: Input stream has been finalized or forced closed without being explicitly closed; stream instantiation reported in following stack trace
java.lang.Throwable
at com.sun.enterprise.loader.ASURLClassLoader$SentinelInputStream.<init>(ASURLClassLoader.java:1230)
at com.sun.enterprise.loader.ASURLClassLoader.getResourceAsStream(ASURLClassLoader.java:878)
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:155)
at org.springframework.core.io.support.EncodedResource.getReader(EncodedResource.java:92)
at org.springframework.test.jdbc.SimpleJdbcTestUtils.executeSqlScript(SimpleJdbcTestUtils.java:139)
at org.springframework.test.jdbc.SimpleJdbcTestUtils.executeSqlScript(SimpleJdbcTestUtils.java:113)
at com.cs.services.bcmonitoring.itests.init.DbInitializerBean.initDb(DbInitializerBean.java:45)

I tried to just close it by myself, but it's a completely internal object that can't be accessed by the caller.


Affects: 3.0.6, 3.1 RC1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues in the test module type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants