Caused by: com.octo.captcha.CaptchaException: word is too tall:

13906 단어 exception
com.octo.captcha.CaptchaException: word is too tall: try to use less letters, smaller font or bigger background:  text bounds = {text=294

    java.awt.geom.Rectangle2D$Float[x=0.0,y=-25.134277,w=12.5,h=36.157227] ascent=25.134277 descent=7.507324 leading=3.515625 

    java.awt.geom.Rectangle2D$Float[x=32.5,y=-22.680664,w=16.381836,h=28.125] ascent=22.680664 descent=5.444336 leading=-0.0 

    java.awt.geom.Rectangle2D$Float[x=68.881836,y=-22.680664,w=16.381836,h=28.125] ascent=22.680664 descent=5.444336 leading=-0.0 

    } with fonts {java.awt.Font[family=Trebuchet MS,name=Trebuchet MS Italic,style=bold,size=25]

    java.awt.Font[family=Monospaced,name=Monospaced.bolditalic,style=italic,size=25]

    java.awt.Font[family=Andale Mono,name=Andale Mono,style=bolditalic,size=25]

    } versus image width = 100, height = 40

    at com.octo.captcha.image.gimpy.GimpyFactory.getImageCaptcha(GimpyFactory.java:79)

    at com.octo.captcha.engine.image.ListImageCaptchaEngine.getNextImageCaptcha(ListImageCaptchaEngine.java:128)

    at com.octo.captcha.engine.image.ImageCaptchaEngine.getNextCaptcha(ImageCaptchaEngine.java:52)

    at com.octo.captcha.service.AbstractCaptchaService.generateAndStoreCaptcha(AbstractCaptchaService.java:148)

    at com.octo.captcha.service.AbstractManageableCaptchaService.generateCountTimeStampAndStoreCaptcha(AbstractManageableCaptchaService.java:340)

    at com.octo.captcha.service.AbstractManageableCaptchaService.generateAndStoreCaptcha(AbstractManageableCaptchaService.java:329)

    at com.octo.captcha.service.AbstractCaptchaService.getChallengeForID(AbstractCaptchaService.java:64)

    at com.octo.captcha.service.image.AbstractManageableImageCaptchaService.getImageChallengeForID(AbstractManageableImageCaptchaService.java:62)

    at com.fcms.common.checkcode.ImageCaptchaServlet.doGet(ImageCaptchaServlet.java:44)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

    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:298)

    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)

    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

    at java.lang.Thread.run(Thread.java:619)

Caused by: com.octo.captcha.CaptchaException: word is too tall: try to use less letters, smaller font or bigger background:  text bounds = {text=294

    java.awt.geom.Rectangle2D$Float[x=0.0,y=-25.134277,w=12.5,h=36.157227] ascent=25.134277 descent=7.507324 leading=3.515625 

    java.awt.geom.Rectangle2D$Float[x=32.5,y=-22.680664,w=16.381836,h=28.125] ascent=22.680664 descent=5.444336 leading=-0.0 

    java.awt.geom.Rectangle2D$Float[x=68.881836,y=-22.680664,w=16.381836,h=28.125] ascent=22.680664 descent=5.444336 leading=-0.0 

    } with fonts {java.awt.Font[family=Trebuchet MS,name=Trebuchet MS Italic,style=bold,size=25]

    java.awt.Font[family=Monospaced,name=Monospaced.bolditalic,style=italic,size=25]

    java.awt.Font[family=Andale Mono,name=Andale Mono,style=bolditalic,size=25]

    } versus image width = 100, height = 40

    at com.octo.captcha.component.image.textpaster.ChangeableAttributedString.moveToRandomSpot(ChangeableAttributedString.java:184)

    at com.octo.captcha.component.image.textpaster.ChangeableAttributedString.moveToRandomSpot(ChangeableAttributedString.java:111)

    at com.octo.captcha.component.image.textpaster.DecoratedRandomTextPaster.pasteText(DecoratedRandomTextPaster.java:82)

    at com.octo.captcha.component.image.wordtoimage.ComposedWordToImage.pasteText(ComposedWordToImage.java:130)

    at com.octo.captcha.component.image.wordtoimage.AbstractWordToImage.getImage(AbstractWordToImage.java:52)

    at com.octo.captcha.image.gimpy.GimpyFactory.getImageCaptcha(GimpyFactory.java:77)

    ... 22 more

2013-4-22 17:13:00 org.apache.catalina.core.StandardWrapperValve invoke

 : Servlet.service() for servlet jcaptcha threw exception

com.octo.captcha.CaptchaException: word is too tall: try to use less letters, smaller font or bigger background:  text bounds = {text=1833

    java.awt.geom.Rectangle2D$Float[x=0.0,y=-25.134277,w=15.002441,h=36.157227] ascent=25.134277 descent=7.507324 leading=3.515625 

    java.awt.geom.Rectangle2D$Float[x=35.00244,y=-26.97754,w=14.404297,h=33.251953] ascent=26.97754 descent=6.274414 leading=-0.0 

    java.awt.geom.Rectangle2D$Float[x=69.40674,y=-23.205566,w=15.05127,h=29.101562] ascent=23.205566 descent=5.895996 leading=-0.0 

    java.awt.geom.Rectangle2D$Float[x=104.45801,y=-23.205566,w=15.05127,h=29.101562] ascent=23.205566 descent=5.895996 leading=-0.0 

    } with fonts {java.awt.Font[family=Lucida Bright,name=Lucida Bright Demibold Italic,style=italic,size=25]

    java.awt.Font[family=DialogInput,name=DialogInput.italic,style=bold,size=25]

    java.awt.Font[family=Segoe UI,name=Segoe UI,style=bolditalic,size=25]

    java.awt.Font[family=Bitstream Vera Sans Mono,name=Bitstream Vera Sans Mono,style=bolditalic,size=25]

    } versus image width = 100, height = 40

    at com.octo.captcha.image.gimpy.GimpyFactory.getImageCaptcha(GimpyFactory.java:79)

    at com.octo.captcha.engine.image.ListImageCaptchaEngine.getNextImageCaptcha(ListImageCaptchaEngine.java:128)

    at com.octo.captcha.engine.image.ImageCaptchaEngine.getNextCaptcha(ImageCaptchaEngine.java:52)

    at com.octo.captcha.service.AbstractCaptchaService.generateAndStoreCaptcha(AbstractCaptchaService.java:148)

    at com.octo.captcha.service.AbstractManageableCaptchaService.generateCountTimeStampAndStoreCaptcha(AbstractManageableCaptchaService.java:340)

    at com.octo.captcha.service.AbstractManageableCaptchaService.generateAndStoreCaptcha(AbstractManageableCaptchaService.java:329)

    at com.octo.captcha.service.AbstractCaptchaService.getChallengeForID(AbstractCaptchaService.java:64)

    at com.octo.captcha.service.image.AbstractManageableImageCaptchaService.getImageChallengeForID(AbstractManageableImageCaptchaService.java:62)

    at com.fcms.common.checkcode.ImageCaptchaServlet.doGet(ImageCaptchaServlet.java:44)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

    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:298)

    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)

    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

    at java.lang.Thread.run(Thread.java:619)

Caused by: com.octo.captcha.CaptchaException: word is too tall: try to use less letters, smaller font or bigger background:  text bounds = {text=1833

    java.awt.geom.Rectangle2D$Float[x=0.0,y=-25.134277,w=15.002441,h=36.157227] ascent=25.134277 descent=7.507324 leading=3.515625 

    java.awt.geom.Rectangle2D$Float[x=35.00244,y=-26.97754,w=14.404297,h=33.251953] ascent=26.97754 descent=6.274414 leading=-0.0 

    java.awt.geom.Rectangle2D$Float[x=69.40674,y=-23.205566,w=15.05127,h=29.101562] ascent=23.205566 descent=5.895996 leading=-0.0 

    java.awt.geom.Rectangle2D$Float[x=104.45801,y=-23.205566,w=15.05127,h=29.101562] ascent=23.205566 descent=5.895996 leading=-0.0 

    } with fonts {java.awt.Font[family=Lucida Bright,name=Lucida Bright Demibold Italic,style=italic,size=25]

    java.awt.Font[family=DialogInput,name=DialogInput.italic,style=bold,size=25]

    java.awt.Font[family=Segoe UI,name=Segoe UI,style=bolditalic,size=25]

    java.awt.Font[family=Bitstream Vera Sans Mono,name=Bitstream Vera Sans Mono,style=bolditalic,size=25]

    } versus image width = 100, height = 40

    at com.octo.captcha.component.image.textpaster.ChangeableAttributedString.moveToRandomSpot(ChangeableAttributedString.java:184)

    at com.octo.captcha.component.image.textpaster.ChangeableAttributedString.moveToRandomSpot(ChangeableAttributedString.java:111)

    at com.octo.captcha.component.image.textpaster.DecoratedRandomTextPaster.pasteText(DecoratedRandomTextPaster.java:82)

    at com.octo.captcha.component.image.wordtoimage.ComposedWordToImage.pasteText(ComposedWordToImage.java:130)

    at com.octo.captcha.component.image.wordtoimage.AbstractWordToImage.getImage(AbstractWordToImage.java:52)

    at com.octo.captcha.image.gimpy.GimpyFactory.getImageCaptcha(GimpyFactory.java:77)

코드가 너무 길어요.이 오류는 매우 드물지만 html에서freemarker 라벨을 사용하면 쉽게 나타날 수 있습니다. 특히 백그라운드에서 수정해야 할 필드도 많습니다.
유사한 문제에 부딪히면 IDE는 때때로 오류를 보고할 수도 있고 때때로 그렇지 않을 수도 있지만, 기존의 코드를 온라인 서버에 발표하면 모두 해석하고 표시할 수 있다.
그러면 코드 처리의 논리에 따라 2차 개발, 삭제 기능을 진행할 수 있다.적어도 당분간은 더 좋은 해결 방법을 찾지 못했어!

좋은 웹페이지 즐겨찾기