[GeoNetwork-devel] Getting started

Hello,

I have recently started to explore the GIS world and have found a lot of interest in GeoNetwork. To get a good grip on all this, I decided to dive into the GeoNetwork code and run it within a IDE (Eclipse).

So I have checked out the code from SVN and followed the instructions found on http://trac.osgeo.org/geonetwork/wiki/ (the instructions on the geonetwork portal seem to be quite outdated). I then ran into a few issues but I almost solved them all (it seems that the JAI libs are outdated and need to be replaced by version 1.1.3, currently it is 1.1).

Now I have two last issues that I could not find how to solve:

  • The database does not init itself on its own and I get the following message: “The database does not exist.”

  • The second is an FileNotFoundException that complains about not finding the following file: geonetwork\web\geonetwork\xml\repositories.xml (The system cannot find the file specified)

Indeed, the file is not there, there are only .tem file. Should I simply rename those files? This does not seem like an ideal solution.

One last question, I was wondering if any of you had made an attempt at building classes with the Eclipse compiler instead of the Ant build (since the Ant build is not incremental, although I feel that by removing the deletedir call, it might work).

On a more practical level, I was wondering if anyone had already tried using GeoNetwork with a large catalogue (around 100 thousand of records)? Does it hold the distance on such a scale?

Thanks very much in advance.

Kind regards,

Guillaume Polet

TRASYS

Terhulpsesteenweg 6C - 1560 Hoeilaart - Belgium

tel. - fax. - mobile

http://www.trasys.be

As from 01/01/2010 - New general number : +32 2 893 12 11 – Direct :


The content of this e-mail is intended solely for the use of the Individual or entity to whom it is addressed. If you have received this communication in error, be aware that forwarding it, copying it, or in any way disclosing its content to any other person, is strictly prohibited. In this case**,** please notify the author by replying to this e-mail immediately.

Before printing, think about the environment

I recommend you do not attempt to run it within an IDE, and instead run the installer, then start GeoNetwork by executing start-geonetwork.bat (or start-geonetwork.sh).

This will create a DB for you (a toy McKoi DB, but nevertheless good to start taking a look).

I myself always build on the command line, and use an IDE principally to move around the source code and edit source code, because of the code completion. But surely you should be able to build it using the IDE as well. Still, you need to package the compiled classes and copy them to the WEB-INF/lib directory, etc… but maybe you can run the Ant build script (that does all that) from within Eclipse, I’d be surprised if you couldn’t.

Kind regards
Heikki Doeleman

On Wed, Dec 2, 2009 at 4:28 PM, Polet Guillaume <guillaume.polet@anonymised.com> wrote:

Hello,

I have recently started to explore the GIS world and have found a lot of interest in GeoNetwork. To get a good grip on all this, I decided to dive into the GeoNetwork code and run it within a IDE (Eclipse).

So I have checked out the code from SVN and followed the instructions found on http://trac.osgeo.org/geonetwork/wiki/ (the instructions on the geonetwork portal seem to be quite outdated). I then ran into a few issues but I almost solved them all (it seems that the JAI libs are outdated and need to be replaced by version 1.1.3, currently it is 1.1).

Now I have two last issues that I could not find how to solve:

  • The database does not init itself on its own and I get the following message: “The database does not exist.”

  • The second is an FileNotFoundException that complains about not finding the following file: geonetwork\web\geonetwork\xml\repositories.xml (The system cannot find the file specified)

Indeed, the file is not there, there are only .tem file. Should I simply rename those files? This does not seem like an ideal solution.

One last question, I was wondering if any of you had made an attempt at building classes with the Eclipse compiler instead of the Ant build (since the Ant build is not incremental, although I feel that by removing the deletedir call, it might work).

On a more practical level, I was wondering if anyone had already tried using GeoNetwork with a large catalogue (around 100 thousand of records)? Does it hold the distance on such a scale?

Thanks very much in advance.

Kind regards,

Guillaume Polet

TRASYS

Terhulpsesteenweg 6C - 1560 Hoeilaart - Belgium

tel. - fax. - mobile

http://www.trasys.be

As from 01/01/2010 - New general number : +32 2 893 12 11 – Direct :


The content of this e-mail is intended solely for the use of the Individual or entity to whom it is addressed. If you have received this communication in error, be aware that forwarding it, copying it, or in any way disclosing its content to any other person, is strictly prohibited. In this case**,** please notify the author by replying to this e-mail immediately.

