Subject: Strange error trying to run Asterix master

From: Steven Jacobs <[email-masked]>
Date: Thu, 28 Sep 2017 14:26:22 -0700

Hi all,
I've been stuck for some time now trying to get master Asterix to debug
correctly for me in Eclipse on my machine. It seems to deal with the class
generation being done by maven, but that's as far as I can see so far. No
one I've talked to has a similar issue, so I was wondering if anyone from
the community at large has had such an issue. It manifests itself when
tying to create the evaluator for a function. The stack trace is attached
below. If anyone has seen such an issue, I would love to get any advice you
may have.

java.lang.VerifyError: Bad return type

Exception Details:

  Location:

org/apache/asterix/runtime/evaluators/functions/records/RecordMergeDescriptor$_EvaluatorFactoryGen.access$0(Lorg/apache/asterix/runtime/evaluators/functions/records/RecordMergeDescriptor$_EvaluatorFactoryGen;)Lorg/apache/asterix/runtime/evaluators/functions/records/RecordMergeDescriptor;
@4: areturn

  Reason:

    Type
'org/apache/asterix/runtime/evaluators/functions/records/RecordMergeDescriptor$_Gen'
(current frame, stack[0]) is not assignable to
'org/apache/asterix/runtime/evaluators/functions/records/RecordMergeDescriptor'
(from method signature)

  Current Frame:

    bci: @4

    flags: { }

    locals: {
'org/apache/asterix/runtime/evaluators/functions/records/RecordMergeDescriptor$_EvaluatorFactoryGen'
}

    stack: {
'org/apache/asterix/runtime/evaluators/functions/records/RecordMergeDescriptor$_Gen'
}

  Bytecode:

    0x0000000: 2ab4 0063 b0

at
org.apache.asterix.runtime.evaluators.functions.records.RecordMergeDescriptor$_Gen.createEvaluatorFactory(
RecordMergeDescriptor.java:86)

at
org.apache.asterix.jobgen.QueryLogicalExpressionJobGen.createScalarFunctionEvaluatorFactory(
QueryLogicalExpressionJobGen.java:144)

at
org.apache.asterix.jobgen.QueryLogicalExpressionJobGen.createEvaluatorFactory(
QueryLogicalExpressionJobGen.java:109)

at org.apache.asterix.jobgen.QueryLogicalExpressionJobGen.codegenArguments(
QueryLogicalExpressionJobGen.java:161)

at
org.apache.asterix.jobgen.QueryLogicalExpressionJobGen.createScalarFunctionEvaluatorFactory(
QueryLogicalExpressionJobGen.java:134)

at
org.apache.asterix.jobgen.QueryLogicalExpressionJobGen.createEvaluatorFactory(
QueryLogicalExpressionJobGen.java:109)

at
org.apache.hyracks.algebricks.core.algebra.expressions.ExpressionRuntimeProvider.createEvaluatorFactory(
ExpressionRuntimeProvider.java:41)

at
org.apache.hyracks.algebricks.core.algebra.operators.physical.AssignPOperator.contributeRuntimeOperator(
AssignPOperator.java:84)

at
org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator.contributeRuntimeOperator(
AbstractLogicalOperator.java:166)

at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(
PlanCompiler.java:97)

at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(
PlanCompiler.java:84)

at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(
PlanCompiler.java:84)

at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(
PlanCompiler.java:84)

at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(
PlanCompiler.java:84)

at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(
PlanCompiler.java:84)

at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(
PlanCompiler.java:84)

at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(
PlanCompiler.java:84)

at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(
PlanCompiler.java:84)

at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(
PlanCompiler.java:84)

at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compilePlan(
PlanCompiler.java:60)

at
org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$1$1.createJob(
HeuristicCompilerFactoryBuilder.java:107)

at org.apache.asterix.api.common.APIFramework.compileQuery(
APIFramework.java:333)

at
org.apache.asterix.app.translator.QueryTranslator.rewriteCompileInsertUpsert(
QueryTranslator.java:1864)

at org.apache.asterix.app.translator.QueryTranslator.lambda$0(
QueryTranslator.java:1752)

at
org.apache.asterix.app.translator.QueryTranslator.handleInsertUpsertStatement(
QueryTranslator.java:1778)

at org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(
QueryTranslator.java:336)

at org.apache.asterix.api.http.server.ApiServlet.post(ApiServlet.java:162)

at org.apache.hyracks.http.server.AbstractServlet.handle(
AbstractServlet.java:78)

