Hi,
every now and then the build fails with this exception:
java.lang.NullPointerException
at org.geoserver.catalog.impl.DefaultCatalogFacade.getResourceByName(DefaultCatalogFacade.java:299)
at org.geoserver.catalog.impl.CatalogImpl.getResourceByName(CatalogImpl.java:469)
at org.geoserver.catalog.impl.CatalogImpl.validate(CatalogImpl.java:408)
at org.geoserver.catalog.impl.CatalogImpl.add(CatalogImpl.java:380)
at org.geoserver.catalog.impl.CatalogImplTest$LayerAddRunner.runInternal(CatalogImplTest.java:1890)
at org.geoserver.catalog.impl.RunnerBase.run(RunnerBase.java:30)
at java.lang.Thread.run(Thread.java:722)
I see this on the OpenJDK7 server, but afaik I spotted it at least once on the main build server as well.
The issue seems to be related to the fact the DefaultCatalogFacade is not thread safe, and of course the test
in question is not using the config locks preventing concurrent access.
For the moment I’ve fixed it by checking for null values in the List lookup(Class clazz, MultiHashMap map) method,
but it would be better if we had a concurrent data structure there.
There is a problem though, in that code we are using a MultiMap, and afaik there are no concurrent multimap
implementations around.
Anyone knows of a good solution?
Cheers
Andrea
–
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it