Before printing, think about the environment


Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev


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

heikki wrote:

I myself always build on the command line, and use an IDE principally to
move around the source code and edit source code, because of the code
completion. But surely you should be able to build it using the IDE as
well. Still, you need to package the compiled classes and copy them to
the WEB-INF/lib directory, etc.. but maybe you can run the Ant build
script (that does all that) from within Eclipse, I'd be surprised if you
couldn't.

I'm going to try to play with it a bit because being able to run GN in
the Eclipse debugger could be A Very Good Thing, IMHO.

--

Archie

-- Archie Warnock warnock@anonymised.com
-- A/WWW Enterprises www.awcubed.com
-- As a matter of fact, I _do_ speak for my employer.

2009/12/2 Archie Warnock <warnock@anonymised.com>:

heikki wrote:

I myself always build on the command line, and use an IDE principally to
move around the source code and edit source code, because of the code
completion. But surely you should be able to build it using the IDE as
well. Still, you need to package the compiled classes and copy them to
the WEB-INF/lib directory, etc.. but maybe you can run the Ant build
script (that does all that) from within Eclipse, I'd be surprised if you
couldn't.

I'm going to try to play with it a bit because being able to run GN in
the Eclipse debugger could be A Very Good Thing, IMHO.

http://trac.osgeo.org/geonetwork/wiki/HowToRunUnderJettyInEclipse
HTH.

Francois

--

Archie

-- Archie Warnock warnock@anonymised.com
-- A/WWW Enterprises www.awcubed.com
-- As a matter of fact, I _do_ speak for my employer.

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
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

-----Original Message-----
From: Francois Prunayre [mailto:fx.prunayre@anonymised.com]
Sent: Thursday, 3 December 2009 2:57 AM
To: Archie Warnock
Cc: geonetwork-devel
Subject: Re: [GeoNetwork-devel] Getting started

> I'm going to try to play with it a bit because being able
to run GN in
> the Eclipse debugger could be A Very Good Thing, IMHO.

http://trac.osgeo.org/geonetwork/wiki/HowToRunUnderJettyInEclipse

Great!

Maybe our howto is still helpful, if you run into problems, but I recommend checking out above one by Francois first. I linked to it from our page:

https://www.seegrid.csiro.au/twiki/bin/view/Infosrvices/GeoNetworkDevelopmentSetup

Cheers,
    Michael

Maybe we should add eclipse configuration files to svn in order to set
up easily a GeoNetwork project, .classpath and .project files should
be the one.
I still facing an issue on how to view all logs to eclipse console,
feel free to update the how to if you find that.
Thanks.

Francois

2009/12/3 <Michael.Stegherr@anonymised.com>:

-----Original Message-----
From: Francois Prunayre [mailto:fx.prunayre@anonymised.com]
Sent: Thursday, 3 December 2009 2:57 AM
To: Archie Warnock
Cc: geonetwork-devel
Subject: Re: [GeoNetwork-devel] Getting started

> I'm going to try to play with it a bit because being able
to run GN in
> the Eclipse debugger could be A Very Good Thing, IMHO.

http://trac.osgeo.org/geonetwork/wiki/HowToRunUnderJettyInEclipse

Great!

Maybe our howto is still helpful, if you run into problems, but I recommend checking out above one by Francois first. I linked to it from our page:

https://www.seegrid.csiro.au/twiki/bin/view/Infosrvices/GeoNetworkDevelopmentSetup

Cheers,
Michael
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
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

Hello,

Thanks to all for you quick and helpful replies. Indeed, it is quite easy to launch the ant script from within Eclipse. It is even possible to add it as a builder of the project (which forces the ant build to run prior launching the application). It is also possible to run jetty within Eclipse by simply adding jetty jars to the classpath and invoke jetty like the .bat/.sh does. Unfortunately it seems that it does not do exactly the same as the installed version (which I have installed and ran successfully for a few weeks now), or at least I can get the source code to produce the same thing as the installed binaries.
Besides the ergonomy of Eclipse, running the application within Eclipse offers great debugging capabilities, hot code replacement (which has been a time saver for me), incremental build (I think I should try to remove the deletedir call in the ant script and it will then be also incremental), and other stuff. Yet I can understand the will to remain IDE independent so that people who prefer to run it from the command line can easily do so. IMHO, the both could coexist.
Anyway, I will keep on looking why this database does not init itself on its own. If anyone has any pointers to give, it is of course welcome.
Also, any idea for the repositories.xml that cannot be found (there is indeed only a repositories.xml.tem file)?

