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/01/15 14:34:59 UTC

[jira] Created: (CAMEL-1261) camel-spring - method call language can not be used with split

camel-spring - method call language can not be used with split
--------------------------------------------------------------

                 Key: CAMEL-1261
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1261
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core, camel-spring
    Affects Versions: 1.5.0
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
             Fix For: 1.5.1, 2.0.0


Using a method call for the split expression is not possible in Spring DSL. It wants to resolve the language.

As we dont have all the expression builder helper in Spring XML its a bit harder to do routing. But I want to use a bean for the splitting. End users should always have the true power of java, regardless.
{code}
            <split>
                <expression>
                    <method bean="echoService" method="splitWords"/>
                </expression>
                <to uri="bean:echoService?method=hello"/>
                <to uri="stream:out"/>
            </split>

{code}

And gives this exception:

{code}
2009-01-15 14:15:18,831 [ing.Main.main()] ERROR MainSupport                    - Failed: org.apache.camel.NoSuchLanguageException: No language could be found for: null
org.apache.camel.NoSuchLanguageException: No language could be found for: null
        at org.apache.camel.impl.DefaultLanguageResolver.noSpecificLanguageFound(DefaultLanguageResolver.java:72)
        at org.apache.camel.impl.DefaultLanguageResolver.resolveLanguage(DefaultLanguageResolver.java:52)
        at org.apache.camel.impl.DefaultCamelContext.resolveLanguage(DefaultCamelContext.java:430)
        at org.apache.camel.model.language.ExpressionType.createExpression(ExpressionType.java:158)
        at org.apache.camel.model.SplitterType.createProcessor(SplitterType.java:86)
{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1261) camel-spring - method call language can not be used with split

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48744#action_48744 ] 

Claus Ibsen commented on CAMEL-1261:
------------------------------------

Comitted the rename.

> camel-spring - method call language can not be used with split
> --------------------------------------------------------------
>
>                 Key: CAMEL-1261
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1261
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core, camel-spring
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.1, 2.0.0
>
>
> Using a method call for the split expression is not possible in Spring DSL. It wants to resolve the language.
> As we dont have all the expression builder helper in Spring XML its a bit harder to do routing. But I want to use a bean for the splitting. End users should always have the true power of java, regardless.
> {code}
>             <split>
>                 <expression>
>                     <method bean="echoService" method="splitWords"/>
>                 </expression>
>                 <to uri="bean:echoService?method=hello"/>
>                 <to uri="stream:out"/>
>             </split>
> {code}
> And gives this exception:
> {code}
> 2009-01-15 14:15:18,831 [ing.Main.main()] ERROR MainSupport                    - Failed: org.apache.camel.NoSuchLanguageException: No language could be found for: null
> org.apache.camel.NoSuchLanguageException: No language could be found for: null
>         at org.apache.camel.impl.DefaultLanguageResolver.noSpecificLanguageFound(DefaultLanguageResolver.java:72)
>         at org.apache.camel.impl.DefaultLanguageResolver.resolveLanguage(DefaultLanguageResolver.java:52)
>         at org.apache.camel.impl.DefaultCamelContext.resolveLanguage(DefaultCamelContext.java:430)
>         at org.apache.camel.model.language.ExpressionType.createExpression(ExpressionType.java:158)
>         at org.apache.camel.model.SplitterType.createProcessor(SplitterType.java:86)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1261) camel-spring - method call language can not be used with split

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48745#action_48745 ] 

Claus Ibsen commented on CAMEL-1261:
------------------------------------

I still think it should be removed as its a xs:any type and its confusing what it can be used for.

