Thanks, that was quite useful.
To paraphrase the Game Of Thrones, the bug happens because “the road to CatalogImpl is dark, and full of wrappers”. [1]
Unfortunately some do not behave as they should and/or are not getting properly unwrapped on their way back during “save”.
One of those is the AdvertisedCatalog layer group wrapper… however, this is the strage thing, the wrapping should happen only during
capablities request, and instead it happens on every request after changing the default style of that one layer.
I’ve then tracked it down to ModificationProxy saving lists of proxied values into the original object on commit, which makes
the layer groups see a proxied list of layers. So to follow Nuno’s step:
···
On Mon, Mar 13, 2017 at 6:28 PM, Nuno Oliveira <nuno.oliveira@anonymised.com> wrote:
Issue created: https://osgeo-org.atlassian.net/browse/GEOS-8028
On 03/13/2017 05:07 PM, Torben Barsballe wrote:
I’ve definately run into this a few times before, but could never reproduce reliably.
Using Nuno’s steps I was able to reproduce this on 2.10.2, so it is not limited to master.
Torben
--
==
GeoServer Professional Services from the experts!
Visit [http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Nuno Miguel Carvalho Oliveira
@nmcoliveira
Software Engineer
GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928
[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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 Mon, Mar 13, 2017 at 8:13 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:
Ah ha, thanks Nuno!
Could you open a ticket with those steps?
I’d say this is a release blocker, but would like to hear from others too
Cheers
Andrea
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world’s most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Geoserver-devel mailing list Geoserver-devel@anonymised.comrge.net https://lists.sourceforge.net/lists/listinfo/geoserver-devel
On Mon, Mar 13, 2017 at 12:12 PM, Nuno Oliveira <nuno.oliveira@anonymised.comt> wrote:
Hi Andrea,
I have already stepped on this issue like one month ago and I was not able to reproduce it and it never happen again so I forget about it.
Well now I just able to reproduce it
I use the Tasmania layer group and the Tasmania roads layer:
-
Open in a new tab the layer groups page
-
Open in another tab the layers page
-
Open a the Tasmania layer group and change the layers draw order and click save
-
Open the Tasmania roads layer and change the default style
-
Open the layer group again and change the roads layer style to another
-
Try to save, the error will happen:
![]()
With this steps it happens always 
Regards,
Nuno Oliveira
On 03/13/2017 09:27 AM, Andrea Aime wrote:
Hi,
playing with GeoServer master I stumbled into this trace a couple of times, saving a layer group:
2017-03-04 14:42:20,086 WARN [geoserver.web] - Error adding/modifying layer group.
java.lang.IllegalArgumentException: not a proxy instance
at java.lang.reflect.Proxy.getInvocationHandler(Proxy.java:816)
at org.geoserver.catalog.impl.CatalogInfoLookup.update(CatalogInfoLookup.java:95)
at org.geoserver.catalog.impl.DefaultCatalogFacade.save(DefaultCatalogFacade.java:500)
at org.geoserver.catalog.impl.CatalogImpl.save(CatalogImpl.java:946)
at org.geoserver.security.SecureCatalogImpl.save(SecureCatalogImpl.java:1352)
at org.geoserver.catalog.impl.AbstractFilteredCatalog.save(AbstractFilteredCatalog.java:740)
at org.geoserver.catalog.impl.AbstractCatalogDecorator.save(AbstractCatalogDecorator.java:446)
at org.geoserver.catalog.impl.LocalWorkspaceCatalog.save(LocalWorkspaceCatalog.java:218)
at org.geoserver.web.data.layergroup.LayerGroupEditPage.doSaveInternal(LayerGroupEditPage.java:309)
at org.geoserver.web.publish.PublishedConfigurationPage.doSave(PublishedConfigurationPage.java:255)
at org.geoserver.web.publish.PublishedConfigurationPage$6.onSubmit(PublishedConfigurationPage.java:241)
at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1307)
at org.apache.wicket.markup.html.form.Form.process(Form.java:974)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:795)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:708)
Now, the thing is, I cannot find a way to reproduce it, it just “happens” and I cannot figure out why.
Could anyone help me track down this beast? Once it happens I see the only way to fix things is
to reload the configuration.
If you’re into the code, here is a description of what’s going on.
The catalog facade on update needs to verify a few properties changed, and needs
to be submitted a ModificationProxy wrapping the actual catalog object to do so. Now, properly written
code always satisfies this property, e.g.:
Catalog catalog = …
LayerGroupInfo lg = catalog.getLayerGroupByName(…); // lg is a proxy here
// change lg properties
catalog.save(lg); // saving the wrapper proxy here
However, somewhere somehow, when saving a group on the UI the catalog gets a non wrapped object,
which does not allow to check what properties changed.
At first I thought it was due to the DefaultCatalogFacade changes, but I see the old catalog would
have tried to unwrap the proxy anyways to send events around, so I guess it’s something new in the UI
behavior instead.
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.
------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
[http://sdm.link/oxford](http://sdm.link/oxford)
_______________________________________________
Geoserver-devel mailing list
[Geoserver-devel@anonymised.comrge.net](mailto:Geoserver-devel@anonymised.comge.net)
[https://lists.sourceforge.net/lists/listinfo/geoserver-devel](https://lists.sourceforge.net/lists/listinfo/geoserver-devel)
--
==
GeoServer Professional Services from the experts!
Visit [http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Nuno Miguel Carvalho Oliveira
@nmcoliveira
Software Engineer
GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928
[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.
------------------------------------------------------------------------------ Announcing the Oxford Dictionaries API! The API offers world-renowned dictionary content that is easy and intuitive to access. Sign up for an account today to start using our lexical data to power your apps and projects. Get started today and enter our developer competition. http://sdm.link/oxford _______________________________________________ Geoserver-devel mailing list Geoserver-devel@anonymised.comrge.net https://lists.sourceforge.net/lists/listinfo/geoserver-devel
–
==
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.
==
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.