You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2009/04/25 07:42:39 UTC
[jira] Created: (CAMEL-1567) Upgrading to JUEL 2.1.1 - Beware of
API changes in JUEL
Upgrading to JUEL 2.1.1 - Beware of API changes in JUEL
-------------------------------------------------------
Key: CAMEL-1567
URL: https://issues.apache.org/activemq/browse/CAMEL-1567
Project: Apache Camel
Issue Type: Task
Components: camel-juel
Affects Versions: 2.0-M1, 1.6.0
Reporter: Claus Ibsen
Hi Claus,
Here is an explanation of the API change from Christopher Beck at JUEL:
Hello Yogesh,
the API to resolve methods has changed in 2.1.1. Camel's method resolver
is breaks with JUEL 2.1.1. Generally, methods are still resolved via
ELResolver.getValue(context, base, property), but
- in 2.1.0, the method name was passed as a property
- in 2.1.1, an instance of de.odysseus.el.misc.MethodInvocation is passed
as a property
The reason for this is to provide more detailed information about the
method invocation to the resolver (i.e the method name, number of arguments
and whether vararg calls are supported).
Now, camel-juel uses its BeanAndMethodELResolver to resolve methods.
There, findMethod(context, base, property) only handles a property
parameter of type string. That's why it doesn't work. When migrating to
juel 2.1.1, the BeanAndMethodELResolver class needs to be updated to work
with MethodInvocation objects as properties.
The JUEL 2.1.1 distribution contains a sample resolver. Taking the sample
code, updating camel's resolver should be pretty straightforward. When
doing so, you may also want to add property "javax.el.varArgs" in
JuelExpression.populateDefaultExpressionProperties(..). That way you would
take real profit by invoking vararg methods from within EL expressions.
There's also a way to quickly modify your resolver to work with both, JUEL
2.1.0 and 2.1.1. Just don't ask for "property instanceof String" but use
property.toString() as a candidate method name: the MethodInvocation's
toString() will answer the method name.
See nabble:
http://www.nabble.com/Camel-JUEL-expression-weirdness-in-1.6.0-td23177119s22882.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-1567) Upgrading to JUEL 2.1.1 - Beware of
API changes in JUEL
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-1567:
-------------------------------
Fix Version/s: 2.1.0
> Upgrading to JUEL 2.1.1 - Beware of API changes in JUEL
> -------------------------------------------------------
>
> Key: CAMEL-1567
> URL: https://issues.apache.org/activemq/browse/CAMEL-1567
> Project: Apache Camel
> Issue Type: Task
> Components: camel-juel
> Affects Versions: 1.6.0, 2.0-M1
> Reporter: Claus Ibsen
> Fix For: 2.1.0
>
>
> Hi Claus,
> Here is an explanation of the API change from Christopher Beck at JUEL:
> Hello Yogesh,
> the API to resolve methods has changed in 2.1.1. Camel's method resolver
> is breaks with JUEL 2.1.1. Generally, methods are still resolved via
> ELResolver.getValue(context, base, property), but
> - in 2.1.0, the method name was passed as a property
> - in 2.1.1, an instance of de.odysseus.el.misc.MethodInvocation is passed
> as a property
> The reason for this is to provide more detailed information about the
> method invocation to the resolver (i.e the method name, number of arguments
> and whether vararg calls are supported).
> Now, camel-juel uses its BeanAndMethodELResolver to resolve methods.
> There, findMethod(context, base, property) only handles a property
> parameter of type string. That's why it doesn't work. When migrating to
> juel 2.1.1, the BeanAndMethodELResolver class needs to be updated to work
> with MethodInvocation objects as properties.
> The JUEL 2.1.1 distribution contains a sample resolver. Taking the sample
> code, updating camel's resolver should be pretty straightforward. When
> doing so, you may also want to add property "javax.el.varArgs" in
> JuelExpression.populateDefaultExpressionProperties(..). That way you would
> take real profit by invoking vararg methods from within EL expressions.
> There's also a way to quickly modify your resolver to work with both, JUEL
> 2.1.0 and 2.1.1. Just don't ask for "property instanceof String" but use
> property.toString() as a candidate method name: the MethodInvocation's
> toString() will answer the method name.
> See nabble:
> http://www.nabble.com/Camel-JUEL-expression-weirdness-in-1.6.0-td23177119s22882.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-1567) Upgrading to JUEL 2.1.1 - Beware of
API changes in JUEL
Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55606#action_55606 ]
Hadrian Zbarcea commented on CAMEL-1567:
----------------------------------------
I planned to work on it this weekend.
> Upgrading to JUEL 2.1.1 - Beware of API changes in JUEL
> -------------------------------------------------------
>
> Key: CAMEL-1567
> URL: https://issues.apache.org/activemq/browse/CAMEL-1567
> Project: Apache Camel
> Issue Type: Task
> Components: camel-juel
> Affects Versions: 1.6.0, 2.0-M1
> Reporter: Claus Ibsen
> Assignee: Hadrian Zbarcea
> Fix For: 2.1.0
>
>
> Hi Claus,
> Here is an explanation of the API change from Christopher Beck at JUEL:
> Hello Yogesh,
> the API to resolve methods has changed in 2.1.1. Camel's method resolver
> is breaks with JUEL 2.1.1. Generally, methods are still resolved via
> ELResolver.getValue(context, base, property), but
> - in 2.1.0, the method name was passed as a property
> - in 2.1.1, an instance of de.odysseus.el.misc.MethodInvocation is passed
> as a property
> The reason for this is to provide more detailed information about the
> method invocation to the resolver (i.e the method name, number of arguments
> and whether vararg calls are supported).
> Now, camel-juel uses its BeanAndMethodELResolver to resolve methods.
> There, findMethod(context, base, property) only handles a property
> parameter of type string. That's why it doesn't work. When migrating to
> juel 2.1.1, the BeanAndMethodELResolver class needs to be updated to work
> with MethodInvocation objects as properties.
> The JUEL 2.1.1 distribution contains a sample resolver. Taking the sample
> code, updating camel's resolver should be pretty straightforward. When
> doing so, you may also want to add property "javax.el.varArgs" in
> JuelExpression.populateDefaultExpressionProperties(..). That way you would
> take real profit by invoking vararg methods from within EL expressions.
> There's also a way to quickly modify your resolver to work with both, JUEL
> 2.1.0 and 2.1.1. Just don't ask for "property instanceof String" but use
> property.toString() as a candidate method name: the MethodInvocation's
> toString() will answer the method name.
> See nabble:
> http://www.nabble.com/Camel-JUEL-expression-weirdness-in-1.6.0-td23177119s22882.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-1567) Upgrading to JUEL 2.1.1 - Beware of
API changes in JUEL
Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55407#action_55407 ]
Hadrian Zbarcea commented on CAMEL-1567:
----------------------------------------
With OSGi there is also an incompatibility between de.odysseus.juel/juel and the spec org.apache.geronimo.specs/geronimo-el_1.0_spec that needs to be resolved.
> Upgrading to JUEL 2.1.1 - Beware of API changes in JUEL
> -------------------------------------------------------
>
> Key: CAMEL-1567
> URL: https://issues.apache.org/activemq/browse/CAMEL-1567
> Project: Apache Camel
> Issue Type: Task
> Components: camel-juel
> Affects Versions: 1.6.0, 2.0-M1
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: Future
>
>
> Hi Claus,
> Here is an explanation of the API change from Christopher Beck at JUEL:
> Hello Yogesh,
> the API to resolve methods has changed in 2.1.1. Camel's method resolver
> is breaks with JUEL 2.1.1. Generally, methods are still resolved via
> ELResolver.getValue(context, base, property), but
> - in 2.1.0, the method name was passed as a property
> - in 2.1.1, an instance of de.odysseus.el.misc.MethodInvocation is passed
> as a property
> The reason for this is to provide more detailed information about the
> method invocation to the resolver (i.e the method name, number of arguments
> and whether vararg calls are supported).
> Now, camel-juel uses its BeanAndMethodELResolver to resolve methods.
> There, findMethod(context, base, property) only handles a property
> parameter of type string. That's why it doesn't work. When migrating to
> juel 2.1.1, the BeanAndMethodELResolver class needs to be updated to work
> with MethodInvocation objects as properties.
> The JUEL 2.1.1 distribution contains a sample resolver. Taking the sample
> code, updating camel's resolver should be pretty straightforward. When
> doing so, you may also want to add property "javax.el.varArgs" in
> JuelExpression.populateDefaultExpressionProperties(..). That way you would
> take real profit by invoking vararg methods from within EL expressions.
> There's also a way to quickly modify your resolver to work with both, JUEL
> 2.1.0 and 2.1.1. Just don't ask for "property instanceof String" but use
> property.toString() as a candidate method name: the MethodInvocation's
> toString() will answer the method name.
> See nabble:
> http://www.nabble.com/Camel-JUEL-expression-weirdness-in-1.6.0-td23177119s22882.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CAMEL-1567) Upgrading to JUEL 2.1.1 - Beware of
API changes in JUEL
Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hadrian Zbarcea resolved CAMEL-1567.
------------------------------------
Resolution: Fixed
Upgrade to juel 2.1.2 as both the latest version (plus 2.1.1 was not available in the maven repos). juel 2.1.2 is also available as an OSGi bundle, which should take care of the incompatibility with the geronimo-el_1.0_spec.
> Upgrading to JUEL 2.1.1 - Beware of API changes in JUEL
> -------------------------------------------------------
>
> Key: CAMEL-1567
> URL: https://issues.apache.org/activemq/browse/CAMEL-1567
> Project: Apache Camel
> Issue Type: Task
> Components: camel-juel
> Affects Versions: 1.6.0, 2.0-M1
> Reporter: Claus Ibsen
> Assignee: Hadrian Zbarcea
> Fix For: 2.1.0
>
>
> Hi Claus,
> Here is an explanation of the API change from Christopher Beck at JUEL:
> Hello Yogesh,
> the API to resolve methods has changed in 2.1.1. Camel's method resolver
> is breaks with JUEL 2.1.1. Generally, methods are still resolved via
> ELResolver.getValue(context, base, property), but
> - in 2.1.0, the method name was passed as a property
> - in 2.1.1, an instance of de.odysseus.el.misc.MethodInvocation is passed
> as a property
> The reason for this is to provide more detailed information about the
> method invocation to the resolver (i.e the method name, number of arguments
> and whether vararg calls are supported).
> Now, camel-juel uses its BeanAndMethodELResolver to resolve methods.
> There, findMethod(context, base, property) only handles a property
> parameter of type string. That's why it doesn't work. When migrating to
> juel 2.1.1, the BeanAndMethodELResolver class needs to be updated to work
> with MethodInvocation objects as properties.
> The JUEL 2.1.1 distribution contains a sample resolver. Taking the sample
> code, updating camel's resolver should be pretty straightforward. When
> doing so, you may also want to add property "javax.el.varArgs" in
> JuelExpression.populateDefaultExpressionProperties(..). That way you would
> take real profit by invoking vararg methods from within EL expressions.
> There's also a way to quickly modify your resolver to work with both, JUEL
> 2.1.0 and 2.1.1. Just don't ask for "property instanceof String" but use
> property.toString() as a candidate method name: the MethodInvocation's
> toString() will answer the method name.
> See nabble:
> http://www.nabble.com/Camel-JUEL-expression-weirdness-in-1.6.0-td23177119s22882.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-1567) Upgrading to JUEL 2.1.1 - Beware of
API changes in JUEL
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55604#action_55604 ]
Claus Ibsen commented on CAMEL-1567:
------------------------------------
Hadrian can you speed up this one or we are going to defer this to 2.2
> Upgrading to JUEL 2.1.1 - Beware of API changes in JUEL
> -------------------------------------------------------
>
> Key: CAMEL-1567
> URL: https://issues.apache.org/activemq/browse/CAMEL-1567
> Project: Apache Camel
> Issue Type: Task
> Components: camel-juel
> Affects Versions: 1.6.0, 2.0-M1
> Reporter: Claus Ibsen
> Assignee: Hadrian Zbarcea
> Fix For: 2.1.0
>
>
> Hi Claus,
> Here is an explanation of the API change from Christopher Beck at JUEL:
> Hello Yogesh,
> the API to resolve methods has changed in 2.1.1. Camel's method resolver
> is breaks with JUEL 2.1.1. Generally, methods are still resolved via
> ELResolver.getValue(context, base, property), but
> - in 2.1.0, the method name was passed as a property
> - in 2.1.1, an instance of de.odysseus.el.misc.MethodInvocation is passed
> as a property
> The reason for this is to provide more detailed information about the
> method invocation to the resolver (i.e the method name, number of arguments
> and whether vararg calls are supported).
> Now, camel-juel uses its BeanAndMethodELResolver to resolve methods.
> There, findMethod(context, base, property) only handles a property
> parameter of type string. That's why it doesn't work. When migrating to
> juel 2.1.1, the BeanAndMethodELResolver class needs to be updated to work
> with MethodInvocation objects as properties.
> The JUEL 2.1.1 distribution contains a sample resolver. Taking the sample
> code, updating camel's resolver should be pretty straightforward. When
> doing so, you may also want to add property "javax.el.varArgs" in
> JuelExpression.populateDefaultExpressionProperties(..). That way you would
> take real profit by invoking vararg methods from within EL expressions.
> There's also a way to quickly modify your resolver to work with both, JUEL
> 2.1.0 and 2.1.1. Just don't ask for "property instanceof String" but use
> property.toString() as a candidate method name: the MethodInvocation's
> toString() will answer the method name.
> See nabble:
> http://www.nabble.com/Camel-JUEL-expression-weirdness-in-1.6.0-td23177119s22882.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-1567) Upgrading to JUEL 2.1.1 - Beware of
API changes in JUEL
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56147#action_56147 ]
Claus Ibsen commented on CAMEL-1567:
------------------------------------
The SMX repo where the jule bundle is located
http://repo2.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.juel/2.1.0_2/
{code}
<feature name='camel-juel' version='${pom.version}'>
<feature version='${pom.version}'>camel-core</feature>
<bundle>mvn:org.apache.geronimo.specs/geronimo-el_1.0_spec/${geronimo-el-version}</bundle>
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.juel/${juel-bundle-version}</bundle>
<bundle>mvn:org.apache.camel/camel-juel/${pom.version}</bundle>
</feature>
{code}
There is a pom.xml that has the versions listed and it lists
<juel-bundle-version>2.1.0_2</juel-bundle-version>
> Upgrading to JUEL 2.1.1 - Beware of API changes in JUEL
> -------------------------------------------------------
>
> Key: CAMEL-1567
> URL: https://issues.apache.org/activemq/browse/CAMEL-1567
> Project: Apache Camel
> Issue Type: Task
> Components: camel-juel
> Affects Versions: 1.6.0, 2.0-M1
> Reporter: Claus Ibsen
> Assignee: Hadrian Zbarcea
> Fix For: 2.1.0
>
>
> Hi Claus,
> Here is an explanation of the API change from Christopher Beck at JUEL:
> Hello Yogesh,
> the API to resolve methods has changed in 2.1.1. Camel's method resolver
> is breaks with JUEL 2.1.1. Generally, methods are still resolved via
> ELResolver.getValue(context, base, property), but
> - in 2.1.0, the method name was passed as a property
> - in 2.1.1, an instance of de.odysseus.el.misc.MethodInvocation is passed
> as a property
> The reason for this is to provide more detailed information about the
> method invocation to the resolver (i.e the method name, number of arguments
> and whether vararg calls are supported).
> Now, camel-juel uses its BeanAndMethodELResolver to resolve methods.
> There, findMethod(context, base, property) only handles a property
> parameter of type string. That's why it doesn't work. When migrating to
> juel 2.1.1, the BeanAndMethodELResolver class needs to be updated to work
> with MethodInvocation objects as properties.
> The JUEL 2.1.1 distribution contains a sample resolver. Taking the sample
> code, updating camel's resolver should be pretty straightforward. When
> doing so, you may also want to add property "javax.el.varArgs" in
> JuelExpression.populateDefaultExpressionProperties(..). That way you would
> take real profit by invoking vararg methods from within EL expressions.
> There's also a way to quickly modify your resolver to work with both, JUEL
> 2.1.0 and 2.1.1. Just don't ask for "property instanceof String" but use
> property.toString() as a candidate method name: the MethodInvocation's
> toString() will answer the method name.
> See nabble:
> http://www.nabble.com/Camel-JUEL-expression-weirdness-in-1.6.0-td23177119s22882.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-1567) Upgrading to JUEL 2.1.1 - Beware of
API changes in JUEL
Posted by "Gert Vanthienen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56150#action_56150 ]
Gert Vanthienen commented on CAMEL-1567:
----------------------------------------
I've added a juel 2.1.2 bundle and upgraded to the snapshot in http://svn.apache.org/viewvc?view=revision&revision=885088
Running *{{mvn -Pvalidate install}}* does not report any problems with this upgrade.
I'll try to cut a release of this bundle later today so you can still get it in camel 2.1.
@hadrian: does this bundle address the incompatibility you were referring to? it just does a plain import of javax.el, without any additional version constraints.
> Upgrading to JUEL 2.1.1 - Beware of API changes in JUEL
> -------------------------------------------------------
>
> Key: CAMEL-1567
> URL: https://issues.apache.org/activemq/browse/CAMEL-1567
> Project: Apache Camel
> Issue Type: Task
> Components: camel-juel
> Affects Versions: 1.6.0, 2.0-M1
> Reporter: Claus Ibsen
> Assignee: Hadrian Zbarcea
> Fix For: 2.1.0
>
>
> Hi Claus,
> Here is an explanation of the API change from Christopher Beck at JUEL:
> Hello Yogesh,
> the API to resolve methods has changed in 2.1.1. Camel's method resolver
> is breaks with JUEL 2.1.1. Generally, methods are still resolved via
> ELResolver.getValue(context, base, property), but
> - in 2.1.0, the method name was passed as a property
> - in 2.1.1, an instance of de.odysseus.el.misc.MethodInvocation is passed
> as a property
> The reason for this is to provide more detailed information about the
> method invocation to the resolver (i.e the method name, number of arguments
> and whether vararg calls are supported).
> Now, camel-juel uses its BeanAndMethodELResolver to resolve methods.
> There, findMethod(context, base, property) only handles a property
> parameter of type string. That's why it doesn't work. When migrating to
> juel 2.1.1, the BeanAndMethodELResolver class needs to be updated to work
> with MethodInvocation objects as properties.
> The JUEL 2.1.1 distribution contains a sample resolver. Taking the sample
> code, updating camel's resolver should be pretty straightforward. When
> doing so, you may also want to add property "javax.el.varArgs" in
> JuelExpression.populateDefaultExpressionProperties(..). That way you would
> take real profit by invoking vararg methods from within EL expressions.
> There's also a way to quickly modify your resolver to work with both, JUEL
> 2.1.0 and 2.1.1. Just don't ask for "property instanceof String" but use
> property.toString() as a candidate method name: the MethodInvocation's
> toString() will answer the method name.
> See nabble:
> http://www.nabble.com/Camel-JUEL-expression-weirdness-in-1.6.0-td23177119s22882.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-1567) Upgrading to JUEL 2.1.1 - Beware of
API changes in JUEL
Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hadrian Zbarcea updated CAMEL-1567:
-----------------------------------
Priority: Major (was: Minor)
> Upgrading to JUEL 2.1.1 - Beware of API changes in JUEL
> -------------------------------------------------------
>
> Key: CAMEL-1567
> URL: https://issues.apache.org/activemq/browse/CAMEL-1567
> Project: Apache Camel
> Issue Type: Task
> Components: camel-juel
> Affects Versions: 1.6.0, 2.0-M1
> Reporter: Claus Ibsen
> Assignee: Hadrian Zbarcea
> Fix For: 1.6.3, 2.1.0
>
>
> Hi Claus,
> Here is an explanation of the API change from Christopher Beck at JUEL:
> Hello Yogesh,
> the API to resolve methods has changed in 2.1.1. Camel's method resolver
> is breaks with JUEL 2.1.1. Generally, methods are still resolved via
> ELResolver.getValue(context, base, property), but
> - in 2.1.0, the method name was passed as a property
> - in 2.1.1, an instance of de.odysseus.el.misc.MethodInvocation is passed
> as a property
> The reason for this is to provide more detailed information about the
> method invocation to the resolver (i.e the method name, number of arguments
> and whether vararg calls are supported).
> Now, camel-juel uses its BeanAndMethodELResolver to resolve methods.
> There, findMethod(context, base, property) only handles a property
> parameter of type string. That's why it doesn't work. When migrating to
> juel 2.1.1, the BeanAndMethodELResolver class needs to be updated to work
> with MethodInvocation objects as properties.
> The JUEL 2.1.1 distribution contains a sample resolver. Taking the sample
> code, updating camel's resolver should be pretty straightforward. When
> doing so, you may also want to add property "javax.el.varArgs" in
> JuelExpression.populateDefaultExpressionProperties(..). That way you would
> take real profit by invoking vararg methods from within EL expressions.
> There's also a way to quickly modify your resolver to work with both, JUEL
> 2.1.0 and 2.1.1. Just don't ask for "property instanceof String" but use
> property.toString() as a candidate method name: the MethodInvocation's
> toString() will answer the method name.
> See nabble:
> http://www.nabble.com/Camel-JUEL-expression-weirdness-in-1.6.0-td23177119s22882.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-1567) Upgrading to JUEL 2.1.1 - Beware of
API changes in JUEL
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-1567:
-------------------------------
Fix Version/s: (was: 1.6.3)
And we wont upgrade on 1.x branch
> Upgrading to JUEL 2.1.1 - Beware of API changes in JUEL
> -------------------------------------------------------
>
> Key: CAMEL-1567
> URL: https://issues.apache.org/activemq/browse/CAMEL-1567
> Project: Apache Camel
> Issue Type: Task
> Components: camel-juel
> Affects Versions: 1.6.0, 2.0-M1
> Reporter: Claus Ibsen
> Assignee: Hadrian Zbarcea
> Fix For: 2.1.0
>
>
> Hi Claus,
> Here is an explanation of the API change from Christopher Beck at JUEL:
> Hello Yogesh,
> the API to resolve methods has changed in 2.1.1. Camel's method resolver
> is breaks with JUEL 2.1.1. Generally, methods are still resolved via
> ELResolver.getValue(context, base, property), but
> - in 2.1.0, the method name was passed as a property
> - in 2.1.1, an instance of de.odysseus.el.misc.MethodInvocation is passed
> as a property
> The reason for this is to provide more detailed information about the
> method invocation to the resolver (i.e the method name, number of arguments
> and whether vararg calls are supported).
> Now, camel-juel uses its BeanAndMethodELResolver to resolve methods.
> There, findMethod(context, base, property) only handles a property
> parameter of type string. That's why it doesn't work. When migrating to
> juel 2.1.1, the BeanAndMethodELResolver class needs to be updated to work
> with MethodInvocation objects as properties.
> The JUEL 2.1.1 distribution contains a sample resolver. Taking the sample
> code, updating camel's resolver should be pretty straightforward. When
> doing so, you may also want to add property "javax.el.varArgs" in
> JuelExpression.populateDefaultExpressionProperties(..). That way you would
> take real profit by invoking vararg methods from within EL expressions.
> There's also a way to quickly modify your resolver to work with both, JUEL
> 2.1.0 and 2.1.1. Just don't ask for "property instanceof String" but use
> property.toString() as a candidate method name: the MethodInvocation's
> toString() will answer the method name.
> See nabble:
> http://www.nabble.com/Camel-JUEL-expression-weirdness-in-1.6.0-td23177119s22882.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-1567) Upgrading to JUEL 2.1.1 - Beware of
API changes in JUEL
Posted by "Gert Vanthienen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56151#action_56151 ]
Gert Vanthienen commented on CAMEL-1567:
----------------------------------------
I managed to reproduce the binary incompatibility issue that Hadrian mentioned earlier -- it looks like juel by default ships with a slightly different set of javax.el classes:
{noformat}
java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance(Ljava/util/Properties;)Ljavax/el/ExpressionFactory;
at org.apache.camel.language.juel.JuelExpression.getExpressionFactory(JuelExpression.java:66)
at org.apache.camel.language.juel.JuelExpression.setVariable(JuelExpression.java:105)
at org.apache.camel.language.juel.JuelExpression.populateContext(JuelExpression.java:88)
at org.apache.camel.language.juel.JuelExpression.evaluate(JuelExpression.java:57)
{noformat}
The way to avoid running into this issue is by using the JUEL ExpressionFactoryImpl class directly (cfr. http://svn.apache.org/viewvc?view=revision&revision=885153)
> Upgrading to JUEL 2.1.1 - Beware of API changes in JUEL
> -------------------------------------------------------
>
> Key: CAMEL-1567
> URL: https://issues.apache.org/activemq/browse/CAMEL-1567
> Project: Apache Camel
> Issue Type: Task
> Components: camel-juel
> Affects Versions: 1.6.0, 2.0-M1
> Reporter: Claus Ibsen
> Assignee: Hadrian Zbarcea
> Fix For: 2.1.0
>
>
> Hi Claus,
> Here is an explanation of the API change from Christopher Beck at JUEL:
> Hello Yogesh,
> the API to resolve methods has changed in 2.1.1. Camel's method resolver
> is breaks with JUEL 2.1.1. Generally, methods are still resolved via
> ELResolver.getValue(context, base, property), but
> - in 2.1.0, the method name was passed as a property
> - in 2.1.1, an instance of de.odysseus.el.misc.MethodInvocation is passed
> as a property
> The reason for this is to provide more detailed information about the
> method invocation to the resolver (i.e the method name, number of arguments
> and whether vararg calls are supported).
> Now, camel-juel uses its BeanAndMethodELResolver to resolve methods.
> There, findMethod(context, base, property) only handles a property
> parameter of type string. That's why it doesn't work. When migrating to
> juel 2.1.1, the BeanAndMethodELResolver class needs to be updated to work
> with MethodInvocation objects as properties.
> The JUEL 2.1.1 distribution contains a sample resolver. Taking the sample
> code, updating camel's resolver should be pretty straightforward. When
> doing so, you may also want to add property "javax.el.varArgs" in
> JuelExpression.populateDefaultExpressionProperties(..). That way you would
> take real profit by invoking vararg methods from within EL expressions.
> There's also a way to quickly modify your resolver to work with both, JUEL
> 2.1.0 and 2.1.1. Just don't ask for "property instanceof String" but use
> property.toString() as a candidate method name: the MethodInvocation's
> toString() will answer the method name.
> See nabble:
> http://www.nabble.com/Camel-JUEL-expression-weirdness-in-1.6.0-td23177119s22882.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-1567) Upgrading to JUEL 2.1.1 - Beware of
API changes in JUEL
Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56155#action_56155 ]
Hadrian Zbarcea commented on CAMEL-1567:
----------------------------------------
I had a slightly different solution using the FactoryFinder to get the juel implementation. Using the default constructor of the juel ExpressionFactory makes it take the properties from an el.properties file on the classpath. This allows a user to configure the ExpressionFactory instance at will. I also set javax.el.varArgs and javax.el.nullProperties to true by default (see [guide|http://juel.sourceforge.net/guide/advanced/index.html]).
> Upgrading to JUEL 2.1.1 - Beware of API changes in JUEL
> -------------------------------------------------------
>
> Key: CAMEL-1567
> URL: https://issues.apache.org/activemq/browse/CAMEL-1567
> Project: Apache Camel
> Issue Type: Task
> Components: camel-juel
> Affects Versions: 1.6.0, 2.0-M1
> Reporter: Claus Ibsen
> Assignee: Hadrian Zbarcea
> Fix For: 2.1.0
>
>
> Hi Claus,
> Here is an explanation of the API change from Christopher Beck at JUEL:
> Hello Yogesh,
> the API to resolve methods has changed in 2.1.1. Camel's method resolver
> is breaks with JUEL 2.1.1. Generally, methods are still resolved via
> ELResolver.getValue(context, base, property), but
> - in 2.1.0, the method name was passed as a property
> - in 2.1.1, an instance of de.odysseus.el.misc.MethodInvocation is passed
> as a property
> The reason for this is to provide more detailed information about the
> method invocation to the resolver (i.e the method name, number of arguments
> and whether vararg calls are supported).
> Now, camel-juel uses its BeanAndMethodELResolver to resolve methods.
> There, findMethod(context, base, property) only handles a property
> parameter of type string. That's why it doesn't work. When migrating to
> juel 2.1.1, the BeanAndMethodELResolver class needs to be updated to work
> with MethodInvocation objects as properties.
> The JUEL 2.1.1 distribution contains a sample resolver. Taking the sample
> code, updating camel's resolver should be pretty straightforward. When
> doing so, you may also want to add property "javax.el.varArgs" in
> JuelExpression.populateDefaultExpressionProperties(..). That way you would
> take real profit by invoking vararg methods from within EL expressions.
> There's also a way to quickly modify your resolver to work with both, JUEL
> 2.1.0 and 2.1.1. Just don't ask for "property instanceof String" but use
> property.toString() as a candidate method name: the MethodInvocation's
> toString() will answer the method name.
> See nabble:
> http://www.nabble.com/Camel-JUEL-expression-weirdness-in-1.6.0-td23177119s22882.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-1567) Upgrading to JUEL 2.1.1 - Beware of
API changes in JUEL
Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hadrian Zbarcea updated CAMEL-1567:
-----------------------------------
Fix Version/s: (was: Future)
2.1.0
1.6.3
Assignee: Hadrian Zbarcea
> Upgrading to JUEL 2.1.1 - Beware of API changes in JUEL
> -------------------------------------------------------
>
> Key: CAMEL-1567
> URL: https://issues.apache.org/activemq/browse/CAMEL-1567
> Project: Apache Camel
> Issue Type: Task
> Components: camel-juel
> Affects Versions: 1.6.0, 2.0-M1
> Reporter: Claus Ibsen
> Assignee: Hadrian Zbarcea
> Priority: Minor
> Fix For: 1.6.3, 2.1.0
>
>
> Hi Claus,
> Here is an explanation of the API change from Christopher Beck at JUEL:
> Hello Yogesh,
> the API to resolve methods has changed in 2.1.1. Camel's method resolver
> is breaks with JUEL 2.1.1. Generally, methods are still resolved via
> ELResolver.getValue(context, base, property), but
> - in 2.1.0, the method name was passed as a property
> - in 2.1.1, an instance of de.odysseus.el.misc.MethodInvocation is passed
> as a property
> The reason for this is to provide more detailed information about the
> method invocation to the resolver (i.e the method name, number of arguments
> and whether vararg calls are supported).
> Now, camel-juel uses its BeanAndMethodELResolver to resolve methods.
> There, findMethod(context, base, property) only handles a property
> parameter of type string. That's why it doesn't work. When migrating to
> juel 2.1.1, the BeanAndMethodELResolver class needs to be updated to work
> with MethodInvocation objects as properties.
> The JUEL 2.1.1 distribution contains a sample resolver. Taking the sample
> code, updating camel's resolver should be pretty straightforward. When
> doing so, you may also want to add property "javax.el.varArgs" in
> JuelExpression.populateDefaultExpressionProperties(..). That way you would
> take real profit by invoking vararg methods from within EL expressions.
> There's also a way to quickly modify your resolver to work with both, JUEL
> 2.1.0 and 2.1.1. Just don't ask for "property instanceof String" but use
> property.toString() as a candidate method name: the MethodInvocation's
> toString() will answer the method name.
> See nabble:
> http://www.nabble.com/Camel-JUEL-expression-weirdness-in-1.6.0-td23177119s22882.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-1567) Upgrading to JUEL 2.1.1 - Beware of
API changes in JUEL
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56146#action_56146 ]
Claus Ibsen commented on CAMEL-1567:
------------------------------------
Hadrian are you sure 2.1.2 is an OSGi bundle? And where is that bundle jar?
The camel-juel features file should also be updated. Its located in
/camel/platforms/karaf/features/src/main/resources
Its still set to use 2.1.0, so that one should also be upgraded to 2.1.2. And maybe we need gertv to create a bundle in SMX bundle repo that wraps the 2.1.2 jar from juel.
> Upgrading to JUEL 2.1.1 - Beware of API changes in JUEL
> -------------------------------------------------------
>
> Key: CAMEL-1567
> URL: https://issues.apache.org/activemq/browse/CAMEL-1567
> Project: Apache Camel
> Issue Type: Task
> Components: camel-juel
> Affects Versions: 1.6.0, 2.0-M1
> Reporter: Claus Ibsen
> Assignee: Hadrian Zbarcea
> Fix For: 2.1.0
>
>
> Hi Claus,
> Here is an explanation of the API change from Christopher Beck at JUEL:
> Hello Yogesh,
> the API to resolve methods has changed in 2.1.1. Camel's method resolver
> is breaks with JUEL 2.1.1. Generally, methods are still resolved via
> ELResolver.getValue(context, base, property), but
> - in 2.1.0, the method name was passed as a property
> - in 2.1.1, an instance of de.odysseus.el.misc.MethodInvocation is passed
> as a property
> The reason for this is to provide more detailed information about the
> method invocation to the resolver (i.e the method name, number of arguments
> and whether vararg calls are supported).
> Now, camel-juel uses its BeanAndMethodELResolver to resolve methods.
> There, findMethod(context, base, property) only handles a property
> parameter of type string. That's why it doesn't work. When migrating to
> juel 2.1.1, the BeanAndMethodELResolver class needs to be updated to work
> with MethodInvocation objects as properties.
> The JUEL 2.1.1 distribution contains a sample resolver. Taking the sample
> code, updating camel's resolver should be pretty straightforward. When
> doing so, you may also want to add property "javax.el.varArgs" in
> JuelExpression.populateDefaultExpressionProperties(..). That way you would
> take real profit by invoking vararg methods from within EL expressions.
> There's also a way to quickly modify your resolver to work with both, JUEL
> 2.1.0 and 2.1.1. Just don't ask for "property instanceof String" but use
> property.toString() as a candidate method name: the MethodInvocation's
> toString() will answer the method name.
> See nabble:
> http://www.nabble.com/Camel-JUEL-expression-weirdness-in-1.6.0-td23177119s22882.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-1567) Upgrading to JUEL 2.1.1 - Beware of
API changes in JUEL
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-1567:
-------------------------------
Priority: Minor (was: Major)
Fix Version/s: (was: 2.1.0)
Future
> Upgrading to JUEL 2.1.1 - Beware of API changes in JUEL
> -------------------------------------------------------
>
> Key: CAMEL-1567
> URL: https://issues.apache.org/activemq/browse/CAMEL-1567
> Project: Apache Camel
> Issue Type: Task
> Components: camel-juel
> Affects Versions: 1.6.0, 2.0-M1
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: Future
>
>
> Hi Claus,
> Here is an explanation of the API change from Christopher Beck at JUEL:
> Hello Yogesh,
> the API to resolve methods has changed in 2.1.1. Camel's method resolver
> is breaks with JUEL 2.1.1. Generally, methods are still resolved via
> ELResolver.getValue(context, base, property), but
> - in 2.1.0, the method name was passed as a property
> - in 2.1.1, an instance of de.odysseus.el.misc.MethodInvocation is passed
> as a property
> The reason for this is to provide more detailed information about the
> method invocation to the resolver (i.e the method name, number of arguments
> and whether vararg calls are supported).
> Now, camel-juel uses its BeanAndMethodELResolver to resolve methods.
> There, findMethod(context, base, property) only handles a property
> parameter of type string. That's why it doesn't work. When migrating to
> juel 2.1.1, the BeanAndMethodELResolver class needs to be updated to work
> with MethodInvocation objects as properties.
> The JUEL 2.1.1 distribution contains a sample resolver. Taking the sample
> code, updating camel's resolver should be pretty straightforward. When
> doing so, you may also want to add property "javax.el.varArgs" in
> JuelExpression.populateDefaultExpressionProperties(..). That way you would
> take real profit by invoking vararg methods from within EL expressions.
> There's also a way to quickly modify your resolver to work with both, JUEL
> 2.1.0 and 2.1.1. Just don't ask for "property instanceof String" but use
> property.toString() as a candidate method name: the MethodInvocation's
> toString() will answer the method name.
> See nabble:
> http://www.nabble.com/Camel-JUEL-expression-weirdness-in-1.6.0-td23177119s22882.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.