From user-return-53313-archive-asf-public=cust-asf.ponee.io@ofbiz.apache.org Wed Feb 21 14:34:15 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2C4B718061A for ; Wed, 21 Feb 2018 14:34:15 +0100 (CET) Received: (qmail 14389 invoked by uid 500); 21 Feb 2018 13:34:13 -0000 Mailing-List: contact user-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ofbiz.apache.org Delivered-To: mailing list user@ofbiz.apache.org Received: (qmail 14354 invoked by uid 99); 21 Feb 2018 13:34:13 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Feb 2018 13:34:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B68C9C0145 for ; Wed, 21 Feb 2018 13:34:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.88 X-Spam-Level: * X-Spam-Status: No, score=1.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, HTML_OBFUSCATE_05_10=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 63xqfYq8nO6K for ; Wed, 21 Feb 2018 13:34:09 +0000 (UTC) Received: from mail-yb0-f180.google.com (mail-yb0-f180.google.com [209.85.213.180]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 5BCD25F1B3 for ; Wed, 21 Feb 2018 13:34:09 +0000 (UTC) Received: by mail-yb0-f180.google.com with SMTP id e3-v6so509433ybk.1 for ; Wed, 21 Feb 2018 05:34:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=jmNMMMSJA6MJLHYkOWzlQxUBP2BoYPvVPMm8bQo5rGY=; b=s7dvJvpiHozzFKxsG2RRS4redORXTSxBM81nIa1lvLogV5Tk6ADdM+JOxWxPy5SG9O 8fa7P0VbqU80lZTKcUl9yl9uF6DNKU/h56zycDDTkPzNSObv/MJk2h+yODTfHKTt7tVR 0YA71BpLsenWKolzD2brgvC25FO+wrQpOC0ljtUiJ1yNPsFelQjQwbs7YDb3+nblXLUw Q1W5vp6vO6LZSq/aYzwTg5fUplqTajlJq8PfIJJ5MrRBAIDGM+sTs+6fRG5TlFp7AUHY W0o325XV/eRuktmqgFfUxpEP1WGw0NCHyTmrmvwStWRj5cJeCScdMv3E9dZm2CgFyjsF Hfqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=jmNMMMSJA6MJLHYkOWzlQxUBP2BoYPvVPMm8bQo5rGY=; b=E2spg70eguedv4wc+eA2FdxjWVoLilcjOMfeoplP6xE7PUs2aTikvai+hXZqUomr7x 0Xnq29SX5UXRUtv3AxjNJ0OOQHE21AyFjnSxvXaH/PnaOCIafjxekJME+7X///vueV2g kUMzo/3BlPk1fWV6+hiipP6DIWqOS3/Rl6KP24bSfBOr0PyKunnkKRi4+Tf/7KmWlW9s j4O5p1ZxUlAwQBUeXmrm1MK18+POhdyvPH8HIWltC6Aptf+qdhoaKFqJcf9fFFchG5am OQXiQxKWyB1GMTa7+3Iqc5ws3a88Zwg8DntSLjypyGpay48r30C8qG+9j5n4xH22jzJk z7mQ== X-Gm-Message-State: APf1xPCkGh8o2Y0KA+6LzuVImANc3gTj67eBY4RUcZdUqi8yhymV+ERD og22iKoa9QebMjaRHEcIPF07hfrBZXMtg3q0rxE= X-Google-Smtp-Source: AH8x224G8KJp0re/I/c148z0qSWrrz1TFPN7p8MTXepj1PnSWUQrTaXx7hrs/h9Ioq/KDexybh3AsjCbEi62OYZg9uk= X-Received: by 2002:a25:a3c1:: with SMTP id e59-v6mr2247278ybi.434.1519220043628; Wed, 21 Feb 2018 05:34:03 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a25:e014:0:0:0:0:0 with HTTP; Wed, 21 Feb 2018 05:34:02 -0800 (PST) Received: by 2002:a25:e014:0:0:0:0:0 with HTTP; Wed, 21 Feb 2018 05:34:02 -0800 (PST) In-Reply-To: <659963be-6c70-4c04-8978-d6959efda213@antwebsystems.com> References: <1738061c-995f-f197-7117-e8717de85121@antwebsystems.com> <659963be-6c70-4c04-8978-d6959efda213@antwebsystems.com> From: Taher Alkhateeb Date: Wed, 21 Feb 2018 16:34:02 +0300 Message-ID: Subject: Re: quick docker image startup? To: Hans Bakker Cc: user@ofbiz.apache.org Content-Type: multipart/alternative; boundary="0000000000000946410565b8fbce" --0000000000000946410565b8fbce Content-Type: text/plain; charset="UTF-8" Oh .. that would be hard to debug without further analysis. Essentially Java is not seeing libraries in the classpath. The classpath is defined _inside_ the jar file with pointers to where the gradle cache is located. So it could be many things, maybe you did not make a first run with gradle to download the cache, or maybe you have different users inside the container each with their own cache directory. Another possibility is that you mounted a volume on top of the downloaded cache. On Feb 21, 2018 4:22 PM, "Hans Bakker" wrote: Thanks Taher, for the extended reply. currently I have tried the most simple one: java -jar build/libs/ofbiz.jar this works outside the docker image, however within the running container it gives the error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException at org.apache.ofbiz.base.start.Start.main(Start.java:60) Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.ParseEx ception 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) ... 1 more perhaps you have a suggestion for me? thanks again for your help. Regards, Hans On 21/02/18 17:56, Taher Alkhateeb wrote: > Oh I just remembered something else you might want to do. You can create a > volume for the cache, this way you wait for the download only the first > time you instantiate the image and subsequent container instantiations > would not need to download anything > > On Feb 21, 2018 9:55 AM, "Taher Alkhateeb" > wrote: > > The image has to get larger, there is no way around that. Either you > repopulate the cache or save a bigger image. OFBiz will not work without > its libraries just like in the ant days. > > For me I have a big OFBiz image because I don't care about size as much as > I do about startup time. > > Now your question was how to start without a rebuild. You can either: > > 1- in build.gradle go to the method createOfbizCommandTask and remove > "dependsOn build" > OR > 2- run java -jar build/libs/ofbiz.jar > > On Feb 21, 2018 8:03 AM, "Hans Bakker" wrote: > > Good day! > > i am trying to create a docker image of the new ofbiz using gradle. > > And obviously i want a quick startup time. > > So i run all the gradle build tasks offline, copy the result in a docker > image and install it in a docker environment. > > Then as normal run ./gradlew ofbiz as the startup command. > > Then because the gradle cache is not there gradle rebuids. Copying the > gradle cache into the docker image is no option, because it gets > substantial bigger. > > How to start the system assuming the build was successful and no rebuild is > required? > > -- Regards, Hans Bakker CEO, http://antwebsystems.com --0000000000000946410565b8fbce--