[play-framework] VerifyError: stack size too large

68 views
Skip to first unread message

Antony

unread,
May 16, 2010, 5:29:28 AM5/16/10
to play-framework
Hello,

I am using play framework since one month to do a prototype site. It
is quite efficient and well designed. I saved a lot time comparing to
other tools.

Now my prototype is entering a critical step, I encountered an issue
with play framework: in one controller class, one private method
(basically a String split function) meets the following error:
Oops: VerifyError
An unexpected error occured caused by exception VerifyError: (class:
controllers
/MainController, method: toList signature: (Ljava/lang/String;)Ljava/
util/Arr
ayList;) Stack size too large

play.exceptions.UnexpectedException: Unexpected Error
at play.Invoker$Invocation.onException(Invoker.java:142)
at play.Invoker$Invocation.run(Invoker.java:182)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.VerifyError: (class: controllers/MainController,
method:
toList signature: (Ljava/lang/String;)Ljava/util/ArrayList;) Stack
size too lar
ge
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethods(Class.java:1791)
at play.utils.Java.findActionMethod(Java.java:61)
at play.mvc.ActionInvoker.getActionMethod(ActionInvoker.java:
323)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:66)
... 1 more

I do some research, perphaps the following post may help to understand
the trouble:
http://forums.sun.com/thread.jspa?threadID=272747
esp the following suggestion:
In BCEL after inserting the code you have to do something like this:
methodGen.setMaxStack(). See BCEL API documentation for more details.

But I don't know how to apply it to play framework to resolve my
problem.

Could you help me to debug it? Thanks a lot anyway.

Antony

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

Guillaume Bort

unread,
May 16, 2010, 11:14:54 AM5/16/10
to play-fr...@googlegroups.com
Can you show the code of the method that produce this error? Thanks.

Antony

unread,
May 18, 2010, 4:17:10 AM5/18/10
to play-framework
Here it is, noting that it works perfectly in a plan Java class, but
not in a Controller class.
Thanks in advance for your help/explanation.

private static ArrayList<String> toList(String str) {
char[] chars = str.toCharArray();
ArrayList<String> strs = new ArrayList<String>();
if (null == str)
return strs;
StringBuffer sb = new StringBuffer();
for (int i = 0; i < chars.length;) {
if (chars[i] != '[' && chars[i] != ']') {
sb.append(chars[i++]);
} else if (chars[i] == ']') {
strs.add(sb.toString().trim());
sb = new StringBuffer();
i++;
while (i < chars.length && (chars[i] == ' ' || chars[i] == ',')) {
i++;
}
} else {
i++;
}
}
return strs;
> > For more options, visit this group athttp://groups.google.com/group/play-framework?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/play-framework?hl=en.- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -

Guillaume Bort

unread,
May 18, 2010, 1:55:58 PM5/18/10
to play-fr...@googlegroups.com
It should be fixed now. Can you confirm?
Reply all
Reply to author
Forward
0 new messages