if (argument == null) throw illegalargumentexception

The argument is not allowed to be null. And I assume it is not null,
because the Field onto which PropertyModel<Date>(dummy,
"notNullExpression") is attached, isRequired(true).

So null values should not be passed from the wicket framework.. in principle.

**
Martin

2009/5/17 Daniele Dellafiore <[email protected]>:
> I see that the originating exception is:
>
> Caused by: java.lang.IllegalArgumentException: Argument "null" must
> not be empty or only whitespace.
>      at com.myapp.dto.Dummy(Dummy.java:76)
>
> that is, an exception raised by your code.
> What is the code at Dummy.java:76?
>
> On Wed, May 13, 2009 at 7:09 PM, Martin Makundi
> <[email protected]> wrote:
>>> I think Igor meant for you to post some code.
>>
>> There's nothing special..
>>
>> form = new form
>>
>> form.add(nestedform = new form)
>>
>> nestedform.add(new textfield(propertymodel).setRequired(true));
>>
>> It works most of the time, but sometimes I get the exception.
>>
>> **
>> Martin
>>
>>>
>>> cheers,
>>> Steve
>>>
>>>
>>>
>>> On 13 May 2009, at 17:27, Martin Makundi wrote:
>>>
>>>> Ok, I was hoping someone has experienced the same stacktrace.
>>>>
>>>> I will try to reproduce the bug still, maybe I find something.
>>>>
>>>> **
>>>> Martin
>>>>
>>>> 2009/5/13 Igor Vaynberg <[email protected]>:
>>>>>
>>>>> hard to say without having something to play against.
>>>>>
>>>>> -igor
>>>>>
>>>>> On Wed, May 13, 2009 at 8:19 AM, Martin Makundi
>>>>> <[email protected]> wrote:
>>>>>>
>>>>>> Hi!
>>>>>>
>>>>>> I have a data object Dummy whose attribute "value" has a setMethod
>>>>>> (setValue) that does not allow the given value to be an empty string
>>>>>> or null.
>>>>>>
>>>>>> This model object is attached to a property model new
>>>>>> PropertyModel(dummy, "value") and the propertymodel is passed to a
>>>>>> TextField component whose "setRequired=true"..
>>>>>>
>>>>>> Normally, when I access the page, the form works perfectly. It
>>>>>> requires the field and does not allow submitting the form without the
>>>>>> required value.
>>>>>>
>>>>>> However, on the log I find following errors and I do not understand
>>>>>> how they occur because the field is required. Is it possible that
>>>>>> there is a bug in wicket (rc4) processing invisible forms or
>>>>>> something? It is difficult to repeat the error because it occurs
>>>>>> randomly in production:
>>>>>>
>>>>>> 2009-05-13 15:31:00,225 2816867 [btpool0-27] ERROR RequestCycle  -
>>>>>> Error calling method: public void
>>>>>> com.myapp.dto.Dummy.setValue(java.lang.String) on object:
>>>>>> com.myapp.dto.du...@3140994e
>>>>>> org.apache.wicket.WicketRuntimeException: Error calling method: public
>>>>>> void com.myapp.dto.Dummy.setValue(java.lang.String) on object:
>>>>>> com.myapp.dto.du...@3140994e
>>>>>>     at
>>>>>> org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1119)
>>>>>>     at
>>>>>> org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(PropertyResolver.java:582)
>>>>>>     at
>>>>>> org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:136)
>>>>>>     at
>>>>>> org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:169)
>>>>>>     at
>>>>>> org.apache.wicket.Component.setDefaultModelObject(Component.java:3061)
>>>>>>     at
>>>>>> org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1141)
>>>>>>     at
>>>>>> org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component(Form.java:224)
>>>>>>     at
>>>>>> org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:488)
>>>>>>     at
>>>>>> org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467)
>>>>>>     at
>>>>>> org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467)
>>>>>>     at
>>>>>> org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467)
>>>>>>     at
>>>>>> org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467)
>>>>>>     at
>>>>>> org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrder(FormComponent.java:439)
>>>>>>     at
>>>>>> org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:2022)
>>>>>>     at org.apache.wicket.markup.html.form.Form.access$300(Form.java:140)
>>>>>>     at
>>>>>> org.apache.wicket.markup.html.form.Form$20.component(Form.java:2007)
>>>>>>     at
>>>>>> org.apache.wicket.markup.html.form.Form$20.component(Form.java:2003)
>>>>>>     at
>>>>>> org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:871)
>>>>>>     at
>>>>>> org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:886)
>>>>>>     at
>>>>>> org.apache.wicket.markup.html.form.Form.updateNestedFormComponentModels(Form.java:2001)
>>>>>>     at
>>>>>> org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1991)
>>>>>>     at org.apache.wicket.markup.html.form.Form.process(Form.java:959)
>>>>>>     at org.apache.wicket.markup.html.form.Form.process(Form.java:907)
>>>>>>     at
>>>>>> org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:875)
>>>>>>     at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>     at
>>>>>> org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
>>>>>>     at
>>>>>> org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
>>>>>>     at
>>>>>> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
>>>>>>     at
>>>>>> wicket.quickstart.TakpApplication$2.processEvents(TakpApplication.java:842)
>>>>>>     at
>>>>>> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1240)
>>>>>>     at org.apache.wicket.RequestCycle.step(RequestCycle.java:1319)
>>>>>>     at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418)
>>>>>>     at org.apache.wicket.RequestCycle.request(RequestCycle.java:544)
>>>>>>     at
>>>>>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
>>>>>>     at
>>>>>> org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160)
>>>>>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>>>>>>     at wicket.quickstart.TakpServlet.service(TakpServlet.java:48)
>>>>>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>>>>>>     at
>>>>>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
>>>>>>     at
>>>>>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
>>>>>>     at
>>>>>> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
>>>>>>     at
>>>>>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>>>>>>     at
>>>>>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
>>>>>>     at
>>>>>> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
>>>>>>     at
>>>>>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
>>>>>>     at
>>>>>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>>>>>     at
>>>>>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>>>>>>     at org.mortbay.jetty.Server.handle(Server.java:285)
>>>>>>     at
>>>>>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
>>>>>>     at
>>>>>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
>>>>>>     at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:627)
>>>>>>     at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
>>>>>>     at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
>>>>>>     at
>>>>>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
>>>>>>     at
>>>>>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
>>>>>> Caused by: java.lang.IllegalArgumentException: Argument "null" must
>>>>>> not be empty or only whitespace.
>>>>>>     at com.myapp.dto.Dummy(Dummy.java:76)
>>>>>>
>>>>>> t. Martin
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: [email protected]
>>>>>> For additional commands, e-mail: [email protected]
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [email protected]
>>>>> For additional commands, e-mail: [email protected]
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
>
> --
> Daniele Dellafiore
> http://blog.ildella.net
> http://twitter.com/ildella
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to