Thanks very much,

Guillaume Polet

-----Original Message-----
From: Francois Prunayre [mailto:fx.prunayre@anonymised.com]
Sent: 02 December 2009 19:57
To: Archie Warnock
Cc: geonetwork-devel
Subject: Re: [GeoNetwork-devel] Getting started

2009/12/2 Archie Warnock <warnock@anonymised.com>:

heikki wrote:

I myself always build on the command line, and use an IDE principally to
move around the source code and edit source code, because of the code
completion. But surely you should be able to build it using the IDE as
well. Still, you need to package the compiled classes and copy them to
the WEB-INF/lib directory, etc.. but maybe you can run the Ant build
script (that does all that) from within Eclipse, I'd be surprised if you
couldn't.

I'm going to try to play with it a bit because being able to run GN in
the Eclipse debugger could be A Very Good Thing, IMHO.

http://trac.osgeo.org/geonetwork/wiki/HowToRunUnderJettyInEclipse
HTH.

Francois

--

Archie

-- Archie Warnock warnock@anonymised.com
-- A/WWW Enterprises www.awcubed.com
-- As a matter of fact, I _do_ speak for my employer.

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
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

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
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

Hi,

have you found this: http://n2.nabble.com/repositories-xml-td3829494.html#a3829494 ? It don`t refer to your problem with the database but perhaps there are some information for you.

best regards
Sarah


Von: Polet Guillaume guillaume.polet@anonymised.com
An: geonetwork-devel geonetwork-devel@lists.sourceforge.net
Gesendet: Donnerstag, den 3. Dezember 2009, 8:37:03 Uhr
Betreff: Re: [GeoNetwork-devel] Getting started

Hello,

Thanks to all for you quick and helpful replies. Indeed, it is quite easy to launch the ant script from within Eclipse. It is even possible to add it as a builder of the project (which forces the ant build to run prior launching the application). It is also possible to run jetty within Eclipse by simply adding jetty jars to the classpath and invoke jetty like the .bat/.sh does. Unfortunately it seems that it does not do exactly the same as the installed version (which I have installed and ran successfully for a few weeks now), or at least I can get the source code to produce the same thing as the installed binaries.
Besides the ergonomy of Eclipse, running the application within Eclipse offers great debugging capabilities, hot code replacement (which has been a time saver for me), incremental build (I think I should try to remove the deletedir call in the ant script and it will then be also incremental), and other stuff. Yet I can understand the will to remain IDE independent so that people who prefer to run it from the command line can easily do so. IMHO, the both could coexist.
Anyway, I will keep on looking why this database does not init itself on its own. If anyone has any pointers to give, it is of course welcome.
Also, any idea for the repositories.xml that cannot be found (there is indeed only a repositories.xml.tem file)?

Thanks very much,

Guillaume Polet

-----Original Message-----
From: Francois Prunayre [mailto:fx.prunayre@anonymised.com]
Sent: 02 December 2009 19:57
To: Archie Warnock
Cc: geonetwork-devel
Subject: Re: [GeoNetwork-devel] Getting started

2009/12/2 Archie Warnock <warnock@anonymised.com>:

heikki wrote:

I myself always build on the command line, and use an IDE principally to
move around the source code and edit source code, because of the code
completion. But surely you should be able to build it using the IDE as
well. Still, you need to package the compiled classes and copy them to
the WEB-INF/lib directory, etc… but maybe you can run the Ant build
script (that does all that) from within Eclipse, I’d be surprised if you
couldn’t.

I’m going to try to play with it a bit because being able to run GN in
the Eclipse debugger could be A Very Good Thing, IMHO.

http://trac.osgeo.org/geonetwork/wiki/HowToRunUnderJettyInEclipse
HTH.

Francois

Archie

– Archie Warnock warnock@anonymised.com
– A/WWW Enterprises www.awcubed.com
– As a matter of fact, I do speak for my employer.


Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev


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


Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev


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


Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev


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


Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com

