You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Vanshul.Chawla" <Va...@target.com> on 2015/09/28 07:06:41 UTC

Class Not Found Exception for HTTPOperationFailedException

Hello,

I am using this in OnException

<exception>org.apache.camel.component.http.HttpOperationFailedException</exception>

When I deploy bundle to Fuse(6.1) , I get this error


Caused by: java.lang.ClassNotFoundException: org.apache.camel.component.http.HttpOperationFailedException


JBossFuse:admin@root> exports | grep org.apache.camel.component.http
   233 org.apache.camel.component.http.helper; version=2.12.0.redhat-611423
   233 org.apache.camel.component.http; version=2.12.0.redhat-611423

When I use java.lang.Exception in onException clause, I can see exception thrown has the same class.

"Exception is org.apache.camel.component.http.HttpOperationFailedException: HTTP operation failed invoking https://XXXX?amp%3BthrowExceptionOnFailure=false with statusCode: 404"

Is there something missing which we need to add to recognize this class in onException clause.


Vanshul

RE: Class Not Found Exception for HTTPOperationFailedException

Posted by "Vanshul.Chawla" <Va...@target.com>.
Installed. Success scenario works. 

Deployment fails when I install the bundle after using this class in onException.

I can even see this class in maven http dependency

---- extract from that class------

package org.apache.camel.component.http;

import java.util.Map;

import org.apache.camel.CamelException;
import org.apache.camel.util.ObjectHelper;

public class HttpOperationFailedException extends CamelException {
    private static final long serialVersionUID = -8721487434390572634L;
    private final String uri;
    private final String redirectLocation;

-------------XXX-------------------------------


-----Original Message-----
From: S Vijayan [mailto:aksvijayans@gmail.com] 
Sent: Monday, September 28, 2015 10:51 AM
To: users@camel.apache.org
Subject: Re: Class Not Found Exception for HTTPOperationFailedException

Hi,
Did you install camel-http feature.
If you didn't install then install it.
On Sep 28, 2015 10:37 AM, "Vanshul.Chawla" <Va...@target.com>
wrote:

> Hello,
>
> I am using this in OnException
>
>
> <exception>org.apache.camel.component.http.HttpOperationFailedExceptio
> n</exception>
>
> When I deploy bundle to Fuse(6.1) , I get this error
>
>
> Caused by: java.lang.ClassNotFoundException:
> org.apache.camel.component.http.HttpOperationFailedException
>
>
> JBossFuse:admin@root> exports | grep org.apache.camel.component.http
>    233 org.apache.camel.component.http.helper; version=2.12.0.redhat-611423
>    233 org.apache.camel.component.http; version=2.12.0.redhat-611423
>
> When I use java.lang.Exception in onException clause, I can see 
> exception thrown has the same class.
>
> "Exception is
> org.apache.camel.component.http.HttpOperationFailedException: HTTP 
> operation failed invoking 
> https://XXXX?amp%3BthrowExceptionOnFailure=false
> with statusCode: 404"
>
> Is there something missing which we need to add to recognize this 
> class in onException clause.
>
>
> Vanshul
>

Re: Class Not Found Exception for HTTPOperationFailedException

Posted by S Vijayan <ak...@gmail.com>.
Hi,
Did you install camel-http feature.
If you didn't install then install it.
On Sep 28, 2015 10:37 AM, "Vanshul.Chawla" <Va...@target.com>
wrote:

> Hello,
>
> I am using this in OnException
>
>
> <exception>org.apache.camel.component.http.HttpOperationFailedException</exception>
>
> When I deploy bundle to Fuse(6.1) , I get this error
>
>
> Caused by: java.lang.ClassNotFoundException:
> org.apache.camel.component.http.HttpOperationFailedException
>
>
> JBossFuse:admin@root> exports | grep org.apache.camel.component.http
>    233 org.apache.camel.component.http.helper; version=2.12.0.redhat-611423
>    233 org.apache.camel.component.http; version=2.12.0.redhat-611423
>
> When I use java.lang.Exception in onException clause, I can see exception
> thrown has the same class.
>
> "Exception is
> org.apache.camel.component.http.HttpOperationFailedException: HTTP
> operation failed invoking https://XXXX?amp%3BthrowExceptionOnFailure=false
> with statusCode: 404"
>
> Is there something missing which we need to add to recognize this class in
> onException clause.
>
>
> Vanshul
>