lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "pepone pepone" <pepone.on...@gmail.com>
Subject HOT SPOT VIRTUAL MACHINE aleatory crash while index documents
Date Sat, 08 Apr 2006 00:52:32 GMT
Hi Lucene experts

I have a program that use lucene to index the content of my objects
Documents, Coments, etc

after index a lot of documents (5000) (12000) is not always at same point i
get this error

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0xb7baa65d, pid=8181, tid=2697431984
#
# Java VM: Java HotSpot(TM) Client VM (Blackdown-1.4.2-03 mixed mode)
# Problematic frame:
# V  [libjvm.so+0x2865d]
#

---------------  T H R E A D  ---------------

Current thread (0x08090bb0):  VMThread [id=8182]

siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00000048

Registers:
EAX=0x00000000, EBX=0xb7e5fe48, ECX=0xa2519a28, EDX=0x00000000
ESP=0xa0c77db0, EBP=0xa0c77dc8, ESI=0xad5203a0, EDI=0xa2509870
EIP=0xb7baa65d, CR2=0x00000048, EFLAGS=0x00010246

Top of Stack: (sp=0xa0c77db0)
0xa0c77db0:   ad5203a0 a2519a28 ad5a08c0 b7e5fe48
0xa0c77dc0:   00000008 a2519a28 a0c77e18 b7dcd492
0xa0c77dd0:   a2519a28 ad5203a0 00000008 a0c77e50
0xa0c77de0:   a1fed680 b7e6ce40 b7e6ce40 b7f8a820
0xa0c77df0:   0005c568 a24ed6a0 a1fdec88 a2509870
0xa0c77e00:   a5bbbcb0 a1fed6a0 00000000 b7e5fe48
0xa0c77e10:   0806b490 a0c77e50 a0c77e38 b7cae83f
0xa0c77e20:   0806b490 a0c77e50 a0c77e48 00000000

Instructions: (pc=0xb7baa65d)
0xb7baa64d:   5d c3 90 85 d2 78 10 8b 06 89 34 24 89 4c 24 04
0xb7baa65d:   ff 50 48 89 c2 eb e2 8b 41 08 89 d1 f7 d1 89 c2

Stack: [0xa0c06000,0xa0c79000),  sp=0xa0c77db0,  free space=455k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native
code)
V  [libjvm.so+0x2865d]
V  [libjvm.so+0x24b492]
V  [libjvm.so+0x12c83f]
V  [libjvm.so+0x121b4f]
V  [libjvm.so+0x1227f8]
V  [libjvm.so+0x12cd4b]
V  [libjvm.so+0x26e9e7]
V  [libjvm.so+0x120223]
V  [libjvm.so+0xe939a]
V  [libjvm.so+0x120430]
V  [libjvm.so+0x299c50]
V  [libjvm.so+0x29994f]
V  [libjvm.so+0x298e6c]
V  [libjvm.so+0x2990b1]
V  [libjvm.so+0x298cbf]
V  [libjvm.so+0x221637]
C  [libpthread.so.0+0x5aba]

VM_Operation (0xa03f88e0): generation collection for allocation, mode:
safepoint, requested by thread 0x0819cc78


---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x081ba170 JavaThread "LuceneServer-Ice.ThreadPool.Client-0"
[_thread_in_native, id=8197]
  0x081c3f00 JavaThread "LuceneServer-Ice.ThreadPool.Server-0"
[_thread_in_native, id=8196]
  0x0819c840 JavaThread "LuceneServer-Ice.ThreadPool.Client-0"
[_thread_in_native, id=8195]
  0x0819cc78 JavaThread "LuceneServer-Ice.ThreadPool.Server-0"
[_thread_blocked, id=8194]
  0x08193890 JavaThread "LuceneServer-Ice.ConnectionMonitor"
[_thread_blocked, id=8193]
  0x08192740 JavaThread "LuceneServer-Ice.ConnectionMonitor"
[_thread_blocked, id=8192]
  0x08097878 JavaThread "CompilerThread0" daemon [_thread_blocked, id=8187]
  0x08096a88 JavaThread "Signal Dispatcher" daemon [_thread_blocked,
id=8186]
  0x08093880 JavaThread "Finalizer" daemon [_thread_blocked, id=8184]
  0x08091e10 JavaThread "Reference Handler" daemon [_thread_blocked,
id=8183]
  0x0805bf78 JavaThread "main" [_thread_blocked, id=8181]

