Created
May 30, 2011 10:17
-
-
Save dwursteisen/998689 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controllers; | |
import play.mvc.Controller; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class Application extends Controller { | |
public static class MyObject { | |
public String address; | |
} | |
public static void index() { | |
List<MyObject> myList = new ArrayList(); | |
MyObject o1 = new MyObject(); | |
MyObject o2 = new MyObject(); | |
o1.address = "fdgdfgdf"; | |
o2.address = "ljljlj"; | |
myList.add(o1); | |
myList.add(o2); | |
otherAction(myList); | |
} | |
public static void otherAction(List<MyObject> objects) { | |
render("index.html"); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Internal Server Error (500) for request GET / | |
Oops: ClassCastException | |
An unexpected error occured caused by exception ClassCastException: java.lang.String cannot be cast to java.util.List | |
play.exceptions.UnexpectedException: Unexpected Error | |
at play.mvc.Controller.redirect(Controller.java:610) | |
at play.mvc.Controller.redirect(Controller.java:540) | |
at controllers.Application.otherAction(Application.java) | |
at controllers.Application.index(Application.java:23) | |
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:540) | |
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:498) | |
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:474) | |
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:469) | |
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:157) | |
at Invocation.HTTP Request(Play!) | |
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List | |
at play.data.binding.Unbinder.unBind(Unbinder.java:44) | |
at play.data.binding.Unbinder.unBind(Unbinder.java:110) | |
at play.data.binding.Unbinder.unBind(Unbinder.java:63) | |
at play.data.binding.Unbinder.unBind(Unbinder.java:29) | |
at play.mvc.Controller.redirect(Controller.java:575) | |
... 9 more |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment