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 CFCB7200D50 for ; Mon, 4 Dec 2017 14:48:34 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CE40B160C05; Mon, 4 Dec 2017 13:48:34 +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 215E5160BF9 for ; Mon, 4 Dec 2017 14:48:33 +0100 (CET) Received: (qmail 33630 invoked by uid 500); 4 Dec 2017 13:48:32 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 33618 invoked by uid 99); 4 Dec 2017 13:48:32 -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; Mon, 04 Dec 2017 13:48:32 +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 B393CC4D5F for ; Mon, 4 Dec 2017 13:48:31 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, KAM_NUMSUBJECT=0.5, 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: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id iGIPUaXArXzg for ; Mon, 4 Dec 2017 13:48:30 +0000 (UTC) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 29DEC5F3CF for ; Mon, 4 Dec 2017 13:48:30 +0000 (UTC) Received: by mail-wm0-f53.google.com with SMTP id b76so14442936wmg.1 for ; Mon, 04 Dec 2017 05:48:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=U6n5oJrIIj4qJvlaZEJGfIeVsJcmaPpLAAz4caC9ZL4=; b=MvC8Tuku1NN3C3LTNGM95d8i+P1t74TGoqVrcq9wLxsQ5FFjNTizxmdQsQnNGV7vDJ tAlG8Ujv1hwY0RPpveZbTQAzFw7KFjVOIb9QQ2UCj8zaMjbL8nKT/OofQ8NPcRV8XcoU AAeceth4m2AlDDRHFGWqH+k5EXSneZkyPR2M/qYgLzDour2WjQ61urzGaC175M9vnS3A EvgY61TA03W1FcoWXhYpSpAVImtsCjA/7n+7aTMgjxJjBv48BiVB2ubU2EzmE90KARvR vUQ8HumtGvPR36mLpid3CRdntzlJyRvxmzhud+MVGKL9TTrIHKDM9peJlAcnXeFS3ryJ 7FdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=U6n5oJrIIj4qJvlaZEJGfIeVsJcmaPpLAAz4caC9ZL4=; b=oDkvGaFtOffZutPX/U2ycCnt2yFUFBKxQ7tL99Wm00jRvfsqGkVFVgUYIJX+7sTrgk FCxARAy1Rno9lj9hY1uYv3P2+PkuITW8Hzwm24fllsbKxsffBbb15+eh5vXhEOd6IRWK D6KyutFIooPJOGCSRBtOReq4wj/ec55D6/VeV7hWz5WUutOROT5KnMMBfago/Y6hEHv5 uF+nHZ46FnqqeUbQDeNsUyUIhhuKSvJueEuuObcUUBzw+pF2NAZ73nGoqyI5vaWQQDXR KFsqFzSqz0wygwqFhBKyahAhAe5rDX08/D2cByejHzN/4d/x+DEhnVaEXOhsdQB6/fgv S07w== X-Gm-Message-State: AJaThX7HFg8UzDToXrjZFTAjIJ2VRMdOguMJgW/z8vbY9T19tBCFj8o1 swUx2UvjPwZvMyTTtrcx4csNgDf52qTjYbKqmkQ= X-Google-Smtp-Source: AGs4zMbDw0Pg0I1OQAmHr7IP2gXftVG2HNpyL1mSW7lLnF5AS5/14x6vwA5AjJgIqdA4KZ/tFtHkqHTJxxcofuc022Q= X-Received: by 10.28.236.6 with SMTP id k6mr7016421wmh.95.1512395309398; Mon, 04 Dec 2017 05:48:29 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Adrien Grand Date: Mon, 04 Dec 2017 13:48:18 +0000 Message-ID: Subject: Re: how to compile lucene 4.10.4 using jdk7 To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary="001a114780022d3f04055f83f9e8" archived-at: Mon, 04 Dec 2017 13:48:35 -0000 --001a114780022d3f04055f83f9e8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I suspect you are not using the version you think you are using at compile time, this error message suggests that you are actually compiling with Java 9. See this email thread which has a bit more information about this issue: http://mail-archives.apache.org/mod_mbox/lucene-dev/201503.mbox/%3C07c401d0= 6aba$0b477c80$21d67580$@thetaphi.de%3E . Le ven. 24 nov. 2017 =C3=A0 15:28, Yonghui Zhao a = =C3=A9crit : > Hi, > > I clone lucene 4.10.4 tag from github and use ant to build. > > My ant and local jdk in mac info: > > *Apache Ant(TM) version 1.9.9 compiled on February 2 2017* > *Trying the default build file: build.xml* > *Buildfile: /Users/yozhao/src/lucene-solr/lucene/core/build.xml* > *Detected Java version: 1.7 in: > /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre* > *Detected OS: Mac OS X* > > > I use simple one word "ant" command to build the jar, and copy the jar to > my Centos server. > Jdk in the server is 1.7.0_67 > > > But when I start my service, exception thrown > > 20 Exception in thread "main" java.lang.NoSuchMethodError: > java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer; > 21 at > > org.apache.lucene.store.ByteBufferIndexInput$SingleBufferImpl.(Byte= BufferIndexInput.java:418) > 22 at > > org.apache.lucene.store.ByteBufferIndexInput.newInstance(ByteBufferIndexI= nput.java:55) > 23 at > org.apache.lucene.store.MMapDirectory.openInput(MMapDirectory.java:199) > 24 at > > org.apache.lucene.store.NRTCachingDirectory.openInput(NRTCachingDirectory= .java:198) > 25 at > org.apache.lucene.store.Directory.openChecksumInput(Directory.java:113) > 26 at > > org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.ja= va:836) > 27 at > > org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.ja= va:769) > > > > This should be some issue with jdk version. I compile in 1.7.0_45 and run > in 1.7.0_67 why can this happen? > --001a114780022d3f04055f83f9e8--