asterixdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Till Westmann" <ti...@apache.org>
Subject Re: Error when building on a new machine
Date Thu, 24 Aug 2017 20:02:50 GMT
Hi Riyafa,

I think that the class that is failing to load is a class that should be 
generated during the maven build.
Did you build with maven or with your IDE?

Cheers,
Till

On 24 Aug 2017, at 12:58, Riyafa Abdul Hameed wrote:

> Dear all,
>
> I pushed my code to the branch "geometry" in github[1]. Then cloned 
> this
> repo in a fresh machine and checked out to the "geometry" branch. 
> After
> building this branch I ran the main of the 
> "AsterixHyracksIntegrationUtil"
> class and logged into the cosole[2] and then tried running a function 
> say:
> st_geom_from_geojson({"type":"MultiLineString","coordinates":[[[1.0,2.0],[4.0,5.0],[7.0,8.0]]]});
>
> Whatever the function I run I get the following exception:
>
> ​Unhandled throwable
> java.lang.ExceptionInInitializerError
> at org.apache.asterix.runtime.functions.FunctionManagerHolder.
> createFunctionManager(FunctionManagerHolder.java:33)
> at org.apache.asterix.runtime.functions.FunctionManagerHolder.<clinit>
> (FunctionManagerHolder.java:25)
> at 
> org.apache.asterix.runtime.formats.NonTaggedDataFormat.resolveFunction(
> NonTaggedDataFormat.java:319)
> at org.apache.asterix.jobgen.QueryLogicalExpressionJobGen.
> createScalarFunctionEvaluatorFactory(QueryLogicalExpressionJobGen.java:138)
> 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.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:217)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:153)
> at org.apache.hyracks.algebricks.core.algebra.expressions.
> ScalarFunctionCallExpression.accept(ScalarFunctionCallExpression.java:55)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.changeRec(ConstantFoldingRule.java:259)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:185)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:153)
> at org.apache.hyracks.algebricks.core.algebra.expressions.
> ScalarFunctionCallExpression.accept(ScalarFunctionCallExpression.java:55)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.changeRec(ConstantFoldingRule.java:259)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:185)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:153)
> at org.apache.hyracks.algebricks.core.algebra.expressions.
> ScalarFunctionCallExpression.accept(ScalarFunctionCallExpression.java:55)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.changeRec(ConstantFoldingRule.java:259)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:185)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:153)
> at org.apache.hyracks.algebricks.core.algebra.expressions.
> ScalarFunctionCallExpression.accept(ScalarFunctionCallExpression.java:55)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.changeRec(ConstantFoldingRule.java:259)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:185)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:153)
> at org.apache.hyracks.algebricks.core.algebra.expressions.
> ScalarFunctionCallExpression.accept(ScalarFunctionCallExpression.java:55)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.transform(ConstantFoldingRule.java:163)
> at org.apache.hyracks.algebricks.core.algebra.operators.logical.
> AbstractAssignOperator.acceptExpressionTransform(
> AbstractAssignOperator.java:67)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule.rewritePost(
> ConstantFoldingRule.java:150)
> at 
> org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.
> rewriteOperatorRef(AbstractRuleController.java:126)
> at 
> org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.
> rewriteOperatorRef(AbstractRuleController.java:100)
> at 
> org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.
> rewriteOperatorRef(AbstractRuleController.java:100)
> at org.apache.hyracks.algebricks.compiler.rewriter.rulecontrollers.
> SequentialFixpointRuleController.rewriteWithRuleCollection(
> SequentialFixpointRuleController.java:53)
> at 
> org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.
> runOptimizationSets(HeuristicOptimizer.java:102)
> at org.apache.hyracks.algebricks.core.rewriter.base.
> HeuristicOptimizer.optimize(HeuristicOptimizer.java:82)
> at 
> org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilde
> r$1$1.optimize(HeuristicCompilerFactoryBuilder.java:90)
> at org.apache.asterix.api.common.APIFramework.compileQuery(
> APIFramework.java:267)
> at 
> org.apache.asterix.app.translator.QueryTranslator.rewriteCompileQuery(
> QueryTranslator.java:1833)
> at 
> org.apache.asterix.app.translator.QueryTranslator.lambda$handleQuery$1(
> QueryTranslator.java:2306)
> at org.apache.asterix.app.translator.QueryTranslator.createAndRunJob(
> QueryTranslator.java:2406)
> at org.apache.asterix.app.translator.QueryTranslator.
> deliverResult(QueryTranslator.java:2339)
> at org.apache.asterix.app.translator.QueryTranslator.
> handleQuery(QueryTranslator.java:2318)
> at 
> org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(
> QueryTranslator.java:370)
> at 
> org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(
> QueryTranslator.java:253)
> at 
> org.apache.asterix.api.http.server.ApiServlet.post(ApiServlet.java:153)
> 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)
> Caused by: java.lang.IllegalStateException: 
> java.lang.ClassNotFoundException:
> org.apache.asterix.runtime.evaluators.functions.records.
> FieldAccessByIndexDescriptor$_Gen
> at org.apache.asterix.runtime.functions.FunctionCollection.
> getGeneratedFunctionDescriptorFactory(FunctionCollection.java:656)
> at org.apache.asterix.runtime.functions.FunctionCollection.<
> clinit>(FunctionCollection.java:631)
> ... 52 more
> Caused by: java.lang.ClassNotFoundException: 
> org.apache.asterix.runtime.
> evaluators.functions.records.FieldAccessByIndexDescriptor$_Gen
> at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> at org.apache.asterix.runtime.functions.FunctionCollection.
> getGeneratedFunctionDescriptorFactory(FunctionCollection.java:652)
> ... 53 more
>
> Aug 24, 2017 8:48:18 AM 
> org.apache.hyracks.http.server.HttpRequestHandler
> call
> SEVERE: Failure handling HTTP Request
> java.lang.ExceptionInInitializerError
> at org.apache.asterix.runtime.functions.FunctionManagerHolder.
> createFunctionManager(FunctionManagerHolder.java:33)
> at org.apache.asterix.runtime.functions.FunctionManagerHolder.<clinit>
> (FunctionManagerHolder.java:25)
> at 
> org.apache.asterix.runtime.formats.NonTaggedDataFormat.resolveFunction(
> NonTaggedDataFormat.java:319)
> at org.apache.asterix.jobgen.QueryLogicalExpressionJobGen.
> createScalarFunctionEvaluatorFactory(QueryLogicalExpressionJobGen.java:138)
> 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.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:217)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:153)
> at org.apache.hyracks.algebricks.core.algebra.expressions.
> ScalarFunctionCallExpression.accept(ScalarFunctionCallExpression.java:55)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.changeRec(ConstantFoldingRule.java:259)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:185)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:153)
> at org.apache.hyracks.algebricks.core.algebra.expressions.
> ScalarFunctionCallExpression.accept(ScalarFunctionCallExpression.java:55)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.changeRec(ConstantFoldingRule.java:259)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:185)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:153)
> at org.apache.hyracks.algebricks.core.algebra.expressions.
> ScalarFunctionCallExpression.accept(ScalarFunctionCallExpression.java:55)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.changeRec(ConstantFoldingRule.java:259)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:185)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:153)
> at org.apache.hyracks.algebricks.core.algebra.expressions.
> ScalarFunctionCallExpression.accept(ScalarFunctionCallExpression.java:55)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.changeRec(ConstantFoldingRule.java:259)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:185)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.visitScalarFunctionCallExpress
> ion(ConstantFoldingRule.java:153)
> at org.apache.hyracks.algebricks.core.algebra.expressions.
> ScalarFunctionCallExpression.accept(ScalarFunctionCallExpression.java:55)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule$
> ConstantFoldingVisitor.transform(ConstantFoldingRule.java:163)
> at org.apache.hyracks.algebricks.core.algebra.operators.logical.
> AbstractAssignOperator.acceptExpressionTransform(
> AbstractAssignOperator.java:67)
> at org.apache.asterix.optimizer.rules.ConstantFoldingRule.rewritePost(
> ConstantFoldingRule.java:150)
> at 
> org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.
> rewriteOperatorRef(AbstractRuleController.java:126)
> at 
> org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.
> rewriteOperatorRef(AbstractRuleController.java:100)
> at 
> org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.
> rewriteOperatorRef(AbstractRuleController.java:100)
> at org.apache.hyracks.algebricks.compiler.rewriter.rulecontrollers.
> SequentialFixpointRuleController.rewriteWithRuleCollection(
> SequentialFixpointRuleController.java:53)
> at 
> org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.
> runOptimizationSets(HeuristicOptimizer.java:102)
> at org.apache.hyracks.algebricks.core.rewriter.base.
> HeuristicOptimizer.optimize(HeuristicOptimizer.java:82)
> at 
> org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilde
> r$1$1.optimize(HeuristicCompilerFactoryBuilder.java:90)
> at org.apache.asterix.api.common.APIFramework.compileQuery(
> APIFramework.java:267)
> at 
> org.apache.asterix.app.translator.QueryTranslator.rewriteCompileQuery(
> QueryTranslator.java:1833)
> at 
> org.apache.asterix.app.translator.QueryTranslator.lambda$handleQuery$1(
> QueryTranslator.java:2306)
> at org.apache.asterix.app.translator.QueryTranslator.createAndRunJob(
> QueryTranslator.java:2406)
> at org.apache.asterix.app.translator.QueryTranslator.
> deliverResult(QueryTranslator.java:2339)
> at org.apache.asterix.app.translator.QueryTranslator.
> handleQuery(QueryTranslator.java:2318)
> at 
> org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(
> QueryTranslator.java:370)
> at 
> org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(
> QueryTranslator.java:253)
> at 
> org.apache.asterix.api.http.server.ApiServlet.post(ApiServlet.java:153)
> 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)
> Caused by: java.lang.IllegalStateException: 
> java.lang.ClassNotFoundException:
> org.apache.asterix.runtime.evaluators.functions.records.
> FieldAccessByIndexDescriptor$_Gen
> at org.apache.asterix.runtime.functions.FunctionCollection.
> getGeneratedFunctionDescriptorFactory(FunctionCollection.java:656)
> at org.apache.asterix.runtime.functions.FunctionCollection.<
> clinit>(FunctionCollection.java:631)
> ... 52 more
> Caused by: java.lang.ClassNotFoundException: 
> org.apache.asterix.runtime.
> evaluators.functions.records.FieldAccessByIndexDescriptor$_Gen
> at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> at org.apache.asterix.runtime.functions.FunctionCollection.
> getGeneratedFunctionDescriptorFactory(FunctionCollection.java:652)
> ... 53 more
>
> In my machine the code works fine. In fresh machine it doesn't. When I
> built the master first and the given branch next it works fine. The 
> code
> runs all the integration tests in gerrit also successfully. The error 
> is
> occuring at "getGeneratedFunctionDescriptorFactory" function at the 
> line
> "Class<?> generatedCl = cl.getClassLoader().loadClass(className);" 
> where it
> calls for loadclass.
>
> I am completely puzzled by this behaviour in a fresh clone of the 
> branch.
> Any insite into this if any would be highly helpful. I am unable to 
> find
> the root cause becaue it occurs only in a fresh clone and when master 
> is
> not built before my branch. Kindly help me figure out the issue. Have 
> I
> changed the structure so badly that I am breaking everything?
> Kindly help.
>
> Thank you.
> Sincerely,
> Riyafa
>
> [1] https://github.com/riyafa/asterixdb
> [2] http://localhost:19001/
> [3] https://asterix-gerrit.ics.uci.edu/#/c/1838/

Mime
View raw message