[Ala-portal] Issue to view occurrence images on the Hubs.

David.Martin at csiro.au David.Martin at csiro.au
Fri Jun 27 07:31:39 CEST 2014

Thanks Daniel

Yes this is a configuration bug for 1.1. We aim to have all configuration driven by one properties file that is external to the deployed application, but this one slipped through the net.

To get around it, include a biocache.properties file in:


with the lines:


This will be fixed in the release of 1.2 which should happen before the workshop in Canberra.


From: Daniel Lins [daniel.lins at gmail.com]
Sent: 27 June 2014 15:08
To: Martin, Dave (CES, Black Mountain); ala-portal at lists.gbif.org; Pedro Corrêa
Subject: Issue to view occurrence images on the Hubs.

Hi Dave,

After I updated the biocache-service to the version 1.1, I stopped viewing the occurrence images in the hubs portal. All images urls were set to http://biocache.ala.org.au/biocache-media.



Maybe it's a issue, because in the biocache-service code (tags/biocache-service-1.1/src/main/java/au/org/ala/biocache/dto/OccurrenceIndex.java) the application is not checking the external configuration file. It is looking to "/biocache.properties". This file does not exist in this folder, thus the application always uses the default media url ("http://biocache.ala.org.au/biocache-media/"), generating this error.

public class OccurrenceIndex {

    public static String biocacheMediaUrl = "http://biocache.ala.org.au/biocache-media/";

    public static String biocacheMediaDir = "/data/biocache-media/";

    protected static final Logger logger = Logger.getLogger(OccurrenceIndex.class);

    static {

        //check the properties file for an override

        try {

            Properties p = new Properties();


            //InputStream inStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("biocache.properties");


            logger.debug("Retrieved biocacheMediaUrl: " + p.getProperty("biocacheMediaUrl"));

            logger.debug("Retrieved biocacheMediaDir: " + p.getProperty("biocacheMediaDir"));

            if(p.getProperty("biocacheMediaUrl") != null)

                biocacheMediaUrl = p.getProperty("biocacheMediaUrl");

            if(p.getProperty("biocacheMediaDir") != null)

                biocacheMediaDir = p.getProperty("biocacheMediaDir");

I changed this code to check first the property of the external configuration file ("/data/biocache/config/biocache-config.properties") and the visualization of images worked again.

Daniel Lins da Silva
(Mobile) 55 11 96144-4050<tel:55%2011%2096144-4050>
Research Center on Biodiversity and Computing (Biocomp)
University of Sao Paulo, Brazil
daniellins at usp.br<mailto:daniellins at usp.br>
daniel.lins at gmail.com<mailto:daniel.lins at gmail.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.gbif.org/pipermail/ala-portal/attachments/20140627/9351fe5c/attachment-0001.html 

More information about the Ala-portal mailing list