Hello Daiane,
it is unclear to me what you are actually doing. Has there already been a basex file within /usr/bin or did you create it yourself? Based on your previous question and the provided answer by Neven Jovanovic the zip archive would not automatically unpack to /usr/bin.
Let's analyze this step by step:
- "org.basex.BaseX" is not a file, but a java class. The command "java org.basex.BaseX" thus simply tells the java JVM to execute the BaseX class. There is no file you want to search for or where you want to replace anything (because it will already be compiled to Java bytecode. Of course there is a source code, but this is not relevant to you). - The error message "Could not find or load main class org.basex.BaseX" now tells you that the JVM could not find the class BaseX. This means the BaseX.jar (where org.basex.BaseX is contained in) is not in your classpath.
I do not know how you did setup / install BaseX on your machine. If you use the zip distribution as Neven suggested (btw I second that, I think it is the easiest way to use a current release on unix) the BaseX.jar is automatically included when using the startup scripts. So to increase your heap size you simply have to replace the line "VM=-Xmx512m" within the bin/basex (or bin/basexgui or bin/basexserver, ...) script. Of course you could also correctly include the BaseX.jar in your current setup.
Cheers, Dirk
On 30/01/14 15:47, DAIANE ROBERTA CANDIDA wrote:
Hello,
I have been trouble with loading lots of xml files into the basex. I using Ubunto OS.
The commands below I used to perform the loading files:
CREATE DB bd_inex2009;SET TEXTINDEX false;SET ATTRINDEX false;SET AUTOFLUSH false;SET ADDCACHE true;SET INTPARSE true;SET DTD false;ADD /home/arwen/daiane_oracle/loading_inex2009/new_page_xml
Those commands result the message error below:
Out of Main Memory. The following hints might help you:
- increase Java's heap size with the flag -Xmx<size>
- choose the internal XML parser in the GUI or via 'set intparse on'
- deactivate the text and attribute indexes
Then to increase Java's heap size with the flag -Xmx<size> I followed the statements on the documentation in http://docs.basex.org/wiki/Start_Scripts.
I replaced the code from /usr/bin named basex, basexclient, basexserver and basesgui but org.basex.BaseX is missing.
Linux/Mac: basex
#!/bin/bash
# Path to this script FILE="${BASH_SOURCE[0]}" while [ -h "$FILE" ] ; do SRC="$(readlink "$FILE")" FILE="$( cd -P "$(dirname "$FILE")" && \ cd -P "$(dirname "$SRC")" && pwd )/$(basename "$SRC")" done BX="$( cd -P "$(dirname "$FILE")/.." && pwd )"
# Core and library classes CP="$BX/BaseX.jar" CP="$CP$(for JAR in "$BX"/lib/*.jar; do echo -n ":$JAR"; done)"
# Options for virtual machine VM=-Xmx512m
# Run code java -cp "$CP" $VM org.basex.BaseX "$@"
I don't know where the org.basex.BaseX file is placed, because of this I didn't find it to replace it like the others files.
When I use the command below:
arwen@arwen:/usr/bin$ basexserver Error: Could not find or load main class org.basex.BaseX
My intention is just increasing Java heap size with the flag -Xmx<size> How can I do this step by step?
Regards,
Daiane
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk