Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 226639AFE for ; Tue, 27 Mar 2012 09:33:16 +0000 (UTC) Received: (qmail 72999 invoked by uid 500); 27 Mar 2012 09:33:14 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 72944 invoked by uid 500); 27 Mar 2012 09:33:13 -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 72931 invoked by uid 99); 27 Mar 2012 09:33:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Mar 2012 09:33:13 +0000 X-ASF-Spam-Status: No, hits=1.3 required=5.0 tests=SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of uwe@thetaphi.de designates 188.138.97.18 as permitted sender) Received: from [188.138.97.18] (HELO mail.sd-datasolutions.de) (188.138.97.18) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Mar 2012 09:33:06 +0000 Received: from VEGA (gate2.marum.de [134.102.237.2]) by mail.sd-datasolutions.de (Postfix) with ESMTPSA id E84E214AA2ED for ; Tue, 27 Mar 2012 09:32:45 +0000 (UTC) From: "Uwe Schindler" To: References: <002e01cd0bea$b1d85510$1588ff30$@thetaphi.de> In-Reply-To: Subject: RE: NumericField exception java.lang.IllegalStateException: call set???Value() before usage in lucene 3.5 Date: Tue, 27 Mar 2012 11:33:09 +0200 Message-ID: <005501cd0bfc$9f5da130$de18e390$@thetaphi.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQIFv6AdUAPq9iFTdm4xEtnVo4F0aQHCbTUYAU3SGZsCQ2vYuZXh3JOw Content-Language: de Hi, > I am not exactly understand the precisionStep arg,I need to add the arg? RTFM: http://goo.gl/PlhhO > On Tue, Mar 27, 2012 at 3:48 PM, jianwen lou wrote: > > > No,There is no multi-thread building index at same time, I google and > > get the result, i use 64 bit jvm. It matters? > > > > > > http://lucene.472066.n3.nabble.com/Lucene-3-4-shift-bug-in-possibly-in > > valid-use-of-NumericTokenStream-td3592962.html > > > > F:\Java\open-source\lucene>java -version java version "1.6.0_25" > > Java(TM) SE Runtime Environment (build 1.6.0_25-b06) Java HotSpot(TM) > > 64-Bit Server VM (build 20.0-b11, mixed mode) > > > > > > > > On Tue, Mar 27, 2012 at 3:24 PM, Uwe Schindler wrote: > > > >> Hi, > >> > >> Are you sure that you are not reusing the same NumericField instances > >> across different threads? > >> > >> ----- > >> Uwe Schindler > >> H.-H.-Meier-Allee 63, D-28213 Bremen > >> http://www.thetaphi.de > >> eMail: uwe@thetaphi.de > >> > >> > >> > -----Original Message----- > >> > From: jianwen lou [mailto:loujanwen@gmail.com] > >> > Sent: Tuesday, March 27, 2012 9:21 AM > >> > To: java-user@lucene.apache.org > >> > Subject: NumericField exception java.lang.IllegalStateException: > >> > call > >> > set???Value() before usage in lucene 3.5 > >> > > >> > I want to store the long type value to my index files like follwing: > >> > > >> > NumericField priceField = new NumericField("price"); > >> > priceField.setDoubleValue(temp.getCurrentprice()); > >> > document.add(priceField); > >> > > >> > NumericField salesField = new > >> NumericField("salescount"); > >> > priceField.setLongValue(temp.getSalescount()); > >> > document.add(salesField); > >> > > >> > NumericField ontimefiled = new NumericField("ontime"); > >> > ontimefiled.setLongValue(temp.getOntime().getTime()); > >> > document.add(ontimefiled); > >> > > >> > when writer add document i get the exception info:there is wrong > >> > with my using NumbericField? thanks > >> > > >> > > >> > java.lang.IllegalStateException: call set???Value() before usage > >> > at > >> > org.apache.lucene.analysis.NumericTokenStream.reset(NumericTokenStr > >> > eam.j > >> > ava:196) > >> > at > >> > > >> > >> org.apache.lucene.index.DocInverterPerField.processFields(DocInverter > >> PerFiel > >> d > >> > .java:130) > >> > at > >> > > >> org.apache.lucene.index.DocFieldProcessorPerThread.processDocument(Do > >> cFie > >> > ldProcessorPerThread.java:278) > >> > at > >> > > org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWri > >> > ter > >> > .java:766) > >> > at > >> > > org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:2066) > >> > at > >> > > com.beike.common.lucene.dao.IndexDaoImpl.saveGoodsIndex4Mobile(Inde > >> > xDa > >> > oImpl.java:308) > >> > at > >> > > com.beike.common.lucene.dao.IndexStrategyServiceImpl.indexGoods4Mob > >> > ile(I > >> > ndexStrategyServiceImpl.java:118) > >> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > >> > at > >> > > >> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: > >> > 39) > >> > at > >> > > >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces > >> sorI > >> > mpl.java:25) > >> > at java.lang.reflect.Method.invoke(Method.java:597) > >> > at > >> > > >> > >> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti > >> on(Aop > >> > Utils.java:307) > >> > at > >> > > >> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo > >> inpo > >> > int(ReflectiveMethodInvocation.java:182) > >> > at > >> > > >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( > >> Refl > >> > ectiveMethodInvocation.java:149) > >> > at > >> > > >> > >> org.springframework.transaction.interceptor.TransactionInterceptor.in > >> voke(Tr > >> a > >> > nsactionInterceptor.java:106) > >> > at > >> > > >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( > >> Refl > >> > ectiveMethodInvocation.java:171) > >> > at > >> > > >> > >> org.springframework.transaction.interceptor.TransactionInterceptor.in > >> voke(Tr > >> a > >> > nsactionInterceptor.java:106) > >> > at > >> > > >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( > >> Refl > >> > ectiveMethodInvocation.java:171) > >> > at > >> > > >> > >> org.springframework.transaction.interceptor.TransactionInterceptor.in > >> voke(Tr > >> a > >> > nsactionInterceptor.java:106) > >> > at > >> > > >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( > >> Refl > >> > ectiveMethodInvocation.java:171) > >> > at > >> > > com.beike.ds.DataSourceInterceptor.invoke(DataSourceInterceptor.java:42) > >> > at > >> > > >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( > >> Refl > >> > ectiveMethodInvocation.java:171) > >> > at > >> > > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDyna > >> > mic > >> > AopProxy.java:204) > >> > at $Proxy53.indexGoods4Mobile(Unknown Source) > >> > at > >> > > >> com.beike.lucene.test.TestLuceneIndex.initGoodsIndex4Mobile(TestLucen > >> eInde > >> > x.java:45) > >> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > >> > at > >> > > >> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: > >> > 39) > >> > at > >> > > >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces > >> sorI > >> > mpl.java:25) > >> > at java.lang.reflect.Method.invoke(Method.java:597) > >> > at > >> > > >> > >> org.springframework.test.context.junit4.SpringTestMethod.invoke(Sprin > >> gTestM > >> > ethod.java:160) > >> > at > >> > > >> org.springframework.test.context.junit4.SpringMethodRoadie.runTestMet > >> hod(S > >> > pringMethodRoadie.java:233) > >> > at > >> > > >> org.springframework.test.context.junit4.SpringMethodRoadie$RunBefores > >> Then > >> > TestThenAfters.run(SpringMethodRoadie.java:333) > >> > at > >> > > >> > >> org.springframework.test.context.junit4.SpringMethodRoadie.runWithRep > >> etitio > >> > ns(SpringMethodRoadie.java:217) > >> > at > >> > > >> org.springframework.test.context.junit4.SpringMethodRoadie.runTest(Sp > >> ringM > >> > ethodRoadie.java:197) > >> > at > >> > > >> org.springframework.test.context.junit4.SpringMethodRoadie.run(Spring > >> Metho > >> > dRoadie.java:143) > >> > at > >> > > >> > >> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invok > >> eTestMe > >> > thod(SpringJUnit4ClassRunner.java:160) > >> > at > >> > > >> > >> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRu > >> nner.ja > >> v > >> > a:51) > >> > at > >> > > >> > >> org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner. > >> java:44 > >> ) > >> > at > >> > > >> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.jav > >> a:27) > >> > at > >> > org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) > >> > at > >> > > >> > >> org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.ja > >> va:42) > >> > at > >> > > >> > >> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(S > >> pringJU > >> n > >> > it4ClassRunner.java:97) > >> > at > >> > > >> > >> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4 > >> TestRef > >> ere > >> > nce.java:38) > >> > at > >> > > >> > >> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution > >> .java:3 > >> 8) > >> > at > >> > > >> > >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(Remot > >> eTestRu > >> > nner.java:460) > >> > at > >> > > >> > >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(Remot > >> eTestRu > >> > nner.java:673) > >> > at > >> > > >> > >> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner. > >> > java:386) > >> > at > >> > > >> > >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTes > >> tRunne > >> > r.java:196) > >> > > >> > > >> > > >> > -- > >> > * > >> > *twitter.com/loujianwen > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > >> For additional commands, e-mail: java-user-help@lucene.apache.org > >> > >> > > > > > > -- > > * > > *twitter.com/loujianwen > > > > > > > -- > * > *twitter.com/loujianwen --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org