On Tue, Jan 24, 2012 at 3:26 PM, John Armstrong <john.armstr...@ccri.com>wrote:

> On Tue, 24 Jan 2012 15:21:15 -0700, Justin Deoliveira
> <jdeol...@opengeo.org> wrote:
> > And sorry, by disable i mean remove the jars. Or perhaps just the
> diskquota
> > jar might do it, not 100% sure.
> >
> > On Tue, Jan 24, 2012 at 3:20 PM, Justin Deoliveira
> > <jdeol...@opengeo.org>wrote:
> >
> >> Hi John,
> >>
> >> Unfortunately the dbconfig module is sort of unmaintained at the
> moment.
> >> That said, it looks like gwc is probably doing some initialization in a
> >> separate thread, which the hibernate startup does not like.
> >>
> >> If you don't need geowebcache, i would just disable it for now.
> >>
> >> -Justin
>
> Thanks; just to be sure I understand you, you think that it's something in
> GWC that's conflicting with the Hibernate module?  I'm not sure I
> understand where you're getting that, but I'm willing to believe it.
>

Sorry, allow me to explain better. The way hibernate is set up in geoserver
is that a session is bound to a single request, or thread. If you try to
access a hibernate backed bean that has a lazy property from outside that
thread/session then you get this exception.

Now, during regular geoserver operation this is rarely an issue because
essentially there is a filter in place that always set ups and tears down
the thread local session, meaning that for the life of a single
request/thread a valid session will always be present.

However, on startup we don't have this same filter available, so we fake
it. BAsically the code that loads the configuration creates a session
before loading, and tears it down after loading. Again this session is
bound to the current thread, which means if any components that initialize
on startup do so in a separate thread, and they access a lazy property of a
bean, then this exception occurs.

So yes, i am saying that gwc is doing just that, it is using a new thread
to do some of its initialization on startup. Gabriel should be able to
verify this but i am pretty sure i have run up against this one before.

Hope that makes it a bit clearer.

-Justin

-- 
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to