Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 20732200B47 for ; Sun, 3 Jul 2016 05:44:58 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1EE7D160A5F; Sun, 3 Jul 2016 03:44:58 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9CB48160A5D for ; Sun, 3 Jul 2016 05:44:56 +0200 (CEST) Received: (qmail 59141 invoked by uid 500); 3 Jul 2016 03:44:55 -0000 Mailing-List: contact dev-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list dev@asterixdb.apache.org Received: (qmail 59128 invoked by uid 99); 3 Jul 2016 03:44:54 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jul 2016 03:44:54 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 55863C05B8 for ; Sun, 3 Jul 2016 03:44:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.98 X-Spam-Level: * X-Spam-Status: No, score=1.98 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=uci-edu.20150623.gappssmtp.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id nOePHnsL7nFN for ; Sun, 3 Jul 2016 03:44:51 +0000 (UTC) Received: from mail-yw0-f179.google.com (mail-yw0-f179.google.com [209.85.161.179]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id A4CD25F400 for ; Sun, 3 Jul 2016 03:44:50 +0000 (UTC) Received: by mail-yw0-f179.google.com with SMTP id i12so17424939ywa.1 for ; Sat, 02 Jul 2016 20:44:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uci-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=EUh9uzoeTTn20JNY5xjzr1MPvIKlKmkd5qyrV1SD5YI=; b=x6dEFN7qMqwYMVF3sMCoWpASFWOa7HnT0ZJzKjHzYy1NC5IWN0MJmQIsCYZYNcG1n+ Ev3YGtRPD1WkeqDyXhc+BTXLUNcgayC/Xa3Vr5f/8tGRTNbuFVk1nZgVD4FUHBgOX1bs aMp9iB6v8TUgrQJDHxv6FajcpoS4LX7QdblU97WrRmIIfsOXXpgP+81CzsrRVoWs9leM SMZUFrvng6bqT8aLgsIh7WrdUluHz9m++by7B2koCuOJAMhnopyboaTnUICZEwlct1Ln kUvyP/BHMOx0C32kDEps7J1Qpavm6fxVZCtqRicDfArTAVwvf3X8H3IVjXtOPvRU7LoX kD9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=EUh9uzoeTTn20JNY5xjzr1MPvIKlKmkd5qyrV1SD5YI=; b=V39jmwqlWEoVq5FwysOyAjQ/P84Wj6jyBh9+n8NYPZwSz59hDHM+r83aeDzrdzw2zL nysOBiM4Yig//Q/NViWY5eFIkg3fn2cRSAMufbHWswg6b3n6wqzB/Ru+gjCctgkZgmfx My/l782eE+I85o8U5zDh/JbM5cTPzP5EznZjkfF1vAOnyZnR7o8DnK6H4AIGFWoK5Dza d+V4EuVjPKjMGnAl33xYy29NHRsW55MD9UW+h8fuFWyi/79fU2xlnLkSWlT4Bw/A86SN 3FaLvlJSc3Px8YW8k7qUfww8pp05xGR0VUNcQCkd7ehaBpfwp3xa/Rea2sogvmHoefi1 UsOw== X-Gm-Message-State: ALyK8tJDf2RIJMCiQiooXJ45w3wzpHqPdRUZpSiOhDbR3bFDujy3YBzy01ysY+uvH7qaAeq4ih/wgT492q9q5Q== X-Received: by 10.13.205.134 with SMTP id p128mr3564979ywd.314.1467517488640; Sat, 02 Jul 2016 20:44:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.84.70 with HTTP; Sat, 2 Jul 2016 20:44:48 -0700 (PDT) In-Reply-To: References: From: Xikui Wang Date: Sat, 2 Jul 2016 20:44:48 -0700 Message-ID: Subject: Re: External function dependency problem To: dev@asterixdb.apache.org Content-Type: multipart/alternative; boundary=001a114e541e9ce6f80536b30a14 archived-at: Sun, 03 Jul 2016 03:44:58 -0000 --001a114e541e9ce6f80536b30a14 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable The error log is as follow: org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: Unable to load/instantiate class edu.uci.ics.cloudberry.noah.feed.GeoTagFactory at org.apache.hyracks.algebricks.runtime.operators.std.AssignRuntimeFactory$1.= open(AssignRuntimeFactory.java:111) at org.apache.hyracks.algebricks.runtime.operators.meta.AlgebricksMetaOperator= Descriptor$2.open(AlgebricksMetaOperatorDescriptor.java:143) at org.apache.asterix.external.feed.dataflow.SyncFeedRuntimeInputHandler.open(= SyncFeedRuntimeInputHandler.java:39) at org.apache.asterix.external.operators.FeedMetaComputeNodePushable.open(Feed= MetaComputeNodePushable.java:127) at org.apache.hyracks.control.nc.Task.pushFrames(Task.java:341) at org.apache.hyracks.control.nc.Task.run(Task.java:297) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1= 142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:= 617) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: Unable to load/instantiate class edu.uci.ics.cloudberry.noah.feed.GeoTagFactory at org.apache.asterix.external.library.ExternalFunction.(ExternalFunctio= n.java:75) at org.apache.asterix.external.library.ExternalScalarFunction.(ExternalF= unctionProvider.java:53) at org.apache.asterix.external.library.ExternalFunctionProvider.getExternalFun= ctionEvaluator(ExternalFunctionProvider.java:39) at org.apache.asterix.external.library.ExternalScalarFunctionEvaluatorFactory.= createScalarEvaluator(ExternalScalarFunctionEvaluatorFactory.java:41) at org.apache.hyracks.algebricks.runtime.operators.std.AssignRuntimeFactory$1.= open(AssignRuntimeFactory.java:109) ... 8 more Caused by: java.lang.ClassCastException: edu.uci.ics.cloudberry.noah.feed.GeoTagFactory cannot be cast to org.apache.asterix.external.api.IFunctionFactory at org.apache.asterix.external.library.ExternalFunction.(ExternalFunctio= n.java:72) ... 12 more org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: Unable to load/instantiate class edu.uci.ics.cloudberry.noah.feed.GeoTagFactory at org.apache.hyracks.algebricks.runtime.operators.std.AssignRuntimeFactory$1.= open(AssignRuntimeFactory.java:111) at org.apache.hyracks.algebricks.runtime.operators.meta.AlgebricksMetaOperator= Descriptor$2.open(AlgebricksMetaOperatorDescriptor.java:143) at org.apache.asterix.external.feed.dataflow.SyncFeedRuntimeInputHandler.open(= SyncFeedRuntimeInputHandler.java:39) at org.apache.asterix.external.operators.FeedMetaComputeNodePushable.open(Feed= MetaComputeNodePushable.java:127) at org.apache.hyracks.control.nc.Task.pushFrames(Task.java:341) at org.apache.hyracks.control.nc.Task.run(Task.java:297) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1= 142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:= 617) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: Unable to load/instantiate class edu.uci.ics.cloudberry.noah.feed.GeoTagFactory at org.apache.asterix.external.library.ExternalFunction.(ExternalFunctio= n.java:75) at org.apache.asterix.external.library.ExternalScalarFunction.(ExternalF= unctionProvider.java:53) at org.apache.asterix.external.library.ExternalFunctionProvider.getExternalFun= ctionEvaluator(ExternalFunctionProvider.java:39) at org.apache.asterix.external.library.ExternalScalarFunctionEvaluatorFactory.= createScalarEvaluator(ExternalScalarFunctionEvaluatorFactory.java:41) at org.apache.hyracks.algebricks.runtime.operators.std.AssignRuntimeFactory$1.= open(AssignRuntimeFactory.java:109) ... 8 more Caused by: java.lang.ClassCastException: edu.uci.ics.cloudberry.noah.feed.GeoTagFactory cannot be cast to org.apache.asterix.external.api.IFunctionFactory at org.apache.asterix.external.library.ExternalFunction.(ExternalFunctio= n.java:72) ... 12 more org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: Unable to load/instantiate class edu.uci.ics.cloudberry.noah.feed.GeoTagFactory at org.apache.hyracks.control.nc.Task.pushFrames(Task.java:365) at org.apache.hyracks.control.nc.Task.run(Task.java:297) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1= 142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:= 617) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: Unable to load/instantiate class edu.uci.ics.cloudberry.noah.feed.GeoTagFactory at org.apache.asterix.external.operators.FeedMetaComputeNodePushable.open(Feed= MetaComputeNodePushable.java:130) at org.apache.hyracks.control.nc.Task.pushFrames(Task.java:341) ... 4 more Caused by: org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: Unable to load/instantiate class edu.uci.ics.cloudberry.noah.feed.GeoTagFactory at org.apache.hyracks.algebricks.runtime.operators.std.AssignRuntimeFactory$1.= open(AssignRuntimeFactory.java:111) at org.apache.hyracks.algebricks.runtime.operators.meta.AlgebricksMetaOperator= Descriptor$2.open(AlgebricksMetaOperatorDescriptor.java:143) at org.apache.asterix.external.feed.dataflow.SyncFeedRuntimeInputHandler.open(= SyncFeedRuntimeInputHandler.java:39) at org.apache.asterix.external.operators.FeedMetaComputeNodePushable.open(Feed= MetaComputeNodePushable.java:127) ... 5 more Caused by: org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: Unable to load/instantiate class edu.uci.ics.cloudberry.noah.feed.GeoTagFactory at org.apache.asterix.external.library.ExternalFunction.(ExternalFunctio= n.java:75) at org.apache.asterix.external.library.ExternalScalarFunction.(ExternalF= unctionProvider.java:53) at org.apache.asterix.external.library.ExternalFunctionProvider.getExternalFun= ctionEvaluator(ExternalFunctionProvider.java:39) at org.apache.asterix.external.library.ExternalScalarFunctionEvaluatorFactory.= createScalarEvaluator(ExternalScalarFunctionEvaluatorFactory.java:41) at org.apache.hyracks.algebricks.runtime.operators.std.AssignRuntimeFactory$1.= open(AssignRuntimeFactory.java:109) ... 8 more Caused by: java.lang.ClassCastException: edu.uci.ics.cloudberry.noah.feed.GeoTagFactory cannot be cast to org.apache.asterix.external.api.IFunctionFactory at org.apache.asterix.external.library.ExternalFunction.(ExternalFunctio= n.java:72) ... 12 more org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: Unable to load/instantiate class edu.uci.ics.cloudberry.noah.feed.GeoTagFactory at org.apache.hyracks.control.nc.Task.pushFrames(Task.java:365) at org.apache.hyracks.control.nc.Task.run(Task.java:297) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1= 142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:= 617) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: Unable to load/instantiate class edu.uci.ics.cloudberry.noah.feed.GeoTagFactory at org.apache.asterix.external.operators.FeedMetaComputeNodePushable.open(Feed= MetaComputeNodePushable.java:130) at org.apache.hyracks.control.nc.Task.pushFrames(Task.java:341) ... 4 more Caused by: org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: Unable to load/instantiate class edu.uci.ics.cloudberry.noah.feed.GeoTagFactory at org.apache.hyracks.algebricks.runtime.operators.std.AssignRuntimeFactory$1.= open(AssignRuntimeFactory.java:111) at org.apache.hyracks.algebricks.runtime.operators.meta.AlgebricksMetaOperator= Descriptor$2.open(AlgebricksMetaOperatorDescriptor.java:143) at org.apache.asterix.external.feed.dataflow.SyncFeedRuntimeInputHandler.open(= SyncFeedRuntimeInputHandler.java:39) at org.apache.asterix.external.operators.FeedMetaComputeNodePushable.open(Feed= MetaComputeNodePushable.java:127) ... 5 more Caused by: org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: Unable to load/instantiate class edu.uci.ics.cloudberry.noah.feed.GeoTagFactory at org.apache.asterix.external.library.ExternalFunction.(ExternalFunctio= n.java:75) at org.apache.asterix.external.library.ExternalScalarFunction.(ExternalF= unctionProvider.java:53) at org.apache.asterix.external.library.ExternalFunctionProvider.getExternalFun= ctionEvaluator(ExternalFunctionProvider.java:39) at org.apache.asterix.external.library.ExternalScalarFunctionEvaluatorFactory.= createScalarEvaluator(ExternalScalarFunctionEvaluatorFactory.java:41) at org.apache.hyracks.algebricks.runtime.operators.std.AssignRuntimeFactory$1.= open(AssignRuntimeFactory.java:109) ... 8 more Caused by: java.lang.ClassCastException: edu.uci.ics.cloudberry.noah.feed.GeoTagFactory cannot be cast to org.apache.asterix.external.api.IFunctionFactory at org.apache.asterix.external.library.ExternalFunction.(ExternalFunctio= n.java:72) ... 12 more org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.api.exceptions.HyracksDataException: java.lang.InterruptedException at org.apache.hyracks.control.nc.Task.pushFrames(Task.java:365) at org.apache.hyracks.control.nc.Task.run(Task.java:297) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1= 142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:= 617) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.hyracks.api.exceptions.HyracksDataException: java.lang.InterruptedException at org.apache.hyracks.dataflow.std.collectors.NonDeterministicChannelReader.fi= ndNextSender(NonDeterministicChannelReader.java:126) at org.apache.hyracks.dataflow.std.collectors.NonDeterministicFrameReader.next= Frame(NonDeterministicFrameReader.java:43) at org.apache.hyracks.control.nc.Task.pushFrames(Task.java:344) ... 4 more Caused by: java.lang.InterruptedException at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:502) at org.apache.hyracks.dataflow.std.collectors.NonDeterministicChannelReader.fi= ndNextSender(NonDeterministicChannelReader.java:124) ... 6 more org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.api.exceptions.HyracksDataException: java.lang.InterruptedException at org.apache.hyracks.control.nc.Task.pushFrames(Task.java:365) at org.apache.hyracks.control.nc.Task.run(Task.java:297) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1= 142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:= 617) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.hyracks.api.exceptions.HyracksDataException: java.lang.InterruptedException at org.apache.hyracks.dataflow.std.collectors.NonDeterministicChannelReader.fi= ndNextSender(NonDeterministicChannelReader.java:126) at org.apache.hyracks.dataflow.std.collectors.NonDeterministicFrameReader.next= Frame(NonDeterministicFrameReader.java:43) at org.apache.hyracks.control.nc.Task.pushFrames(Task.java:344) ... 4 more Caused by: java.lang.InterruptedException at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:502) at org.apache.hyracks.dataflow.std.collectors.NonDeterministicChannelReader.fi= ndNextSender(NonDeterministicChannelReader.java:124) ... 6 more org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.api.exceptions.HyracksDataException: java.lang.InterruptedException at org.apache.hyracks.control.nc.Task.pushFrames(Task.java:365) at org.apache.hyracks.control.nc.Task.run(Task.java:297) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1= 142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:= 617) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.hyracks.api.exceptions.HyracksDataException: java.lang.InterruptedException at org.apache.hyracks.dataflow.std.collectors.NonDeterministicChannelReader.fi= ndNextSender(NonDeterministicChannelReader.java:126) at org.apache.hyracks.dataflow.std.collectors.NonDeterministicFrameReader.next= Frame(NonDeterministicFrameReader.java:43) at org.apache.hyracks.control.nc.Task.pushFrames(Task.java:344) ... 4 more Caused by: java.lang.InterruptedException at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:502) at org.apache.hyracks.dataflow.std.collectors.NonDeterministicChannelReader.fi= ndNextSender(NonDeterministicChannelReader.java:124) ... 6 more org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.api.exceptions.HyracksDataException: java.lang.InterruptedException at org.apache.hyracks.control.nc.Task.pushFrames(Task.java:365) at org.apache.hyracks.control.nc.Task.run(Task.java:297) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1= 142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:= 617) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.hyracks.api.exceptions.HyracksDataException: java.lang.InterruptedException at org.apache.hyracks.dataflow.std.collectors.NonDeterministicChannelReader.fi= ndNextSender(NonDeterministicChannelReader.java:126) at org.apache.hyracks.dataflow.std.collectors.NonDeterministicFrameReader.next= Frame(NonDeterministicFrameReader.java:43) at org.apache.hyracks.control.nc.Task.pushFrames(Task.java:344) ... 4 more Caused by: java.lang.InterruptedException at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:502) at org.apache.hyracks.dataflow.std.collectors.NonDeterministicChannelReader.fi= ndNextSender(NonDeterministicChannelReader.java:124) ... 6 more testFile src/test/resources/runtimets/queries/external-library/tweetGeoTag/tweetGeoT= ag.3.update.aql raised an exception: java.lang.Exception: HTTP operation failed: 2 STATUS LINE: HTTP/1.1 500 Server Error SUMMARY: Error: Failure in feed STACKTRACE: org.apache.asterix.common.exceptions.AsterixException: Failure in feed at org.apache.asterix.external.feed.management.FeedLifecycleEventSubscriber.as= sertNoFailure(FeedLifecycleEventSubscriber.java:62) at org.apache.asterix.external.feed.management.FeedLifecycleEventSubscriber.as= sertEvent(FeedLifecycleEventSubscriber.java:55) at org.apache.asterix.aql.translator.QueryTranslator.handleConnectFeedStatemen= t(QueryTranslator.java:2238) at org.apache.asterix.aql.translator.QueryTranslator.compileAndExecute(QueryTr= anslator.java:366) at org.apache.asterix.aql.translator.QueryTranslator.compileAndExecute(QueryTr= anslator.java:253) at org.apache.asterix.api.http.servlet.RESTAPIServlet.handleRequest(RESTAPISer= vlet.java:195) at org.apache.asterix.api.http.servlet.UpdateAPIServlet.handleRequest(UpdateAP= IServlet.java:30) at org.apache.asterix.api.http.servlet.RESTAPIServlet.doPost(RESTAPIServlet.ja= va:162) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:546) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:483) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.jav= a:228) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.jav= a:956) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:411= ) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java= :188) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java= :891) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:11= 7) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:= 114) at org.eclipse.jetty.server.Server.handle(Server.java:353) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:5= 98) at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnecti= on.java:1076) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:427) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint= .java:510) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndP= oint.java:34) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.= java:40) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:= 450) at java.lang.Thread.run(Thread.java:745) at org.apache.asterix.test.aql.TestExecutor.executeHttpMethod(TestExecutor.jav= a:275) at org.apache.asterix.test.aql.TestExecutor.executeUpdate(TestExecutor.java:33= 1) at org.apache.asterix.test.aql.TestExecutor.executeTest(TestExecutor.java:496) at org.apache.asterix.test.aql.TestExecutor.executeTest(TestExecutor.java:762) at org.apache.asterix.test.runtime.ExecutionTest.test(ExecutionTest.java:106) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:6= 2) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp= l.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod= .java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.= java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.j= ava:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.ja= va:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.ja= va:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.ja= va:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.junit.runners.Suite.runChild(Suite.java:127) at org.junit.runners.Suite.runChild(Suite.java:26) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:2= 6) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.junit.runner.JUnitCore.run(JUnitCore.java:160) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTest= Runner.java:119) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTest= Runner.java:42) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitSt= arter.java:234) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:6= 2) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp= l.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) ...Unexpected! On Sat, Jul 2, 2016 at 7:23 PM, Raman Grover wrote: > i am missing the attachment > On Jul 2, 2016 6:39 PM, "Xikui Wang" wrote: > > > Hi Raman, > > > > Thanks for your help. I tried this quick fix on my branch, but it > > introduces some new exceptions. I think this causes Asterix fails at > > entering the external function. The error message is attached. > > > > Best, > > Xikui > > > > On Fri, Jul 1, 2016 at 10:11 AM, Raman Grover > > wrote: > > > >> Operations related to setting up an external library are contained in > >> ExternalLibraryUtil > >> < > >> > https://github.com/apache/asterixdb/blob/master/asterixdb/asterix-app/src= /main/java/org/apache/asterix/app/external/ExternalLibraryUtils.java > >> > > >> > >> At line 382, we have > >> // create and return the class loader > >> > >> ClassLoader classLoader =3D new URLClassLoader(urls, parentClassLoader= ); > >> return classLoader; > >> > >> Above, we have the parentClassLoader set to the classloader for > >> ExternalLibraryUtil which is the application class loader (AsterixDB's > >> classloader that loads the dependencies from pom.xml). The proposed > >> solution (a) in earlier thread - skipping application classloader woul= d > >> translate to replacing the above code with > >> > >> ClassLoader classLoader =3D new URLClassLoader(urls, null); > >> > >> Regards, > >> Raman > >> > >> On Thu, Jun 30, 2016 at 4:41 PM, Xikui Wang wrote: > >> > >> > > > >> > > Hi Abdullah, > >> > > >> > I reverted my code to reproduce the problem. Noticing this external > >> > function has a couple of other bugs but the dependency one is blocki= ng > >> > others, so this should be enough to reproduce the problem. > >> > > >> > > > >> > The external function package is geoTag.zip. > >> > > >> > > =E2=80=8B > >> > > > >> > > =E2=80=8BTest scripts are in tweetGeoTag.zip > >> > > >> > External function is loading data from data/, i.e.: data/state.json = . > So > >> > all json files in data.zip need to be placed under > >> > ../asterixdb/asterix-app/data/ > >> > > >> > The real_tweets_adm.adm used in ddl is also attached. > >> > > >> > This setting will cause > >> > > >> > java.lang.NoSuchMethodError: > >> > > com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z > >> > > at > >> > > > >> > com.fasterxml.jackson.databind.ObjectMapper.(ObjectMapper.java:541) > >> > > at > >> > > > >> > com.fasterxml.jackson.databind.ObjectMapper.(ObjectMapper.java:452) > >> > > at > org.wololo.geojson.GeoJSONFactory.(GeoJSONFactory.java:17) > >> > > at > >> > > > >> > > >> > edu.uci.ics.cloudberry.gnosis.USGeoJSONIndex.loadShape(IGeoIndex.scala:29= ) > >> > > at > >> > > > >> > > >> > edu.uci.ics.cloudberry.gnosis.USGeoGnosis$.loadShape(USGeoGnosis.scala:10= 1) > >> > > at > >> > > > >> > > >> > edu.uci.ics.cloudberry.gnosis.USGeoGnosis$$anonfun$load$1.apply(USGeoGnos= is.scala:20) > >> > > at > >> > > > >> > > >> > edu.uci.ics.cloudberry.gnosis.USGeoGnosis$$anonfun$load$1.apply(USGeoGnos= is.scala:18) > >> > > at > >> > > > >> > > >> > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca= la:245) > >> > > at > >> > > > >> > > >> > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca= la:245) > >> > > at scala.collection.immutable.List.foreach(List.scala:381) > >> > > at > >> scala.collection.TraversableLike$class.map(TraversableLike.scala:245) > >> > > at scala.collection.immutable.List.map(List.scala:285) > >> > > at > >> edu.uci.ics.cloudberry.gnosis.USGeoGnosis.load(USGeoGnosis.scala:18) > >> > > at > >> edu.uci.ics.cloudberry.gnosis.USGeoGnosis.(USGeoGnosis.scala:15) > >> > > at > >> > > > >> > > >> > edu.uci.ics.cloudberry.noah.feed.GeoTagFunction.initialize(GeoTagFunction= .java:34) > >> > > at > >> > > > >> > > >> > org.apache.asterix.external.library.ExternalFunction.initialize(ExternalF= unction.java:113) > >> > > > >> > > >> > The attachments exceed the size limits. I moved them under this goog= le > >> > drive directory: > >> > > >> > > >> > > >> > https://drive.google.com/folderview?id=3D0B_6Dzy3OTjaNRUVJWTRvWEtKSU0&usp= =3Dsharing > >> > > >> > Let me know if you need anything else. Thanks. > >> > > >> > Best, > >> > Xikui > >> > > >> > On Thu, Jun 30, 2016 at 12:06 PM, abdullah alamoudi < > bamousaa@gmail.com > >> > > >> > wrote: > >> > > >> > > I will look into that. > >> > >> > >> > >> @Xikui, > >> > >> Do you have a reproducable use case where such a behavior can be > >> > observed? > >> > >> > >> > >> Cheers, > >> > >> Abdullah. > >> > >> > >> > >> On Thu, Jun 30, 2016 at 7:53 PM, Raman Grover < > >> ramangrover29@gmail.com> > >> > >> wrote: > >> > >> > >> > >> > Hi > >> > >> > > >> > >> > Each external library has an separately associated custom class > >> loader > >> > >> > (URLClassLoader) that loads the contained functions and any > >> > dependencies > >> > >> > (jar files) packaged inside the library. The custom loader fits > >> into > >> > the > >> > >> > natural hierarchy with system (classpath based) classloader as > the > >> > >> > immediate parent and bootstrap classloader as the root. As the > >> > >> delegation > >> > >> > model works, a class loader attempts to load a class only after > >> > >> parent(s) > >> > >> > in the lineage have failed. > >> > >> > > >> > >> > In your specific case, the system class loader is able to find > the > >> > >> jackson > >> > >> > library from the configured classpath and so the library > >> classloader > >> > is > >> > >> not > >> > >> > involved at all for this jar. The problem arising due to > different > >> > >> versions > >> > >> > of a jar present across the hierarchy of classloaders is simila= r > to > >> > one > >> > >> > faced in web containers such as Tomcat or application servers > such > >> as > >> > >> > Websphere where system loaded classes can override any > application > >> > >> specific > >> > >> > classes due to name conflict. > >> > >> > > >> > >> > The way you are defining a library is correct. The fix needs to > be > >> in > >> > >> the > >> > >> > way the classes are loaded by AsterixDB (here acting as an > >> application > >> > >> > server). > >> > >> > > >> > >> > I see two ways:- > >> > >> > > >> > >> > a) Skipping the system class loader: AsterixDB uses a > >> URLClassloader > >> > to > >> > >> > load libraries. Setting the parent of the this classloader as > null > >> > >> implies > >> > >> > the bootrstrap classloader (root) as the immediate parent. The > >> > bootstrap > >> > >> > classloader loads rt.jar (java runtime classes) and i18n.jar an= d > >> these > >> > >> > definitely do not have conflicts with your library dependencies > (if > >> > they > >> > >> > do, not sure why one would override the classes in rt.jar and s= o > we > >> > >> need to > >> > >> > fix the library). Note that the system classloader is out of th= e > >> > >> hierarchy > >> > >> > here and so any other jars loaded by AsterixDB from its classpa= th > >> > >> (pom.xml) > >> > >> > would not be visible. > >> > >> > > >> > >> > b) Defining a Custom Class loader: Inside AsterixDB, we provide= a > >> > custom > >> > >> > implementation of classloader that attempts to load a class pri= or > >> to > >> > >> > delegating to the parent. This way, the library classes and > >> packaged > >> > >> > dependencies override any system level classes from the class > path > >> and > >> > >> even > >> > >> > the classes contained in rt.jar and i18n.jar. > >> > >> > > >> > >> > I am opening the discussion here to suggest further alternative= s > or > >> > >> provide > >> > >> > preferences. > >> > >> > > >> > >> > I have a preference for (a) (skipping the system class loader) > for > >> > two > >> > >> > reasons: > >> > >> > > >> > >> > a) it is simpler > >> > >> > > >> > >> > b) the other option allows a custom class loader to override > >> classes > >> > in > >> > >> > rt.jar., which is ok but not how classloaders are supposed to > work > >> in > >> > >> > principle. > >> > >> > > >> > >> > Regards, > >> > >> > > >> > >> > Raman > >> > >> > > >> > >> > > >> > >> > > >> > >> > > >> > >> > > >> > >> > > >> > >> > > >> > >> > On Jun 29, 2016 11:07 PM, "Mike Carey" > wrote: > >> > >> > > >> > >> > > Any classloader experts have suggestions...? > >> > >> > > On Jun 29, 2016 10:26 PM, "Xikui Wang" wrote= : > >> > >> > > > >> > >> > > > Hi Devs, > >> > >> > > > > >> > >> > > > We found a problem when trying to build external functions > for > >> the > >> > >> > > > cloudberry demo. > >> > >> > > > > >> > >> > > > When the external function is depend on certain library, th= e > >> > library > >> > >> > that > >> > >> > > > comes with the external function will be blocked by same > >> library > >> > in > >> > >> > > > AsterixDB. In our case, our external function 'geoTag' uses > >> > jackson > >> > >> > > v2.7.1, > >> > >> > > > and we packed all dependencies into one single jar. When > >> running > >> > >> > 'geoTag' > >> > >> > > > on Asterix, it will call jackson v2.0.0 in AsterixDB which > >> causes > >> > >> > > > NullPointerException. We have to manually change pom.xml in > >> > >> AsterixDB > >> > >> > to > >> > >> > > > fix that. > >> > >> > > > > >> > >> > > > We are wondering is that because we load the external > function > >> in > >> > a > >> > >> > wrong > >> > >> > > > way, or this could be one possible interesting problem whic= h > is > >> > >> worth > >> > >> > > > noticing. Thanks. > >> > >> > > > > >> > >> > > > Best, > >> > >> > > > Xikui > >> > >> > > > > >> > >> > > > >> > >> > > >> > >> > >> > > > >> > > > >> > > >> > >> > >> > >> -- > >> Raman > >> > > > > > --001a114e541e9ce6f80536b30a14--