(1) Download the tar.gz (x86 or x64, depending on your platform)of latest JDK from the Oracle web site; (2) extract the content of the tar.gz file into /usr/local/java/ (you will need root privileges); (3) supposing the latest version is jdk1.8.0_25 then run the following commands:

I have been using the Eclipse IDE for coding for several years, mostly in Java but also in PHP, HTML, CSS and Javascript. With this post I would like to share my favorite settings, Java templates and shortcuts I use on a daily basis, and some troubleshooting I had to deal with.

Troubleshooting

to fix the problem with Unity scroll bar, which doesn’t work in Eclipse, run:

sudo vim /usr/bin/eclipse

and insert the following lines at the beginning of the file:

# work around for LP #769277
export UBUNTU_MENUPROXY=0
export LIBOVERLAY_SCROLLBAR=0
# end work around

to fix the problem of Eclipse crashing at startup displaying an error dialog with the message “An error has occurred. See the log file /home/user/.eclipse/org.eclipse.platform_3.7.0_155965261/ configuration/1334402764482.log.” run the following commands:

Eclipse on Linux uses by default UTF-8 as text encoding, while on Windows it uses the CP1252 one: when you transfer your source code from one system to the other some special characters (like the accented vowels) may not appear correctly in one of the systems. To fix this problem open your Eclipse on Windows and change its text encoding from CP1252 to UTF-8 from the menu Window → Preferences → General → Workspace, in the “Text file encoding” panel. To change the encoding of a file from CP1252 to UTF-8 run the following command on a Linux terminal:

to fix the error “Could not load the Tomcat server configuration at /usr/share/tomcat7/conf. The configuration may be corrupt or incomplete. /usr/share/tomcat7/conf/catalina.policy (No such file or directory)” assign the tomcat7 group to your user. Assuming your username is pippo, run:

sudo adduser pippo tomcat7

to fix the error “Could not load the Tomcat server configuration at /Servers/Tomcat v7.0 Server at localhost-config. The configuration may be corrupt or incomplete” assign the tomcat7 group to your user. Assuming your username is pippo, run:

install Dropbox (do not use nautilus-dropbox from Ubuntu Software Center because of this bug. If you have installed that accidentally, make sure you have uninstalled it and wiped out your ~/.dropbox directory before installing the version from their web site). If you are upgrading from previous versions of Ubuntu then uninstall first the client by running:

set up the fastest mirror by editing your /etc/apt/sources.list. The geographical location does not always give the best mirror: in order to choose the best mirror it is recommended to know your local internet network topology;

set Libreoffice to use the metric system by default: open LibreOffice Writer and go to Tools / Options / LibreOffice Writer / General and set the measurement unit from the drop down menu called Measurement Unit. Do the same for each LibreOffice application;

set your search domains:

with a DHCP server, edit your /etc/dhcp/dhclient.conf and add a line like the following for each of the domains you want to use:

prepend domain-name "your.domain.com";

with a static IP, edit your /etc/resolv.conf and add a line like the following for each of the domains you want to use:

search your.domain.com

to rename and automount your NTFS partition:

make required no folders in /mnt

sudo mkdir /mnt/win

check your partition list using

sudo fdisk -l

open /etc/fstab by running:

sudo gedit /etc/fstab

add entries in the following manner

/dev/sdb1 /mnt/large ntfs user 0 0

to make it appear in Nautilus open the directory by clicking on File System on the left menu, go into /mnt/win, from the top menu “Bookmarks” select “Add bookmark”.

If you are getting the following dialog: Unable to mount XX GB Filesystem Error mounting: mount: unknown filesystem type ‘exfat’ You need to install ExFat support in Ubuntu. You can do that by simply running the following commands:

Globus Toolkit 5.2 promises to greatly enhance the ability to install, setup and update the GT client and service components. This has been achieved by providing binary native packages Red Hat, Fedora, Debian, Ubuntu, Scientific Linux, and CentOS. Globus developers will maintain a Globus repository containing all packages.

GT 5.2 includes the latest versions of all components: GRAM, GridFTP, MyProxy and GSISSH. This latest version of GRAM includes a number of scalability and reliability improvements found from working with Open Science Grid (OSG) that are not in the 5.0 series. GridFTP added support for the DCSC command, which allows the client to specify credentials used to secure the data channel connection. Globus Online utilizes this command for seamless data movement across multiple security domains.

GT 5.2 is protocol and client API compatible with GT 5.0 (e.g. 5.2 clients will work with GT 5.0 services, and visa versa.)

