Hi,

This seems to be happening because the plugin is not initialized early
enough. For some reason it's loaded with GWC but not at the beginning of
the server setup. Maybe I've missed a configuration file that informs GS
about possible extensions?


 Sampo


On Fri, Apr 25, 2014 at 9:08 AM, Sampo Savolainen <
[email protected]> wrote:

> Hi Andrea,
>
> I just merged this into my branch. It seems that during geoserver startup,
> the XStreamPersisterInitializer.init() method is called only after the
> server configuration is loaded.
>
> ...
> 25 Apr 09:03:46 INFO [org.geoserver] - Loaded feature type 'restricted',
> enabled
> 25 Apr 09:03:46 INFO [org.geoserver] - Loaded feature type 'sf'
> 25 Apr 09:03:46 INFO [org.geoserver] - Loaded layer 'restricted'
> 25 Apr 09:03:46 INFO [org.geoserver] - Loaded layer group 'tiger-ny'
> 25 Apr 09:03:46 INFO [org.geoserver] - Loaded layer group 'spearfish'
> 25 Apr 09:03:46 INFO [org.geoserver] - Loaded layer group 'tasmania'
> 25 Apr 09:03:46 INFO [org.geoserver] - Loaded service 'wcs', enabled
> 25 Apr 09:03:46 INFO [org.geoserver] - Loaded service 'wfs', enabled
> 25 Apr 09:03:46 INFO [org.geoserver] - Loaded service 'wms', enabled
> 25 Apr 09:03:46 INFO [storage.DefaultStorageFinder] -
> ***************************************************************************************
> 25 Apr 09:03:46 INFO [storage.DefaultStorageFinder] - *** Reverting to
> java.io.tmpdir null for storage. Please set GEOWEBCACHE_CACHE_DIR. ***
> 25 Apr 09:03:46 INFO [storage.DefaultStorageFinder] -
> ***************************************************************************************
> 25 Apr 09:03:46 INFO [config.XMLConfiguration] - Will look for
> geowebcache.xml in '/tmp/geowebcache'
> 25 Apr 09:03:47 INFO [gwc.config] - Initializing GeoServer specific GWC
> configuration from gwc-gs.xml
> #################### WfsNgXStreamPersisterInitializer
> init(XStreamPersister) called
> ...
>
> (The ##### line is System.err from my persister bean)
>
> I would've expected the persister to be initialized before the feature
> types are loaded? Also, the metadata configuration XML is not being
> deserialized as is.
>
>
>  Sampo
>
>
> On Fri, Apr 25, 2014 at 12:14 AM, Justin Deoliveira <
> [email protected]> wrote:
>
>> Looks good to me.
>>
>>
>> On Thu, Apr 24, 2014 at 10:33 AM, Andrea Aime <
>> [email protected]> wrote:
>>
>>> Hi Justin,
>>> not sure if you saw the pull request already, I've mentioned in a mail
>>> in this
>>>  thread a few days ago:
>>> https://github.com/geoserver/geoserver/pull/571
>>>
>>> Seems good to go to me
>>>
>>> Cheers
>>> Andrea
>>>
>>>
>>>
>>> On Sun, Apr 20, 2014 at 7:04 PM, Justin Deoliveira <
>>> [email protected]> wrote:
>>>
>>>> +1 on the idea. Personally I am fine without a proposal for this one, I
>>>> do have a couple of questions though.
>>>>
>>>> Where will the extension point be invoked from? XStreamPersister
>>>> itself, or from XStreamPersisterFactory? I would vote for the latter as I
>>>> think it would be nice to keep that outside of the persister itself.
>>>>
>>>> Should the interface take an instance of the persister rather than the
>>>> underlying xstream? Rationale is that since we expose some other methods on
>>>> XStreamPersister that configure how things are encoded I wonder if we may
>>>> want to make those (along with future methods) available to the plugins as
>>>> well?
>>>>
>>>>
>>>>
>>>> On Fri, Apr 18, 2014 at 3:34 AM, Andrea Aime <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi,
>>>>> when working over a new module there's often a decision to be made,
>>>>> about where
>>>>> the configuration should be stored and how.
>>>>>
>>>>> While custom configuration files are a popular choice, they also have
>>>>> significant downsides:
>>>>> * the config in question cannot be edited via REST config
>>>>> * persistance has to be managed by the plugin
>>>>> * the config sometimes really is something related to a particular
>>>>> catalog resource, so it
>>>>>   would be better placed as part of the resource metadata map
>>>>>
>>>>> Of course one can put whatever is needed in the metadata map, but the
>>>>> default
>>>>> XStream persistence can leave a lot to be desired, with package names
>>>>> included
>>>>> in the element names and the like, to the point of making the metadata
>>>>> map choice
>>>>> less than desirable.
>>>>>
>>>>> What I'm proposing here is a simple customization to the
>>>>> XStreamPersister that
>>>>> allows plugins to register converters and aliases for their objects.
>>>>> This is probably needed by Sampo for the stored query configuration,
>>>>> and I would also
>>>>> like to benefit from it.
>>>>>
>>>>>  The interface would be simple:
>>>>>
>>>>> XStreamPersisterInitializer {
>>>>>
>>>>>   /**
>>>>>    * Allows XStream customizations. Plugins can use this to add
>>>>> aliases and
>>>>>    * custom converters for their own configuration objects
>>>>>    */
>>>>>   void init(XStream xs);
>>>>>
>>>>> }
>>>>>
>>>>> This is pretty small, so not sure if a GSIP is required, but if you
>>>>> feel like it is,
>>>>> let me know.
>>>>>
>>>>> Feedback welcomed
>>>>>
>>>>> Cheers
>>>>> Andrea
>>>>>
>>>>>
>>>>> --
>>>>> ==
>>>>> Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
>>>>> 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
>>>>>
>>>>> -------------------------------------------------------
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Learn Graph Databases - Download FREE O'Reilly Book
>>>>> "Graph Databases" is the definitive new guide to graph databases and
>>>>> their
>>>>> applications. Written by three acclaimed leaders in the field,
>>>>> this first edition is now available. Download your free book today!
>>>>> http://p.sf.net/sfu/NeoTech
>>>>> _______________________________________________
>>>>> Geoserver-devel mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *Justin Deoliveira*
>>>> Vice President, Engineering | Boundless
>>>> [email protected]
>>>> @j_deolive <https://twitter.com/j_deolive>
>>>>
>>>
>>>
>>>
>>> --
>>> ==
>>> Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
>>> 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
>>>
>>> -------------------------------------------------------
>>>
>>
>>
>>
>> --
>> *Justin Deoliveira*
>> Vice President, Engineering | Boundless
>> [email protected]
>> @j_deolive <https://twitter.com/j_deolive>
>>
>
>
>
> --
> Sampo Savolainen
> R&D Director, Spatineo Oy
> [email protected]
> +358-407555649
> Linnankoskenkatu 16 A 17, 00250 Helsinki, Finland
> www.spatineo.com, twitter.com/#!/spatineo
> www.linkedin.com/company/spatineo-inc
>
> This message may contain privileged and/or confidential information. If you
> have received this e-mail in error or are not the intended recipient, you
> may not use, copy, disseminate, or distribute it; do not open any
> attachments, delete it immediately from your system and notify the sender
> promptly by e-mail that you have done so.
>



-- 
Sampo Savolainen
R&D Director, Spatineo Oy
[email protected]
+358-407555649
Linnankoskenkatu 16 A 17, 00250 Helsinki, Finland
www.spatineo.com, twitter.com/#!/spatineo
www.linkedin.com/company/spatineo-inc

This message may contain privileged and/or confidential information. If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate, or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to