I can see errors like this in runtime (Jetty only, not reproducible with
Tomcat)
I'm using Java8

Steps are:
1) mvn jetty:run-exploded
2) wait long enough
These errors seems to affect nothing, so I thought it is some jetty problem

On Thu, 29 Nov 2018 at 15:36, Martin Grigorov <[email protected]> wrote:

> Hi,
>
> Those classes are in wicket jars but if they were not loaded by the
> WebappClassLoader before the call to javax.servlet.Filter#destroy() then
> the web container won't be able to load them inside #destroy().
> It is some kind of security protection done by the web container to not
> load any new classes once destroy is initiated.
>
> The usual solution is to pre-load (at Application#init()) all classes which
> might be needed in Application#destroy() but this might break at any time
> when some new code is added to #destroy(), even in the application code -
> Application#onDestroy().
>
>
> On Thu, Nov 29, 2018 at 10:15 AM Rob Audenaerde <[email protected]>
> wrote:
>
> > Hi all,
> >
> > The problem where WicketApplication.destroy() hangs in 8.1.0 seems to be
> > fixed with WICKET-6603, however, I noted a new problem (less impacting
> for
> > me at least).
> >
> > When quickly firing up embedded jetty, then opening a page and shutting
> > jetty down, I get exceptions in the page serializer. Note that this has
> > nothing to do with the WicketTester, as I use a pre-compiled
> > application.war in a standalone embedded Jetty.
> >
> > (Jetty version:  9.4.11.v20180605, Java version: build
> > 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, wicket version 8.2.0)
> >
> > I got at least these two on different occasions:
> >
> > Exception in thread "Wicket-AsyncPageStore-PageSavingThread"
> > java.lang.NoClassDefFoundError:
> > org/danekja/java/util/function/serializable/SerializableBiConsumer
> > at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
> > at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3119)
> > ...
> >
> > and
> >
> > Exception in thread "Wicket-AsyncPageStore-PageSavingThread"
> > java.lang.NoClassDefFoundError:
> > org/apache/wicket/request/mapper/parameter/INamedParameters$Type
> > at java.base/java.lang.Class.getDeclaredMethods0(Native Method
> > ...
> >
> > There classes are present in the wicket jars, so I'm a bit at loss as to
> > what causes this. I can simple wrap the `destoy()` of my application in a
> > try-catch and ignore the exceptions; however; it seems something is
> still a
> > bit wrong.
> >
> > It seems these classes are unloaded somehow? Maybe any of you can shed
> some
> > light on this?
> >
> > -Rob
> >
>


-- 
WBR
Maxim aka solomax

Reply via email to