Hi, I'm trying to index a big set of plain text files, almost 8,104,467
files, that are all under the same
directory /media/MAFALDA/yohasebewp2txt/Archivos and want to get my index
under /media/MAFALDA/LuceneIndex using IndexFiles.java program from the
documentation.

I'm using Netbeans IDE, and I get the folllowing error message:

Indexing to directory '/media/MAFALDA/LuceneIndex'...
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit
exceeded
at java.nio.ByteBuffer.wrap(ByteBuffer.java:367)
at java.lang.StringCoding$StringDecoder.decode(StringCoding.java:155)
at java.lang.StringCoding.decode(StringCoding.java:191)
at java.lang.String.<init>(String.java:451)
at java.lang.String.<init>(String.java:523)
at java.io.UnixFileSystem.list(Native Method)
at java.io.File.list(File.java:990)
at lucenetest.IndexFiles.indexDocs(IndexFiles.java:159)
at lucenetest.IndexFiles.main(IndexFiles.java:118)
Java Result: 1
BUILD SUCCESSFUL (total time: 1 minute 23 seconds)


I've googled the Exception and also I've found that I must increase the
maximum memory allocation of the JVM in the user netbeans.conf file under
the user directory of netbeans: /usr/local/netbeans-7.1.2/etc

I've already done that but I can make it work.

I'm pasting the netbeans.conf file content:

# ${HOME} will be replaced by JVM user.home system property
netbeans_default_userdir="${HOME}/.netbeans/7.1.2"

# Options used by NetBeans launcher by default, can be overridden by
explicit
# command line switches:
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=512m
-J-Xmx3g -J-Dapple.laf.useScreenMenuBar=true
-J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true
-J-Dsun.zip.disableMemoryMapping=true -J-XX:+UseConcMarkSweepGC
-J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled"
# Note that default -Xmx and -XX:MaxPermSize are selected for you
automatically.
# You can find these values in var/log/messages.log file in your userdir.
# The automatically selected value can be overridden by specifying -J-Xmx or
# -J-XX:MaxPermSize= here or on the command line.

# If you specify the heap size (-Xmx) explicitly, you may also want to
enable
# Concurrent Mark & Sweep garbage collector. In such case add the following
# options to the netbeans_default_options:
# -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled
-J-XX:+CMSPermGenSweepingEnabled
# (see http://wiki.netbeans.org/FaqGCPauses)

# Default location of JDK, can be overridden by using --jdkhome <dir>:
netbeans_jdkhome="/usr/lib/jvm/java-6-openjdk-amd64"

# Additional module clusters, using ${path.separator} (';' on Windows or
':' on Unix):
#netbeans_extraclusters="/absolute/path/to/cluster1:/absolute/path/to/cluster2"

# If you have some problems with detect of proxy settings, you may want to
enable
# detect the proxy settings provided by JDK5 or higher.
# In such case add -J-Djava.net.useSystemProxies=true to the
netbeans_default_options.


-- 
Reyna
Mexico

Reply via email to