You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Chris Kimpton <ch...@kimptoc.net> on 2001/03/04 21:26:15 UTC
Re: Velocity and wrong file name
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
Re: Velocity and wrong file name
Posted by Chris Kimpton <ch...@kimptoc.net>.
Hi,
>
> Should be fixed now chris, give it a whirl!
>
Thanks - thats it... although I was hoping the new validation/exceptions
would allow me to trap cases where a macro in the template did not expand
properly.
I would like to get an exception if a macro expands to null - is there a way
to turn this on somehow - a kind of "strict" setting or something?
Thanks,
Chris
Re: Velocity and wrong file name
Posted by Jason van Zyl <jv...@periapt.com>.
Chris Kimpton wrote:
> Hi,
>
> >
> > I'm fixing this now, sorry for the trouble.
> >
>
> No problem.
>
> Chris
Should be fixed now chris, give it a whirl!
--
jvz.
Jason van Zyl
jvanzyl@periapt.com
http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
Re: Velocity and wrong file name
Posted by Chris Kimpton <ch...@kimptoc.net>.
Hi,
>
> I'm fixing this now, sorry for the trouble.
>
No problem.
Chris
Re: Velocity and wrong file name
Posted by jv...@periapt.com.
Chris Kimpton wrote:
> 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;
>
>
I'm fixing this now, sorry for the trouble.
--
jvz.
Jason van Zyl
jvanzyl@periapt.com
http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine