Installation Of HDB and TDB in Linux

Hi All

While executing the step 8 of Installation Manual for HDB and TDB, following errors are coming:
1. Could not find or load main class HdbArchiver.HdbArchiver
2. Could not find or load main class TdbArchiver.TdbArchiver

Any help will be appreciated.

Thanks
Balkrishna Chitalia
Edited 9 years ago
Hi!
I am also encountering the same problem as mentioned above while installing the HDB and TDB.

Thanks,
Pritesh
Hi,

This is because the launcher script assumes that you have an /etc/bashrc where your CLASSPATH environment variable is initialized.

You can solve the issue editing the $ARCHIVING_ROOT/device/linux/*Archiver script and replacing this line:

source /etc/bashrc

by these lines (it will add all archiving .jar files to classpath):


ARCHIVING_ROOT=/wherever/you/installed/archiving

for file in `find $ARCHIVING_ROOT/lib/java -maxdepth 1 -iname "*.jar"` ; do
  CLASSPATH=$file:$CLASSPATH;
done

Srj
Keep on dancing,

http://www.tango-controls.org/resources/howto/how-fandango/
Edited 9 years ago
Hi

Thanks a lot Sergi. It worked.

Thanks
Balkrishna
Hi Sergi,
we experienced a similar issue under ubuntu 14.04 LTS. We solved this by replacing dash by bash like this:
echo 'dash dash/sh boolean false' | sudo debconf-set-selections
sudo dpkg-reconfigure -p critical dash
sudo ln -s /etc/bash.bashrc /etc/bashrc
I can not actually check if this solve also our issue, but if then, I understand the solution you gave here is the one which is recommanded ?
- Philippe

Well, basically the problem was that ARCHIVING_ROOT and CLASSPATH environment variables must be properly defined before launching the devices.

In our case we prefer to not set the variables in bashrc as we may use different classpaths for different applications; so it is up to you whether you want to use /etc/bash.bashrc, /etc/bashrc or directly define the variables in the launcher script as we do.

In my opinion the best would be to have sort of
source ../etc/archiving.rc
file to you load your environment.
Keep on dancing,

http://www.tango-controls.org/resources/howto/how-fandango/
Ok, thanks.
In fact, the complete message we got was the following :

shell terminal$./HdbArchiver  01

./HdbArchiver: 8: ./HdbArchiver: source: not found
./HdbArchiver: 19: ./HdbArchiver: [[: not found
./HdbArchiver: 27: ./HdbArchiver: [[: not found
Error: Could not find or load main class HdbArchiver.HdbArchiver

If I remember well, the solution of dash was because of the first 3 lines. It solves the last one which seems to be a side effect.
- Philippe
 
Register or login to create to post a reply.