cfhttp error in 4.5.1.022 on Java 8

1,929 views
Skip to first unread message

Adam Chapman

unread,
Jul 8, 2015, 6:13:44 AM7/8/15
to lu...@googlegroups.com
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"
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

Adam Chapman

unread,
Jul 8, 2015, 6:19:33 AM7/8/15
to lu...@googlegroups.com
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

Julian Halliwell

unread,
Jul 8, 2015, 8:46:59 AM7/8/15
to lu...@googlegroups.com
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.

Adam Chapman

unread,
Jul 8, 2015, 6:50:48 PM7/8/15
to lu...@googlegroups.com
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,
Adam

Michael Offner

unread,
Jul 9, 2015, 2:29:59 AM7/9/15
to lucee
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.


 

--
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+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/830c6662-ec58-4033-84be-e48667f91736%40googlegroups.com.

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

Konstantinos Liakos

unread,
Jul 9, 2015, 10:03:45 AM7/9/15
to lu...@googlegroups.com

John Berquist

unread,
Jul 9, 2015, 10:32:40 AM7/9/15
to lu...@googlegroups.com
Using Lucee 4.5.1.022 and the updated jars referenced in https://luceeserver.atlassian.net/browse/LDEV-292, 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

Konstantinos Liakos

unread,
Jul 9, 2015, 10:36:43 AM7/9/15
to lu...@googlegroups.com
Using Lucee 4.5.1.022 and the updated jars referenced in https://luceeserver.atlassian.net/browse/LDEV-292, 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.

John Berquist

unread,
Jul 9, 2015, 10:43:43 AM7/9/15
to lu...@googlegroups.com
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?

Konstantinos Liakos

unread,
Jul 9, 2015, 10:48:46 AM7/9/15
to lu...@googlegroups.com
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.

John Berquist

unread,
Jul 9, 2015, 10:57:39 AM7/9/15
to lu...@googlegroups.com
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 :/

Adam Chapman

unread,
Jul 10, 2015, 12:32:44 AM7/10/15
to lu...@googlegroups.com
@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

Michael Offner

unread,
Jul 10, 2015, 5:51:32 AM7/10/15
to lucee
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!

--
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+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

Adam Chapman

unread,
Jul 11, 2015, 7:16:09 AM7/11/15
to lu...@googlegroups.com
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

Michael Offner

unread,
Jul 13, 2015, 3:10:48 AM7/13/15
to lucee
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.

Micha

--
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+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

Jonathan van Zuijlekom

unread,
Jul 19, 2015, 3:14:37 PM7/19/15
to lu...@googlegroups.com
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.SSLPeerUnverifiedException
urlhttps://maps.googleapis.com/maps/api/geocode/json?address=64%20Warrigal%20Road%2C%20Surrey%20Hills%20VIC
Java 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



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?
Reply all
Reply to author
Forward
0 new messages