velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Oliver" <>
Subject ClasspathResourceLoader no worky
Date Thu, 04 Aug 2005 20:48:37 GMT

I have a JUnit test that I can't seem to get working tieh

VelocityEngine ve = new VelocityEngine();

ve.setProperty(VelocityEngine.RUNTIME_LOG_LOGSYSTEM, this);
ve.setProperty(Velocity.RESOURCE_LOADER, "class");
VelocityContext context = new VelocityContext();
context.put("username", new String("root"));
context.put("password", new String("letmein"));
StringWriter sw = null;
try {
	sw = new StringWriter();
Velocity.ENCODING_DEFAULT,context, sw);
} catch (ResourceNotFoundException e) {

I am running Eclipse 3.0 with JUnit 3.8 and I have the debug runtime
classpath including a jar with the Hibernate_cfg_xml.vm file in several
locations, but whenever I run this test it throws the

I have the template located in the jar at the root and in a couple of
package directories.

I cannot get it to find it.

Is this a problem with the JUnit class loader?

I looked in the debugger and the resourceLoader IS the
ClasspathResourceLoader so I know that part is at least working.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message