#993: Cacn't place geonetwork at the root of the URL
-----------------------+----------------------------------------------------
Reporter: agueganno | Owner: geonetwork-devel@…
Type: defect | Status: new
Priority: major | Milestone: v2.9.0
Component: General | Version: v2.8.0RC0
Keywords: |
-----------------------+----------------------------------------------------
Hi,
I'm trying to configure geonetwork, tomcat and httpd to place geonetwork
at the root of one of our domain names. However, that's not as simple as
what I expected. geonetwork is a snapshot of the end of May.
When doing such things, I usually add a host in tomcat, place my webapp as
ROOT in a dedicated webapp directory in tomcat. Then, I use Jkmount in
apache httpd, and everything is fine...
In the case of geonetwork, however, that does not work. Indeed, when
launching the application, I obtain an exception really early. The
exception is thrown in Geonetwork.java at line 143. When looking at the
code, I find that :
{{{
path = context.getAppPath();
String baseURL = context.getBaseUrl();
String webappName = baseURL.substring(1);
// TODO : if webappName is "". ie no context
}}}
What I understand is that the application retrieve the directory that is
used as a base for geonetwork's URL. It tries to perform a substring...
and as we're at the root. It fails. I think this bug is really problematic
for many reasons.
First of all, it should work. We want to propose a dedicated service based
on geonetwork, and we should be able to get rid of its name in the URL.
Then, the error that is sent is absolutely not easy to understand. As I
haven't found a clear documentation about that problem, the error embedded
in the exception MUST be accurate.
Even if it's a development version of the application, I don't think it's
a hard part to improve. Someone as written a todo, it would have been
faster to make a test and throw a clear exception. I've worked as usual
for server applications : I've searched really hard in the logs, trying to
understand what had been broken. It took a really long time. And it wasn't
useful in any ways. Note that this exception does not seem to be an
isolate example... I've been forced to look at the source code. It's not
difficult, I agree. But I shouldn't have to do that. I'm ready to report
bugs each time it's needed. But I want to be able to do it as a user.
--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/993>
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/>
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.