当我运行命令play test
时,我能够遍历http://localhosts:9000/@tests
并选择要运行的测试。
但是,每当我进行代码更改时,我都希望自动运行所有单元测试。当我尝试play auto-test
错误并且应用程序无法启动时。我该如何解决这个问题?
我得到以下追踪
16:21:57,428 WARN ~ You're running Play! in DEV mode
~
~ Go to http://localhost:9000/@tests to run the tests
~
16:21:57,493 INFO ~ Listening for HTTP on port 9000 (Waiting a first request to start) ...
~
~ *The application does not start. There are errors: java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:9000/@tests.list*
[ 已更新
看起来错误发生在SecureSocial.UserService中。我不知道为什么会这样,因为我没有运行https]
我正在使用游戏1.24与securesocial 0.2.3
17:56:10,323 INFO ~ Listening for HTTP on port 9000 (Waiting a first request to start) ...
17:56:18,030 ERROR ~
@69ac4j243
Internal Server Error (500) for request GET /@tests.list
Oops: UnexpectedException
An unexpected error occured caused by exception UnexpectedException: While applying class play.classloading.enhancers.ControllersEnhancer on securesocial.provider.DefaultUserService
play.exceptions.UnexpectedException: While applying play.CorePlugin@11a06e38 on securesocial.provider.DefaultUserService
at play.plugins.PluginCollection.enhance(PluginCollection.java:511)
at play.classloading.ApplicationClasses$ApplicationClass.enhance(ApplicationClasses.java:235)
at play.classloading.ApplicationClassloader.loadApplicationClass(ApplicationClassloader.java:165)
at play.classloading.ApplicationClassloader.loadClass(ApplicationClassloader.java:84)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructors(Class.java:1459)
at play.plugins.PluginCollection.reloadApplicationPlugins(PluginCollection.java:199)
at play.Play.start(Play.java:460)
at play.Play.detectChanges(Play.java:629)
at play.Invoker$Invocation.init(Invoker.java:198)
at Invocation.HTTP Request(Play!)
Caused by: play.exceptions.UnexpectedException: While applying class play.classloading.enhancers.ControllersEnhancer on securesocial.provider.DefaultUserService
at play.CorePlugin.enhance(CorePlugin.java:302)
at play.plugins.PluginCollection.enhance(PluginCollection.java:506)
... 12 more
Caused by: java.lang.RuntimeException: Trying to visit uncompiled class while enhancing. Uncompiled class: securesocial.provider.UserService$Service
at play.classloading.enhancers.Enhancer$ApplicationClassesClasspath.openClassfile(Enhancer.java:75)
at javassist.ClassPoolTail.openClassfile(ClassPoolTail.java:335)
at javassist.ClassPool.openClassfile(ClassPool.java:594)
at javassist.CtClassType.getClassFile2(CtClassType.java:185)
at javassist.CtClassType.subtypeOf(CtClassType.java:303)
at javassist.CtClassType.subtypeOf(CtClassType.java:318)
at play.classloading.enhancers.ControllersEnhancer.enhanceThisClass(ControllersEnhancer.java:37)
at play.CorePlugin.enhance(CorePlugin.java:297)
... 13 more
@KILLED