velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Kimpton" <ch...@kimptoc.net>
Subject Re: Velocity and wrong file name
Date Sun, 04 Mar 2001 20:26:15 GMT
Hi,

I am trying to upgrade from 0.72 to 0.75 to get the better error handling -
but I get this error when calling the Runtime.init with a properties object;


[ConfirmFormatsEJB] java.lang.ClassCastException: java.util.Vector
[ConfirmFormatsEJB] java.lang.ClassCastException: java.util.Vector
[ConfirmFormatsEJB]     at
org.apache.velocity.runtime.configuration.Configurations.subset(Configuratio
ns.java:214)
[ConfirmFormatsEJB]     at
org.apache.velocity.runtime.configuration.Configuration.subset(Configuration
.java:317)
[ConfirmFormatsEJB]     at
org.apache.velocity.runtime.resource.ResourceManager.assembleResourceLoaderI
nitializers(ResourceManager.java:181)
[ConfirmFormatsEJB]     at
org.apache.velocity.runtime.resource.ResourceManager.initialize(ResourceMana
ger.java:143)
[ConfirmFormatsEJB]     at
org.apache.velocity.runtime.Runtime.init(Runtime.java:267)
[ConfirmFormatsEJB]     at
org.apache.velocity.runtime.Runtime.init(Runtime.java:301)
[ConfirmFormatsEJB]     at
com.lubega.confirms.entity.ConfirmFormatsBean.buildConfirmBody(ConfirmFormat
sBean.java:45)


This is my code - which works fine with 0.72 - just gives no errors for
invalid templates (which is done later in the code...)

[snip]
            Properties props = new Properties();
            String templatePath = getStatic("template.path");

props.setProperty("resource.loader.1.resource.path",templatePath);
            org.apache.velocity.runtime.Runtime.init( props /*
"Velocity.properties" */ );
[snip]

Yes - I am using velocity in a standalone app...

Thanks in advance,
Chris


Mime
View raw message