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
No value for key [org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy] bound to thread #65
Comments
@brischniz Could you provide a sample application with the issue? Probably it's related to #61. |
I confirm this is happening. I'll try to investigate. |
This issue still occurs in our application running Grails 3.3.9. It would also appear that even disabling the plugin in |
Disabling the plugin will not prevent the issue. The ´expando metaclass’ enabling is done in a static block in the plugin. We might need some help from Grails team since every time we find a fix, anither issue arise. |
Were you by any chance successful in creating a sample application? It might be easier to lobby for some help if we can reproduce it reliably. *Edit: never mind, I was able to reproduce it. Turns out I actually have to include the plugin in |
Added sample here: https://github.com/joemccall86/melody-sample |
Thanks @joemccall86, I'll take a look at sample code. |
I've created branch 65_no_value_for_key, I see issue even without |
Thanks Sergio! I just had a new baby so I don’t have much time right now ;-) |
@bassmartin Congratulations on the birth of your baby! Enjoy this time :-) |
@bassmartin , yes, agree with @sergiomichels , Enjoy this time :-) And sleep |
Thanks @sergiomichels |
When I use the latest release, I don't have any SQL queries monitored. sql Statistics sql - 1 day None Do you all still have SQL queries monitored? I see this in the logs |
@bassmartin Probably Grails version or data source different configuration, I added simple test in https://github.com/javamelody/grails-melody-plugin/blob/master/app-integration-tests/src/integration-test/groovy/grails.melody.plugin/GrailsTransactionSpec.groovy specially for sql monitoring... We can start enhancing this integration test suite to cover this because is getting hard to handle all possibilities without tests. |
I installed a custom version with this code modified (removed the if Why is that if required?
|
Which class is this for you? I think my initial idea was to make sure that we're dealing with two levels of encapsulation to reach the datasource (store - targetds - targetds) but I guess we can check if property with this name exists instead of using instance of. |
This might have to do with my configuration. Here are some extracts :
I commented them and I still have a LazyConnectionDataSourceProxy |
Since the code in org.grails.datastore.gorm.jdbc.connections.DataSourceConnectionSourceFactory#proxy is
I think we could replace What do you think about that @sergiomichels ? |
Yep, looks good. I think that probably there's an way to configure this for one specific integration test (instead of creating new project), can you take a look at Spring Security plug-in and see if it's using it? https://github.com/grails-plugins/grails-spring-security-core/tree/master/integration-test-app |
I tried to integrate the grails-melody-plugin-1.73.2 into a Grails-3.3.8 application but with some GORM interactions I got the following stacktrace:
It seems that Graeme Rocher investigated on that issue a while ago: grails/grails-core#10675 (comment)
The text was updated successfully, but these errors were encountered: