[ 
https://issues.apache.org/jira/browse/BROOKLYN-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15964093#comment-15964093
 ] 

Aled Sage commented on BROOKLYN-449:
------------------------------------

I've now seen this as well. It seems to happen in our QA framework maybe one in 
100 times approx. It's not always for the same test (i.e. it's not specific to 
redis).

In the brooklyn server's log, I see:
{noformat}
2017-04-04 12:48:21,689 INFO  327 o.a.b.r.r.EffectorResource [tp1268907907-129] 
REST invocation of BasicApplicationImpl{id=k9kjw0ku0f}.stop[] {} by user *****
2017-04-04 12:48:21,697 WARN  327 o.a.b.r.u.DefaultExceptionMapper 
[tp1268907907-129] REST call generated exception type class 
java.lang.NoClassDefFoundError unrecognized in class 
org.apache.brooklyn.rest.util.DefaultExceptionMapper (subsequent occurrences 
will be logged debug only): java.lang.NoClassDefFoundError: Could not 
initialize class org.codehaus.groovy.runtime.InvokerHelper
{noformat}

This happens when invoking the {{stop}} effector over the REST api. Here's the 
error logged by the caller:
{noformat}
2017-04-04 12:48:21,705 ERROR 287 i.c.t.s.TestRunnerCallable [er-VpBXgoxP-3715] 
Error Executing test suite ******** on http://10.104.2.2:39012
java.lang.RuntimeException: POST request to 
http://10.104.2.2:39012/v1/applications/k9kjw0ku0f/entities/k9kjw0ku0f/effectors/stop?timeout=1m
 returned status 500 (Server Error): {"message":"Invalid java type: Could not 
initialize class 
org.codehaus.groovy.runtime.InvokerHelper","details":"java.lang.NoClassDefFoundError:
 Could not initialize class org.codehaus.groovy.runtime.InvokerHelper\n\tat 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.createPojoMetaClassGetPropertySite(AbstractCallSite.java:274)\n\tat
 org.codehaus.groovy.runtime.callsite.AbstractCallSite.crea
teGetPropertySite(AbstractCallSite.java:250)\n\tat 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.acceptGetProperty(AbstractCallSite.java:235)\n\tat
 org.codehaus.groovy.runtime.callsite
.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)\n\tat 
org.apache.brooklyn.util.groovy.GroovyJavaMethods.invokeMethodOnMetaClass(GroovyJavaMethods.java:210)\n\tat
 org.apache.brookl
yn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodLocal(AbstractManagementContext.java:321)\n\tat
 org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffec
torMethodSync(AbstractManagementContext.java:346)\n\tat 
org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:276)\n\tat
 org.apache.brooklyn.core.effecto
r.MethodEffector.call(MethodEffector.java:153)\n\tat 
org.apache.brooklyn.core.entity.trait.Startable$StopEffectorBody.call(Startable.java:68)\n\tat
 org.apache.brooklyn.core.entity.trait.Starta
ble$StopEffectorBody.call(Startable.java:60)\n\tat 
org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$1.call(EffectorTasks.java:82)\n\tat
 org.apache.brooklyn.util.core.tas
k.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:363)\n\tat 
org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:529)\n\tat
 java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\n\tat
 java.util.concurrent.ThreadPoolExecutor$Wo
rker.run(ThreadPoolExecutor.java:617)\n\tat 
java.lang.Thread.run(Thread.java:745)\n","error":500}
        at 
io.cloudsoft.test.scheduler.rest.client.BrooklynRestClientImpl.invokeEffector(BrooklynRestClientImpl.java:215)[287:io.cloudsoft.amp.qaframework.qa-test-scheduler:1.0.0.SNAPSHOT]
        at 
io.cloudsoft.test.scheduler.TestRunnerCallable.stopTest(TestRunnerCallable.java:405)[287:io.cloudsoft.amp.qaframework.qa-test-scheduler:1.0.0.SNAPSHOT]
        at 
io.cloudsoft.test.scheduler.TestRunnerCallable.executeTests(TestRunnerCallable.java:155)[287:io.cloudsoft.amp.qaframework.qa-test-scheduler:1.0.0.SNAPSHOT]
        at 
io.cloudsoft.test.scheduler.TestRunnerCallable.call(TestRunnerCallable.java:99)[287:io.cloudsoft.amp.qaframework.qa-test-scheduler:1.0.0.SNAPSHOT]
        at 
io.cloudsoft.test.scheduler.TestRunnerImpl$1.run(TestRunnerImpl.java:79)[287:io.cloudsoft.amp.qaframework.qa-test-scheduler:1.0.0.SNAPSHOT]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
        at 
org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:362)[120:org.apache.brooklyn.core:0.11.0.SNAPSHOT]
        at 
org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:529)[120:org.apache.brooklyn.core:0.11.0.SNAPSHOT]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
{noformat}

I think the long-term solution is to remove our use of Groovy (as proposed on 
the mailing list)! I'm not sure why this is happening. We've only seen it in 
our qa framework, so maybe there's some race with startup/shutdown (but no 
evidence of that in the logs, that I've seen).

> Intermittent NoClassDefFoundError deploying a redis blueprint
> -------------------------------------------------------------
>
>                 Key: BROOKLYN-449
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-449
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Duncan Grant
>
> 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)

Reply via email to