Cfhttp error in 4.5.1.022 on Java 8

Hi All,

Running this code on Tomcat 7, Java 1.7.0_76 works fine.
Running this code on Tomcat 8, Java 8 throws error below.

Code:===========
Address = “64 Warrigal Road, Surrey Hills VIC”
geocodeUrl =
https://maps.googleapis.com/maps/api/geocode/json?address=#URLEncodedFormat(Address)#
cfhttp(url=“#geocodeUrl#” method=“GET” timeout=“3” throwonerror=“No”) {}
WriteDump(cfhttp);
abort;

Exception

org.apache.http.impl.conn.CPool.setValidateAfterInactivity(I)V
java.lang.NoSuchMethodError

Sorry for the vauge error, that’s the only info I could get right now… I
will try to grab a stack trace ASAP.

Can anyone else confirm this?

Regards,
Adam

Hi Adam,

There have been some discussions recently which sound as they might be similar:

https://groups.google.com/forum/#!topic/lucee/KGkJewPlfEo

Try the solution suggested there of checking whether your http-client
jars need updating.

Julian.On 8 July 2015 at 11:13, Adam Chapman <@Adam_Chapman> wrote:

Running this code on Tomcat 7, Java 1.7.0_76 works fine.
Running this code on Tomcat 8, Java 8 throws error below.

Code:

Address = “64 Warrigal Road, Surrey Hills VIC”
geocodeUrl =
https://maps.googleapis.com/maps/api/geocode/json?address=#URLEncodedFormat(Address)#
cfhttp(url=“#geocodeUrl#” method=“GET” timeout=“3” throwonerror=“No”) {}
WriteDump(cfhttp);
abort;

Exception

org.apache.http.impl.conn.CPool.setValidateAfterInactivity(I)V
java.lang.NoSuchMethodError

Stacktrace snip…

org.apache.http.impl.conn.CPool.setValidateAfterInactivity(I)V
at
org.apache.http.impl.conn.PoolingHttpClientConnectionManager.(PoolingHttpClientConnectionManager.java:176):176
at
org.apache.http.impl.conn.PoolingHttpClientConnectionManager.(PoolingHttpClientConnectionManager.java:158):158
at
org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:919):919
at lucee.runtime.tag.Http41._doEndTag(Http41.java:978):978
at lucee.runtime.tag.Http41.doEndTag(Http41.java:618):618
at lucee.runtime.tag.HttpImpl.doEndTag(HttpImpl.java:223):223On Wednesday, July 8, 2015 at 8:13:44 PM UTC+10, Adam Chapman wrote:

Hi All,

Running this code on Tomcat 7, Java 1.7.0_76 works fine.
Running this code on Tomcat 8, Java 8 throws error below.

Code:

Address = “64 Warrigal Road, Surrey Hills VIC”
geocodeUrl = "
https://maps.googleapis.com/maps/api/geocode/json?address=#URLEncodedFormat(Address)#
"
cfhttp(url=“#geocodeUrl#” method=“GET” timeout=“3” throwonerror=“No”) {}
WriteDump(cfhttp);
abort;

Exception

org.apache.http.impl.conn.CPool.setValidateAfterInactivity(I)V
java.lang.NoSuchMethodError

Sorry for the vauge error, that’s the only info I could get right now… I
will try to grab a stack trace ASAP.

Can anyone else confirm this?

Regards,
Adam

Hi Julian,

Thanks for they reply. I’ve read through that thread, though it seems that
issue is with updating via the admin from 4.5.1.000 to 4.5.1.022.

I’m doing a fresh deploy to a cloud instance using the 4.5.1.022 war file
from bitbucket, so I would assume that the jars in the 4.5.1.022 war don’t
need updating? Can anyone confirm this?

Regards,
AdamOn Wednesday, July 8, 2015 at 10:46:59 PM UTC+10, Julian Halliwell wrote:

Hi Adam,

There have been some discussions recently which sound as they might be
similar:

Redirecting to Google Groups

Try the solution suggested there of checking whether your http-client
jars need updating.

Julian.

On 8 July 2015 at 11:13, Adam Chapman <adam.p....@gmail.com <javascript:>> wrote:

Running this code on Tomcat 7, Java 1.7.0_76 works fine.
Running this code on Tomcat 8, Java 8 throws error below.

Code:

Address = “64 Warrigal Road, Surrey Hills VIC”
geocodeUrl =
"
https://maps.googleapis.com/maps/api/geocode/json?address=#URLEncodedFormat(Address)#"

cfhttp(url=“#geocodeUrl#” method=“GET” timeout=“3” throwonerror=“No”) {}
WriteDump(cfhttp);
abort;

Exception

org.apache.http.impl.conn.CPool.setValidateAfterInactivity(I)V
java.lang.NoSuchMethodError

This is a conflict with different versions of the httpclient jar, my
assumption that it works with Java 7 but not with Java 8 is that Java 8
loads them in a different order somehow.

So i assume you have different versions of the httpclient libary in your
environment, is that the case?
I that is the case this is not a bug, you cannot have different version and
expect to work it correct.

Micha

Side note:
With Lucee 5 problems like this are in the past because the
core defineds exactly what version it needs and load them diretly.On Wed, Jul 8, 2015 at 12:19 PM, Adam Chapman <@Adam_Chapman> wrote:

Stacktrace snip…

org.apache.http.impl.conn.CPool.setValidateAfterInactivity(I)V
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.
(PoolingHttpClientConnectionManager.java:176):176
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.
(PoolingHttpClientConnectionManager.java:158):158
at
org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:919):919
at lucee.runtime.tag.Http41._doEndTag(Http41.java:978):978
at lucee.runtime.tag.Http41.doEndTag(Http41.java:618):618
at lucee.runtime.tag.HttpImpl.doEndTag(HttpImpl.java:223):223
On Wednesday, July 8, 2015 at 8:13:44 PM UTC+10, Adam Chapman wrote:

Hi All,

Running this code on Tomcat 7, Java 1.7.0_76 works fine.
Running this code on Tomcat 8, Java 8 throws error below.

Code:

Address = “64 Warrigal Road, Surrey Hills VIC”
geocodeUrl = "
https://maps.googleapis.com/maps/api/geocode/json?address=#URLEncodedFormat(Address)#
"
cfhttp(url=“#geocodeUrl#” method=“GET” timeout=“3” throwonerror=“No”) {}
WriteDump(cfhttp);
abort;

Exception

org.apache.http.impl.conn.CPool.setValidateAfterInactivity(I)V
java.lang.NoSuchMethodError

Sorry for the vauge error, that’s the only info I could get right now… I
will try to grab a stack trace ASAP.

Can anyone else confirm this?

Regards,
Adam


You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/830c6662-ec58-4033-84be-e48667f91736%40googlegroups.com
https://groups.google.com/d/msgid/lucee/830c6662-ec58-4033-84be-e48667f91736%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

Using Lucee 4.5.1.022 and the updated jars referenced in
[LDEV-292] - Lucee, I was not able to
access https://s3.amazonaws.com using cfhttp

This is odd, I also use the same version with the Lucee updated jars and I
can access S3 just fine.On Thursday, 9 July 2015 17:32:40 UTC+3, John Berquist wrote:

Using Lucee 4.5.1.022 and the updated jars referenced in
[LDEV-292] - Lucee, I was not able to
access https://s3.amazonaws.com using cfhttp. I got the same sort of
error Konstantinos Liakos referenced in his comment on LDEV-292. I went
ahead and retrieved the latest jars directly from the apache project which,
as Konstantinos Liakos again noted in that issue, had a fix for the issue,
and replaced the http jars in the lucee lib folder. Now everything works
again, but I am not sure how recommended this is as an approach.

John Berquist

On Thursday, July 9, 2015 at 10:03:45 AM UTC-4, Konstantinos Liakos wrote:

I have faced problems particularly with googleapis.com domain.

See my comment here:
[LDEV-292] - Lucee

My solution was nginx proxy.

On Wednesday, 8 July 2015 13:13:44 UTC+3, Adam Chapman wrote:

Hi All,

Running this code on Tomcat 7, Java 1.7.0_76 works fine.
Running this code on Tomcat 8, Java 8 throws error below.

Code:

Address = “64 Warrigal Road, Surrey Hills VIC”
geocodeUrl = "
https://maps.googleapis.com/maps/api/geocode/json?address=#URLEncodedFormat(Address)#
"
cfhttp(url=“#geocodeUrl#” method=“GET” timeout=“3” throwonerror=“No”) {}
WriteDump(cfhttp);
abort;

Exception

org.apache.http.impl.conn.CPool.setValidateAfterInactivity(I)V
java.lang.NoSuchMethodError

Sorry for the vauge error, that’s the only info I could get right now…
I will try to grab a stack trace ASAP.

Can anyone else confirm this?

Regards,
Adam

I don’t know why it would be different, but I was using cfhttp directly
with a pre-signed url to get a bucket listing, so maybe that is why it
didn’t work for me :confused:

I don’t really have any ideas why the difference :). I do know that it was
the exact sort of error you mentioned in your comment regarding
the ‘maps.googleapis.com’ https address. That is what led me to try the
very latest jars. I assume when you say you can access s3 you don’t mean
with cfdirectory or the like, but directly with a cfhttp request?

I actually have some legacy code that uses fileRead('s3:// and it still
works just fine, at 4.5.1.022 and with the new http client jars provided by
Lucee.On Thursday, 9 July 2015 17:43:43 UTC+3, John Berquist wrote:

I don’t really have any ideas why the difference :). I do know that it was
the exact sort of error you mentioned in your comment regarding the ’
maps.googleapis.com’ https address. That is what led me to try the very
latest jars. I assume when you say you can access s3 you don’t mean with
cfdirectory or the like, but directly with a cfhttp request?

I have faced problems particularly with googleapis.com domain.

See my comment
here: [LDEV-292] - Lucee

My solution was nginx proxy.On Wednesday, 8 July 2015 13:13:44 UTC+3, Adam Chapman wrote:

Hi All,

Running this code on Tomcat 7, Java 1.7.0_76 works fine.
Running this code on Tomcat 8, Java 8 throws error below.

Code:

Address = “64 Warrigal Road, Surrey Hills VIC”
geocodeUrl = "
https://maps.googleapis.com/maps/api/geocode/json?address=#URLEncodedFormat(Address)#
"
cfhttp(url=“#geocodeUrl#” method=“GET” timeout=“3” throwonerror=“No”) {}
WriteDump(cfhttp);
abort;

Exception

org.apache.http.impl.conn.CPool.setValidateAfterInactivity(I)V
java.lang.NoSuchMethodError

Sorry for the vauge error, that’s the only info I could get right now… I
will try to grab a stack trace ASAP.

Can anyone else confirm this?

Regards,
Adam

Using Lucee 4.5.1.022 and the updated jars referenced in
[LDEV-292] - Lucee, I was not able to access
https://s3.amazonaws.com using cfhttp. I got the same sort of error
Konstantinos Liakos referenced in his comment on LDEV-292. I went ahead and
retrieved the latest jars directly from the apache project which,
as Konstantinos Liakos again noted in that issue, had a fix for the issue,
and replaced the http jars in the lucee lib folder. Now everything works
again, but I am not sure how recommended this is as an approach.

John BerquistOn Thursday, July 9, 2015 at 10:03:45 AM UTC-4, Konstantinos Liakos wrote:

I have faced problems particularly with googleapis.com domain.

See my comment here:
[LDEV-292] - Lucee

My solution was nginx proxy.

On Wednesday, 8 July 2015 13:13:44 UTC+3, Adam Chapman wrote:

Hi All,

Running this code on Tomcat 7, Java 1.7.0_76 works fine.
Running this code on Tomcat 8, Java 8 throws error below.

Code:

Address = “64 Warrigal Road, Surrey Hills VIC”
geocodeUrl = "
https://maps.googleapis.com/maps/api/geocode/json?address=#URLEncodedFormat(Address)#
"
cfhttp(url=“#geocodeUrl#” method=“GET” timeout=“3” throwonerror=“No”) {}
WriteDump(cfhttp);
abort;

Exception

org.apache.http.impl.conn.CPool.setValidateAfterInactivity(I)V
java.lang.NoSuchMethodError

Sorry for the vauge error, that’s the only info I could get right now… I
will try to grab a stack trace ASAP.

Can anyone else confirm this?

Regards,
Adam

the war file comes with the new jars, but I assume the old jar files are
also loaded in the system from somewhere else, that is the problem.
we will review that, most likely we will rewrite the war file to use the
old jars to avoid this problem.
You can check your system for the following files:
apache-commons-httpclient.jar
apache-commons-httpcore.jar
apache-commons-httpmime.jar

that are the onces get updated and i’m relatievly sure you have multiple
versions of them in your system.

Micha

p.s. i cannot wait that Lucee 5 get stable and we get rid of all this jar
problems!On Fri, Jul 10, 2015 at 6:32 AM, Adam Chapman <@Adam_Chapman> wrote:

@Micha I have only ever used Tomcat 8 Java 8 (AWS Elastic Beanstalk) with
Lucee. Lucee 4.5.1.000 works, 4.5.1.022 does not. I am deploying using an
unmodified .war file (apart from cfml code) from the Lucee downloads page.

The environment has not changed. Only the Lucee war file.

Is the solution to update the http-client jar files in the AWS platform?

Regards,
Adam

On Friday, July 10, 2015 at 12:57:39 AM UTC+10, John Berquist wrote:

I don’t know why it would be different, but I was using cfhttp directly
with a pre-signed url to get a bucket listing, so maybe that is why it
didn’t work for me :confused:


You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/3d3e47eb-ffe0-48a6-825f-64d1d6de9073%40googlegroups.com
https://groups.google.com/d/msgid/lucee/3d3e47eb-ffe0-48a6-825f-64d1d6de9073%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

@Micha I have only ever used Tomcat 8 Java 8 (AWS Elastic Beanstalk) with
Lucee. Lucee 4.5.1.000 works, 4.5.1.022 does not. I am deploying using an
unmodified .war file (apart from cfml code) from the Lucee downloads page.

The environment has not changed. Only the Lucee war file.

Is the solution to update the http-client jar files in the AWS platform?

Regards,
AdamOn Friday, July 10, 2015 at 12:57:39 AM UTC+10, John Berquist wrote:

I don’t know why it would be different, but I was using cfhttp directly
with a pre-signed url to get a bucket listing, so maybe that is why it
didn’t work for me :confused:

Thanks Micha, So just to confirm, I should try to update the AWS system jars with those in the 4.5.1.022 war file?

+1 for Lucee 5… All the best for getting it stable.

Regards,
Adam

right or better remove the jars from the war, if they already on the system
you don’t need to bundle them in the war.

MichaOn Sat, Jul 11, 2015 at 1:16 PM, Adam Chapman <@Adam_Chapman> wrote:

Thanks Micha, So just to confirm, I should try to update the AWS system
jars with those in the 4.5.1.022 war file?

+1 for Lucee 5… All the best for getting it stable.

Regards,
Adam


You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/aafb3772-6a69-443e-93cb-c6d28331e1d9%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.

I get this on Lucee 4.5.1.022 on Tomcat 7.0.52, Java 1.8.0_45

Lucee 4.5.1.022 Error (javax.net.ssl.SSLPeerUnverifiedException)MessageHost
name ‘maps.googleapis.com’ does not match the certificate subject provided
by the peer (CN=.googleapis.com, O=Google Inc, L=Mountain View,
ST=California, C=US)Causejavax.net.ssl.SSLPeerUnverifiedExceptionurl
https://maps.googleapis.com/maps/api/geocode/json?address=64%20Warrigal%20Road%2C%20Surrey%20Hills%20VICJava
StacktraceHost name ‘maps.googleapis.com’ does not match the certificate
subject provided by the peer (CN=
.googleapis.com, O=Google Inc, L=Mountain
View, ST=California, C=US)
at
org.apache.http.conn.ssl.SSLConnectionSocketFactory.verifyHostname(SSLConnectionSocketFactory.java:465):465
at
org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:395):395
at
org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353):353
at
org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134):134
at
org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353):353
at
org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380):380
at
org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236):236
at
org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184):184
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88):88
at
org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110):110
at
org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184):184
at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82):82
at lucee.runtime.tag.Executor41.execute(Http41.java:1450):1450
at lucee.runtime.tag.Executor41.run(Http41.java:1438):1438
Timestamp7/19/15 8:55:38 PM CEST