Regarding the console output, this is simply a configuration of Log4J. By default jeeves outputs its message to a file (within log/geonetwork.log file) which in production is the desired effect. If you change the property log4j.appender.jeeves to org.apache.log4j.ConsoleAppender (in the file located web/geonetwork/WEB-INF/log4j.cfg), you will have all the output in Eclipse console. If you want to have full control on this, you can simply rewrite an appender implementing the Appender of Log4J. I have always found that log4j is kind of an overkill for what it needs to do, but everybody uses it.

Regarding Eclipse, another very handy stuff is the JadClipse plugin which allows you to decompile the code on the fly (simply do a CTRL+click or press F3) to better understand what third-party code does.

I added to this mail the .project, .classpath and launch files. I have not added the ant builder in the project, but if you want to do it, it is quite simple.

Guillaume Polet

-----Original Message-----
From: Francois Prunayre [mailto:fx.prunayre@anonymised.com]
Sent: 03 December 2009 7:58
To: Michael.Stegherr
Cc: geonetwork-devel
Subject: Re: [GeoNetwork-devel] Getting started

Maybe we should add eclipse configuration files to svn in order to set
up easily a GeoNetwork project, .classpath and .project files should
be the one.
I still facing an issue on how to view all logs to eclipse console,
feel free to update the how to if you find that.
Thanks.

Francois

2009/12/3 <Michael.Stegherr@anonymised.com>:

-----Original Message-----
From: Francois Prunayre [mailto:fx.prunayre@anonymised.com]
Sent: Thursday, 3 December 2009 2:57 AM
To: Archie Warnock
Cc: geonetwork-devel
Subject: Re: [GeoNetwork-devel] Getting started

> I'm going to try to play with it a bit because being able
to run GN in
> the Eclipse debugger could be A Very Good Thing, IMHO.

http://trac.osgeo.org/geonetwork/wiki/HowToRunUnderJettyInEclipse

Great!

Maybe our howto is still helpful, if you run into problems, but I recommend checking out above one by Francois first. I linked to it from our page:

https://www.seegrid.csiro.au/twiki/bin/view/Infosrvices/GeoNetworkDevelopmentSetup

Cheers,
Michael
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
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

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
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

(attachments)

GeoNetwork.launch (960 Bytes)
.project (266 Bytes)
.classpath (10.5 KB)

I keep on making small steps here, but it seems that I have progressed on some stuff. I chose to switch to a Postgres 8.3 database and initialize the database with GAST which in the end succeeded and the server was finally able to start on that database. This also solved my issue with the XML file template repositories.xml which is created on the fly from the template (the change.txt gave me a hint on this). I guess the first issue was causing all the following ones.

I now have some new issues and was still wondering if anyone could help me solve them:
1) The map viewer does not work: I always get a broken image. Do I need to set up anything else? (btw, this does not work either with in my local installation of geonetwork). My first guess would be that this is somehow related to proxies although I did configure them in the admin page.
2) I always get a huge stacktrace complaining about not finding "jdbc/EPSG" This seems to be related to geoserver. Is this normal? Is there something I should do? Geotools reports on its web site that postgresql 8.2 only is supported with geotools 2.5.1 Should I downgrade to 8.2.

Anyone's help will be much appreciated, as always.

Guillaume Polet

