velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Will Glass-Husain" <wglasshus...@gmail.com>
Subject Re: ClassCastException
Date Thu, 03 May 2007 04:39:52 GMT
What version of Velocity are you using?  Velocity 1.5 fixes a couple of race
conditions that cause exceptions under high volume use.

WILL

On 5/2/07, ETsifrina <etsifrina@chessys.com> wrote:
>
>
> We are using Velocity templates to export data from our app into a file.
> We are getting the following exception on occasion, however it is not
> consistently reproducible.
> We have checked the data, thinking that one of the more unual characters
> in
> the data might be responsible, but to no avail.  Perhaps someone here
> might
> shed some light on the problem.
>
> Here is the export template that is used:
> #set ($GLExportQueueItemglSignmap = {"D":"+","C":"-"})
>
> #foreach($templateitem in $templatecollection)
> $formatter.substring($!{templateitem.Transaction.AccountIDNumber
> },0,16)$formatter.date($!{templateitem.Transaction.postDate
> },"yyyyMMdd")$formatter.date($!{templateitem.Transaction.effectiveDate
> },"yyyyMMdd")$formatter.substring($!{
> templateitem.Transaction.transactionType},0,2)$formatter.substring($!{
> templateitem.Transaction.debitOrCredit
> },0,1)$formatter.fixedWidth($formatter.currency($!{
> templateitem.Transaction.transAmount
> },2,true),16,true,0)$formatter.fixedWidth($!{
> templateitem.Transaction.userRef1},16)$formatter.fixedWidth($!{
> templateitem.Transaction.userRef2},16)$formatter.fixedWidth($!{
> templateitem.Transaction.userRef3},16)$formatter.fixedWidth($!{
> templateitem.Transaction.userRef4},16)$formatter.fixedWidth($!{
> templateitem.Transaction.userRef5},16)$formatter.fixedWidth($!{
> templateitem.Transaction.detailInfo},40)$formatter.substring($!{
> templateitem.GLExportQueueItem.glAccountNumber
> },0,40)$formatter.mapTool($GLExportQueueItemglSignmap,$!{
> templateitem.GLExportQueueItem.glSign
> })$formatter.fixedWidth($formatter.currency($!{
> templateitem.GLExportQueueItem.glAmount
> },2,true),16,true,0)$formatter.fixedWidth($!{
> templateitem.Transaction.tranID},16,true,0)
> #end
>
> Thanks in advance,
>      Elena
>
>
> sun.reflect.GeneratedMethodAccessor11176.invoke(Unknown Source)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> java.lang.reflect.Method.invoke(Unknown Source)
> org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(
> UberspectImpl.java:249)
> org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java
> :215)
> org.apache.velocity.runtime.parser.node.ASTReference.execute(
> ASTReference.java:181)
> org.apache.velocity.runtime.parser.node.ASTReference.render(
> ASTReference.java:229)
> org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:57)
> org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:414)
> org.apache.velocity.runtime.parser.node.ASTDirective.render(
> ASTDirective.java:117)
> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java
> :235)
> org.apache.velocity.app.Velocity.evaluate(Velocity.java:287)
> org.apache.velocity.app.Velocity.evaluate(Velocity.java:183)
> ...
> --
> View this message in context:
> http://www.nabble.com/ClassCastException-tf3683800.html#a10296477
> Sent from the Velocity - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>


-- 
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message