[
https://issues.apache.org/jira/browse/BROOKLYN-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16028250#comment-16028250
]
ASF GitHub Bot commented on BROOKLYN-449:
-----------------------------------------
GitHub user aledsage opened a pull request:
https://github.com/apache/brooklyn-server/pull/706
Remove GroovyJavaMethods.* usage
Motivated by @duncangrant encountering more problems like that in
https://issues.apache.org/jira/browse/BROOKLYN-449, but this time when it tried
to call `DslComponent` which called `GroovyJavaMethods.truth`.
Now the only use of `GroovyJavaMethods` are:
* If we genuinely have a Groovy-specific object, such as a `Closure`
* `AbstractAggregatingEnricher` constructor uses
`GroovyJavaMethods.castToPredicate()` (but that code is all deprecated since
0.7.0, so should just be deleted - assuming it is never mentioned in anyone's
persisted state?!)
---
These changes will change the semantics of our `attributeWhenReady` etc
very slightly, for people taking advantage of the more unusual groovy'isms.
The difference between `GroovyJavaMethods.truth` and
`JavaGroovyEquivalents.groovyTruth()` is that the former also handles
"matchers" and classes with an asBoolean method (see
http://groovy-lang.org/semantics.html#Groovy-Truth).
However, we deprecated all the groovy support in 0.11.0, so I think it's
fine to make these changes now.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/aledsage/brooklyn-server remove-groovy-usage
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-server/pull/706.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #706
----
commit c52cb126c6efa64a1093efca423245b6ee9d8e52
Author: Aled Sage <[email protected]>
Date: 2017-05-29T11:27:10Z
Remove GroovyJavaMethods.* usage
----
> Intermittent NoClassDefFoundError (org.codehaus.groovy.runtime.InvokerHelper)
> invoking effector
> -----------------------------------------------------------------------------------------------
>
> Key: BROOKLYN-449
> URL: https://issues.apache.org/jira/browse/BROOKLYN-449
> Project: Brooklyn
> Issue Type: Bug
> Reporter: Duncan Grant
> Attachments: amp.debug.log, amp.info.log, karaf.log, karaf output
>
>
> I've seen the following error occasionally during redis deployment. Most of
> the time it seems to work.
> java.lang.NoClassDefFoundError: Could not initialize class
> org.codehaus.groovy.runtime.InvokerHelper
> I'm deploying https://github.com/brooklyncentral/brooklyn-redis-server using
> the catalog.tests.bom
> Sorry - the logs are in kibana and I don't know how to export them.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)