dev@grizzly.java.net

Re: [Issue 758] Deplyer refactorinf regression issue

From: Hubert Iwaniuk <neotyk_at_kungfoo.pl>
Date: Thu, 5 Nov 2009 22:08:33 +0100

First look at classloaders produced by old and new approach shows following
differences:
war contents in old is referenced vis jar:file: protocol while with new one
via file: protocol to exploded location.
Same stands for WEB-INF/classes.
So it should not produce any difference, but apparently it somehow does.
I'll try looking into it a bit more.

Cheers,
Hubert


On Thu, Nov 5, 2009 at 8:27 PM, Survivant 00 <survivant00_at_gmail.com> wrote:

> I couldn't wait until tonight.
>
> I been able to make it works, but I had to change a little code. (now I'm
> pretty sure that something missing in the ClassLoader).
>
> here what I changed : (call the older classloader instead for this test)
>
> public void deployWar(
> String location, String context, URLClassLoader
> serverLibLoader, WebApp defaultWebApp) throws DeployException {
> String ctx = context;
> if (ctx == null) {
> ctx = getContext(location);
> int i = ctx.lastIndexOf('.');
> if (i > 0) {
> ctx = ctx.substring(0, i);
> }
> }
> Map.Entry<String, URLClassLoader> loaderEntry = null;
> try {
> loaderEntry = explodeAndCreateWebAppClassLoader(location,
> serverLibLoader);
> } catch(Exception e){
> e.printStackTrace();
> }
>
> WarDeploymentConfiguration config = new
> WarDeploymentConfiguration(ctx, loaderEntry.getValue(), defaultWebApp);
> if (logger.isLoggable(Level.FINER)) {
> logger.log(Level.FINER, String.format("Configuration for
> deployment: %s.", config));
> }
> deployer.deploy(ws, new File(location).toURI(), config);
> }
>
>
> and spring found the files.
>
>
> Do you want me to go deeper ? (into the code :0 )
>