[Geoserver-devel] Misterious EMF related exception

Hi,
on a production system running an old Geoserver I’m seeing the following stack trace:

Caused by: java.lang.NullPointerException
at org.eclipse.emf.ecore.util.EcoreEList.resolveProxy(EcoreEList.java:212)
at org.eclipse.emf.ecore.util.EcoreEList.indexOf(EcoreEList.java:411)
at org.eclipse.emf.common.util.AbstractEList.remove(AbstractEList.java:463)
at org.geotools.xml.Schemas.dispose(Schemas.java:371)
at org.geoserver.wfs.xml.SchemaCleanerCallback.finished(SchemaCleanerCallback.java:48)
at org.geoserver.ows.Dispatcher.fireFinishedCallback(Dispatcher.java:308)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:285)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

No way to reproduce it locally… looking at the code is seems that it could happen if the item to be removed
is not found in the list, then the code checks if the list contains proxies by trying to unwrap them, and either
it turns out the list contains a null value, or the value is not null, it’s a proxy, and the list has no owner…

The above means nothing to me however… does that ring a bell to anyone? Anything you might have
already seen? It’s happening while making WFS 2.0 requests to a 2.4.x GeoServer, does not happen
with 1.1 and 1.0.
Checked the ticket tracker, could not find anything related…

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.


Andrea,

It rings a bell but I believe my exception was slightly different, relating to the classpath.

Anyway, the solution for me was setting:

System.setProperty(“org.eclipse.emf.ecore.EPackage.Registry.INSTANCE”,
“org.eclipse.emf.ecore.impl.EPackageRegsitryImpl”);

I noted this thread in my comments:
http://www.eclipsezone.com/eclipse/forums/t108113.html

···

On Thu, May 19, 2016 at 1:09 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Hi,
on a production system running an old Geoserver I’m seeing the following stack trace:

Caused by: java.lang.NullPointerException
at org.eclipse.emf.ecore.util.EcoreEList.resolveProxy(EcoreEList.java:212)
at org.eclipse.emf.ecore.util.EcoreEList.indexOf(EcoreEList.java:411)
at org.eclipse.emf.common.util.AbstractEList.remove(AbstractEList.java:463)
at org.geotools.xml.Schemas.dispose(Schemas.java:371)
at org.geoserver.wfs.xml.SchemaCleanerCallback.finished(SchemaCleanerCallback.java:48)
at org.geoserver.ows.Dispatcher.fireFinishedCallback(Dispatcher.java:308)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:285)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

No way to reproduce it locally… looking at the code is seems that it could happen if the item to be removed
is not found in the list, then the code checks if the list contains proxies by trying to unwrap them, and either
it turns out the list contains a null value, or the value is not null, it’s a proxy, and the list has no owner…

The above means nothing to me however… does that ring a bell to anyone? Anything you might have
already seen? It’s happening while making WFS 2.0 requests to a 2.4.x GeoServer, does not happen
with 1.1 and 1.0.
Checked the ticket tracker, could not find anything related…

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.



Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j


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

Jason Newmoyer
Newmoyer Geospatial Solutions
843.606.0424
jason@anonymised.com

On Thu, May 19, 2016 at 8:40 PM, Jason Newmoyer <
jason@anonymised.com> wrote:

Andrea,

It rings a bell but I believe my exception was slightly different,
relating to the classpath.

Thanks for the follow up. Do you have by any chance your stack trace handy?
Was that happening with GeoServer?

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.

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