izerui / kaptcha

Automatically exported from code.google.com/p/kaptcha
Other
0 stars 0 forks source link

java.lang.NoSuchMethodError: com.jhlabs.image.RippleFilter.setXAmplitude(F)V #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Attempts to generate captcha image result in the following exception:

org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Captcha threw exception
java.lang.NoSuchMethodError: com.jhlabs.image.RippleFilter.setXAmplitude(F)V
    at
com.google.code.kaptcha.impl.WaterRipple.getDistortedImage(WaterRipple.java:34)
    at
com.google.code.kaptcha.impl.DefaultKaptcha.createImage(DefaultKaptcha.java:44)
    at
com.google.code.kaptcha.servlet.KaptchaServlet.doGet(KaptchaServlet.java:84)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:290)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:2
33)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:1
75)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109
)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Pr
otocol.java:584)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)

What is the expected output? What do you see instead?
No image is getting generated.

What version of the product are you using? On what operating system?
WinXP SP2
Tomcat 6.0
JDK 6
kaptcha 2.3

Please provide any additional information below.
 jcapture is working fine on the same system

thanks.

Original issue reported on code.google.com by divinat...@gmail.com on 2 Aug 2008 at 6:54

GoogleCodeExporter commented 9 years ago
This is an easy one that one day will make a great interview question to see 
how well someone can problem 
solve java issues.

The answer is that jcaptcha already has com.jhlabs.image.* on the classpath and 
that version is a different 
version than the one that Kaptcha expects. Kaptcha expects the latest version 
and jcaptcha is using a much 
older version (according to the jcaptcha pom.xml, it is 
<version>01012005</version>). For convenience, 
Kaptcha includes the latest version of that library in its .jar file for you.

Because both products require different versions of that package, I don't think 
you are going to be able to use  
both jcaptcha and kaptcha concurrently in the same web application. So, just 
dump jcaptcha. =)

Original comment by latch...@gmail.com on 3 Aug 2008 at 4:38

GoogleCodeExporter commented 9 years ago
I had the same problem! Thanks for the information now its working!!!!

Original comment by spideyh2...@gmail.com on 28 Aug 2008 at 9:22

GoogleCodeExporter commented 9 years ago
Hi, I still got this problem although I think I do not have jcaptcha installed. 
can
someone help?

Original comment by adinu...@gmail.com on 6 May 2009 at 5:43

GoogleCodeExporter commented 9 years ago
It has nothing to do with jcaptcha, it has to do with having com.jhlabs.image.* 
in your classpath.

Original comment by latch...@gmail.com on 6 May 2009 at 5:49

GoogleCodeExporter commented 9 years ago
Issue 42 has been merged into this issue.

Original comment by latch...@gmail.com on 13 Oct 2009 at 4:14

GoogleCodeExporter commented 9 years ago
the same happens when you have SimpleCaptcha also installed. 

Original comment by neofo...@gmail.com on 14 Jan 2010 at 3:05

GoogleCodeExporter commented 9 years ago
patient: it hurts when i do that.
dr: don't do that.

Original comment by latch...@gmail.com on 14 Jan 2010 at 6:15

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I had the problem.
And finally I found it's the jar conflict.
Because there is a jcaptcha-all.jar in the lib.

Original comment by bick...@gmail.com on 21 Dec 2012 at 1:45