4

When I run the command play test, I am able to traverse to http://localhosts:9000/@tests and choose the tests to run.

However, I would like to have play automatically run all my unit tests whenever I make a code change. When I try play auto-test errors and the application does not start. How do I resolve this?

I get the following trace

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*

[UPDATED]

Looks like the error is in the SecureSocial.UserService. I am not sure why this would be as I am not running on https]

I am using play 1.24 with 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
James Ward
  • 29,283
  • 9
  • 49
  • 85
user35559
  • 1,018
  • 3
  • 11
  • 21
  • 1
    What's logged in your logs/system.out? – Gelin Luo Feb 05 '12 at 22:14
  • @green : Thanks for the heads up about the logs/system.out. I am new to play and am trying to figure this out – user35559 Feb 06 '12 at 03:27
  • Have you tried implementing the UserService? If this issue persists please create an issue on https://github.com/jaliss/securesocial – Somatik Feb 06 '12 at 13:52
  • @Somatik, the error still persists. The steps I took are a) implement UserService.Service "public class MyUserService implements UserService.Service" as all the methods in UserService are static (b) Add the following line in my application.conf file "UserService.Service=securesocial.provider.MyUserService" – user35559 Feb 07 '12 at 04:26
  • have a look at this question http://stackoverflow.com/questions/9205959/getting-logged-out-of-securesocial-on-compile-and-on-clustered-servers, also this article talks about securesocial http://playlatam.wordpress.com/2012/02/20/secure-json-services-with-play-scala-and-securesocial-by-matt-raible/ – opensas Feb 20 '12 at 22:14
  • This is still an issue with Play v1.2.5 and SecureSocial v0.2.4. Does anyone have any further insight? – tazmaniax Dec 14 '12 at 19:21

0 Answers0