> camel-spring - method call language can not be used with split
> --------------------------------------------------------------
>
>                 Key: CAMEL-1261
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1261
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core, camel-spring
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.1, 2.0.0
>
>
> Using a method call for the split expression is not possible in Spring DSL. It wants to resolve the language.
> As we dont have all the expression builder helper in Spring XML its a bit harder to do routing. But I want to use a bean for the splitting. End users should always have the true power of java, regardless.
> {code}
>             <split>
>                 <expression>
>                     <method bean="echoService" method="splitWords"/>
>                 </expression>
>                 <to uri="bean:echoService?method=hello"/>
>                 <to uri="stream:out"/>
>             </split>
> {code}
> And gives this exception:
> {code}
> 2009-01-15 14:15:18,831 [ing.Main.main()] ERROR MainSupport                    - Failed: org.apache.camel.NoSuchLanguageException: No language could be found for: null
> org.apache.camel.NoSuchLanguageException: No language could be found for: null
>         at org.apache.camel.impl.DefaultLanguageResolver.noSpecificLanguageFound(DefaultLanguageResolver.java:72)
>         at org.apache.camel.impl.DefaultLanguageResolver.resolveLanguage(DefaultLanguageResolver.java:52)
>         at org.apache.camel.impl.DefaultCamelContext.resolveLanguage(DefaultCamelContext.java:430)
>         at org.apache.camel.model.language.ExpressionType.createExpression(ExpressionType.java:158)
>         at org.apache.camel.model.SplitterType.createProcessor(SplitterType.java:86)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1261) camel-spring - method call language can not be used with split

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48733#action_48733 ] 

Claus Ibsen commented on CAMEL-1261:
------------------------------------

I think we need to get that expression ts:anyType out of the XSD. 

> camel-spring - method call language can not be used with split
> --------------------------------------------------------------
>
>                 Key: CAMEL-1261
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1261
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core, camel-spring
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.1, 2.0.0
>
>
> Using a method call for the split expression is not possible in Spring DSL. It wants to resolve the language.
> As we dont have all the expression builder helper in Spring XML its a bit harder to do routing. But I want to use a bean for the splitting. End users should always have the true power of java, regardless.
> {code}
>             <split>
>                 <expression>
>                     <method bean="echoService" method="splitWords"/>
>                 </expression>
>                 <to uri="bean:echoService?method=hello"/>
>                 <to uri="stream:out"/>
>             </split>
> {code}
> And gives this exception:
> {code}
> 2009-01-15 14:15:18,831 [ing.Main.main()] ERROR MainSupport                    - Failed: org.apache.camel.NoSuchLanguageException: No language could be found for: null
> org.apache.camel.NoSuchLanguageException: No language could be found for: null
>         at org.apache.camel.impl.DefaultLanguageResolver.noSpecificLanguageFound(DefaultLanguageResolver.java:72)
>         at org.apache.camel.impl.DefaultLanguageResolver.resolveLanguage(DefaultLanguageResolver.java:52)
>         at org.apache.camel.impl.DefaultCamelContext.resolveLanguage(DefaultCamelContext.java:430)
>         at org.apache.camel.model.language.ExpressionType.createExpression(ExpressionType.java:158)
>         at org.apache.camel.model.SplitterType.createProcessor(SplitterType.java:86)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1261) camel-spring - method call language can not be used with split

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48730#action_48730 ] 

Claus Ibsen commented on CAMEL-1261:
------------------------------------

Okay I got confused. The <expression> should not be there. Its a shallow that we should try to get out of the XSD

> camel-spring - method call language can not be used with split
> --------------------------------------------------------------
>
>                 Key: CAMEL-1261
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1261
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core, camel-spring
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.1, 2.0.0
>
>
> Using a method call for the split expression is not possible in Spring DSL. It wants to resolve the language.
> As we dont have all the expression builder helper in Spring XML its a bit harder to do routing. But I want to use a bean for the splitting. End users should always have the true power of java, regardless.
> {code}
>             <split>
>                 <expression>
>                     <method bean="echoService" method="splitWords"/>
>                 </expression>
>                 <to uri="bean:echoService?method=hello"/>
>                 <to uri="stream:out"/>
>             </split>
> {code}
> And gives this exception:
> {code}
> 2009-01-15 14:15:18,831 [ing.Main.main()] ERROR MainSupport                    - Failed: org.apache.camel.NoSuchLanguageException: No language could be found for: null
> org.apache.camel.NoSuchLanguageException: No language could be found for: null
>         at org.apache.camel.impl.DefaultLanguageResolver.noSpecificLanguageFound(DefaultLanguageResolver.java:72)
>         at org.apache.camel.impl.DefaultLanguageResolver.resolveLanguage(DefaultLanguageResolver.java:52)
>         at org.apache.camel.impl.DefaultCamelContext.resolveLanguage(DefaultCamelContext.java:430)
>         at org.apache.camel.model.language.ExpressionType.createExpression(ExpressionType.java:158)
>         at org.apache.camel.model.SplitterType.createProcessor(SplitterType.java:86)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1261) camel-spring - method call language can not be used with split

