[Geoserver-users] Solution to trouble upgrading from 2.6.x to 2.8.x

Hi,

I’ve been battling to upgrade a 2.6.x version of GeoServer to 2.8.x.

The issue was that the GeoServer would just shutdown on load without an error message:

2016-07-04 12:56:11,819 INFO [geoserver.security] - AuthenticationCache Eviction Task created to run every 600 seconds
2016-07-04 12:56:11,944 INFO [georss.GeoRSSPoller] - destroy() invoked

2016-07-04 12:56:13,007 WARN [support.DisposableBeanAdapter] - Invocation of destroy method failed on bean with name ‘geoServerLoader’: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name ‘geoWebCacheExtensions’: Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)

I have now identified the cause and I thought I’d share it just incase anyone else gets the problem.

We originally used the Web.xml file to set the data directory for the GeoServer and eventually moved the setting into the JVM options. I had left a custom version of the Web.xml file in my installation directory which meant I was overwriting the file whenever I installed a new version of GeoServer.

It appears that the following entry has been removed from the web.xml in the package for 2.8.4.

enableVersioning

true

Once I replaced the web.xml with the packaged version the server loaded again.

The upgrade page (http://docs.geoserver.org/maintain/en/user/installation/upgrade.html) and migration page (http://docs.geoserver.org/maintain/en/user/datadirectory/migrating.html#migrating-data-directory) in the documentation do not appear to have any notes relating to the move from 2.6.x to 2.8.x so perhaps this email will assist anyone else who uses a custom web.xml and encounters the same issue. The GeoServer logs will not provide much assistance in identifying the cause if this is your problem.

Best Regards,

Paul Wittle

Hi Paul,
I’ve diffed the 2.6.x and 2.8.x web.xml files and found the following:

git diff 2.6.x…2.8.x – app/src/main/webapp/WEB-INF/web.xml
diff --git a/src/web/app/src/main/webapp/WEB-INF/web.xml b/src/web/app/src/main/webapp/WEB-INF/web.xml
index 25202f0…b6f9a86 100644
— a/src/web/app/src/main/webapp/WEB-INF/web.xml
+++ b/src/web/app/src/main/webapp/WEB-INF/web.xml
@@ -26,12 +26,6 @@
PARTIAL-BUFFER2

  • enableVersioning
  • true
···

On Mon, Jul 4, 2016 at 5:01 PM, Paul Wittle <P.Wittle@anonymised.com…> wrote:

Hi,

I’ve been battling to upgrade a 2.6.x version of GeoServer to 2.8.x.

The issue was that the GeoServer would just shutdown on load without an error message:

2016-07-04 12:56:11,819 INFO [geoserver.security] - AuthenticationCache Eviction Task created to run every 600 seconds
2016-07-04 12:56:11,944 INFO [georss.GeoRSSPoller] - destroy() invoked

2016-07-04 12:56:13,007 WARN [support.DisposableBeanAdapter] - Invocation of destroy method failed on bean with name ‘geoServerLoader’: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name ‘geoWebCacheExtensions’: Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)

I have now identified the cause and I thought I’d share it just incase anyone else gets the problem.

We originally used the Web.xml file to set the data directory for the GeoServer and eventually moved the setting into the JVM options. I had left a custom version of the Web.xml file in my installation directory which meant I was overwriting the file whenever I installed a new version of GeoServer.

It appears that the following entry has been removed from the web.xml in the package for 2.8.4.

enableVersioning

true

Once I replaced the web.xml with the packaged version the server loaded again.