04-Dec-2009 13:31:20 org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory isAvailable
WARNING: Unavailable authority factory: European Petroleum Survey Group
org.opengis.referencing.FactoryException: Failed to connect to the EPSG database.
  at org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:428)
  at org.geotools.referencing.factory.DeferredAuthorityFactory.getBackingStore(DeferredAuthorityFactory.java:132)
  at org.geotools.referencing.factory.BufferedAuthorityFactory.isAvailable(BufferedAuthorityFactory.java:233)
  at org.geotools.referencing.factory.DeferredAuthorityFactory.isAvailable(DeferredAuthorityFactory.java:119)
  at org.geotools.factory.FactoryRegistry.isAvailable(FactoryRegistry.java:668)
  at org.geotools.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:500)
  at org.geotools.factory.FactoryRegistry.getServiceImplementation(FactoryRegistry.java:436)
  at org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:364)
  at org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.java:143)
  at org.geotools.referencing.ReferencingFactoryFinder.getAuthorityFactory(ReferencingFactoryFinder.java:216)
  at org.geotools.referencing.ReferencingFactoryFinder.getCRSAuthorityFactory(ReferencingFactoryFinder.java:436)
  at org.geotools.referencing.factory.epsg.LongitudeFirstFactory.createBackingStore(LongitudeFirstFactory.java:189)
  at org.geotools.referencing.factory.DeferredAuthorityFactory.getBackingStore(DeferredAuthorityFactory.java:132)
  at org.geotools.referencing.factory.BufferedAuthorityFactory.isAvailable(BufferedAuthorityFactory.java:233)
  at org.geotools.referencing.factory.DeferredAuthorityFactory.isAvailable(DeferredAuthorityFactory.java:119)
  at org.geotools.factory.FactoryRegistry.isAvailable(FactoryRegistry.java:668)
  at org.geotools.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:500)
  at org.geotools.factory.FactoryRegistry$1.filter(FactoryRegistry.java:191)
  at javax.imageio.spi.FilterIterator.advance(Unknown Source)
  at javax.imageio.spi.FilterIterator.next(Unknown Source)
  at org.geotools.resources.LazySet.addNext(LazySet.java:70)
  at org.geotools.resources.LazySet.size(LazySet.java:87)
  at java.util.AbstractCollection.toArray(Unknown Source)
  at java.util.ArrayList.<init>(Unknown Source)
  at org.geotools.referencing.DefaultAuthorityFactory.getBackingFactory(DefaultAuthorityFactory.java:96)
  at org.geotools.referencing.DefaultAuthorityFactory.<init>(DefaultAuthorityFactory.java:69)
  at org.geotools.referencing.CRS.getAuthorityFactory(CRS.java:182)
  at org.geotools.referencing.CRS.decode(CRS.java:420)
  at org.geoserver.catalog.util.LegacyCatalogImporter.readCoverage(LegacyCatalogImporter.java:662)
  at org.geoserver.catalog.util.LegacyCatalogImporter.imprt(LegacyCatalogImporter.java:248)
  at org.geoserver.config.GeoServerLoader.initialize(GeoServerLoader.java:119)
  at org.geoserver.config.GeoServerLoader.postProcessBeforeInitialization(GeoServerLoader.java:81)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:350)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1330)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
  at java.security.AccessController.doPrivileged(Native Method)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
  at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
  at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
  at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:495)
  at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:162)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
  at java.security.AccessController.doPrivileged(Native Method)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
  at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
  at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
  at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:495)
  at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:162)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
  at java.security.AccessController.doPrivileged(Native Method)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
  at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
  at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
  at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
  at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
  at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
  at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1234)
  at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
  at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:460)
  at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
  at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
  at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
  at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
  at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
  at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
  at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
  at org.mortbay.jetty.Server.doStart(Server.java:222)
  at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
  at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.mortbay.start.Main.invokeMain(Main.java:194)
  at org.mortbay.start.Main.start(Main.java:523)
  at org.mortbay.start.Main.main(Main.java:119)
Caused by: java.sql.SQLException: Failed to get the data source for name "jdbc/EPSG".
  at org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createDataSource(ThreadedEpsgFactory.java:306)
  at org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory.createDataSource(ThreadedHsqlEpsgFactory.java:200)
  at org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore0(ThreadedEpsgFactory.java:373)
  at org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:421)
  ... 100 more
Caused by: javax.naming.NotContextException: jdbc is not a subcontext
  at tyrex.naming.MemoryContext.internalLookup(MemoryContext.java:341)
  at tyrex.naming.MemoryContext.lookup(MemoryContext.java:271)
  at javax.naming.InitialContext.lookup(Unknown Source)
  at org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createDataSource(ThreadedEpsgFactory.java:299)
  ... 103 more

Hi,

I use postgresql 8.4 and have no problems.

Have you found this:
http://n2.nabble.com/Fw-Geoserver-with-Tomcat-map-not-shown-td3649521.html#a3649580
http://n2.nabble.com/GeoNetwork-2-4-1-Javascript-error-with-IE8-and-map-is-not-loading-td3558505.html#a3597395
(don´t know if you use IE or FF, and which version of Gn, Java you use but wanted to let you know)

best regards
Sarah


Von: Polet Guillaume guillaume.polet@anonymised.com
An: geonetwork-devel@lists.sourceforge.net
Gesendet: Freitag, den 4. Dezember 2009, 13:44:44 Uhr
Betreff: Re: [GeoNetwork-devel] Getting started

