ok. after weeks of wrestling with gump to find out what the failures
are about, this last build gave some decent info.

See:
http://vmgump.apache.org/gump/public/velocity-engine/velocity-engine-test/gump_work/build_velocity-engine_velocity-engine-test.html

I think this section shows the main problem:

    [junit] log:  [debug] Velocity was not initialized! Calling init()...
    [junit]  [debug] Starting Apache Velocity v03092008 (compiled:
2008-09-03 18:37:33)
    [junit]  [debug] Default Properties File:
org/apache/velocity/runtime/defaults/velocity.properties
    [junit]  [debug] ResourceManager : No configuration information
for resource loader named 'string'. Skipping.
    [junit]  [debug] ResourceLoader instantiated:
org.apache.velocity.runtime.resource.loader.FileResourceLoader
    [junit]  [debug] Do unicode file recognition:  false
    [junit]  [debug] FileResourceLoader : adding path
'/srv/gump/public/workspace/velocity-engine/test/resourceexists'
    [junit]  [debug] ResourceCache: initialized (class
org.apache.velocity.runtime.resource.ResourceCacheImpl) with class
java.util.Collections$SynchronizedMap cache map.

As you can see, the engine knows there are two resource loaders 'file'
and 'string'.  It has path info for the 'file' resource loader, but it
has *no* info on the 'string' resource loader.  But if you look at the
test case, it clearly adds info for both loaders:

        velocity = new VelocityEngine();
        velocity.setProperty("resource.loader", "file,string");
        velocity.setProperty("file.resource.loader.path", path);
        velocity.setProperty("string.resource.loader.class",
StringResourceLoader.class.getName());

This code runs perfectly on my machine and probably on yours too.  So,
what the hell?  If you further peruse the output from the last gump
build (link above), you will see that the ResourceInstanceTestCase has
the same problem (no info for the 'testrl' resource loader).

The ResourceManager code producing that 'no config info' log message is:

            String loaderName = (String) it.next();
            StringBuffer loaderID = new StringBuffer(loaderName);
            loaderID.append(".").append(RuntimeConstants.RESOURCE_LOADER);

            ExtendedProperties loaderConfiguration =
                        rsvc.getConfiguration().subset(loaderID.toString());
            if (loaderConfiguration == null)
            {
                log.debug("ResourceManager : No configuration
information for resource loader named '" +
                          loaderName + "'. Skipping.");
                continue;
            }

Why this would work for 'file' and not for 'string' or 'testrl' is
currently a baffling mystery to me.  My best guess at this point is
that it is due to some underlying change in Commons-Collections'
ExtendedProperties class.  But that seems kind of unlikely.  Any
insights?  I'm about ready to give up and just find a workaround that
makes gump happy, but if there is a bug coming down the line, that
would not be helpful...

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to