This is with the Lucee installed
from http://bitbucket.org/lucee/lucee/downloads/lucee-4.5.1.022-jars.zip.

The http://bitbucket.org/lucee/lucee/downloads/lucee-4.5.1.022-jars.zip
includes Apache HttpClient 4.4.1. The latest version is 4.5.

When I updated to 4.5 the problem was gone.
I downloaded 4.5.tar.gz, extracted and renamed from
httpcomponents-client-4.5/lib
httpclient-4.5.jar → apache-commons-httpclient.jar
httpcore-4.4.1.jar (not updated)
httpmime-4.5.jar → apache-commons-httpmime.jar

Question is, why is 4.5.1.022 shipped with 4.4.1 and not 4.5?On Wednesday, July 8, 2015 at 12:13:44 PM UTC+2, Adam Chapman wrote:

Hi All,

Running this code on Tomcat 7, Java 1.7.0_76 works fine.
Running this code on Tomcat 8, Java 8 throws error below.

Code:

Address = “64 Warrigal Road, Surrey Hills VIC”
geocodeUrl = "
https://maps.googleapis.com/maps/api/geocode/json?address=#URLEncodedFormat(Address)#
"
cfhttp(url=“#geocodeUrl#” method=“GET” timeout=“3” throwonerror=“No”) {}
WriteDump(cfhttp);
abort;

Exception

org.apache.http.impl.conn.CPool.setValidateAfterInactivity(I)V
java.lang.NoSuchMethodError

Sorry for the vauge error, that’s the only info I could get right now… I
will try to grab a stack trace ASAP.

Can anyone else confirm this?

Regards,
Adam