I keep on making small steps here, but it seems that I have progressed on some stuff. I chose to switch to a Postgres 8.3 database and initialize the database with GAST which in the end succeeded and the server was finally able to start on that database. This also solved my issue with the XML file template repositories.xml which is created on the fly from the template (the change.txt gave me a hint on this). I guess the first issue was causing all the following ones.

I now have some new issues and was still wondering if anyone could help me solve them:

  1. The map viewer does not work: I always get a broken image. Do I need to set up anything else? (btw, this does not work either with in my local installation of geonetwork). My first guess would be that this is somehow related to proxies although I did configure them in the admin page.
  2. I always get a huge stacktrace complaining about not finding “jdbc/EPSG” This seems to be related to geoserver. Is this normal? Is there something I should do? Geotools reports on its web site that postgresql 8.2 only is supported with geotools 2.5.1 Should I downgrade to 8.2.

Anyone’s help will be much appreciated, as always.

Guillaume Polet

04-Dec-2009 13:31:20 org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory isAvailable
WARNING: Unavailable authority factory: European Petroleum Survey Group
org.opengis.referencing.FactoryException: Failed to connect to the EPSG database.
at org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:428)
at org.geotools.referencing.factory.DeferredAuthorityFactory.getBackingStore(DeferredAuthorityFactory.java:132)
at org.geotools.referencing.factory.BufferedAuthorityFactory.isAvailable(BufferedAuthorityFactory.java:233)
at org.geotools.referencing.factory.DeferredAuthorityFactory.isAvailable(DeferredAuthorityFactory.java:119)
at org.geotools.factory.FactoryRegistry.isAvailable(FactoryRegistry.java:668)
at org.geotools.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:500)
at org.geotools.factory.FactoryRegistry.getServiceImplementation(FactoryRegistry.java:436)
at org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:364)
at org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.java:143)
at org.geotools.referencing.ReferencingFactoryFinder.getAuthorityFactory(ReferencingFactoryFinder.java:216)
at org.geotools.referencing.ReferencingFactoryFinder.getCRSAuthorityFactory(ReferencingFactoryFinder.java:436)
at org.geotools.referencing.factory.epsg.LongitudeFirstFactory.createBackingStore(LongitudeFirstFactory.java:189)
at org.geotools.referencing.factory.DeferredAuthorityFactory.getBackingStore(DeferredAuthorityFactory.java:132)
at org.geotools.referencing.factory.BufferedAuthorityFactory.isAvailable(BufferedAuthorityFactory.java:233)
at org.geotools.referencing.factory.DeferredAuthorityFactory.isAvailable(DeferredAuthorityFactory.java:119)
at org.geotools.factory.FactoryRegistry.isAvailable(FactoryRegistry.java:668)
at org.geotools.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:500)
at org.geotools.factory.FactoryRegistry$1.filter(FactoryRegistry.java:191)
at javax.imageio.spi.FilterIterator.advance(Unknown Source)
at javax.imageio.spi.FilterIterator.next(Unknown Source)
at org.geotools.resources.LazySet.addNext(LazySet.java:70)
at org.geotools.resources.LazySet.size(LazySet.java:87)
at java.util.AbstractCollection.toArray(Unknown Source)
at java.util.ArrayList.(Unknown Source)
at org.geotools.referencing.DefaultAuthorityFactory.getBackingFactory(DefaultAuthorityFactory.java:96)
at org.geotools.referencing.DefaultAuthorityFactory.(DefaultAuthorityFactory.java:69)
at org.geotools.referencing.CRS.getAuthorityFactory(CRS.java:182)
at org.geotools.referencing.CRS.decode(CRS.java:420)
at org.geoserver.catalog.util.LegacyCatalogImporter.readCoverage(LegacyCatalogImporter.java:662)
at org.geoserver.catalog.util.LegacyCatalogImporter.imprt(LegacyCatalogImporter.java:248)
at org.geoserver.config.GeoServerLoader.initialize(GeoServerLoader.java:119)
at org.geoserver.config.GeoServerLoader.postProcessBeforeInitialization(GeoServerLoader.java:81)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:350)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1330)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:495)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:162)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:495)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:162)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1234)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:460)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mortbay.start.Main.invokeMain(Main.java:194)
at org.mortbay.start.Main.start(Main.java:523)
at org.mortbay.start.Main.main(Main.java:119)
Caused by: java.sql.SQLException: Failed to get the data source for name “jdbc/EPSG”.
at org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createDataSource(ThreadedEpsgFactory.java:306)
at org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory.createDataSource(ThreadedHsqlEpsgFactory.java:200)
at org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore0(ThreadedEpsgFactory.java:373)
at org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:421)
… 100 more
Caused by: javax.naming.NotContextException: jdbc is not a subcontext
at tyrex.naming.MemoryContext.internalLookup(MemoryContext.java:341)
at tyrex.naming.MemoryContext.lookup(MemoryContext.java:271)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createDataSource(ThreadedEpsgFactory.java:299)
… 103 more


Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev


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


Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com