at org.apache.hyracks.http.server.HttpRequestHandler.handle(
HttpRequestHandler.java:70)

at org.apache.hyracks.http.server.HttpRequestHandler.call(
HttpRequestHandler.java:55)

at org.apache.hyracks.http.server.HttpRequestHandler.call(
HttpRequestHandler.java:36)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(
ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(
ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

---

From: Wail Alkowaileet <[email-masked]>
Date: Thu, 28 Sep 2017 20:19:51 -0700

I got the same issue before. I did "clean project" and the issue seems to
be resolved.

On Thu, Sep 28, 2017 at 2:26 PM, Steven Jacobs <[email-masked]> wrote:

> org/apache/asterix/runtime/evaluators/functions/records/
> RecordMergeDescriptor$_EvaluatorFactoryGen.access$0(
> Lorg/apache/asterix/runtime/evaluators/functions/records/
> RecordMergeDescriptor$_EvaluatorFactoryGen;)Lorg/apache/asterix/runtime/
> evaluators/functions/records/RecordMergeDescriptor;
> @4: areturn
>
>   Reason:
>
>     Type
> 'org/apache/asterix/runtime/evaluators/functions/records/
> RecordMergeDescriptor$_EvaluatorFactoryGen'
> }
>
>     stack: {
> org.apache.asterix.runtime.evaluators.functions.records.
> RecordMergeDescriptor$_Gen.createEvaluatorFactory(
> org.apache.hyracks.algebricks.core.algebra.expressions.
> ExpressionRuntimeProvider.createEvaluatorFactory(
> org.apache.hyracks.algebricks.core.algebra.operators.
> physical.AssignPOperator.contributeRuntimeOperator(
> AssignPOperator.java:84)
>
> at
> org.apache.hyracks.algebricks.core.algebra.operators.logical.
> AbstractLogicalOperator.contributeRuntimeOperator(

-- 

*Regards,*
Wail Alkowaileet

---

From: Steven Jacobs <[email-masked]>
Date: Fri, 29 Sep 2017 04:37:35 +0000

If only that worked for me :( I have even tried deleting the m2 repository
cache completely.
Steven

On Thu, Sep 28, 2017 at 8:19 PM Wail Alkowaileet <[email-masked]> wrote:

> > RecordMergeDescriptor$_Gen'
> > RecordMergeDescriptor'
> > RecordMergeDescriptor$_Gen'
> > }
> >
> >   Bytecode:
> >
> >     0x0000000: 2ab4 0063 b0
> >
> >
> > at
> org.apache.asterix.api.http.server.ApiServlet.post(ApiServlet.java:162)
> >

---

From: Michael Blow <[email-masked]>
Date: Fri, 29 Sep 2017 05:22:05 +0000

What JVM is this?  Try Oracle latest Java 8 if not already using.

-MDB

---

From: Steven Jacobs <[email-masked]>
Date: Fri, 29 Sep 2017 11:56:05 -0700

I'm on build build 1.8.0_65-b17. I've switched to Intellij and the problem
doesn't occur there so it seems to be related to Eclipse specifically.
Steven

On Thu, Sep 28, 2017 at 10:22 PM, Michael Blow <[email-masked]>
wrote:

> > > > generation being done by maven, but that's as far as I can see so
> far.
> > No
> > > > below. If anyone has seen such an issue, I would love to get any
> advice
> > > you
> > > > may have.
> > > >
> > > >
> > org.apache.hyracks.algebricks.compiler.api.
> HeuristicCompilerFactoryBuilde
> > > > r$1$1.createJob(

---

From: Chen Luo <[email-masked]>
Date: Fri, 29 Sep 2017 15:26:50 -0700

Hi Steven,

I was using Eclipse (on mac) to debug AsterixDB's code, and things work
well for me. After switch to another branch, I think we need to run "mvn
clean install" to rebuild class files, and in the meanwhile need to refresh
the workspace in Eclipse to rebuild things in Eclipse.

Best regards,
Chen Luo

On Fri, Sep 29, 2017 at 11:56 AM, Steven Jacobs <[email-masked]> wrote:

> > > > I got the same issue before. I did "clean project" and the issue
> seems
> > to
> > > > be resolved.
> > > >
> > > > > correctly for me in Eclipse on my machine. It seems to deal with
> the
> > > > class
> > > > > one I've talked to has a similar issue, so I was wondering if
> anyone
> > > from