Posted by "James Strachan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48729#action_48729 ] 

James Strachan commented on CAMEL-1261:
---------------------------------------

kinda conflused by this - as SplitterType is an ExpressionNode (just like filter, when) so it should allow expressions as children?

{code>
<split>
 <method bean="echoService" method="splitWords"/>
</split>
{code}

this works for me in IntelliJ. Indeed there's a test case splitterWithCustomThreadPoolExecutor.xml in camel-spring

> camel-spring - method call language can not be used with split
> --------------------------------------------------------------
>
>                 Key: CAMEL-1261
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1261
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core, camel-spring
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.1, 2.0.0
>
>
> Using a method call for the split expression is not possible in Spring DSL. It wants to resolve the language.
> As we dont have all the expression builder helper in Spring XML its a bit harder to do routing. But I want to use a bean for the splitting. End users should always have the true power of java, regardless.
> {code}
>             <split>
>                 <expression>
>                     <method bean="echoService" method="splitWords"/>
>                 </expression>
>                 <to uri="bean:echoService?method=hello"/>
>                 <to uri="stream:out"/>
>             </split>
> {code}
> And gives this exception:
> {code}
> 2009-01-15 14:15:18,831 [ing.Main.main()] ERROR MainSupport                    - Failed: org.apache.camel.NoSuchLanguageException: No language could be found for: null
> org.apache.camel.NoSuchLanguageException: No language could be found for: null
>         at org.apache.camel.impl.DefaultLanguageResolver.noSpecificLanguageFound(DefaultLanguageResolver.java:72)
>         at org.apache.camel.impl.DefaultLanguageResolver.resolveLanguage(DefaultLanguageResolver.java:52)
>         at org.apache.camel.impl.DefaultCamelContext.resolveLanguage(DefaultCamelContext.java:430)
>         at org.apache.camel.model.language.ExpressionType.createExpression(ExpressionType.java:158)
>         at org.apache.camel.model.SplitterType.createProcessor(SplitterType.java:86)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1261) camel-spring - method call language can not be used with split

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48740#action_48740 ] 

Claus Ibsen commented on CAMEL-1261:
------------------------------------

I suggest to rename expression to languageExpression or kinda remove it all together. Its used for expression using language where you set the language name in an attribute. Hardly used in Spring DSL where we have XSD types for all the languages (xpath, groovy, el, methodCall, etc.)




> camel-spring - method call language can not be used with split
> --------------------------------------------------------------
>
>                 Key: CAMEL-1261
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1261
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core, camel-spring
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.1, 2.0.0
>
>
> Using a method call for the split expression is not possible in Spring DSL. It wants to resolve the language.
> As we dont have all the expression builder helper in Spring XML its a bit harder to do routing. But I want to use a bean for the splitting. End users should always have the true power of java, regardless.
> {code}
>             <split>
>                 <expression>
>                     <method bean="echoService" method="splitWords"/>
>                 </expression>
>                 <to uri="bean:echoService?method=hello"/>
>                 <to uri="stream:out"/>
>             </split>
> {code}
> And gives this exception:
> {code}
> 2009-01-15 14:15:18,831 [ing.Main.main()] ERROR MainSupport                    - Failed: org.apache.camel.NoSuchLanguageException: No language could be found for: null
> org.apache.camel.NoSuchLanguageException: No language could be found for: null
>         at org.apache.camel.impl.DefaultLanguageResolver.noSpecificLanguageFound(DefaultLanguageResolver.java:72)
>         at org.apache.camel.impl.DefaultLanguageResolver.resolveLanguage(DefaultLanguageResolver.java:52)
>         at org.apache.camel.impl.DefaultCamelContext.resolveLanguage(DefaultCamelContext.java:430)
>         at org.apache.camel.model.language.ExpressionType.createExpression(ExpressionType.java:158)
>         at org.apache.camel.model.SplitterType.createProcessor(SplitterType.java:86)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-1261) camel-spring - method call language can not be used with split

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-1261.
--------------------------------

       Resolution: Duplicate
    Fix Version/s:     (was: 1.5.1)

