Hi all,
I've just started using Wicket, for a new project. In general it's looking
very promising, but we've had one problem. We are using Wicket from within
OSGi (Equinox). When we submit a Wicket servlet to our embedded web server
(Jetty) and the servlet gets initialized, there is a NullPointerException in
Application.initializeComponents(), on the following line:
// Load properties files used by all libraries
final Enumeration resources = Thread.currentThread
().getContextClassLoader()
.getResources("wicket.properties");
The reason is that in the OSGi environment, there is no context classloader
associated with the running thread. Making this assumption seems wrong to
me; something like the code in ClassLoaderResourceStreamLocator.java seems
more appropriate.
This is seen using Wicket 1.3 (latest beta), looking at the Wicket 1.2 code,
it doesn't seem to have this problem.
For the time being we can work around this by manually setting the current
thread's context classloader before activating the Wicket servlet, but it
doesn't seem to me that this should be necessary.
I found a thread from last year discussing similar issues:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg07325.html.
(The original post in thread actually suggests changing *to* using the
current thread context classloader, which is wrong IMHO!) But later in the
thread, providing a pluggable classloader access policy is discussed. Was
there a decision on how this should be done, or is this still an outstanding
issue?
Many thanks,
Jan