java - Typesafe Activator: "run" works, but "start" fails with an error -
i'm working on project, using java play-framework. until tested executing ./activator run
, worked flawlessly. now, wanted try , deploy running ./activator start
instead. raises compilation error though, , don't know why because code seems in order.
the error:
[error] /home/ghijs/psopv/psopv-2015-groep13/code/activator-codesubmission/app/helpers/login.java:12: illegal cyclic reference involving method login [error] public class login { [error] ^ [error] 1 error found [error] (compile:doc) scaladoc generation failed [error] total time: 16 s, completed jun 4, 2015 2:02:31 pm
the "login" class:
package helpers; import models.user; import play.logger; import play.data.form; import play.data.validation.constraints.minlength; import play.data.validation.constraints.required; public class login { @required @minlength(4) private string username; @required @minlength(5) private string password; private string userid; private user.usertype usertype; public void login(string usrnm, string psswrd){ username = usrnm; password = psswrd; } public string getusername() {return username;} public string getpassword() {return password;} public string getuserid() {return userid;} public user.usertype getusertype() {return usertype;} public void setusername(string u){username = u;} public void setpassword(string p){password = p;} public final static form<login> login_form = new form(login.class); public string validate(){ logger.info("validating login info ..."); user u = user.authenticate(username, password); if(u == null) { logger.error("invalid username or password."); return "invalid user or password"; } else { logger.info("validating login info ... ok"); userid = u.getidentifier(); usertype = u.getusertype(); return null; } } }
i need because ./activator dist
throws same error, , need able create distributable version of program.
public void login(string usrnm, string psswrd){ username = usrnm; password = psswrd; }
this not constructor. remove void
keyword. keep in mind, not having default constructor form result in runtime exceptions.
Comments
Post a Comment