BriteSnow / snow

A Lightweight, Google Guice, Simple, and Powerful Web Application Framework that makes building modern Web Application a breeze! Fully open source, Apache V2 licensed.
http://britesnow.com/snow
29 stars 10 forks source link

IllegalArgumentException in snapshot #10

Closed rbanikaz closed 11 years ago

rbanikaz commented 11 years ago

java.lang.IllegalArgumentException: com.britesnow.snow.web.param.annotation.WebModel is not a binding annotation. Please annotate it with @BindingAnnotation. at com.google.inject.internal.util.$Preconditions.checkArgument(Preconditions.java:113) at com.google.inject.Key.ensureIsBindingAnnotation(Key.java:366) at com.google.inject.Key.strategyFor(Key.java:338) at com.google.inject.Key.get(Key.java:227) at com.britesnow.snow.web.handler.ParamDefBuilder.buildParamDef(ParamDefBuilder.java:51) at com.britesnow.snow.web.handler.ParamDefBuilder.buildParamDefs(ParamDefBuilder.java:28) at com.britesnow.snow.web.handler.WebObjectRegistry.registerWebModel(WebObjectRegistry.java:283) at com.britesnow.snow.web.handler.WebObjectRegistry.registerWebObjectMethods(WebObjectRegistry.java:209) at com.britesnow.snow.web.handler.WebObjectRegistry.init(WebObjectRegistry.java:73) at com.britesnow.snow.web.Application.init(Application.java:77) at com.britesnow.snow.web.WebController.init(WebController.java:119) at com.britesnow.snow.web.SnowServlet.init(SnowServlet.java:46) at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:471)

rbanikaz commented 11 years ago

Thanks Jeremy for your help! Resolved it by adding explicit type for the @WebModel

Thanks again for the prompt attention

jeremychone commented 11 years ago

With pleasure @rbanikaz Yes, this was a Groovy related issue as Groovy allows you to not have a type for a method param. @WebModel param need to be of type Map m.