0

我们在我们的 ubuntu CI 服务器 Java 7 上运行 play 1.2.4( mbknor-3版本)。

今天,不知何故,我们开始在所有分支上都出现这些错误,即使是那些没有提交代码并且之前的构建已成功完成的分支。

当我这样做时,错误正在发生play start,然后curl localhost:9000。我已经尝试运行play cleanandplay deps --sync并重新启动服务器,并且还验证了服务器没有用完硬盘空间。

知道是什么原因造成的吗?如何调试它?

2012-06-11 08:47:51,255 INFO  (play) ~ Starting /home/ubuntu/programs/teamcity/buildAgent/work/a9561c50f06f33d5/portal/src
2012-06-11 08:47:51,259 INFO  (play) ~ Module less is available (/home/ubuntu/programs/teamcity/buildAgent/work/a9561c50f06f33d5/portal/src/modules/less-0.9)
2012-06-11 08:47:51,260 INFO  (play) ~ Module secure is available (/home/ubuntu/programs/play/play-1.2.4-mbknor-3/modules/secure)
2012-06-11 08:47:51,261 INFO  (play) ~ Module crud is available (/home/ubuntu/programs/play/play-1.2.4-mbknor-3/modules/crud)
2012-06-11 08:47:53,608 DEBUG (com.asual.lesscss.LessEngine) ~ Initializing LESS Engine.
2012-06-11 08:47:53,945 DEBUG (com.asual.lesscss.LessEngine) ~ Using implementation version: Rhino 1.7 release 3 2011 07 19
2012-06-11 08:47:55,396 WARN  (play) ~ You're running Play! in DEV mode
2012-06-11 08:47:55,716 INFO  (play) ~ Listening for HTTP on port 9000 (Waiting a first request to start) ...
2012-06-11 08:48:04,566 ERROR (play) ~

@6ajlb3agi
Internal Server Error (500) for request GET /

Oops: ExceptionInInitializerError
An unexpected error occured caused by exception ExceptionInInitializerError: null

play.exceptions.UnexpectedException: Unexpected Error
        at play.Invoker$Invocation.onException(Invoker.java:244)
        at play.Invoker$Invocation.run(Invoker.java:286)
        at Invocation.HTTP Request(Play!)
Caused by: java.lang.ExceptionInInitializerError
        at play.templates.TemplateLoader.load(TemplateLoader.java:78)
        at play.mvc.Router.parse(Router.java:162)
        at play.mvc.Router.parse(Router.java:190)
        at play.mvc.Router.parse(Router.java:164)
        at play.mvc.Router.load(Router.java:48)
        at play.mvc.Router.detectChanges(Router.java:219)
        ... 1 more
Caused by: groovy.lang.MissingFieldException: No such field: metaClass for class: java.lang.Class
        at groovy.lang.MetaClassImpl.getAttribute(MetaClassImpl.java:1074)
        at groovy.lang.MetaClassImpl.getStaticProperty(MetaClassImpl.java:1308)
        at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:707)
        at org.codehaus.groovy.runtime.Invoker.getProperty(Invoker.java:727)
        at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:206)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:295)
        at Script1.run(Script1.groovy:1)
        at groovy.lang.GroovyShell.evaluate(GroovyShell.java:521)
        at groovy.lang.GroovyShell.evaluate(GroovyShell.java:496)
        at play.templates.GroovyTemplate.<clinit>(GroovyTemplate.java:62)
        ... 7 more
2012-06-11 08:48:04,569 ERROR (play) ~ Error during the 500 response generation
java.lang.NoClassDefFoundError: Could not initialize class play.templates.GroovyTemplate
        at play.templates.TemplateLoader.load(TemplateLoader.java:78)
        at play.templates.TemplateLoader.load(TemplateLoader.java:172)
        at play.server.PlayHandler.serve500(PlayHandler.java:778)
        at play.server.PlayHandler$NettyInvocation.run(PlayHandler.java:237)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)
4

1 回答 1

2

这是一个奇怪的问题,但我有一个解决方案。

该问题似乎是由与- groovy -> groovy-all-1.0-jsr 05依赖项的 jar 冲突引起的。

  1. 很久以前,我将此依赖项添加到我的项目中,以便从我的项目中运行 groovy 脚本。
  2. 从那时起,我的项目似乎不再需要这种依赖关系。
  3. 事实上,我的项目构建已经忽略了这种依赖关系已经有一段时间了:

:: 问题总结 :: :::: 警告 :::::::::::::::::::::::::::::::::::::::: ::::::::

  ::          UNRESOLVED DEPENDENCIES         ::

  ::::::::::::::::::::::::::::::::::::::::::::::

  :: groovy#groovy-all-1.0-jsr;05: java.text.ParseException:

在“http://repo1.maven.org/maven2/groovy/groovy-all-1.0-jsr/05/groovy-all-1.0-jsr-05.pom”中发现不一致的模块描述符文件:错误的模块名称:预期= 'groovy-all-1.0-jsr' 找到='groovy-all'; 错误的修订:预期='05' found='1.0-jsr-05';

  ::::::::::::::::::::::::::::::::::::::::::::::

:::: 错误 mavenCentral:在 http://repo1.maven.org/maven2/groovy/groovy-all-1.0-jsr/05/groovy-all-1.0-jsr-05.pom中找到错误的模块名称:预期= 'groovy-all-1.0-jsr 找到='groovy-all'

  mavenCentral: bad revision found in

http://repo1.maven.org/maven2/groovy/groovy-all-1.0-jsr/05/groovy-all-1.0-jsr-05.pom:预期='05 found='1.0-jsr-05'

  1. 昨天,出于某种巫术的原因,在我们的 CI 机器(而不是其他机器)上,这种依赖关系开始正确解析,获取此文件,并导致类加载问题。这相当令人不安,因为我仍然不知道发生了什么变化,而且我有点担心这可能会发生在我们的生产机器上。

该决议正在摆脱这种依赖。

于 2012-06-11T12:47:30.537 回答