Opened 12 years ago

Last modified 12 years ago

#993 new enhancement

Cacn't place geonetwork at the root of the URL

Reported by: agueganno Owned by: geonetwork-devel@…
Priority: major Milestone: Future release
Component: General Version: v2.8.0RC0
Keywords: Cc:

Description

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.

Change History (2)

comment:1 by fxp, 12 years ago

Milestone: v2.10.0 RC0Future release
Type: defectenhancement

comment:2 by fxp, 12 years ago

This may require at least some changes to:

  • harvesting which depends on that
  • data directory configuration
Note: See TracTickets for help on using tickets.