You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by SudeepShakya <sh...@live.com> on 2012/04/04 06:03:34 UTC

Debugging error

What may be the cause for this error :

WicketMessage: Attempted to set property value on a null object. Property
expression: date1 Value: Tue Apr 17 00:00:00 NPT 2012

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Debugging-error-tp4530892p4530892.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Debugging error

Posted by SudeepShakya <sh...@live.com>.
 Ok, very well. U said that there is null in the constructor, what's that, I
don't understand.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Debugging-error-tp4530892p4531271.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Debugging error

Posted by Michal Wegrzyn <mi...@onior.com>.
We did not fight each other... We fought with your code!

Best regards,
Michal Wegrzyn

> -----Original Message-----
> From: SudeepShakya [mailto:shakyasudeep@live.com]
> Sent: Wednesday, April 04, 2012 10:35
> To: users@wicket.apache.org
> Subject: Re: Debugging error
> 
> Hello guys don't fight each other.
> What's the conclusion ??
> 
> I am using wicket 1.5.3
> 
> --
> View this message in context: http://apache-
> wicket.1842946.n4.nabble.com/Debugging-error-tp4530892p4531245.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Debugging error

Posted by SudeepShakya <sh...@live.com>.
Hello guys don't fight each other.
What's the conclusion ??

I am using wicket 1.5.3

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Debugging-error-tp4530892p4531245.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Debugging error

Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Apr 4, 2012 at 9:53 AM, Michal Wegrzyn <mi...@onior.com> wrote:
>> -----Original Message-----
>> From: Martin Grigorov [mailto:mgrigorov@apache.org]
>> Sent: Wednesday, April 04, 2012 9:41
>> To: users@wicket.apache.org
>> Subject: Re: Debugging error
>>
>> On Wed, Apr 4, 2012 at 9:37 AM, Michal Wegrzyn
>> <mi...@onior.com> wrote:
>> > Look at VoteEditForm constructor.
>> >
>> > Form form = new Form("form",new CompoundPropertyModel(aVote)) {...}
>> >
>> > Object aVote is null.
>>
>> It is not null. It is misleading because there is a member field and
>> constructor parameter with the same name.
>
> I think that you are saying... about commented code ;-)

Right. I give up reading this code :-)

>
>> CompoundPropertyModel also throws an exception when null is passed so
>> it is immediately clear.
>
> Is it? It seems like CompoundPropertyModel sets only its object field.

Correct!
The check is only in 6.x...
Now is the time someone to tell me whether I broke it in 6.x or
improve it. I think it is an improvement.

>
>> But the pasted code is hard to read with all these comments and
>> indents...
>>
>> >
>> > Best regards,
>> > Michal Wegrzyn
>> >
>> >> -----Original Message-----
>> >> From: SudeepShakya [mailto:shakyasudeep@live.com]
>> >> Sent: Wednesday, April 04, 2012 8:20
>> >> To: users@wicket.apache.org
>> >> Subject: Re: Debugging error
>> >>
>> >> I have attached the files.
>> >> http://apache-wicket.1842946.n4.nabble.com/file/n4531058/Votes.java
>> >> Votes.java
>> >> http://apache-
>> >> wicket.1842946.n4.nabble.com/file/n4531058/VoteEditForm.java
>> >> VoteEditForm.java
>> >> http://apache-
>> >> wicket.1842946.n4.nabble.com/file/n4531058/VoteCollection.java
>> >> VoteCollection.java
>> >> http://apache-
>> >> wicket.1842946.n4.nabble.com/file/n4531058/VoteCollectionJDBC.java
>> >> VoteCollectionJDBC.java</nabble&lt;nabble_a
>> >> href=&quot;VoteDisplayPage.java&quot;>VoteDisplayPage.java _a>
>> >>
>> >> --
>> >> View this message in context: http://apache-
>> >> wicket.1842946.n4.nabble.com/Debugging-error-tp4530892p4531058.html
>> >> Sent from the Users forum mailing list archive at Nabble.com.
>> >>
>> >> --------------------------------------------------------------------
>> -
>> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> >> For additional commands, e-mail: users-help@wicket.apache.org
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> > For additional commands, e-mail: users-help@wicket.apache.org
>> >
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Debugging error