Other Threads:
=>0x08090bb0 VMThread [id=8182]
  0x080991a8 WatcherThread [id=8188]

VM state:at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread:  ([mutex/lock_event])
[0x0805b740/0x0805b770] Threads_lock - owner thread: 0x08090bb0
[0x0805ba70/0x0805ba90] Heap_lock - owner thread: 0x0819cc78

Heap
 def new generation   total 4864K, used 512K [0xa0da0000, 0xa12e0000,
0xa1d00000)
  eden space 4352K,   0% used [0xa0da0000, 0xa0da0000, 0xa11e0000)
  from space 512K, 100% used [0xa11e0000, 0xa1260000, 0xa1260000)
  to   space 512K,   0% used [0xa1260000, 0xa1260000, 0xa12e0000)
 tenured generation   total 64248K, used 64239K [0xa1d00000, 0xa5bbe000,
0xad5a0000)
   the space 64248K,  99% used [0xa1d00000, 0xa5bbbcb0, 0xa1fed800,
0xa5bbe000)
 compacting perm gen  total 4096K, used 3120K [0xad5a0000, 0xad9a0000,
0xb39a0000)
   the space 4096K,  76% used [0xad5a0000, 0xad8ac100, 0xad8ac200,
0xad9a0000)

Dynamic libraries:
08048000-08057000 r-xp 00000000 08:01 741073     /opt/blackdown-jdk-1.4.2.03
/bin/java
08057000-08059000 rwxp 0000e000 08:01 741073     /opt/blackdown-jdk-1.4.2.03
/bin/java
08059000-0835a000 rwxp 08059000 00:00 0          [heap]
a0000000-a0027000 rwxp a0000000 00:00 0
a0027000-a0100000 ---p a0027000 00:00 0
a01f6000-a01f7000 ---p a01f6000 00:00 0
a01f7000-a0204000 rwxp a01f7000 00:00 0
a0204000-a0207000 ---p a0204000 00:00 0
a0207000-a0277000 rwxp a0207000 00:00 0
a0277000-a0278000 ---p a0277000 00:00 0
a0278000-a0285000 rwxp a0278000 00:00 0
a0285000-a0288000 ---p a0285000 00:00 0
a0288000-a02f8000 rwxp a0288000 00:00 0
a02f8000-a02f9000 ---p a02f8000 00:00 0
a02f9000-a0306000 rwxp a02f9000 00:00 0
a0306000-a0309000 ---p a0306000 00:00 0
a0309000-a0379000 rwxp a0309000 00:00 0
a0379000-a037a000 ---p a0379000 00:00 0
a037a000-a0387000 rwxp a037a000 00:00 0
a0387000-a038a000 ---p a0387000 00:00 0
a038a000-a03fa000 rwxp a038a000 00:00 0
a03fa000-a03fb000 ---p a03fa000 00:00 0
a03fb000-a0408000 rwxp a03fb000 00:00 0
a0408000-a040b000 ---p a0408000 00:00 0
a040b000-a047b000 rwxp a040b000 00:00 0
a047b000-a047c000 ---p a047b000 00:00 0
a047c000-a0489000 rwxp a047c000 00:00 0
a0489000-a048c000 ---p a0489000 00:00 0
a048c000-a0541000 rwxp a048c000 00:00 0
a0541000-a0551000 r-xp 00000000 08:01 741334     /opt/blackdown-jdk-1.4.2.03
/jre/lib/i386/libnet.so
a0551000-a0552000 rwxp 0000f000 08:01 741334     /opt/blackdown-jdk-1.4.2.03
/jre/lib/i386/libnet.so
a0552000-a0566000 r-xs 00000000 16:05 292479     /home/pepone/announcements-
0.0.3/lib/oz.searchs.jar
a0566000-a0587000 r-xs 00000000 16:05 189505     /home/pepone/announcements-
0.0.3/lib/oz.files.jar
a0587000-a05ab000 r-xs 00000000 16:05 292868     /home/pepone/announcements-
0.0.3/lib/oz.base.jar
a05ab000-a05ca000 r-xs 00000000 08:01 597633
/opt/proguard3.4/lib/proguardgui.jar
a05ca000-a062f000 r-xs 00000000 08:01 597630
/opt/proguard3.4/lib/proguard.jar
a062f000-a0695000 r-xs 00000000 08:01 176167     /opt/lucene/lucene.jar
a0695000-a06e8000 r-xs 00000000 08:01 596206     /opt/looks-1.3.2/looks-
1.3.2.jar
a06e8000-a06fd000 r-xs 00000000 08:01 594812     /opt/forms-1.0.5/forms-
1.0.5.jar
a06fd000-a07dc000 r-xs 00000000 08:01 88113      /opt/Ice-3.0.1/lib/Ice.jar
a07dc000-a080c000 r-xs 00000000 08:01 123041     /opt/db/lib/db.jar
a080c000-a0828000 r-xs 00000000 08:01 741180     /opt/blackdown-jdk-1.4.2.03
/jre/lib/ext/sunjce_provider.jar
a0828000-a08e4000 r-xs 00000000 08:01 741295     /opt/blackdown-jdk-1.4.2.03
/jre/lib/ext/localedata.jar
a08e4000-a08f2000 r-xs 00000000 08:01 741178     /opt/blackdown-jdk-1.4.2.03
/jre/lib/ext/ldapsec.jar
a08f2000-a08f3000 ---p a08f2000 00:00 0
a08f3000-a0973000 rwxp a08f3000 00:00 0
a0973000-a0974000 ---p a0973000 00:00 0
a0974000-a0981000 rwxp a0974000 00:00 0
a0981000-a0984000 ---p a0981000 00:00 0
a0984000-a09f4000 rwxp a0984000 00:00 0
a09f4000-a09f5000 ---p a09f4000 00:00 0
a09f5000-a0a02000 rwxp a09f5000 00:00 0
a0a02000-a0a05000 ---p a0a02000 00:00 0
a0a05000-a0a75000 rwxp a0a05000 00:00 0
a0a75000-a0a76000 ---p a0a75000 00:00 0
a0a76000-a0af6000 rwxp a0a76000 00:00 0
a0af6000-a0af7000 ---p a0af6000 00:00 0
a0af7000-a0b04000 rwxp a0af7000 00:00 0
a0b04000-a0b07000 ---p a0b04000 00:00 0
a0b07000-a0b77000 rwxp a0b07000 00:00 0
a0b77000-a0b78000 ---p a0b77000 00:00 0
a0b78000-a0b85000 rwxp a0b78000 00:00 0
a0b85000-a0b88000 ---p a0b85000 00:00 0
a0b88000-a0bf8000 rwxp a0b88000 00:00 0
a0bf8000-a0bf9000 ---p a0bf8000 00:00 0
a0bf9000-a0c7c000 rwxp a0bf9000 00:00 0
a0c7c000-a0cac000 rwxp a0c7c000 00:00 0
a0cac000-a0ccc000 rwxp a0cac000 00:00 0
a0ccc000-a0d09000 rwxp a0ccc000 00:00 0
a0d09000-a0d0c000 rwxp a0d09000 00:00 0
a0d0c000-a0d10000 rwxp a0d0c000 00:00 0
a0d10000-a0d31000 rwxp a0d10000 00:00 0
a0d31000-a0d6d000 rwxp a0d31000 00:00 0
a0d6d000-a0d6f000 rwxp a0d6d000 00:00 0
a0d6f000-a0d9f000 rwxp a0d6f000 00:00 0
a0d9f000-a12e0000 rwxp a0d9f000 00:00 0
a12e0000-a1d00000 rwxp a12e0000 00:00 0
a1d00000-a5bbe000 rwxp a1d00000 00:00 0
a5bbe000-ad5a0000 rwxp a5bbe000 00:00 0
ad5a0000-ad9a0000 rwxp ad5a0000 00:00 0
ad9a0000-b39a0000 rwxp ad9a0000 00:00 0
b39a6000-b39d6000 rwxp b39a6000 00:00 0
b39d6000-b3a4e000 rwxp b39d6000 00:00 0
b3a4e000-b3c16000 rwxp b3a4e000 00:00 0
b3c16000-b5a4e000 rwxp b3c16000 00:00 0
b5a4e000-b5ff0000 r-xs 00000000 08:01 741302     /opt/blackdown-jdk-1.4.2.03
/jre/lib/charsets.jar
b5ff0000-b6002000 r-xs 00000000 08:01 741294     /opt/blackdown-jdk-1.4.2.03
/jre/lib/jce.jar
b6002000-b60df000 r-xs 00000000 08:01 741691     /opt/blackdown-jdk-1.4.2.03
/jre/lib/jsse.jar
b60df000-b60f5000 r-xs 00000000 08:01 741303     /opt/blackdown-jdk-1.4.2.03
/jre/lib/sunrsasign.jar
b60f5000-b613f000 rwxp b60f5000 00:00 0
b613f000-b7ae9000 r-xs 00000000 08:01 741252     /opt/blackdown-jdk-1.4.2.03
/jre/lib/rt.jar
b7ae9000-b7afa000 r-xp 00000000 08:01 741338     /opt/blackdown-jdk-1.4.2.03
/jre/lib/i386/libzip.so
b7afa000-b7afc000 rwxp 00011000 08:01 741338     /opt/blackdown-jdk-1.4.2.03
/jre/lib/i386/libzip.so
b7afc000-b7b1b000 r-xp 00000000 08:01 741323     /opt/blackdown-jdk-1.4.2.03
/jre/lib/i386/libjava.so
b7b1b000-b7b1c000 rwxp 0001f000 08:01 741323     /opt/blackdown-jdk-1.4.2.03
/jre/lib/i386/libjava.so
b7b1c000-b7b24000 r-xp 00000000 08:01 707624     /lib/libnss_files-2.3.5.so
b7b24000-b7b26000 rwxp 00007000 08:01 707624     /lib/libnss_files-2.3.5.so
b7b26000-b7b2d000 r-xp 00000000 08:01 707273     /lib/libnss_compat-2.3.5.so
b7b2d000-b7b2f000 rwxp 00006000 08:01 707273     /lib/libnss_compat-2.3.5.so
b7b30000-b7b36000 r-xp 00000000 08:01 741335     /opt/blackdown-jdk-1.4.2.03
/jre/lib/i386/libnio.so
b7b36000-b7b37000 rwxp 00006000 08:01 741335     /opt/blackdown-jdk-1.4.2.03
/jre/lib/i386/libnio.so
b7b37000-b7b39000 r-xs 00000000 08:01 597631
/opt/proguard3.4/lib/retrace.jar
b7b39000-b7b4a000 r-xp 00000000 08:01 741337     /opt/blackdown-jdk-1.4.2.03
/jre/lib/i386/libverify.so
b7b4a000-b7b4b000 rwxp 00011000 08:01 741337     /opt/blackdown-jdk-1.4.2.03
/jre/lib/i386/libverify.so
b7b4b000-b7b6b000 r-xp 00000000 08:01 707646     /lib/libm-2.3.5.so
b7b6b000-b7b6d000 rwxp 0001f000 08:01 707646     /lib/libm-2.3.5.so
b7b6d000-b7b7e000 r-xp 00000000 08:01 707185     /lib/libnsl-2.3.5.so
b7b7e000-b7b80000 rwxp 00010000 08:01 707185     /lib/libnsl-2.3.5.so
b7b80000-b7b82000 rwxp b7b80000 00:00 0
b7b82000-b7e48000 r-xp 00000000 08:01 741223     /opt/blackdown-jdk-1.4.2.03
/jre/lib/i386/client/libjvm.so
b7e48000-b7e63000 rwxp 002c6000 08:01 741223     /opt/blackdown-jdk-1.4.2.03
/jre/lib/i386/client/libjvm.so
b7e63000-b7e7b000 rwxp b7e63000 00:00 0
b7e7b000-b7f87000 r-xp 00000000 08:01 707831     /lib/libc-2.3.5.so
b7f87000-b7f88000 r-xp 0010c000 08:01 707831     /lib/libc-2.3.5.so
b7f88000-b7f8b000 rwxp 0010d000 08:01 707831     /lib/libc-2.3.5.so
b7f8b000-b7f8d000 rwxp b7f8b000 00:00 0
b7f8d000-b7f8f000 r-xp 00000000 08:01 707633     /lib/libdl-2.3.5.so
b7f8f000-b7f91000 rwxp 00001000 08:01 707633     /lib/libdl-2.3.5.so
b7f91000-b7f9f000 r-xp 00000000 08:01 707706     /lib/libpthread-2.3.5.so
b7f9f000-b7fa0000 r-xp 0000d000 08:01 707706     /lib/libpthread-2.3.5.so
b7fa0000-b7fa1000 rwxp 0000e000 08:01 707706     /lib/libpthread-2.3.5.so
b7fa1000-b7fa4000 rwxp b7fa1000 00:00 0
b7fa5000-b7fa6000 r-xp b7fa5000 00:00 0
b7fa6000-b7fa9000 r-xs 00000000 08:01 741177     /opt/blackdown-jdk-1.4.2.03
/jre/lib/ext/dnsns.jar
b7fa9000-b7fad000 rwxs 00000000 08:01 790749     /tmp/hsperfdata_pepone/8181
b7fad000-b7fb5000 r-xp 00000000 08:01 707642     /lib/libnss_nis-2.3.5.so
b7fb5000-b7fb7000 rwxp 00007000 08:01 707642     /lib/libnss_nis-2.3.5.so
b7fb7000-b7fbf000 r-xp 00000000 08:01 741119     /opt/blackdown-jdk-1.4.2.03
/jre/lib/i386/native_threads/libhpi.so
b7fbf000-b7fc0000 rwxp 00007000 08:01 741119     /opt/blackdown-jdk-1.4.2.03
/jre/lib/i386/native_threads/libhpi.so
b7fc0000-b7fd5000 r-xp 00000000 08:01 704920     /lib/ld-2.3.5.so
b7fd5000-b7fd6000 r-xp 00014000 08:01 704920     /lib/ld-2.3.5.so
b7fd6000-b7fd7000 rwxp 00015000 08:01 704920     /lib/ld-2.3.5.so
bf6d6000-bf6e0000 rwxp bf6d6000 00:00 0
bf6e0000-bf6e3000 ---p bf6e0000 00:00 0
bf8bf000-bf8d5000 rwxp bf8bf000 00:00 0          [stack]
ffffe000-fffff000 ---p 00000000 00:00 0          [vdso]

