You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Glen Mazza (JIRA)" <ji...@apache.org> on 2008/05/17 05:38:43 UTC

[jira] Created: (CAMEL-525) Camel should throw a fatal exception if it can't resolve the component

Camel should throw a fatal exception if it can't resolve the component
----------------------------------------------------------------------

                 Key: CAMEL-525
                 URL: https://issues.apache.org/activemq/browse/CAMEL-525
             Project: Apache Camel
          Issue Type: Bug
    Affects Versions: 1.3.0
            Reporter: Glen Mazza
            Priority: Minor


For that attached code, if I use the correct component URI prefix "test-jms" that I have registered, Camel runs fine:
            from("test-jms:queue:test.queue").process(new Processor() { ...

[Registration done via:
      context.addComponent("test-jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
]

But if I misspell the component prefix (here, "test-jms4"), Camel halts with no output or feedback to the user informing him of the problem:
            from("test-jms4:queue:test.queue").process(new Processor() { ...

No feedback about the problem is given in the log files either.  

I think in the from() and to() methods, Camel should be changed to throw an exception whenever it cannot resolve the component (i.e., if the user uses "test-jms4" instead of "test-jms", "cfx" instead of "cxf", etc.), not just halt silently.


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


[jira] Resolved: (CAMEL-525) Camel should throw a fatal exception if it can't resolve the component

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

Claus Ibsen resolved CAMEL-525.
-------------------------------

    Resolution: Cannot Reproduce

It is not a bug in Camel. End-user swallows the exception.

> Camel should throw a fatal exception if it can't resolve the component
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-525
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-525
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.3.0
>            Reporter: Glen Mazza
>            Assignee: Claus Ibsen
>            Priority: Minor
>         Attachments: CamelSample2.java, pom.xml
>
>
> For that attached code, if I use the correct component URI prefix "test-jms" that I have registered, Camel runs fine:
>             from("test-jms:queue:test.queue").process(new Processor() { ...
> [Registration done via:
>       context.addComponent("test-jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
> ]
> But if I misspell the component prefix (here, "test-jms4"), Camel halts with no output or feedback to the user informing him of the problem:
>             from("test-jms4:queue:test.queue").process(new Processor() { ...
> No feedback about the problem is given in the log files either.  
> I think in the from() and to() methods, Camel should be changed to throw an exception whenever it cannot resolve the component (i.e., if the user uses "test-jms4" instead of "test-jms", "cfx" instead of "cxf", etc.), not just halt silently.

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


[jira] Assigned: (CAMEL-525) Camel should throw a fatal exception if it can't resolve the component

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

Claus Ibsen reassigned CAMEL-525:
---------------------------------

    Assignee: Claus Ibsen

> Camel should throw a fatal exception if it can't resolve the component
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-525
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-525
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.3.0
>            Reporter: Glen Mazza
>            Assignee: Claus Ibsen
>            Priority: Minor
>         Attachments: CamelSample2.java, pom.xml
>
>
> For that attached code, if I use the correct component URI prefix "test-jms" that I have registered, Camel runs fine:
>             from("test-jms:queue:test.queue").process(new Processor() { ...
> [Registration done via:
>       context.addComponent("test-jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
> ]
> But if I misspell the component prefix (here, "test-jms4"), Camel halts with no output or feedback to the user informing him of the problem:
>             from("test-jms4:queue:test.queue").process(new Processor() { ...
> No feedback about the problem is given in the log files either.  
> I think in the from() and to() methods, Camel should be changed to throw an exception whenever it cannot resolve the component (i.e., if the user uses "test-jms4" instead of "test-jms", "cfx" instead of "cxf", etc.), not just halt silently.

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


[jira] Commented: (CAMEL-525) Camel should throw a fatal exception if it can't resolve the component

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

Claus Ibsen commented on CAMEL-525:
-----------------------------------

Damm the anwser is right before my eyes.

Glenn you swallow the exception yourself in your run method()

{code}
   public static void main(String[] args) {
      CamelSample2 cs = new CamelSample2();
      try {
         cs.run();
      } catch (Exception e) {
      }
   }
{code}

You should remove the catch block

{code}
   public static void main(String[] args) throws Exception {
      CamelSample2 cs = new CamelSample2();
     cs.run();
   }
{code}

> Camel should throw a fatal exception if it can't resolve the component
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-525
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-525
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.3.0
>            Reporter: Glen Mazza
>            Assignee: Claus Ibsen
>            Priority: Minor
>         Attachments: CamelSample2.java, pom.xml
>
>
> For that attached code, if I use the correct component URI prefix "test-jms" that I have registered, Camel runs fine:
>             from("test-jms:queue:test.queue").process(new Processor() { ...
> [Registration done via:
>       context.addComponent("test-jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
> ]
> But if I misspell the component prefix (here, "test-jms4"), Camel halts with no output or feedback to the user informing him of the problem:
>             from("test-jms4:queue:test.queue").process(new Processor() { ...
> No feedback about the problem is given in the log files either.  
> I think in the from() and to() methods, Camel should be changed to throw an exception whenever it cannot resolve the component (i.e., if the user uses "test-jms4" instead of "test-jms", "cfx" instead of "cxf", etc.), not just halt silently.

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


[jira] Commented: (CAMEL-525) Camel should throw a fatal exception if it can't resolve the component

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

Claus Ibsen commented on CAMEL-525:
-----------------------------------

Glen

Do you not get a NoSuchEndpointException. The code below throws this fatal exception on me.

{code}
org.apache.camel.NoSuchEndpointException: No endpoint could be found for: mistyped://hello

public class Issue525Test extends ContextTestSupport {

    public void testXXX() throws Exception {
        Thread.sleep(1000);
    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            public void configure() throws Exception {
                from("mistyped://hello").to("mock:result");
            }
        };
    }
}
{code}

> Camel should throw a fatal exception if it can't resolve the component
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-525
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-525
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.3.0
>            Reporter: Glen Mazza
>            Priority: Minor
>         Attachments: CamelSample2.java, pom.xml
>
>
> For that attached code, if I use the correct component URI prefix "test-jms" that I have registered, Camel runs fine:
>             from("test-jms:queue:test.queue").process(new Processor() { ...
> [Registration done via:
>       context.addComponent("test-jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
> ]
> But if I misspell the component prefix (here, "test-jms4"), Camel halts with no output or feedback to the user informing him of the problem:
>             from("test-jms4:queue:test.queue").process(new Processor() { ...
> No feedback about the problem is given in the log files either.  
> I think in the from() and to() methods, Camel should be changed to throw an exception whenever it cannot resolve the component (i.e., if the user uses "test-jms4" instead of "test-jms", "cfx" instead of "cxf", etc.), not just halt silently.

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


[jira] Updated: (CAMEL-525) Camel should throw a fatal exception if it can't resolve the component

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

Glen Mazza updated CAMEL-525:
-----------------------------

    Attachment: CamelSample2.java

Test file.

> Camel should throw a fatal exception if it can't resolve the component
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-525
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-525
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.3.0
>            Reporter: Glen Mazza
>            Priority: Minor
>         Attachments: CamelSample2.java
>
>
> For that attached code, if I use the correct component URI prefix "test-jms" that I have registered, Camel runs fine:
>             from("test-jms:queue:test.queue").process(new Processor() { ...
> [Registration done via:
>       context.addComponent("test-jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
> ]
> But if I misspell the component prefix (here, "test-jms4"), Camel halts with no output or feedback to the user informing him of the problem:
>             from("test-jms4:queue:test.queue").process(new Processor() { ...
> No feedback about the problem is given in the log files either.  
> I think in the from() and to() methods, Camel should be changed to throw an exception whenever it cannot resolve the component (i.e., if the user uses "test-jms4" instead of "test-jms", "cfx" instead of "cxf", etc.), not just halt silently.

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


[jira] Updated: (CAMEL-525) Camel should throw a fatal exception if it can't resolve the component

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

Glen Mazza updated CAMEL-525:
-----------------------------

    Attachment: pom.xml

pom file used to run sample.

> Camel should throw a fatal exception if it can't resolve the component
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-525
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-525
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.3.0
>            Reporter: Glen Mazza
>            Priority: Minor
>         Attachments: CamelSample2.java, pom.xml
>
>
> For that attached code, if I use the correct component URI prefix "test-jms" that I have registered, Camel runs fine:
>             from("test-jms:queue:test.queue").process(new Processor() { ...
> [Registration done via:
>       context.addComponent("test-jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
> ]
> But if I misspell the component prefix (here, "test-jms4"), Camel halts with no output or feedback to the user informing him of the problem:
>             from("test-jms4:queue:test.queue").process(new Processor() { ...
> No feedback about the problem is given in the log files either.  
> I think in the from() and to() methods, Camel should be changed to throw an exception whenever it cannot resolve the component (i.e., if the user uses "test-jms4" instead of "test-jms", "cfx" instead of "cxf", etc.), not just halt silently.

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


[jira] Commented: (CAMEL-525) Camel should throw a fatal exception if it can't resolve the component

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

Claus Ibsen commented on CAMEL-525:
-----------------------------------

I tried your code in the camel-jms component and also got the exception

{code}
org.apache.camel.NoSuchEndpointException: No endpoint could be found for: test-jms4:queue:test.queue
	at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:54)


public class Issue5252Test extends TestCase {

    public void testXXX() throws Exception {
        CamelContext context = new DefaultCamelContext();

        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(
            "vm://localhost?broker.persistent=false");
        context.addComponent("test-jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));

        context.addRoutes(new RouteBuilder() {
            public void configure() {

                from("test-jms4:queue:test.queue").process(new Processor() {
                    public void process(Exchange e) {
                        System.out.println("This was called - Body: " + e.getIn().getBody(String.class));
                    }

                });
            }
        });

        CamelTemplate template = new CamelTemplate(context);
        context.start();
        for (int i = 0; i < 3; i++) {
            System.out.println("i is: " + i);
            template.sendBody("test-jms:queue:test.queue", "" + i);
        }
        Thread.sleep(60000);
        context.stop();
    }

}
{code}

> Camel should throw a fatal exception if it can't resolve the component
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-525
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-525
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.3.0
>            Reporter: Glen Mazza
>            Assignee: Claus Ibsen
>            Priority: Minor
>         Attachments: CamelSample2.java, pom.xml
>
>
> For that attached code, if I use the correct component URI prefix "test-jms" that I have registered, Camel runs fine:
>             from("test-jms:queue:test.queue").process(new Processor() { ...
> [Registration done via:
>       context.addComponent("test-jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
> ]
> But if I misspell the component prefix (here, "test-jms4"), Camel halts with no output or feedback to the user informing him of the problem:
>             from("test-jms4:queue:test.queue").process(new Processor() { ...
> No feedback about the problem is given in the log files either.  
> I think in the from() and to() methods, Camel should be changed to throw an exception whenever it cannot resolve the component (i.e., if the user uses "test-jms4" instead of "test-jms", "cfx" instead of "cxf", etc.), not just halt silently.

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


[jira] Updated: (CAMEL-525) Camel should throw a fatal exception if it can't resolve the component

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

Hadrian Zbarcea updated CAMEL-525:
----------------------------------

    Fix Version/s: 1.4.0

> Camel should throw a fatal exception if it can't resolve the component
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-525
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-525
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.3.0
>            Reporter: Glen Mazza
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 1.4.0
>
>         Attachments: CamelSample2.java, pom.xml
>
>
> For that attached code, if I use the correct component URI prefix "test-jms" that I have registered, Camel runs fine:
>             from("test-jms:queue:test.queue").process(new Processor() { ...
> [Registration done via:
>       context.addComponent("test-jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
> ]
> But if I misspell the component prefix (here, "test-jms4"), Camel halts with no output or feedback to the user informing him of the problem:
>             from("test-jms4:queue:test.queue").process(new Processor() { ...
> No feedback about the problem is given in the log files either.  
> I think in the from() and to() methods, Camel should be changed to throw an exception whenever it cannot resolve the component (i.e., if the user uses "test-jms4" instead of "test-jms", "cfx" instead of "cxf", etc.), not just halt silently.

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


[jira] Commented: (CAMEL-525) Camel should throw a fatal exception if it can't resolve the component

Posted by "Glen Mazza (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42857#action_42857 ] 

Glen Mazza commented on CAMEL-525:
----------------------------------

Oh heavens!  I did not take that into account.  Sorry about that...

Glen


> Camel should throw a fatal exception if it can't resolve the component
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-525
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-525
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.3.0
>            Reporter: Glen Mazza
>            Assignee: Claus Ibsen
>            Priority: Minor
>         Attachments: CamelSample2.java, pom.xml
>
>
> For that attached code, if I use the correct component URI prefix "test-jms" that I have registered, Camel runs fine:
>             from("test-jms:queue:test.queue").process(new Processor() { ...
> [Registration done via:
>       context.addComponent("test-jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
> ]
> But if I misspell the component prefix (here, "test-jms4"), Camel halts with no output or feedback to the user informing him of the problem:
>             from("test-jms4:queue:test.queue").process(new Processor() { ...
> No feedback about the problem is given in the log files either.  
> I think in the from() and to() methods, Camel should be changed to throw an exception whenever it cannot resolve the component (i.e., if the user uses "test-jms4" instead of "test-jms", "cfx" instead of "cxf", etc.), not just halt silently.

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