You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Malcolm Edgar <ma...@gmail.com> on 2005/12/03 11:53:08 UTC
Parse refactoring
Hi Guys,
Velocity parser was refactored a few weeks ago, the directory was changed
from memory. This is breaking compatablity with Cayenne which uses Velocity
1.4.
Click has been using 1.5-dev up until now, but this change is leaving me in
no mans land.
Is is possible that this change could be rolled back.
regards Malcolm Edgar
Stack trace:
java.lang.NoSuchMethodError:
org.apache.velocity.runtime.parser.node.Node.jjtGetChild(I)Lorg/apache/velocity/runtime/parser/node/Node;
at org.objectstyle.cayenne.access.jdbc.ResultDirective.getChild(
ResultDirective.java:190)
at org.objectstyle.cayenne.access.jdbc.ResultDirective.getChildAsString(
ResultDirective.java:202)
at org.objectstyle.cayenne.access.jdbc.ResultDirective.render(
ResultDirective.java:151)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(
ASTDirective.java:117)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(
SimpleNode.java:240)
at
org.objectstyle.cayenne.access.jdbc.SQLTemplateProcessor.buildStatement(
SQLTemplateProcessor.java:219)
Re: Parse refactoring
Posted by Will Glass-Husain <wg...@forio.com>.
Thanks Malcolm,
It's a challenge to keep compatibility on an the bleeding edge of a evolving
code base. (even one as slowly evolving as Velocity). On the other hand,
I know there are lots of new features in Velocity 1.5-dev that have been
unreleased for some time.
I still believe we'll release Velocity 1.5 by the end of the year. At that
point I'd recommend that Cayenne stick with the released version.
Let us talk about the Node package issue. Some of the developers are
enroute to ApacheCon, so it might be a day or two.
WILL
----- Original Message -----
From: "Malcolm Edgar" <ma...@gmail.com>
To: "Velocity Developers List" <ve...@jakarta.apache.org>;
<ca...@objectstyle.org>; <cl...@lists.sourceforge.net>
Sent: Saturday, December 10, 2005 11:02 PM
Subject: Re: Parse refactoring
Hi Will & company,
Regarding the cause of the problem.
This is the code from Cayenne class ResultDirective (Cayenne 1.2 M6):
import org.apache.velocity.runtime.parser.node.Node;
protected Object getChild(InternalContextAdapter context, Node node, int
i)
throws MethodInvocationException {
return (i >= 0 && i < node.jjtGetNumChildren())
? node.jjtGetChild(i).value(context)
: null;
}
When running with Velocity 1.5-dev this throwing the exception:
Caused by: java.lang.NoSuchMethodError:
org.apache.velocity.runtime.parser.node.Node.jjtGetChild
(I)Lorg/apache/velocity/runtime/parser/node/Node;
at org.objectstyle.cayenne.access.jdbc.ResultDirective.getChild(
ResultDirective.java:190)
As the Node.jttGetChild(i) returns:
org.apache.velocity.runtime.parser.Node
rather than:
org.apache.velocity.runtime.parser.node.Node
This issue, plus another Velocity/Cayenne issue of a disappearing object
reference in the velocity Context, is causing a lot of grief. We have been
burning a lot of time over the last couple of weeks trying identify the
latter issue, plus having to rollback Velocity changes maintain Cayenne
compatability.
The Velocity stability issue is really hurting us, and we are at the point
of deciding whether to swap Velocity out for FreeMarker. This is not a fun
option, as I have invested a bunch of time into Velocity, and we have
applications out there which will need to be reworked if we do this.
I hope we can work out some solution
regards Malcolm Edgar
On 12/4/05, Will Glass-Husain <wg...@forio.com> wrote:
>
> Hmm..
>
> This is awkward. Hard to improve a product when other apps rely on the
> internal method calls.
>
> Do you know the specific change in Velocity which broke Cayenne?
>
> WILL
>
> ----- Original Message -----
> From: "Malcolm Edgar" <ma...@gmail.com>
> To: "Velocity Developers List" <ve...@jakarta.apache.org>
> Sent: Saturday, December 03, 2005 2:53 AM
> Subject: Parse refactoring
>
>
> Hi Guys,
>
> Velocity parser was refactored a few weeks ago, the directory was changed
> from memory. This is breaking compatablity with Cayenne which uses
> Velocity
> 1.4.
>
> Click has been using 1.5-dev up until now, but this change is leaving me
> in
> no mans land.
>
> Is is possible that this change could be rolled back.
>
> regards Malcolm Edgar
>
> Stack trace:
>
> java.lang.NoSuchMethodError:
> org.apache.velocity.runtime.parser.node.Node.jjtGetChild
> (I)Lorg/apache/velocity/runtime/parser/node/Node;
>
> at org.objectstyle.cayenne.access.jdbc.ResultDirective.getChild(
> ResultDirective.java:190)
> at
> org.objectstyle.cayenne.access.jdbc.ResultDirective.getChildAsString(
> ResultDirective.java:202)
> at org.objectstyle.cayenne.access.jdbc.ResultDirective.render(
> ResultDirective.java:151)
> at org.apache.velocity.runtime.parser.node.ASTDirective.render(
> ASTDirective.java:117)
> at org.apache.velocity.runtime.parser.node.SimpleNode.render(
> SimpleNode.java:240)
> at
> org.objectstyle.cayenne.access.jdbc.SQLTemplateProcessor.buildStatement(
> SQLTemplateProcessor.java:219)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
Re: Parse refactoring
Posted by Will Glass-Husain <wg...@forio.com>.
Thanks again for reporting this issue with the the source head. The intent
is for this to be a drop-in release, so clearly the fact that existing
custom directives are broken is a problem. As I said,
let us discuss and then get back to you.
You can track the issue at:
http://issues.apache.org/jira/browse/VELOCITY-426
Best, WILL
----- Original Message -----
From: "Malcolm Edgar" <ma...@gmail.com>
To: "Velocity Developers List" <ve...@jakarta.apache.org>;
<ca...@objectstyle.org>; <cl...@lists.sourceforge.net>
Sent: Saturday, December 10, 2005 11:02 PM
Subject: Re: Parse refactoring
Hi Will & company,
Regarding the cause of the problem.
This is the code from Cayenne class ResultDirective (Cayenne 1.2 M6):
import org.apache.velocity.runtime.parser.node.Node;
protected Object getChild(InternalContextAdapter context, Node node, int
i)
throws MethodInvocationException {
return (i >= 0 && i < node.jjtGetNumChildren())
? node.jjtGetChild(i).value(context)
: null;
}
When running with Velocity 1.5-dev this throwing the exception:
Caused by: java.lang.NoSuchMethodError:
org.apache.velocity.runtime.parser.node.Node.jjtGetChild
(I)Lorg/apache/velocity/runtime/parser/node/Node;
at org.objectstyle.cayenne.access.jdbc.ResultDirective.getChild(
ResultDirective.java:190)
As the Node.jttGetChild(i) returns:
org.apache.velocity.runtime.parser.Node
rather than:
org.apache.velocity.runtime.parser.node.Node
This issue, plus another Velocity/Cayenne issue of a disappearing object
reference in the velocity Context, is causing a lot of grief. We have been
burning a lot of time over the last couple of weeks trying identify the
latter issue, plus having to rollback Velocity changes maintain Cayenne
compatability.
The Velocity stability issue is really hurting us, and we are at the point
of deciding whether to swap Velocity out for FreeMarker. This is not a fun
option, as I have invested a bunch of time into Velocity, and we have
applications out there which will need to be reworked if we do this.
I hope we can work out some solution
regards Malcolm Edgar
On 12/4/05, Will Glass-Husain <wg...@forio.com> wrote:
>
> Hmm..
>
> This is awkward. Hard to improve a product when other apps rely on the
> internal method calls.
>
> Do you know the specific change in Velocity which broke Cayenne?
>
> WILL
>
> ----- Original Message -----
> From: "Malcolm Edgar" <ma...@gmail.com>
> To: "Velocity Developers List" <ve...@jakarta.apache.org>
> Sent: Saturday, December 03, 2005 2:53 AM
> Subject: Parse refactoring
>
>
> Hi Guys,
>
> Velocity parser was refactored a few weeks ago, the directory was changed
> from memory. This is breaking compatablity with Cayenne which uses
> Velocity
> 1.4.
>
> Click has been using 1.5-dev up until now, but this change is leaving me
> in
> no mans land.
>
> Is is possible that this change could be rolled back.
>
> regards Malcolm Edgar
>
> Stack trace:
>
> java.lang.NoSuchMethodError:
> org.apache.velocity.runtime.parser.node.Node.jjtGetChild
> (I)Lorg/apache/velocity/runtime/parser/node/Node;
>
> at org.objectstyle.cayenne.access.jdbc.ResultDirective.getChild(
> ResultDirective.java:190)
> at
> org.objectstyle.cayenne.access.jdbc.ResultDirective.getChildAsString(
> ResultDirective.java:202)
> at org.objectstyle.cayenne.access.jdbc.ResultDirective.render(
> ResultDirective.java:151)
> at org.apache.velocity.runtime.parser.node.ASTDirective.render(
> ASTDirective.java:117)
> at org.apache.velocity.runtime.parser.node.SimpleNode.render(
> SimpleNode.java:240)
> at
> org.objectstyle.cayenne.access.jdbc.SQLTemplateProcessor.buildStatement(
> SQLTemplateProcessor.java:219)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
Re: Parse refactoring
Posted by Malcolm Edgar <ma...@gmail.com>.
Hi Will & company,
Regarding the cause of the problem.
This is the code from Cayenne class ResultDirective (Cayenne 1.2 M6):
import org.apache.velocity.runtime.parser.node.Node;
protected Object getChild(InternalContextAdapter context, Node node, int
i)
throws MethodInvocationException {
return (i >= 0 && i < node.jjtGetNumChildren())
? node.jjtGetChild(i).value(context)
: null;
}
When running with Velocity 1.5-dev this throwing the exception:
Caused by: java.lang.NoSuchMethodError:
org.apache.velocity.runtime.parser.node.Node.jjtGetChild
(I)Lorg/apache/velocity/runtime/parser/node/Node;
at org.objectstyle.cayenne.access.jdbc.ResultDirective.getChild(
ResultDirective.java:190)
As the Node.jttGetChild(i) returns:
org.apache.velocity.runtime.parser.Node
rather than:
org.apache.velocity.runtime.parser.node.Node
This issue, plus another Velocity/Cayenne issue of a disappearing object
reference in the velocity Context, is causing a lot of grief. We have been
burning a lot of time over the last couple of weeks trying identify the
latter issue, plus having to rollback Velocity changes maintain Cayenne
compatability.
The Velocity stability issue is really hurting us, and we are at the point
of deciding whether to swap Velocity out for FreeMarker. This is not a fun
option, as I have invested a bunch of time into Velocity, and we have
applications out there which will need to be reworked if we do this.
I hope we can work out some solution
regards Malcolm Edgar
On 12/4/05, Will Glass-Husain <wg...@forio.com> wrote:
>
> Hmm..
>
> This is awkward. Hard to improve a product when other apps rely on the
> internal method calls.
>
> Do you know the specific change in Velocity which broke Cayenne?
>
> WILL
>
> ----- Original Message -----
> From: "Malcolm Edgar" <ma...@gmail.com>
> To: "Velocity Developers List" <ve...@jakarta.apache.org>
> Sent: Saturday, December 03, 2005 2:53 AM
> Subject: Parse refactoring
>
>
> Hi Guys,
>
> Velocity parser was refactored a few weeks ago, the directory was changed
> from memory. This is breaking compatablity with Cayenne which uses
> Velocity
> 1.4.
>
> Click has been using 1.5-dev up until now, but this change is leaving me
> in
> no mans land.
>
> Is is possible that this change could be rolled back.
>
> regards Malcolm Edgar
>
> Stack trace:
>
> java.lang.NoSuchMethodError:
> org.apache.velocity.runtime.parser.node.Node.jjtGetChild
> (I)Lorg/apache/velocity/runtime/parser/node/Node;
>
> at org.objectstyle.cayenne.access.jdbc.ResultDirective.getChild(
> ResultDirective.java:190)
> at
> org.objectstyle.cayenne.access.jdbc.ResultDirective.getChildAsString(
> ResultDirective.java:202)
> at org.objectstyle.cayenne.access.jdbc.ResultDirective.render(
> ResultDirective.java:151)
> at org.apache.velocity.runtime.parser.node.ASTDirective.render(
> ASTDirective.java:117)
> at org.apache.velocity.runtime.parser.node.SimpleNode.render(
> SimpleNode.java:240)
> at
> org.objectstyle.cayenne.access.jdbc.SQLTemplateProcessor.buildStatement(
> SQLTemplateProcessor.java:219)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>
Fwd: Parse refactoring
Posted by Mike Kienenberger <mk...@gmail.com>.
Forwarding to the Cayenne dev mailing list for comment. Note that
Cayenne has been using Velocity 1.3.1 up to this point.
---------- Forwarded message ----------
From: Will Glass-Husain <wg...@forio.com>
Date: Dec 3, 2005 2:03 PM
Subject: Re: Parse refactoring
To: Velocity Developers List <ve...@jakarta.apache.org>
Hmm..
This is awkward. Hard to improve a product when other apps rely on the
internal method calls.
Do you know the specific change in Velocity which broke Cayenne?
WILL
----- Original Message -----
From: "Malcolm Edgar" <ma...@gmail.com>
To: "Velocity Developers List" <ve...@jakarta.apache.org>
Sent: Saturday, December 03, 2005 2:53 AM
Subject: Parse refactoring
Hi Guys,
Velocity parser was refactored a few weeks ago, the directory was changed
from memory. This is breaking compatablity with Cayenne which uses Velocity
1.4.
Click has been using 1.5-dev up until now, but this change is leaving me in
no mans land.
Is is possible that this change could be rolled back.
regards Malcolm Edgar
Stack trace:
java.lang.NoSuchMethodError:
org.apache.velocity.runtime.parser.node.Node.jjtGetChild(I)Lorg/apache/velocity/runtime/parser/node/Node;
at org.objectstyle.cayenne.access.jdbc.ResultDirective.getChild(
ResultDirective.java:190)
at org.objectstyle.cayenne.access.jdbc.ResultDirective.getChildAsString(
ResultDirective.java:202)
at org.objectstyle.cayenne.access.jdbc.ResultDirective.render(
ResultDirective.java:151)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(
ASTDirective.java:117)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(
SimpleNode.java:240)
at
org.objectstyle.cayenne.access.jdbc.SQLTemplateProcessor.buildStatement(
SQLTemplateProcessor.java:219)
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
Re: Parse refactoring
Posted by Will Glass-Husain <wg...@forio.com>.
Hmm..
This is awkward. Hard to improve a product when other apps rely on the
internal method calls.
Do you know the specific change in Velocity which broke Cayenne?
WILL
----- Original Message -----
From: "Malcolm Edgar" <ma...@gmail.com>
To: "Velocity Developers List" <ve...@jakarta.apache.org>
Sent: Saturday, December 03, 2005 2:53 AM
Subject: Parse refactoring
Hi Guys,
Velocity parser was refactored a few weeks ago, the directory was changed
from memory. This is breaking compatablity with Cayenne which uses Velocity
1.4.
Click has been using 1.5-dev up until now, but this change is leaving me in
no mans land.
Is is possible that this change could be rolled back.
regards Malcolm Edgar
Stack trace:
java.lang.NoSuchMethodError:
org.apache.velocity.runtime.parser.node.Node.jjtGetChild(I)Lorg/apache/velocity/runtime/parser/node/Node;
at org.objectstyle.cayenne.access.jdbc.ResultDirective.getChild(
ResultDirective.java:190)
at org.objectstyle.cayenne.access.jdbc.ResultDirective.getChildAsString(
ResultDirective.java:202)
at org.objectstyle.cayenne.access.jdbc.ResultDirective.render(
ResultDirective.java:151)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(
ASTDirective.java:117)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(
SimpleNode.java:240)
at
org.objectstyle.cayenne.access.jdbc.SQLTemplateProcessor.buildStatement(
SQLTemplateProcessor.java:219)
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
velocity: result data is not on-the-fly
Posted by Fang Yidong <fa...@yahoo.com.cn>.
I am currently working at a webcomponent object base
on velocity.I use velocity to render to the final
page,which is written to the servlet output stream.I
found that I get no byte before the whole parse
complete.This makes the page rendering seems to be
slow compare to the on-the-fly.
___________________________________________________________
雅虎免费G邮箱-No.1的防毒防垃圾超大邮箱
http://cn.mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org