Disclosure: this troubleshooting is intended for legacy applications which mandatory need the version 4.0.x of Globus Toolkit. If you don’t have an impelling reason to install that particular version, it is highly recommended that you install the latest version available of Globus Toolkit from its official web site and follow the installation guide of the official documentation.

ERROR service.ReliableFileTransferImpl [main,<init>:76] Unable to setup database driver with pooling.Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections

open /etc/postgresql/X.Y/main/postgresql.conf(where X.Y is current PostgreSQL version) and check that the line beginning with “listen_addresses” is not commented (i.e. the line should not begin with a #) and is set to listen to all addresses, in the following way:

listen_addresses = '*'

open /etc/postgresql/X.Y/main/pg_hba.conf” and check that the last line looks like:

host rftDatabase "globus" "x.x.x.x" 255.255.255.255 md5

where “x.x.x.x” is your public IP address. If you are using Globus Toolkit on your local machine for testing purposes then using 127.0.0.1 should be fine, although in this case you won’t be able to access Globus services outside your machine;

check that PostgreSQL is up and running and on which port:

sudo netstat -tulpn | grep postgres

PostgreSQL should run on port 5432. The default port number may be automatically changed (usually to 5433) as result of a version upgrade. To change it back to 5432 edit the /etc/postgresql/X.Y/main/postgresql.conf and the stop and start the service (warning: a restart won’t be enough) with:

sudo service postgresql stop
sudo service postgresql start

to check whether PostgreSQL is running properly on the 5432 port run:

telnet localhost 5432

the message “telnet: Unable to connect to remote host: Connection refused” would mean either PostgreSQL is not running, or is running on the wrong port. If you get “Connected to localhost.localdomain. Escape character is ‘^]’.” then PostgreSQL is fine.

you may have forgotten to create the globus user in postgres. To fix it follow the steps 22 and 23 on this tutorial.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

/O=YourCA/CN=Name Surname” is not authorized to use operation: http://www.globus.org/08/2004/delegationService}requestSecurityToken on this service

ensure that in your /etc/grid-security/grid-mapfile there is a line containing the Subject of your usercert.pem (note that you need to change the ‘, ‘ with ‘/’), followed by a user on the server machine (you can use globus if you don’t have a user account on that machine). For example:

"O=YourCA/CN=Name Surname" globus

Stop and restart your Globus container for changes to take effect.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

client.GramJob keeps displaying annoying INFO

edit /usr/local/globus-4.0.8/container-log4j.properties and set the log4j.category.org.globus variable to WARN so that it will look this way:

Using a hash as a reference is deprecated at /usr/local/globus-4.0.8/lib/perl/Globus/GRAM/ExtensionsHandler.pm line 161.Using a hash as a reference is deprecated at /usr/local/globus-4.0.8/lib/perl/Globus/GRAM/ExtensionsHandler.pm line 174.]

there seems to be a bug in Perl 5.x, or some kind of incompatibility issue between Perl 5.x and Globus Toolkit 4.0.x. To fix that, you need to edit the file lib/perl/Globus/GRAM/ExtensionsHandler.pm and remove the % character in front of $attributes at lines 161 and 174.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

The file $GLOBUS_LOCATION/etc/globus_wsrf_rft/jndi-config.xml is missing

you have probably missed one step during the installation of Globus Toolkit. To fix that, run the following command as globus user:

$GLOBUS_LOCATION/sbin/gpt-postinstall

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

My client application does not receive any notification from the server.

make sure the client and the server nodes resides in the same local area network and that there is no interference by a firewall or NAT router. To avoid NAT router problems try adding in the /etc/hosts of each one of your server nodes the following entry:

your /usr/local/globus/etc/gram-service/globus_gram_fs_map_config.xml is corrupted or wasn’t created during the Globus Toolkit installation as it was supposed to. Download this file (right click and choose save as), put it in /usr/local/globus/etc/gram-service/ and replace ????? with the hostname of your machine.

The 5.2 release is protocol and source compatible with Globus Toolkit 5.0.

Major Changes between 5.0 and 5.2:

Native packaging for linux distributions based on RPM and Debian package managers

The concept of “flavors” of Globus libraries has been obsoleted

Elimination of the compile-time distinction between threaded and non-threaded builds. All libraries are built to be thread-safe, but most applications and services will run by default without threads. The GLOBUS_THREAD_MODEL environment variable can be used to select between “none” (nothreads) and “pthreads” event-handling model.

The toolkit has been reorganized to be compliant with the Filesystem Hierarchy Standard.

The environment variable GLOBUS_LOCATION is no longer required to be set at runtime (though it is still honored to allow non-native packages to be relocated).

Shared library versioning to allow different versions of libraries to coexist.