The upgrade page (http://docs.geoserver.org/maintain/en/user/installation/upgrade.html) and migration page (http://docs.geoserver.org/maintain/en/user/datadirectory/migrating.html#migrating-data-directory) in the documentation do not appear to have any notes relating to the move from 2.6.x to 2.8.x so perhaps this email will assist anyone else who uses a custom web.xml and encounters the same issue. The GeoServer logs will not provide much assistance in identifying the cause if this is your problem.

Best Regards,

Paul Wittle

“This e-mail is intended for the named addressee(s) only and may contain information about individuals or other sensitive information and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this email in error, kindly disregard the content of the message and notify the sender immediately. Please be aware that all email may be subject to recording and/or monitoring in accordance with relevant legislation.”


Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313

fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


Thanks Andrea,

That is interesting; would that be linked to the comment on the http://docs.geoserver.org/maintain/en/user/installation/upgrade.html page regarding the GeoJSON encoding?

Anyway, it is fixed now so that is fine.

Thanks for your help,

Paul

···

Hi Paul,

I’ve diffed the 2.6.x and 2.8.x web.xml files and found the following:

git diff 2.6.x…2.8.x – app/src/main/webapp/WEB-INF/web.xml

diff --git a/src/web/app/src/main/webapp/WEB-INF/web.xml b/src/web/app/src/main/webapp/WEB-INF/web.xml

index 25202f0…b6f9a86 100644

— a/src/web/app/src/main/webapp/WEB-INF/web.xml

+++ b/src/web/app/src/main/webapp/WEB-INF/web.xml

@@ -26,12 +26,6 @@

PARTIAL-BUFFER2

  • enableVersioning

  • true

@@ -75,7 +69,7 @@

Set Character Encoding

  • org.vfny.geoserver.filters.SetCharacterEncodingFilter
  • org.springframework.web.filter.CharacterEncodingFilter

encoding

UTF-8

@@ -114,7 +108,7 @@

parameter defaults to false.

enabled

  • true
  • false

log-request-bodies

  • true
  • false

@@ -254,6 +248,10 @@

sld

text/xml

  • json

  • application/json

index.html

I believe theactual issue was caused the change of the SetCharacterEncodingFilter package, as there

is nothing left in GeoServer using the versioning variable.

I believe you should have found one error about that, but not in the GeoServer logs, more likely in the

container ones instead (e.g., Tomcat catalina.out or something like that).

Cheers

Andrea

On Mon, Jul 4, 2016 at 5:01 PM, Paul Wittle <P.Wittle@…7193…> wrote:

Hi,

I’ve been battling to upgrade a 2.6.x version of GeoServer to 2.8.x.

The issue was that the GeoServer would just shutdown on load without an error message:

2016-07-04 12:56:11,819 INFO [geoserver.security] - AuthenticationCache Eviction Task created to run every 600 seconds
2016-07-04 12:56:11,944 INFO [georss.GeoRSSPoller] - destroy() invoked

2016-07-04 12:56:13,007 WARN [support.DisposableBeanAdapter] - Invocation of destroy method failed on bean with name ‘geoServerLoader’: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name ‘geoWebCacheExtensions’: Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)

I have now identified the cause and I thought I’d share it just incase anyone else gets the problem.

We originally used the Web.xml file to set the data directory for the GeoServer and eventually moved the setting into the JVM options. I had left a custom version of the Web.xml file in my installation directory which meant I was overwriting the file whenever I installed a new version of GeoServer.

It appears that the following entry has been removed from the web.xml in the package for 2.8.4.

enableVersioning

true

Once I replaced the web.xml with the packaged version the server loaded again.

The upgrade page (http://docs.geoserver.org/maintain/en/user/installation/upgrade.html) and migration page (http://docs.geoserver.org/maintain/en/user/datadirectory/migrating.html#migrating-data-directory) in the documentation do not appear to have any notes relating to the move from 2.6.x to 2.8.x so perhaps this email will assist anyone else who uses a custom web.xml and encounters the same issue. The GeoServer logs will not provide much assistance in identifying the cause if this is your problem.

Best Regards,

Paul Wittle

“This e-mail is intended for the named addressee(s) only and may contain information about individuals or other sensitive information and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this email in error, kindly disregard the content of the message and notify the sender immediately. Please be aware that all email may be subject to recording and/or monitoring in accordance with relevant legislation.”


Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==

GeoServer Professional Services from the experts! Visit

http://goo.gl/it488V for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


On Tue, Jul 5, 2016 at 10:07 AM, Paul Wittle <P.Wittle@anonymised.com>
wrote:

Thanks Andrea,

That is interesting; would that be linked to the comment on the
http://docs.geoserver.org/maintain/en/user/installation/upgrade.html page
regarding the GeoJSON encoding?

No, it has nothing to do with it. It is a side effect of making the web/app
module a template for
building a customized geoserver without having to rely on war overlays, in
which all remaining
java classes in the module were moved away in the main module.

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------