VM Arguments:
jvm_args: -Xmx200m -XX:MaxPermSize=100m
java_command: IceBox.Server --
Ice.Config=/home/pepone/announcements-0.0.3/DB/icegrid/titanio/servers/LuceneServer/config/config--
Ice.Default.Locator=IceGrid/Locator:tcp -h 192.168.0.197 -p 14000 --
Ice.ServerId=LuceneServer
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=/opt/blackdown-jdk-1.4.2.03
CLASSPATH=/opt/db/lib/db.jar:/opt/Ice-3.0.1/lib/Ice.jar:/opt/forms-1.0.5
/forms-
1.0.5.jar:/opt/looks-1.3.2/looks-1.3.2.jar:/opt/lucene/lucene.jar:/opt/proguard3.4/lib/proguard.jar:/opt/proguard3.4/lib/proguardgui.jar:/opt/proguard3.4/lib/retrace.jar:/home/pepone/announcements-0.0.3/lib/oz.base.jar:/home/pepone/announcements-0.0.3/lib/oz.files.jar:/home/pepone/announcements-0.0.3/lib/oz.announcements.jar:/home/pepone/announcements-0.0.3/lib/oz.searchs.jar:
.
PATH=/usr/kde/3.5/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.3.6:/opt/db/bin:/opt/eclipse:/opt/Ice-
3.0.1
/bin:/opt/appweb/bin:/opt/gsasl/bin:/opt/gsoap/bin:/home/pepone/Desktop/WebServer/bin:/opt/vmime/bin:/home/pepone/announcements-
0.0.3/bin:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03
/jre/bin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/kde/3.4/bin:/var/qmail/bin
LD_LIBRARY_PATH=/opt/blackdown-jdk-1.4.2.03
/jre/lib/i386/client:/opt/blackdown-jdk-1.4.2.03
/jre/lib/i386:/opt/blackdown-jdk-1.4.2.03/jre/../lib/i386
SHELL=/bin/bash
DISPLAY=:0