Posted by Michal Wegrzyn <mi...@onior.com>.
> -----Original Message-----
> From: Martin Grigorov [mailto:mgrigorov@apache.org]
> Sent: Wednesday, April 04, 2012 9:41
> To: users@wicket.apache.org
> Subject: Re: Debugging error
> 
> On Wed, Apr 4, 2012 at 9:37 AM, Michal Wegrzyn
> <mi...@onior.com> wrote:
> > Look at VoteEditForm constructor.
> >
> > Form form = new Form("form",new CompoundPropertyModel(aVote)) {...}
> >
> > Object aVote is null.
> 
> It is not null. It is misleading because there is a member field and
> constructor parameter with the same name.

I think that you are saying... about commented code ;-)

> CompoundPropertyModel also throws an exception when null is passed so
> it is immediately clear.

Is it? It seems like CompoundPropertyModel sets only its object field.

> But the pasted code is hard to read with all these comments and
> indents...
> 
> >
> > Best regards,
> > Michal Wegrzyn
> >
> >> -----Original Message-----
> >> From: SudeepShakya [mailto:shakyasudeep@live.com]
> >> Sent: Wednesday, April 04, 2012 8:20
> >> To: users@wicket.apache.org
> >> Subject: Re: Debugging error
> >>
> >> I have attached the files.
> >> http://apache-wicket.1842946.n4.nabble.com/file/n4531058/Votes.java
> >> Votes.java
> >> http://apache-
> >> wicket.1842946.n4.nabble.com/file/n4531058/VoteEditForm.java
> >> VoteEditForm.java
> >> http://apache-
> >> wicket.1842946.n4.nabble.com/file/n4531058/VoteCollection.java
> >> VoteCollection.java
> >> http://apache-
> >> wicket.1842946.n4.nabble.com/file/n4531058/VoteCollectionJDBC.java
> >> VoteCollectionJDBC.java</nabble&lt;nabble_a
> >> href=&quot;VoteDisplayPage.java&quot;>VoteDisplayPage.java _a>
> >>
> >> --
> >> View this message in context: http://apache-
> >> wicket.1842946.n4.nabble.com/Debugging-error-tp4530892p4531058.html
> >> Sent from the Users forum mailing list archive at Nabble.com.
> >>
> >> --------------------------------------------------------------------
> -
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> 
> 
> 
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org


Re: Debugging error

Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Apr 4, 2012 at 9:37 AM, Michal Wegrzyn <mi...@onior.com> wrote:
> Look at VoteEditForm constructor.
>
> Form form = new Form("form",new CompoundPropertyModel(aVote)) {...}
>
> Object aVote is null.

It is not null. It is misleading because there is a member field and
constructor parameter with the same name.
CompoundPropertyModel also throws an exception when null is passed so
it is immediately clear.
But the pasted code is hard to read with all these comments and indents...

>
> Best regards,
> Michal Wegrzyn
>
>> -----Original Message-----
>> From: SudeepShakya [mailto:shakyasudeep@live.com]
>> Sent: Wednesday, April 04, 2012 8:20
>> To: users@wicket.apache.org
>> Subject: Re: Debugging error
>>
>> I have attached the files.
>> http://apache-wicket.1842946.n4.nabble.com/file/n4531058/Votes.java
>> Votes.java
>> http://apache-
>> wicket.1842946.n4.nabble.com/file/n4531058/VoteEditForm.java
>> VoteEditForm.java
>> http://apache-
>> wicket.1842946.n4.nabble.com/file/n4531058/VoteCollection.java
>> VoteCollection.java
>> http://apache-
>> wicket.1842946.n4.nabble.com/file/n4531058/VoteCollectionJDBC.java
>> VoteCollectionJDBC.java</nabble&lt;nabble_a
>> href=&quot;VoteDisplayPage.java&quot;>VoteDisplayPage.java _a>
>>
>> --
>> View this message in context: http://apache-
>> wicket.1842946.n4.nabble.com/Debugging-error-tp4530892p4531058.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Debugging error

