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

NoSuchMethodException in DerbyEmbeddedDatabaseConfigurer [SPR-6346] #11012

Closed
spring-projects-issues opened this issue Nov 13, 2009 · 7 comments
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Jaro Kuruc opened SPR-6346 and commented

I am getting java.lang.NoSuchMethodException: org.springframework.jdbc.datasource.embedded.DerbyEmbeddedDatabaseConfigurer.getNoopOutputStream() when booting embedded Derby instance. It is most likely caused by package-private visibility of DerbyEmbeddedDatabaseConfigurer.getNoopOutputStream() method.


Affects: 3.0 RC2

Referenced from: commits 2cb6e21, 3547230

@spring-projects-issues
Copy link
Collaborator Author

Keith Donald commented

Can you specify what version of Derby you are testing against?

@spring-projects-issues
Copy link
Collaborator Author

Jaro Kuruc commented

I'm using Derby 10.5.1000001.764942 from EBR.

@spring-projects-issues
Copy link
Collaborator Author

Keith Donald commented

Ok. I'm wondering because we haven't noticed this is in our tests. Was the effect of this just a warning and the embedded DB was still able to initialize?

@spring-projects-issues
Copy link
Collaborator Author

Dave Syer commented

It's just a one-line log message. If you change the visibility of that method to public you just get a different error (IllegalAccessException), so we might as well give up (and/or raise an issue with Derby). Pretty minimal impact on an application either way.

@spring-projects-issues
Copy link
Collaborator Author

Jaro Kuruc commented

Maybe it's because DerbyEmbeddedDatabaseConfigurer itself has package-private visibility.

@spring-projects-issues
Copy link
Collaborator Author

Dave Syer commented

That is indeed the problem, or at least the start of the problem. Derby uses Class.forName() in its SingleStream utility class, so that's going to break in other interesting ways when the class loader is not what they were expecting for some reason (e.g. in a special container: JEE or OSGi). I guess we can make that class public final (I'll leave that up to Keith and/or Oliver), but it won't solve the problem in all containers.

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Fixed through the use of a public OutputStreamFactory helper.

Juergen

@spring-projects-issues spring-projects-issues added type: bug A general bug in: data Issues in data modules (jdbc, orm, oxm, tx) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.0 RC3 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants