gpt4 book ai didi

grails - java.lang.NoSuchMethodError:com.lowagie.text.pdf.BaseFont.getCharBBox(C)[I

转载 作者:行者123 更新时间:2023-12-02 15:00:09 26 4
gpt4 key购买 nike

我使用的是grails 2.3.7。我在这个地方感到震惊。花了很多时间找到解决方案,但我不知道可以解决我的问题。

   2015-10-12 14:15:08,908 ERROR [http-nio-8080-exec-5]     
GrailsExceptionResolver.error(213) | NoSuchMethodError occurred when
processing request: [GET] /dispatch/renderAsPdf/3621410

com.lowagie.text.pdf.BaseFont.getCharBBox(C)[I. Stacktrace follows:
org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Executing action [renderAsPdf] of controller
[com.mymodelorder.model.DispatchController] caused exception: Runtime error executing action
at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:198)
at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
at grails.plugin.multitenant.core.servlet.CurrentTenantServletFilter.doFilter(CurrentTenantServletFilter.java:53)
at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53)
at grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter.doFilter(RequestHolderAuthenticationFilter.java:49)
at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:82)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Runtime error executing action
... 9 more
Caused by: java.lang.reflect.InvocationTargetException
... 9 more
Caused by: java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox(C)[I
at org.xhtmlrenderer.pdf.ITextFontResolver$FontDescription.setMetricDefaults(ITextFontResolver.java:679)
at org.xhtmlrenderer.pdf.ITextFontResolver$FontDescription.<init>(ITextFontResolver.java:610)
at org.xhtmlrenderer.pdf.ITextFontResolver.addCourier(ITextFontResolver.java:410)
at org.xhtmlrenderer.pdf.ITextFontResolver.createInitialFontMap(ITextFontResolver.java:390)
at org.xhtmlrenderer.pdf.ITextFontResolver.<init>(ITextFontResolver.java:52)
at org.xhtmlrenderer.pdf.ITextRenderer.<init>(ITextRenderer.java:115)
at org.xhtmlrenderer.pdf.ITextRenderer.<init>(ITextRenderer.java:102)
at grails.plugin.rendering.pdf.PdfRenderingService.doRender(PdfRenderingService.groovy:34)

下面是 BuildConfig.groovy
  repositories {
inherits false // Whether to inherit repository definitions from plugins
grailsPlugins()
grailsHome()
grailsCentral()
mavenLocal()
mavenCentral()
mavenRepo "http://snapshots.repository.codehaus.org"
mavenRepo "http://repository.codehaus.org"
mavenRepo "http://download.java.net/maven/2/"
mavenRepo "http://repository.jboss.com/maven2/"
mavenRepo "http://mvnrepository.com/"
mavenRepo "http://repo.grails.org/grails/core"
mavenRepo "https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo"
mavenRepo "http://repo.spring.io/milestone/"
}

dependencies {
runtime 'mysql:mysql-connector-java:5.1.27'
compile 'com.paypal.sdk:adaptivepaymentssdk:2.5.106'
compile 'org.codehaus.groovy.modules.http-builder:http-builder:0.7'
compile 'commons-beanutils:commons-beanutils:1.8.3'
}


plugins {
build ":tomcat:7.0.52.1"
compile ":scaffolding:2.0.2"
compile ':cache:1.1.1'
runtime ":hibernate:3.6.10.9" // or ":hibernate4:4.3.4"
runtime ":database-migration:1.4.0"
runtime ":jquery:1.11.1"
runtime ":resources:1.2.8"

compile ":spring-security-core:2.0-RC4"
compile ":multi-tenant-single-db:0.8.3"
compile ":famfamfam:1.0.1"
compile ":spring-security-ui:1.0-RC2"
compile ":joda-time:1.5"

runtime ":zipped-resources:1.0.1"
runtime ":cached-resources:1.1"
compile ":cache-headers:1.1.5"
compile ":simple-captcha:1.0.0"
compile ":cache:1.1.7"
compile ":webxml:1.4.1"
compile ":easygrid:1.4.5"
compile ":jquery-ui:1.10.3"
compile ":calendar:1.2.1"
compile ":file-uploader:1.2.1"
compile ":csv:0.3.1"
compile ":paypal:0.6.8"
compile ":rendering:1.0.0"
/*runtime( "org.grails.plugins:rendering:1.0.0") {
excludes "itext"
}*/
compile ":aws:1.7.5.0"
compile ":remote-pagination:0.4.8"
compile ":drop-box:1.3.1"

compile ':spring-security-oauth:2.1.0-SNAPSHOT'
compile ":spring-security-oauth-google:0.3.1"
compile ':spring-security-oauth-facebook:0.1'
compile ':spring-security-oauth-linkedin:0.1'
compile ':spring-security-oauth-twitter:0.1'
}

当我使用 dependency-report 命令时,我发现以下与itext版本有关的详细信息。
+--- org.grails:grails-docs:2.3.7
| \--- org.xhtmlrenderer:core-renderer:R8
| \--- org.yaml:snakeyaml:1.8
| \--- org.grails:grails-gdoc-engine:1.0.1
| \--- com.lowagie:itext:2.0.8
| \--- bouncycastle:bcmail-jdk14:138
| \--- bouncycastle:bcprov-jdk14:138
| \--- commons-lang:commons-lang:2.6

+--- org.grails.plugins:rendering:1.0.0
| \--- org.xhtmlrenderer:core-renderer:R8
| \--- com.lowagie:itext:2.1.0
| \--- bouncycastle:bcmail-jdk14:136
| \--- bouncycastle:bcprov-jdk14:136

我不明白为什么这个错误来得早,它可以正常工作,但是
现在给像上面提到的类似itext版本的错误。

请帮帮我。

最佳答案

您可以通过从其中一个插件中排除itext依赖性来解决问题。就我而言,冲突的插件是exportrendering

我决定像这样从export插件中排除它:
compile (':export:1.6') { excludes 'itext', 'itext-rtf' }

关于grails - java.lang.NoSuchMethodError:com.lowagie.text.pdf.BaseFont.getCharBBox(C)[I,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33085664/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com