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
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to