java.lang.NoSuchMethodError

72 views
Skip to first unread message

David Repas

unread,
Nov 9, 2015, 8:17:18 PM11/9/15
to Lucee
Hello -

I'm running Lucee 4.5.2.018 on AWS Elastic Beanstalk. When using the 64bit Amazon Linux 2015.03 v2.0.1 running Tomcat 8 Java 8 environment, everything works fine. But, when utilizing the most recent version, 64bit Amazon Linux 2015.09 v2.0.4 running Tomcat 8 Java 8 - I receive the following error:

java.lang.NoSuchMethodError
org.apache.http.entity.StringEntity.<init>(Ljava/lang/String;Lorg/apache/http/entity/ContentType;)V

It appears that cfhttp calls (twilio, etc.) are causing the error.

This doesn't appear to be related to Lucee versions, per se, since it also occurs on the previous Lucee stable version. I know there have been some challenges with cfhttp lately, so I'm not sure if this is also related.

Any thoughts?

Thanks.

Sean Daniels

unread,
Nov 10, 2015, 8:15:56 AM11/10/15
to lu...@googlegroups.com
I ran into this error when I was trying to get a workaround for this issue:

https://luceeserver.atlassian.net/browse/LDEV-429

The solution was to replace all three http related jars with the ones I reference in the comments.
> --
> Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html
> ---
> 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/bac36f59-f8c2-4b5b-88fc-f246f9ee3a64%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Andrew Dixon

unread,
Nov 10, 2015, 8:19:18 AM11/10/15
to lu...@googlegroups.com
Hi David,

If you upgraded from 4.5.1.xxx you need to perform the "optional step" in the release notes:


Kind regards,

Andrew

David Repas

unread,
Nov 10, 2015, 3:50:24 PM11/10/15
to Lucee
Thanks for the suggestions.

Unfortunately, that didn't seem to help. After a bunch of trial and error, I did find something that appeared to fix the issue. There's a related post by Micha about possibly just removing those jars if they are already loaded in the system.


So, I removed all 3 of them, but that didn't work - received some sort of mime error. Then I tried leaving "apache-commons-httpmime.jar", but removed the other 2.

And surprise, that works.

I'm not sure why the "Amazon Linux 2015.09 v2.0.4 running Tomcat 8 Java 8" environment has the problem, but "Amazon Linux 2015.03 v2.0.1 running Tomcat 8 Java 8" does not.

Anyway, hopefully this will help someone down the road.

David
Reply all
Reply to author
Forward
0 new messages