FAQ
Hi,
My camel contains some routes, and one route to a cxf endpoint.
If the cxf endpoint is not start when the camel begin starting , the server
throws error and the camelcontext do not work at all.
what I want it's to start this camelcontext and just log the error message.
How to hand it?

Thanks.

--
View this message in context: http://camel.465427.n5.nabble.com/how-can-I-hand-the-webservice-error-when-starting-the-camel-tp3413719p3413719.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Search Discussions

  • Tarun Ramakrishna at Mar 8, 2011 at 11:24 am
    Hi,

    Wouldn't setting and customizing an error handler on the route that delivers
    to the CXF endpoint do this for you ?

    Best Regards,
    Tarun

    On Tue, Mar 8, 2011 at 3:08 PM, Bill wrote:

    Hi,
    My camel contains some routes, and one route to a cxf endpoint.
    If the cxf endpoint is not start when the camel begin starting , the server
    throws error and the camelcontext do not work at all.
    what I want it's to start this camelcontext and just log the error message.
    How to hand it?

    Thanks.

    --
    View this message in context:
    http://camel.465427.n5.nabble.com/how-can-I-hand-the-webservice-error-when-starting-the-camel-tp3413719p3413719.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Bill at Mar 9, 2011 at 5:44 am
    Hi,
    It does not matter with the error hander.

    It is a Context initialization failed error:

    org.apache.camel.FailedToCreateProducerException: Failed to create Producer
    for endpoint: Endpoint[cxf://bean:serverEndpoint?dataFormat=MESSAGE].
    Reason: org.apache.cxf.service.factory.ServiceConstructionException: Failed
    to create service.

    --
    View this message in context: http://camel.465427.n5.nabble.com/how-can-I-hand-the-webservice-error-when-starting-the-camel-tp3413719p3415036.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Tarun Ramakrishna at Mar 9, 2011 at 12:07 pm
    A little unclear on what you expect here. The CamelContext does not
    start because of an invalid endpoint. The only way to make it start
    AFAIK would be to remove this invalid endpoint. I assume you are using
    Spring. If you have control over when the spring application context
    is constructed, you can merely catch the exception and remove this
    faulty CXF bean (and replace it with say a default CXF bean) . If you
    are in an OSGI environment where the spring extender is responsible
    for bootstrapping spring contexts, you can customize the extender
    behavior and incorporate the same logic.
    On Wed, Mar 9, 2011 at 11:13 AM, Bill wrote:

    Hi,
    It does not matter with the error hander.

    It is a Context initialization failed error:

    org.apache.camel.FailedToCreateProducerException: Failed to create Producer
    for endpoint: Endpoint[cxf://bean:serverEndpoint?dataFormat=MESSAGE].
    Reason: org.apache.cxf.service.factory.ServiceConstructionException: Failed
    to create service.

    --
    View this message in context: http://camel.465427.n5.nabble.com/how-can-I-hand-the-webservice-error-when-starting-the-camel-tp3413719p3415036.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Bill at Mar 10, 2011 at 1:50 am
    Hi,
    I am using spring.

    assuming the cxf endpoint is not a invalid endpoint, It is just not running
    when the camelcontext starts.

    what I want it's when camelcontext starts , it do not check the cxf endpoint
    is started or not.

    Just throws exception when I invoke cxf endpoint if the cxf server not
    started yet.

    --
    View this message in context: http://camel.465427.n5.nabble.com/how-can-I-hand-the-webservice-error-when-starting-the-camel-tp3413719p3422629.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Willem Jiang at Mar 10, 2011 at 2:09 am
    I'm not sure what your route looks like.
    But according the stack trace, it looks like your cxf endpoint
    configuration is wrong. It's better idea to let you know if the cxf
    endpoint is wrong.
    org.apache.camel.FailedToCreateProducerException: Failed to create Producer
    for endpoint: Endpoint[cxf://bean:serverEndpoint?dataFormat=MESSAGE].
    Reason: org.apache.cxf.service.factory.ServiceConstructionException: Failed
    to create service. Willem
    On 3/10/11 9:49 AM, Bill wrote:
    Hi,
    I am using spring.

    assuming the cxf endpoint is not a invalid endpoint, It is just not running
    when the camelcontext starts.

    what I want it's when camelcontext starts , it do not check the cxf endpoint
    is started or not.

    Just throws exception when I invoke cxf endpoint if the cxf server not
    started yet.

    --
    View this message in context: http://camel.465427.n5.nabble.com/how-can-I-hand-the-webservice-error-when-starting-the-camel-tp3413719p3422629.html
    Sent from the Camel - Users mailing list archive at Nabble.com.

    --
    Willem
    ----------------------------------
    FuseSource
    Web: http://www.fusesource.com
    Blog: http://willemjiang.blogspot.com (English)
    http://jnn.javaeye.com (Chinese)
    Twitter: willemjiang
  • Bill at Mar 11, 2011 at 12:07 am
    Hi,
    My cxf endpoint configuration is not wrong.
    when my order is : start cxf server --> start camel server , it is normal.

    but I want : start camel server --> start cxf server , it is throws
    FailedToCreateProducerException.

    I think when starting camel server, it check the cxf server is alive or not.
    I do not want camel to do this.

    --
    View this message in context: http://camel.465427.n5.nabble.com/how-can-I-hand-the-webservice-error-when-starting-the-camel-tp3413719p3424372.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Tarun Ramakrishna at Mar 11, 2011 at 12:58 pm
    Do you have a wsdlUrl resolvable without contacting the CXF server ?

    My cxf endpoint configuration is not wrong.
    when my order is :  start cxf server --> start camel server , it is normal.

    but I want : start camel server --> start cxf server , it is throws
    FailedToCreateProducerException.

    I think when starting camel server, it check the cxf server is alive or not.
    I do not want camel to do this.
  • Bill at Mar 12, 2011 at 12:54 am
    Hi, Ramakrishna-2 , thanks your reply.
    I resovled it.
    Because I defined the route information with WebURL like <***
    wsdlURL="http://localhost:9000/order?wsdl">,
    and I store the wsdl file to my classpath in ws.wsdl , change the
    wsdlURL="ws.wsdl" .
    It is done.

    --
    View this message in context: http://camel.465427.n5.nabble.com/how-can-I-hand-the-webservice-error-when-starting-the-camel-tp3413719p3425983.html
    Sent from the Camel - Users mailing list archive at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedMar 8, '11 at 9:39a
activeMar 12, '11 at 12:54a
posts9
users3
websitecamel.apache.org

People

Translate

site design / logo © 2022 Grokbase