Posted by Michal Wegrzyn <mi...@onior.com>.
Look at VoteEditForm constructor.

Form form = new Form("form",new CompoundPropertyModel(aVote)) {...}

Object aVote is null.

Best regards,
Michal Wegrzyn

> -----Original Message-----
> From: SudeepShakya [mailto:shakyasudeep@live.com]
> Sent: Wednesday, April 04, 2012 8:20
> To: users@wicket.apache.org
> Subject: Re: Debugging error
> 
> I have attached the files.
> http://apache-wicket.1842946.n4.nabble.com/file/n4531058/Votes.java
> Votes.java
> http://apache-
> wicket.1842946.n4.nabble.com/file/n4531058/VoteEditForm.java
> VoteEditForm.java
> http://apache-
> wicket.1842946.n4.nabble.com/file/n4531058/VoteCollection.java
> VoteCollection.java
> http://apache-
> wicket.1842946.n4.nabble.com/file/n4531058/VoteCollectionJDBC.java
> VoteCollectionJDBC.java</nabble&lt;nabble_a
> href=&quot;VoteDisplayPage.java&quot;>VoteDisplayPage.java _a>
> 
> --
> View this message in context: http://apache-
> wicket.1842946.n4.nabble.com/Debugging-error-tp4530892p4531058.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Debugging error

Posted by SudeepShakya <sh...@live.com>.
I have attached the files.
http://apache-wicket.1842946.n4.nabble.com/file/n4531058/Votes.java
Votes.java 
http://apache-wicket.1842946.n4.nabble.com/file/n4531058/VoteEditForm.java
VoteEditForm.java 
http://apache-wicket.1842946.n4.nabble.com/file/n4531058/VoteCollection.java
VoteCollection.java 
http://apache-wicket.1842946.n4.nabble.com/file/n4531058/VoteCollectionJDBC.java
VoteCollectionJDBC.java</nabble&lt;nabble_a
href=&quot;VoteDisplayPage.java&quot;>VoteDisplayPage.java _a>

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Debugging-error-tp4530892p4531058.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Debugging error

Posted by Martin Grigorov <mg...@apache.org>.
Show some code

On Wed, Apr 4, 2012 at 7:19 AM, SudeepShakya <sh...@live.com> wrote:
> I used CompoundPropertyModel in form.
> Sir I am creating a form which takes inputs from the user and compares the
> values to the database and displays the required data from database. For
> this, I have created a class(containing only getters and setters) , a class
> for form, and a class for displaying the required data. So i am confused how
> to implement it.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Debugging-error-tp4530892p4530973.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Debugging error

Posted by SudeepShakya <sh...@live.com>.
I used CompoundPropertyModel in form.
Sir I am creating a form which takes inputs from the user and compares the
values to the database and displays the required data from database. For
this, I have created a class(containing only getters and setters) , a class
for form, and a class for displaying the required data. So i am confused how
to implement it.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Debugging-error-tp4530892p4530973.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Debugging error

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

It means that you use something like: new PropertyModel(object,
"date"), and 'object' is null, so you cannot set its 'date' property.

On Wed, Apr 4, 2012 at 6:03 AM, SudeepShakya <sh...@live.com> wrote:
> What may be the cause for this error :
>
> WicketMessage: Attempted to set property value on a null object. Property
> expression: date1 Value: Tue Apr 17 00:00:00 NPT 2012
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Debugging-error-tp4530892p4530892.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org