Hi Sarah,

Thanks for such a great feedback and in such a short time. However, I
have found that the maps displayed in mapviewer are actually coming from
external web sites (I first thought that they were delivered by the
embedded Geoserver) and to reach them they use a traditional URL
connection without setting proxies and other stuffs. Unfortunately for
me, I am behind a proxy which moreover requires authentication
(otherwise it is quite easy to set up global proxy for a Java app, a few
VM args does the trick or simply setting the env property
"java.net.useSystemProxies" to true also works).

I have then modified the code so that the URLConnection performs the
proxy authentication and it got me further but it seems that there are
other URL connection, now performed by
org.apache.commons.httpclient.HttpConnection which also needs to be
configured somehow (I have still no idea on how). Anyway, this is a bit
surprising that GN asks for proxy settings but only parts of the code
uses them. Or maybe I have missed some code somewhere which does it all,
but then it does not seem to work for me ...so far ;-).

I have also read the posts you mentioned in your previous e-mail, but I
don't think that they are related to what I am facing. I have a few
questions regarding them, though.
1) Did you end up using a J2EE VM or did the J2SE was enough?
2) Regarding Geoserver, I don't really understand how it interacts with
GN. How do they communicate and how is GN aware of Geoserver. Can I
configure GN to use another instance of Geoserver or am I forced to use
the embedded one? Since I have checked-out the GN 2.4.2 tag, Geoserver
is "only" 1.7.3 though I'd rather use the latest version (which I think
is 2.0).

I will keep on looking.

Have a great week-end,

Guillaume

I finally got the map to work but with a nasty hack and not using the
saved parameters. In reality, the maps are accessed through another
application "intermap". Intermap, at first, has no knowledge of GN and
so this is why it does not use the proxy settings GN has. It does allow
to set a proxy, although I have not found where I could set, the code
does well allow to set some. But it does not take care of performing
proxy authentication.

So, so far, and just for the purpose of making it run, I have hard-coded
my proxy settings in the method
org.wfp.vam.intermap.http.ConcurrentHTTPTransactionHandler.doTransaction
s() by using some code like this:
httpClient.getState().setProxyCredentials(AuthScope.ANY,
  new UsernamePasswordCredentials(username,password));
    HostConfiguration hConf=
httpClient.getHostConfiguration();
    if (proxyHost != null)
      hConf.setProxy(proxyHost, proxyPort);

And indeed, it worked, I now have a nice map of the world served by the
demis WMS server.

IMO, it is a bit misleading to have the code of several applications
mixed within the same project, but hey, I have not done anything, so I
can't complain ;-).

Have a nice week-end,

Guillaume Polet

-----Original Message-----
From: Polet Guillaume [mailto:guillaume.polet@anonymised.com]
Sent: 04 December 2009 15:38
To: geonetwork-devel@lists.sourceforge.net
Subject: Re: [GeoNetwork-devel] Getting started

Hi Sarah,

Thanks for such a great feedback and in such a short time. However, I
have found that the maps displayed in mapviewer are actually coming from
external web sites (I first thought that they were delivered by the
embedded Geoserver) and to reach them they use a traditional URL
connection without setting proxies and other stuffs. Unfortunately for
me, I am behind a proxy which moreover requires authentication
(otherwise it is quite easy to set up global proxy for a Java app, a few
VM args does the trick or simply setting the env property
"java.net.useSystemProxies" to true also works).

I have then modified the code so that the URLConnection performs the
proxy authentication and it got me further but it seems that there are
other URL connection, now performed by
org.apache.commons.httpclient.HttpConnection which also needs to be
configured somehow (I have still no idea on how). Anyway, this is a bit
surprising that GN asks for proxy settings but only parts of the code
uses them. Or maybe I have missed some code somewhere which does it all,
but then it does not seem to work for me ...so far ;-).