False alarm. Have created a new ticket with the rename of the expression to language. And avoiding it being a tns:any type.

> camel-spring - method call language can not be used with split
> --------------------------------------------------------------
>
>                 Key: CAMEL-1261
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1261
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core, camel-spring
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.0.0
>
>
> Using a method call for the split expression is not possible in Spring DSL. It wants to resolve the language.
> As we dont have all the expression builder helper in Spring XML its a bit harder to do routing. But I want to use a bean for the splitting. End users should always have the true power of java, regardless.
> {code}
>             <split>
>                 <expression>
>                     <method bean="echoService" method="splitWords"/>
>                 </expression>
>                 <to uri="bean:echoService?method=hello"/>
>                 <to uri="stream:out"/>
>             </split>
> {code}
> And gives this exception:
> {code}
> 2009-01-15 14:15:18,831 [ing.Main.main()] ERROR MainSupport                    - Failed: org.apache.camel.NoSuchLanguageException: No language could be found for: null
> org.apache.camel.NoSuchLanguageException: No language could be found for: null
>         at org.apache.camel.impl.DefaultLanguageResolver.noSpecificLanguageFound(DefaultLanguageResolver.java:72)
>         at org.apache.camel.impl.DefaultLanguageResolver.resolveLanguage(DefaultLanguageResolver.java:52)
>         at org.apache.camel.impl.DefaultCamelContext.resolveLanguage(DefaultCamelContext.java:430)
>         at org.apache.camel.model.language.ExpressionType.createExpression(ExpressionType.java:158)
>         at org.apache.camel.model.SplitterType.createProcessor(SplitterType.java:86)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (CAMEL-1261) camel-spring - method call language can not be used with split

Posted by "James Strachan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48729#action_48729 ] 

jstrachan edited comment on CAMEL-1261 at 1/15/09 6:42 AM:
----------------------------------------------------------------

kinda conflused by this - as SplitterType is an ExpressionNode (just like filter, when) so it should allow expressions as children?

{code}
<split>
 <method bean="echoService" method="splitWords"/>
</split>
{code}

this works for me in IntelliJ. Indeed there's a test case splitterWithCustomThreadPoolExecutor.xml in camel-spring

      was (Author: jstrachan):
    kinda conflused by this - as SplitterType is an ExpressionNode (just like filter, when) so it should allow expressions as children?

{code>
<split>
 <method bean="echoService" method="splitWords"/>
</split>
{code}

this works for me in IntelliJ. Indeed there's a test case splitterWithCustomThreadPoolExecutor.xml in camel-spring
  
> camel-spring - method call language can not be used with split
> --------------------------------------------------------------
>
>                 Key: CAMEL-1261
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1261
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core, camel-spring
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.1, 2.0.0
>
>
> Using a method call for the split expression is not possible in Spring DSL. It wants to resolve the language.
> As we dont have all the expression builder helper in Spring XML its a bit harder to do routing. But I want to use a bean for the splitting. End users should always have the true power of java, regardless.
> {code}
>             <split>
>                 <expression>
>                     <method bean="echoService" method="splitWords"/>
>                 </expression>
>                 <to uri="bean:echoService?method=hello"/>
>                 <to uri="stream:out"/>
>             </split>
> {code}
> And gives this exception:
> {code}
> 2009-01-15 14:15:18,831 [ing.Main.main()] ERROR MainSupport                    - Failed: org.apache.camel.NoSuchLanguageException: No language could be found for: null
> org.apache.camel.NoSuchLanguageException: No language could be found for: null
>         at org.apache.camel.impl.DefaultLanguageResolver.noSpecificLanguageFound(DefaultLanguageResolver.java:72)
>         at org.apache.camel.impl.DefaultLanguageResolver.resolveLanguage(DefaultLanguageResolver.java:52)
>         at org.apache.camel.impl.DefaultCamelContext.resolveLanguage(DefaultCamelContext.java:430)
>         at org.apache.camel.model.language.ExpressionType.createExpression(ExpressionType.java:158)
>         at org.apache.camel.model.SplitterType.createProcessor(SplitterType.java:86)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.