[GeoNetwork-devel] getHandlerContext Problem

Hi list,
I’am developing on Geonework with Eclipse+Tomcat. When I deploy Geonetwork and try to login, a NullPointer Exception appears in this line of exec method in Login.java:

public Element exec(Element params, ServiceContext context) throws Exception
{
String username = Util.getParam(params, Params.USERNAME);
String password = Util.getParam(params, Params.PASSWORD);

GeonetContext gc = (GeonetContext) context.getHandlerContext(Geonet.CONTEXT_NAME);
SettingManager sm = gc.getSettingManager();

Dbms dbms = (Dbms) context.getResourceManager().open(Geonet.Res.MAIN_DB);

The problem is that getHandleContext method return null.
Any idea about the reason of this fail?
Thanks in advance…

Hello Francisco:

I found very usefull this guide: http://lab.usgin.org/sites/default/files/application/file/u5/GeoNetworkEclipseSetup_0.pdf

-----

Hola Francisco:

Esta guía fue muy útil, muestra la configuración para Eclipse+Tomcat sobre WinXP.

http://lab.usgin.org/sites/default/files/application/file/u5/GeoNetworkEclipseSetup_0.pdf

Un saludo

2010/7/6 Francisco <ricken11@anonymised.com>

Hi list,
I’am developing on Geonework with Eclipse+Tomcat. When I deploy Geonetwork and try to login, a NullPointer Exception appears in this line of exec method in Login.java:

public Element exec(Element params, ServiceContext context) throws Exception
{
String username = Util.getParam(params, Params.USERNAME);
String password = Util.getParam(params, Params.PASSWORD);

GeonetContext gc = (GeonetContext) context.getHandlerContext(Geonet.CONTEXT_NAME);
SettingManager sm = gc.getSettingManager();

Dbms dbms = (Dbms) context.getResourceManager().open(Geonet.Res.MAIN_DB);

The problem is that getHandleContext method return null.
Any idea about the reason of this fail?
Thanks in advance…


This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/firsthttp://p.sf.net/sfu/sprint-com-first


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork


Enrique Jesús Cardona Cebrián

Hello Francisco again:

I can reproduce your problem shutting down my database. When DB is up and running there aren’t any probs.


Francisco, hola de nuevo:

Puede reproducir tu problema desactivando la base de datos. Pero cuando volví a activarla puede usar el servicio de Login correctamente.

Espero haber sido de ayuda.

2010/7/6 Francisco <ricken11@anonymised.com>

Hi list,
I’am developing on Geonework with Eclipse+Tomcat. When I deploy Geonetwork and try to login, a NullPointer Exception appears in this line of exec method in Login.java:

public Element exec(Element params, ServiceContext context) throws Exception
{
String username = Util.getParam(params, Params.USERNAME);
String password = Util.getParam(params, Params.PASSWORD);

GeonetContext gc = (GeonetContext) context.getHandlerContext(Geonet.CONTEXT_NAME);
SettingManager sm = gc.getSettingManager();

Dbms dbms = (Dbms) context.getResourceManager().open(Geonet.Res.MAIN_DB);

The problem is that getHandleContext method return null.
Any idea about the reason of this fail?
Thanks in advance…


This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/firsthttp://p.sf.net/sfu/sprint-com-first


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork


Enrique Jesús Cardona Cebrián