---------------  S Y S T E M  ---------------

OS:Gentoo Base System version 1.12.0_pre16

uname:Linux 2.6.14-gentoo-r5 #1 SMP PREEMPT Tue Dec 20 16:13:37 Local time
zone must be set-- i686
libc:glibc 2.3.5 NPTL 2.3.5
rlimit: STACK 32768k, CORE 0k, NPROC 7168, NOFILE 10024, AS infinity
load average:0.00 -0.00 -0.00

CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2

Memory: 4k page, physical 904980k(19116k free), swap 996020k(996020k free)

vm_info: Java HotSpot(TM) Client VM (Blackdown-1.4.2-03) for linux-x86,
built on Nov 23 2005 20:51:18 by jk with GCC 3.2




Here is the code that I use for index documents


/*
 * Created on Oct 16, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package Oz.Searchs;

import java.io.FileReader;
import java.util.Iterator;

import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.analysis.KeywordAnalyzer;
import org.apache.lucene.analysis.PerFieldAnalyzerWrapper;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.Term;
import Ice.Current;
import IceUtil.StringUtil;
import Oz.Searchs.ObjectMetadata;

/**
 * @author pepone
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class IndexerI extends Indexer {

    private IndexReader reader;
    private IndexWriter writer;
    private int optimized;
    private int lastoptimized;
    public IndexerI() throws Exception
    {
        optimized=100;
        lastoptimized=0;
    }

    public IndexerI(String indexDir)
    {
        this.indexDir=indexDir;
        try
        {
            reader=IndexReader.open(indexDir);
            PerFieldAnalyzerWrapper analyzerWrapper =
                    new PerFieldAnalyzerWrapper(new StandardAnalyzer());
                analyzerWrapper.addAnalyzer("identity",new
KeywordAnalyzer());
                analyzerWrapper.addAnalyzer("type",new KeywordAnalyzer());
                analyzerWrapper.addAnalyzer("name",new KeywordAnalyzer());
                analyzerWrapper.addAnalyzer("path",new KeywordAnalyzer());
                analyzerWrapper.addAnalyzer("parent-id",new
KeywordAnalyzer());
            writer=new IndexWriter(indexDir,analyzerWrapper,false);
            writer.setUseCompoundFile(false);
            writer.setMaxBufferedDocs(5);
            writer.setMergeFactor(5);
            optimized=100;
            lastoptimized=0;
        }
        catch(Exception ex)
        {
            ex.printStackTrace();
        }
    }

    synchronized public void indexObject(ObjectMetadata metadata,Current
current)
    {
        try
        {
            System.out.println("IndexerI.indexObject");
            System.out.println(metadata.objectId);

            reader=IndexReader.open(indexDir);
            reader.delete(new Term("identity",metadata.objectId));
            reader.close();
            System.out.println("Reder close");
            Document doc=new Document();

            doc.add(
                Field.Keyword(
                    "identity",
                    metadata.objectId));

            Iterator it=metadata.indexedKeys.keySet().iterator();

            while(it.hasNext())
            {
                Object obj=it.next();
                doc.add(
                    Field.Text(
                        (String)obj,
                        (String)metadata.indexedKeys.get(obj)));
            }

            Iterator itStored=metadata.storedKeys.keySet().iterator();
            while(itStored.hasNext())
            {
                Object objS=itStored.next();
                doc.add(
                    Field.Keyword(
                        (String)objS,
                        (String)metadata.storedKeys.get(objS)));
            }

            writer.addDocument(doc);
            if(lastoptimized>=optimized)
            {
                writer.optimize();
                lastoptimized=0;
            }
            else
                lastoptimized++;
            writer.close();
        }
        catch(java.io.FileNotFoundException e)
        {
            System.out.println(e.getMessage());
            try
            {
                IndexWriter writer=new IndexWriter(
                    indexDir,
                    new StandardAnalyzer(),true);
                writer.close();
                indexObject(metadata,current);
            }
            catch(Exception e2)
            {
                System.out.println(e2.getMessage());
            }
        }
        catch(Exception ex)
        {
            ex.printStackTrace();
        }
    }

    synchronized public void removeObject(Ice.Identity id,Current current)
    {
        try
        {
            IndexReader reader=IndexReader.open(indexDir);
            reader.delete(new Term("identity",Ice.Util.identityToString
(id)));
            reader.close();
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
    }
}


Can any of you sayme if there is and evident error in this code, or where
can i found the source of the problem

any ideas or coments are wellcome


--
play tetris http://pepone.on-rez.com/tetris

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message