You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Steve <st...@gmail.com> on 2016/02/11 18:45:32 UTC

ClassCastException While Using HandleHttpRequest Processor

I modified the Hello NiFi Web Service to use port 8443 and set Client
Authentication to "Need Authentication". I used a self signed certificate. I
set up a GetHTTP processor using the same certificate. The HandleHttpRequest
processor throws the following error: HandleHttpRequest [...] failed to
process due to java.lang.ClassCastException:
[Ljava.security.cert.X509Certificate; cannot be cast to
[Ljavax.security.cert.X509Certificate;; rolling back session:

This setup works fine when setting Client Authentication to "No
Authentication" even when calling using https.



--
View this message in context: http://apache-nifi-developer-list.39713.n7.nabble.com/ClassCastException-While-Using-HandleHttpRequest-Processor-tp7280.html
Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.

Re: ClassCastException While Using HandleHttpRequest Processor

Posted by Steve <st...@gmail.com>.
Unfortunately, my NiFi is set up in an area without external internet so I
can't copy and paste. I ran the openssl command and it caused the same error
on HandleHttpRequest processor. The response is way too much to retype.
Also, how do you set the logging so that the stacktrace is output. I'm only
seeing the error.



--
View this message in context: http://apache-nifi-developer-list.39713.n7.nabble.com/ClassCastException-While-Using-HandleHttpRequest-Processor-tp7280p7296.html
Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.

Re: ClassCastException While Using HandleHttpRequest Processor

Posted by Andy LoPresto <al...@gmail.com>.
Steve,

It appears there is an issue with the classes used for certificate examination and parsing in the HandleHTTPRequest processor (specifically line 583). I will try to recreate this issue when I get a chance. In the meantime, if you can provide the complete stack trace, as well as the results of the below command-line operation, that may help in diagnosing this issue. Thanks.

$ openssl s_client -connect <host:port> -debug -state -cert <path_to_your_cert.pem> -key <path_to_your_key.pem> -CAfile <path_to_your_cert.pem>

Andy LoPresto
alopresto.apache@gmail.com
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

> On Feb 11, 2016, at 9:45 AM, Steve <st...@gmail.com> wrote:
> 
> I modified the Hello NiFi Web Service to use port 8443 and set Client
> Authentication to "Need Authentication". I used a self signed certificate. I
> set up a GetHTTP processor using the same certificate. The HandleHttpRequest
> processor throws the following error: HandleHttpRequest [...] failed to
> process due to java.lang.ClassCastException:
> [Ljava.security.cert.X509Certificate; cannot be cast to
> [Ljavax.security.cert.X509Certificate;; rolling back session:
> 
> This setup works fine when setting Client Authentication to "No
> Authentication" even when calling using https.
> 
> 
> 
> --
> View this message in context: http://apache-nifi-developer-list.39713.n7.nabble.com/ClassCastException-While-Using-HandleHttpRequest-Processor-tp7280.html
> Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.