asterixdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abdullah alamoudi <bamou...@gmail.com>
Subject Re: Error when building on a new machine
Date Fri, 25 Aug 2017 05:37:50 GMT
Riyafa,
Those are built in asterix-runtime if I am not mistaken (used to be in asterix-algebra). If
you see the error when you run AsterixHyracksIntegrationUtil through the IDE, here is what
I do:
open commandline

go to asterix-runtime
> mvn install -o -DskipTests;

when this completes, run AsterixHyracksIntegrationUtil again and it will work.

Not the smoothest experience but hope this helps,
Abdullah.

P.S,
If this still doesn't work for you, let me know and I will help you further.

> On Aug 24, 2017, at 9:45 PM, Riyafa Abdul Hameed <riyafa@apache.org> wrote:
> 
> Dear all,
> 
> My question is when does these .class files that end with $_Gen, $1 or
> .class files that contain $ get generator. I mean what configuration in
> asterixDB pom files generate these? Because these classes are not generated
> when I build my branch in a fresh clone.
> Kindly help.
> 
> Thank you.
> Sincerely,
> Riyafa
> 
> On 25 August 2017 at 09:18, Riyafa Abdul Hameed <riyafa.12@cse.mrt.ac.lk>
> wrote:
> 
>> Hi Till,
>> 
>> I first built using maven and ran the main method of
>> AsterixHyracksIntegrationUtil using the ide. How do I build all classes
>> using maven? Is there a place that I might have corrupted a pom.xml? The
>> classes that don't load are ones ending with a $_Gen (found by debugging)
>> Kindly help.
>> 
>> Thank you.
>> Sincerely,
>> Riyafa
>> 
>> On 25 Aug 2017 01:32, "Till Westmann" <tillw@apache.org> wrote:
>> 
>> 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 "
>>> AsterixHyracks7IntegrationUtil"
>>> 
>>> 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.resol
>>> veFunction(
>>> NonTaggedDataFormat.java:319)
>>> at org.apache.asterix.jobgen.QueryLogicalExpressionJobGen.
>>> createScalarFunctionEvaluatorFactory(QueryLogicalExpressionJ
>>> obGen.java:138)
>>> at org.apache.asterix.jobgen.QueryLogicalExpressionJobGen.
>>> createEvaluatorFactory(QueryLogicalExpressionJobGen.java:109)
>>> at org.apache.hyracks.algebricks.core.algebra.expressions.
>>> ExpressionRuntimeProvider.createEvaluatorFactory(ExpressionR
>>> untimeProvider.
>>> 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.AbstractRul
>>> eController.
>>> rewriteOperatorRef(AbstractRuleController.java:126)
>>> at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRul
>>> eController.
>>> rewriteOperatorRef(AbstractRuleController.java:100)
>>> at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRul
>>> eController.
>>> 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.HeuristicCompiler
>>> FactoryBuilde
>>> 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$han
>>> dleQuery$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(ApiServle
>>> t.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.resol
>>> veFunction(
>>> NonTaggedDataFormat.java:319)
>>> at org.apache.asterix.jobgen.QueryLogicalExpressionJobGen.
>>> createScalarFunctionEvaluatorFactory(QueryLogicalExpressionJ
>>> obGen.java:138)
>>> at org.apache.asterix.jobgen.QueryLogicalExpressionJobGen.
>>> createEvaluatorFactory(QueryLogicalExpressionJobGen.java:109)
>>> at org.apache.hyracks.algebricks.core.algebra.expressions.
>>> ExpressionRuntimeProvider.createEvaluatorFactory(ExpressionR
>>> untimeProvider.
>>> 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.AbstractRul
>>> eController.
>>> rewriteOperatorRef(AbstractRuleController.java:126)
>>> at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRul
>>> eController.
>>> rewriteOperatorRef(AbstractRuleController.java:100)
>>> at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRul
>>> eController.
>>> 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.HeuristicCompiler
>>> FactoryBuilde
>>> 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$han
>>> dleQuery$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(ApiServle
>>> t.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