I have also read the posts you mentioned in your previous e-mail, but I
don't think that they are related to what I am facing. I have a few
questions regarding them, though.
1) Did you end up using a J2EE VM or did the J2SE was enough?
2) Regarding Geoserver, I don't really understand how it interacts with
GN. How do they communicate and how is GN aware of Geoserver. Can I
configure GN to use another instance of Geoserver or am I forced to use
the embedded one? Since I have checked-out the GN 2.4.2 tag, Geoserver
is "only" 1.7.3 though I'd rather use the latest version (which I think
is 2.0).

I will keep on looking.

Have a great week-end,

Guillaume

------------------------------------------------------------------------
------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
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

Hi Polet,

good to hear that you solved your issue.
I use Java SDK VM.

So I have difficulties to add new WMS (and harvesting) in intermap (which I think is related to proxies) so I will look at your code and your another explanations. Thanks for that.

Perhaps one of the developers can give some additional explanations about Gn configurations and geoserver stuff.

Have a nice weekend.

best regards
Sarah


Von: Polet Guillaume guillaume.polet@anonymised.com
An: geonetwork-devel@lists.sourceforge.net
Gesendet: Freitag, den 4. Dezember 2009, 16:35:33 Uhr
Betreff: Re: [GeoNetwork-devel] Getting started

I finally got the map to work but with a nasty hack and not using the
saved parameters. In reality, the maps are accessed through another
application “intermap”. Intermap, at first, has no knowledge of GN and
so this is why it does not use the proxy settings GN has. It does allow
to set a proxy, although I have not found where I could set, the code
does well allow to set some. But it does not take care of performing
proxy authentication.

So, so far, and just for the purpose of making it run, I have hard-coded
my proxy settings in the method
org.wfp.vam.intermap.http.ConcurrentHTTPTransactionHandler.doTransaction
s() by using some code like this:
httpClient.getState().setProxyCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(username,password));
HostConfiguration hConf=
httpClient.getHostConfiguration();
if (proxyHost != null)
hConf.setProxy(proxyHost, proxyPort);

And indeed, it worked, I now have a nice map of the world served by the
demis WMS server.

IMO, it is a bit misleading to have the code of several applications
mixed within the same project, but hey, I have not done anything, so I
can’t complain ;-).

Have a nice week-end,

Guillaume Polet

-----Original Message-----
From: Polet Guillaume [mailto:guillaume.polet@anonymised.com]
Sent: 04 December 2009 15:38
To: geonetwork-devel@anonymised.comts.sourceforge.net
Subject: Re: [GeoNetwork-devel] Getting started

Hi Sarah,

Thanks for such a great feedback and in such a short time. However, I
have found that the maps displayed in mapviewer are actually coming from
external web sites (I first thought that they were delivered by the
embedded Geoserver) and to reach them they use a traditional URL
connection without setting proxies and other stuffs. Unfortunately for
me, I am behind a proxy which moreover requires authentication
(otherwise it is quite easy to set up global proxy for a Java app, a few
VM args does the trick or simply setting the env property
“java.net.useSystemProxies” to true also works).

I have then modified the code so that the URLConnection performs the
proxy authentication and it got me further but it seems that there are
other URL connection, now performed by
org.apache.commons.httpclient.HttpConnection which also needs to be
configured somehow (I have still no idea on how). Anyway, this is a bit
surprising that GN asks for proxy settings but only parts of the code
uses them. Or maybe I have missed some code somewhere which does it all,
but then it does not seem to work for me …so far ;-).

I have also read the posts you mentioned in your previous e-mail, but I
don’t think that they are related to what I am facing. I have a few
questions regarding them, though.

  1. Did you end up using a J2EE VM or did the J2SE was enough?
  2. Regarding Geoserver, I don’t really understand how it interacts with
    GN. How do they communicate and how is GN aware of Geoserver. Can I
    configure GN to use another instance of Geoserver or am I forced to use
    the embedded one? Since I have checked-out the GN 2.4.2 tag, Geoserver
    is “only” 1.7.3 though I’d rather use the latest version (which I think
    is 2.0).

I will keep on looking.

Have a great week-end,

Guillaume



Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev


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


Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev


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


Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com