草庐IT

Java 1.8u20 无法启动 spring boot 和 groovy 2.3.7

coder 2024-04-01 原文

我刚刚将 java 更新到 1.8u20 现在我得到了这个异常,我在使用 Java 1.8u05 时没有得到 我正在使用最新的 spring boot 1.18 和 groovy 2.3.7 indy。

有人知道这是 java、spring 还是 groovy 的问题吗?

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validationController': Injection of autowired dependencies failed; 
nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.lang.Object io.demo.online.service.ValidationController.MappingJackson2JsonView; 
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'viewResolver' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]: Initialization of bean failed; 
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'groovyTemplateViewResolver' defined in class path resource [org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAutoConfiguration$GroovyWebConfiguration.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [groovy.text.TemplateEngine]: : Error creating bean with name 'groovyTemplateEngine' defined in class path resource [org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAutoConfiguration$GroovyMarkupConfiguration.class]: Instantiation of bean failed; 
nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public groovy.text.TemplateEngine org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAutoConfiguration$GroovyMarkupConfiguration.groovyTemplateEngine() throws java.lang.Exception] threw exception; nested exception is java.lang.VerifyError: Bad <init> method call from inside of a branch
Exception Details:
  Location:
    org/codehaus/groovy/control/customizers/ASTTransformationCustomizer.<init>(Ljava/lang/Class;)V @155: invokespecial
  Reason:
    Error exists in the bytecode
  Bytecode:
    0x0000000: 05bd 006c 5903 2b53 5904 2bba 0071 0000
    0x0000010: 5359 10ff 1202 b800 772a 5fab 0000 0182
    0x0000020: 0000 000a b951 be33 0000 0059 bd3c 11f8
    0x0000030: 0000 0086 e4d2 7468 0000 00aa f226 4f65
    0x0000040: 0000 00bc 1cb4 ddcd 0000 00ce 224d 0e57
    0x0000050: 0000 00e9 4441 e4ca 0000 010d 4c34 1502
    0x0000060: 0000 0128 589a 5432 0000 0143 6648 e9fd
    0x0000070: 0000 015e 5f5a 5903 32ba 0080 0000 5f59
    0x0000080: 0432 ba00 4300 005f 5905 32ba 0083 0000
    0x0000090: 5f59 0632 ba00 8600 005f 57b7 0089 a701
    0x00000a0: 095f 5a59 0332 ba00 4300 005f 5904 32ba
    0x00000b0: 0083 0000 5f59 0532 ba00 8600 005f 57b7
    0x00000c0: 008b a700 e55f 5a59 0332 ba00 4300 005f
    0x00000d0: 57b7 008e a700 d35f 5a59 0332 ba00 4b00
    0x00000e0: 005f 57b7 0091 a700 c15f 5a59 0332 ba00
    0x00000f0: 8000 005f 5904 32ba 0043 0000 5f57 b700
    0x0000100: 94a7 00a6 5f5a 5903 32ba 0080 0000 5f59
    0x0000110: 0432 ba00 4300 005f 5905 32ba 0083 0000
    0x0000120: 5f57 b700 97a7 0082 5f5a 5903 32ba 0080
    0x0000130: 0000 5f59 0432 ba00 4b00 005f 57b7 009a
    0x0000140: a700 675f 5a59 0332 ba00 4300 005f 5904
    0x0000150: 32ba 0086 0000 5f57 b700 9da7 004c 5f5a
    0x0000160: 5903 32ba 0043 0000 5f59 0432 ba00 8300
    0x0000170: 005f 57b7 009f a700 315f 5a59 0332 ba00
    0x0000180: 8000 005f 5904 32ba 0043 0000 5f59 0532
    0x0000190: ba00 8600 005f 57b7 00a2 a700 0dbb 00a4
    0x00001a0: 5912 a6b7 00a9 bf57 b1                 
  Stackmap Table:
    full_frame(@116,{UninitializedThis,Object[#121]},{Object[#125],UninitializedThis})
    full_frame(@161,{UninitializedThis,Object[#121]},{Object[#125],UninitializedThis})
    full_frame(@197,{UninitializedThis,Object[#121]},{Object[#125],UninitializedThis})
    full_frame(@215,{UninitializedThis,Object[#121]},{Object[#125],UninitializedThis})
    full_frame(@233,{UninitializedThis,Object[#121]},{Object[#125],UninitializedThis})
    full_frame(@260,{UninitializedThis,Object[#121]},{Object[#125],UninitializedThis})
    full_frame(@296,{UninitializedThis,Object[#121]},{Object[#125],UninitializedThis})
    full_frame(@323,{UninitializedThis,Object[#121]},{Object[#125],UninitializedThis})
    full_frame(@350,{UninitializedThis,Object[#121]},{Object[#125],UninitializedThis})
    full_frame(@377,{UninitializedThis,Object[#121]},{Object[#125],UninitializedThis})
    full_frame(@413,{UninitializedThis,Object[#121]},{Object[#125],UninitializedThis})
    full_frame(@423,{Object[#2],Object[#121]},{Object[#125]})

这是所有依赖项的列表

runtime - Runtime classpath for source set 'main'.
+--- org.codehaus.groovy:groovy-all:2.3.7
+--- org.springframework.boot:spring-boot-starter-actuator:1.1.8.RELEASE
|    +--- org.springframework.boot:spring-boot-starter:1.1.8.RELEASE
|    |    +--- org.springframework.boot:spring-boot:1.1.8.RELEASE
|    |    |    +--- org.springframework:spring-core:4.0.7.RELEASE
|    |    |    \--- org.springframework:spring-context:4.0.7.RELEASE
|    |    |         +--- org.springframework:spring-aop:4.0.7.RELEASE
|    |    |         |    +--- aopalliance:aopalliance:1.0
|    |    |         |    +--- org.springframework:spring-beans:4.0.7.RELEASE
|    |    |         |    |    \--- org.springframework:spring-core:4.0.7.RELEASE
|    |    |         |    \--- org.springframework:spring-core:4.0.7.RELEASE
|    |    |         +--- org.springframework:spring-beans:4.0.7.RELEASE (*)
|    |    |         +--- org.springframework:spring-core:4.0.7.RELEASE
|    |    |         \--- org.springframework:spring-expression:4.0.7.RELEASE
|    |    |              \--- org.springframework:spring-core:4.0.7.RELEASE
|    |    +--- org.springframework.boot:spring-boot-autoconfigure:1.1.8.RELEASE
|    |    |    \--- org.springframework.boot:spring-boot:1.1.8.RELEASE (*)
|    |    +--- org.springframework.boot:spring-boot-starter-logging:1.1.8.RELEASE
|    |    |    +--- org.slf4j:jcl-over-slf4j:1.7.7
|    |    |    |    \--- org.slf4j:slf4j-api:1.7.7
|    |    |    +--- org.slf4j:jul-to-slf4j:1.7.7
|    |    |    |    \--- org.slf4j:slf4j-api:1.7.7
|    |    |    +--- org.slf4j:log4j-over-slf4j:1.7.7
|    |    |    |    \--- org.slf4j:slf4j-api:1.7.7
|    |    |    \--- ch.qos.logback:logback-classic:1.1.2
|    |    |         +--- ch.qos.logback:logback-core:1.1.2
|    |    |         \--- org.slf4j:slf4j-api:1.7.6 -> 1.7.7
|    |    +--- org.springframework:spring-core:4.0.7.RELEASE
|    |    \--- org.yaml:snakeyaml:1.13
|    +--- org.springframework.boot:spring-boot-actuator:1.1.8.RELEASE
|    |    +--- org.springframework.boot:spring-boot:1.1.8.RELEASE (*)
|    |    +--- org.springframework.boot:spring-boot-autoconfigure:1.1.8.RELEASE (*)
|    |    +--- com.fasterxml.jackson.core:jackson-databind:2.3.4
|    |    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.3.0
|    |    |    \--- com.fasterxml.jackson.core:jackson-core:2.3.4
|    |    +--- org.springframework:spring-core:4.0.7.RELEASE
|    |    \--- org.springframework:spring-context:4.0.7.RELEASE (*)
|    \--- org.springframework:spring-core:4.0.7.RELEASE
+--- org.springframework.boot:spring-boot-starter-web:1.1.8.RELEASE
|    +--- org.springframework.boot:spring-boot-starter:1.1.8.RELEASE (*)
|    +--- com.fasterxml.jackson.core:jackson-databind:2.3.4 (*)
|    +--- org.hibernate:hibernate-validator:5.0.3.Final -> 5.1.2.Final
|    |    +--- javax.validation:validation-api:1.1.0.Final
|    |    +--- org.jboss.logging:jboss-logging:3.1.3.GA
|    |    \--- com.fasterxml:classmate:1.0.0
|    +--- org.springframework:spring-core:4.0.7.RELEASE
|    +--- org.springframework:spring-web:4.0.7.RELEASE
|    |    +--- org.springframework:spring-aop:4.0.7.RELEASE (*)
|    |    +--- org.springframework:spring-beans:4.0.7.RELEASE (*)
|    |    +--- org.springframework:spring-context:4.0.7.RELEASE (*)
|    |    \--- org.springframework:spring-core:4.0.7.RELEASE
|    \--- org.springframework:spring-webmvc:4.0.7.RELEASE
|         +--- org.springframework:spring-beans:4.0.7.RELEASE (*)
|         +--- org.springframework:spring-context:4.0.7.RELEASE (*)
|         +--- org.springframework:spring-core:4.0.7.RELEASE
|         +--- org.springframework:spring-expression:4.0.7.RELEASE (*)
|         \--- org.springframework:spring-web:4.0.7.RELEASE (*)
+--- org.eclipse.jetty:jetty-webapp:9.2.0.v20140526
|    +--- org.eclipse.jetty:jetty-xml:9.2.0.v20140526
|    |    \--- org.eclipse.jetty:jetty-util:9.2.0.v20140526
|    \--- org.eclipse.jetty:jetty-servlet:9.2.0.v20140526
|         \--- org.eclipse.jetty:jetty-security:9.2.0.v20140526
|              \--- org.eclipse.jetty:jetty-server:9.2.0.v20140526
|                   +--- javax.servlet:javax.servlet-api:3.1.0
|                   +--- org.eclipse.jetty:jetty-http:9.2.0.v20140526
|                   |    \--- org.eclipse.jetty:jetty-util:9.2.0.v20140526
|                   \--- org.eclipse.jetty:jetty-io:9.2.0.v20140526
|                        \--- org.eclipse.jetty:jetty-util:9.2.0.v20140526
+--- org.eclipse.jetty:jetty-jsp:9.2.0.v20140526
|    +--- org.eclipse.jetty.toolchain:jetty-schemas:3.1.M0
|    +--- javax.servlet:javax.servlet-api:3.1.0
|    +--- javax.servlet.jsp:javax.servlet.jsp-api:2.3.1
|    +--- org.glassfish.web:javax.servlet.jsp:2.3.2
|    |    +--- org.glassfish:javax.el:[3.0.0,) -> 3.0.1-b05
|    |    \--- javax.servlet.jsp:javax.servlet.jsp-api:2.3.1
|    +--- org.eclipse.jetty.orbit:javax.servlet.jsp.jstl:1.2.0.v201105211821
|    +--- org.glassfish.web:javax.servlet.jsp.jstl:1.2.2
|    +--- org.glassfish:javax.el:3.0.0 -> 3.0.1-b05
|    \--- org.eclipse.jetty.orbit:org.eclipse.jdt.core:3.8.2.v20130121
+--- org.eclipse.jetty:jetty-servlets:9.2.0.v20140526
|    +--- org.eclipse.jetty:jetty-continuation:9.2.0.v20140526
|    +--- org.eclipse.jetty:jetty-http:9.2.0.v20140526 (*)
|    +--- org.eclipse.jetty:jetty-util:9.2.0.v20140526
|    \--- org.eclipse.jetty:jetty-io:9.2.0.v20140526 (*)
+--- org.springframework:spring-aspects:4.0.7.RELEASE
|    \--- org.aspectj:aspectjweaver:1.8.2
+--- javax.inject:javax.inject:1
+--- commons-io:commons-io:2.4
+--- xmlunit:xmlunit:1.5
+--- com.google.guava:guava:18.0
\--- org.hibernate:hibernate-validator:5.1.2.Final (*)

我可以在 linux 和 macos 上重现这个错误。

最佳答案

不幸的是,JDK 1.8u20 有几个 validator 错误,这使得它与 groovy 不兼容。您应该尝试使用 1.8u5 或最新的 EAP 8u40。

关于Java 1.8u20 无法启动 spring boot 和 groovy 2.3.7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26324084/

有关Java 1.8u20 无法启动 spring boot 和 groovy 2.3.7的更多相关文章

  1. ruby-on-rails - 由于 "wkhtmltopdf",PDFKIT 显然无法正常工作 - 2

    我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-

  2. ruby-on-rails - 无法使用 Rails 3.2 创建插件? - 2

    我对最新版本的Rails有疑问。我创建了一个新应用程序(railsnewMyProject),但我没有脚本/生成,只有脚本/rails,当我输入ruby./script/railsgeneratepluginmy_plugin"Couldnotfindgeneratorplugin.".你知道如何生成插件模板吗?没有这个命令可以创建插件吗?PS:我正在使用Rails3.2.1和ruby​​1.8.7[universal-darwin11.0] 最佳答案 随着Rails3.2.0的发布,插件生成器已经被移除。查看变更日志here.现在

  3. ruby - 无法运行 Rails 2.x 应用程序 - 2

    我尝试运行2.x应用程序。我使用rvm并为此应用程序设置其他版本的ruby​​:$rvmuseree-1.8.7-head我尝试运行服务器,然后出现很多错误:$script/serverNOTE:Gem.source_indexisdeprecated,useSpecification.Itwillberemovedonorafter2011-11-01.Gem.source_indexcalledfrom/Users/serg/rails_projects_terminal/work_proj/spohelp/config/../vendor/rails/railties/lib/r

  4. ruby-on-rails - 无法在centos上安装therubyracer(V8和GCC出错) - 2

    我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e

  5. ruby - 无法让 RSpec 工作—— 'require' : cannot load such file - 2

    我花了三天的时间用头撞墙,试图弄清楚为什么简单的“rake”不能通过我的规范文件。如果您遇到这种情况:任何文件夹路径中都不要有空格!。严重地。事实上,从现在开始,您命名的任何内容都没有空格。这是我的控制台输出:(在/Users/*****/Desktop/LearningRuby/learn_ruby)$rake/Users/*******/Desktop/LearningRuby/learn_ruby/00_hello/hello_spec.rb:116:in`require':cannotloadsuchfile--hello(LoadError) 最佳

  6. java - 等价于 Java 中的 Ruby Hash - 2

    我真的很习惯使用Ruby编写以下代码:my_hash={}my_hash['test']=1Java中对应的数据结构是什么? 最佳答案 HashMapmap=newHashMap();map.put("test",1);我假设? 关于java-等价于Java中的RubyHash,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/22737685/

  7. ruby - 无法覆盖 irb 中的 to_s - 2

    我在pry中定义了一个函数:to_s,但我无法调用它。这个方法去哪里了,怎么调用?pry(main)>defto_spry(main)*'hello'pry(main)*endpry(main)>to_s=>"main"我的ruby版本是2.1.2看了一些答案和搜索后,我认为我得到了正确的答案:这个方法用在什么地方?在irb或pry中定义方法时,会转到Object.instance_methods[1]pry(main)>defto_s[1]pry(main)*'hello'[1]pry(main)*end=>:to_s[2]pry(main)>defhello[2]pry(main)

  8. ruby - 无法在 60 秒内获得稳定的 Firefox 连接 (127.0.0.1 :7055) - 2

    我使用的是Firefox版本36.0.1和Selenium-Webdrivergem版本2.45.0。我能够创建Firefox实例,但无法使用脚本继续进行进一步的操作无法在60秒内获得稳定的Firefox连接(127.0.0.1:7055)错误。有人能帮帮我吗? 最佳答案 我遇到了同样的问题。降级到firefoxv33后一切正常。您可以找到旧版本here 关于ruby-无法在60秒内获得稳定的Firefox连接(127.0.0.1:7055),我们在StackOverflow上找到一个类

  9. ruby - 安装 Ruby 时遇到问题(无法下载资源 "readline--patch") - 2

    当我尝试安装Ruby时遇到此错误。我试过查看this和this但无济于事➜~brewinstallrubyWarning:YouareusingOSX10.12.Wedonotprovidesupportforthispre-releaseversion.Youmayencounterbuildfailuresorotherbreakages.Pleasecreatepull-requestsinsteadoffilingissues.==>Installingdependenciesforruby:readline,libyaml,makedepend==>Installingrub

  10. ruby-on-rails - 无法让 rspec、spork 和调试器正常运行 - 2

    GivenIamadumbprogrammerandIamusingrspecandIamusingsporkandIwanttodebug...mmm...let'ssaaay,aspecforPhone.那么,我应该把“require'ruby-debug'”行放在哪里,以便在phone_spec.rb的特定点停止处理?(我所要求的只是一个大而粗的箭头,即使是一个有挑战性的程序员也能看到:-3)我已经尝试了很多位置,除非我没有正确测试它们,否则会发生一些奇怪的事情:在spec_helper.rb中的以下位置:require'rubygems'require'spork'

随机推荐