You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openmeetings.apache.org by "seba.wagner@gmail.com" <se...@gmail.com> on 2012/10/16 19:59:10 UTC

issue with file download out of form component

Hi,

I did follow this tutorial to create a download via Ajax in a form:
https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow

The slightly modified code can be seen here:
https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
Line 127 "download.initialize(target);" is called.

The rest seems to me similar to the example, except for that I set the File
is set dynamically with every Ajax request.

The File itself does exist and is created correctly.

However Wicket throws this wired exception:
http://pastebin.com/raw.php?i=Fijqjd5y

The trace seems to be an internal Wicket error. Is this a Bug inside Wicket?

Sebastian
-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
seba.wagner@gmail.com

Re: issue with file download out of form component

Posted by Maxim Solodovnik <so...@gmail.com>.
i have fixed it
please take a look at latest commit (revision 1399103)

On Wed, Oct 17, 2012 at 11:39 AM, Maxim Solodovnik <so...@gmail.com>wrote:

> I'll take a look at it
>
>
> On Wed, Oct 17, 2012 at 12:59 AM, seba.wagner@gmail.com <
> seba.wagner@gmail.com> wrote:
>
>> Hi,
>>
>> I did follow this tutorial to create a download via Ajax in a form:
>>
>> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>>
>> The slightly modified code can be seen here:
>>
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
>> Line 127 "download.initialize(target);" is called.
>>
>> The rest seems to me similar to the example, except for that I set the
>> File
>> is set dynamically with every Ajax request.
>>
>> The File itself does exist and is created correctly.
>>
>> However Wicket throws this wired exception:
>> http://pastebin.com/raw.php?i=Fijqjd5y
>>
>> The trace seems to be an internal Wicket error. Is this a Bug inside
>> Wicket?
>>
>> Sebastian
>> --
>> Sebastian Wagner
>> https://twitter.com/#!/dead_lock
>> http://www.webbase-design.de
>> http://www.wagner-sebastian.com
>> seba.wagner@gmail.com
>>
>
>
>
> --
> WBR
> Maxim aka solomax
>



-- 
WBR
Maxim aka solomax

Re: issue with file download out of form component

Posted by Maxim Solodovnik <so...@gmail.com>.
I'll take a look at it

On Wed, Oct 17, 2012 at 12:59 AM, seba.wagner@gmail.com <
seba.wagner@gmail.com> wrote:

> Hi,
>
> I did follow this tutorial to create a download via Ajax in a form:
>
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>
> The slightly modified code can be seen here:
>
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
> Line 127 "download.initialize(target);" is called.
>
> The rest seems to me similar to the example, except for that I set the File
> is set dynamically with every Ajax request.
>
> The File itself does exist and is created correctly.
>
> However Wicket throws this wired exception:
> http://pastebin.com/raw.php?i=Fijqjd5y
>
> The trace seems to be an internal Wicket error. Is this a Bug inside
> Wicket?
>
> Sebastian
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> seba.wagner@gmail.com
>



-- 
WBR
Maxim aka solomax

Re: issue with file download out of form component

Posted by Maxim Solodovnik <so...@gmail.com>.
I'll take a look at it

On Wed, Oct 17, 2012 at 12:59 AM, seba.wagner@gmail.com <
seba.wagner@gmail.com> wrote:

> Hi,
>
> I did follow this tutorial to create a download via Ajax in a form:
>
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>
> The slightly modified code can be seen here:
>
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
> Line 127 "download.initialize(target);" is called.
>
> The rest seems to me similar to the example, except for that I set the File
> is set dynamically with every Ajax request.
>
> The File itself does exist and is created correctly.
>
> However Wicket throws this wired exception:
> http://pastebin.com/raw.php?i=Fijqjd5y
>
> The trace seems to be an internal Wicket error. Is this a Bug inside
> Wicket?
>
> Sebastian
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> seba.wagner@gmail.com
>



-- 
WBR
Maxim aka solomax

Re: issue with file download out of form component

Posted by "seba.wagner@gmail.com" <se...@gmail.com>.
ok, I had no time to test yet.

Thanks!
Sebastian

2012/10/17 Maxim Solodovnik <so...@gmail.com>

> Hello Sebastian.
> There is no need to update wicket right now, all our code works as expected
> On Oct 17, 2012 5:46 PM, "seba.wagner@gmail.com" <se...@gmail.com>
> wrote:
>
> > Hi Martin,
> >
> > thanks for committing a patch that fast!
> > I see your patch at: http://markmail.org/message/ntjpnxce6uw44ejt
> > But I don't know what SNAPSHOTs are compiled from that one.
> > Will this fix be in the next 6.2.0-SNAPSHOT or 6.0.0-SNAPSHOT ?
> >
> > We sync our dependencies from:
> >
> >
> https://repository.apache.org/content/groups/snapshots/org/apache/wicket/wicket/
> >
> > Where is your
> >
> > Thanks!
> > Sebastian
> >
> > 2012/10/17 Martin Grigorov <mg...@apache.org>
> >
> > > There was a response from Maxim from OpenMeetings team, but
> > > users@wicket.apache.org was not in CC:
> > >
> > > <copy>
> > > Hello Martin,
> > >
> > > I have modified the code and have removed AjaxDownloader (since it is
> not
> > > really necessary).
> > > NullPointerException somehow happens while post parameters parsing
> > > (getCallbackURL) is not working anymore.
> > >
> > > I believe this is somehow connected with custom HomePageMapper
> > >
> > >
> > >
> >
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
> > >
> > > line 62 and below.
> > > Maybe you can help me with this?
> > >
> > > I have added HomePageMapper to implement "single page application" and
> > > remove all URL parameters automaticatilly being added by Wicket.
> > >
> > > Thanks in advance
> > >
> > > </copy>
> > >
> > >
> > > Hi Maxim,
> > >
> > > The NullPointerException is while Wicket tries to read the POST
> > > parameters. The request mappers manipulate only the GET parameters, so
> > > I think it is not related.
> > > I've just checked Jetty 7.6.3 sources and they return String[0] so it
> > > should be OK in this particular version of Jetty. But I'll add the
> > > check anyway with https://issues.apache.org/jira/browse/WICKET-4818
> > >
> > > On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mgrigorov@apache.org
> >
> > > wrote:
> > > > Hi,
> > > >
> > > > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
> > > > <se...@gmail.com> wrote:
> > > >> Hi,
> > > >>
> > > >> I did follow this tutorial to create a download via Ajax in a form:
> > > >>
> > >
> >
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
> > > >>
> > > >> The slightly modified code can be seen here:
> > > >>
> > >
> >
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
> > > >> Line 127 "download.initialize(target);" is called.
> > > >
> > > > It seems you have modified BackupPanel. There is no code like
> > > > "download.initialize(target)"
> > > >
> > > >>
> > > >> The rest seems to me similar to the example, except for that I set
> the
> > > File
> > > >> is set dynamically with every Ajax request.
> > > >>
> > > >> The File itself does exist and is created correctly.
> > > >>
> > > >> However Wicket throws this wired exception:
> > > >> http://pastebin.com/raw.php?i=Fijqjd5y
> > > >
> > > > NullPointerException is not something one should expect so it is a
> bug.
> > > > According to
> > >
> >
> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
> > > > its cause is that HttpServletRequest.getParametersMap() returns a Map
> > > > with an entry with value == null. I'm not sure in what cases this can
> > > > happen but I'll add a check for null there.
> > > >
> > > >>
> > > >> The trace seems to be an internal Wicket error. Is this a Bug inside
> > > Wicket?
> > > >>
> > > >> Sebastian
> > > >> --
> > > >> Sebastian Wagner
> > > >> https://twitter.com/#!/dead_lock
> > > >> http://www.webbase-design.de
> > > >> http://www.wagner-sebastian.com
> > > >> seba.wagner@gmail.com
> > > >
> > > >
> > > >
> > > > --
> > > > Martin Grigorov
> > > > jWeekend
> > > > Training, Consulting, Development
> > > > http://jWeekend.com
> > >
> > >
> > >
> > > --
> > > 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
> > >
> > >
> >
> >
> > --
> > Sebastian Wagner
> > https://twitter.com/#!/dead_lock
> > http://www.webbase-design.de
> > http://www.wagner-sebastian.com
> > seba.wagner@gmail.com
> >
>



-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
seba.wagner@gmail.com

Re: issue with file download out of form component

Posted by Maxim Solodovnik <so...@gmail.com>.
I'll take a look at it
On Oct 18, 2012 5:16 PM, "seba.wagner@gmail.com" <se...@gmail.com>
wrote:

> There is an issue with the BackupPanel, the UI is locked as soon as you
> click on the download backup button.
> https://issues.apache.org/jira/browse/OPENMEETINGS-450
>
> Sebastian
>
> 2012/10/17 Maxim Solodovnik <so...@gmail.com>
>
> > Hello Sebastian.
> > There is no need to update wicket right now, all our code works as
> expected
> > On Oct 17, 2012 5:46 PM, "seba.wagner@gmail.com" <se...@gmail.com>
> > wrote:
> >
> > > Hi Martin,
> > >
> > > thanks for committing a patch that fast!
> > > I see your patch at: http://markmail.org/message/ntjpnxce6uw44ejt
> > > But I don't know what SNAPSHOTs are compiled from that one.
> > > Will this fix be in the next 6.2.0-SNAPSHOT or 6.0.0-SNAPSHOT ?
> > >
> > > We sync our dependencies from:
> > >
> > >
> >
> https://repository.apache.org/content/groups/snapshots/org/apache/wicket/wicket/
> > >
> > > Where is your
> > >
> > > Thanks!
> > > Sebastian
> > >
> > > 2012/10/17 Martin Grigorov <mg...@apache.org>
> > >
> > > > There was a response from Maxim from OpenMeetings team, but
> > > > users@wicket.apache.org was not in CC:
> > > >
> > > > <copy>
> > > > Hello Martin,
> > > >
> > > > I have modified the code and have removed AjaxDownloader (since it is
> > not
> > > > really necessary).
> > > > NullPointerException somehow happens while post parameters parsing
> > > > (getCallbackURL) is not working anymore.
> > > >
> > > > I believe this is somehow connected with custom HomePageMapper
> > > >
> > > >
> > > >
> > >
> >
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
> > > >
> > > > line 62 and below.
> > > > Maybe you can help me with this?
> > > >
> > > > I have added HomePageMapper to implement "single page application"
> and
> > > > remove all URL parameters automaticatilly being added by Wicket.
> > > >
> > > > Thanks in advance
> > > >
> > > > </copy>
> > > >
> > > >
> > > > Hi Maxim,
> > > >
> > > > The NullPointerException is while Wicket tries to read the POST
> > > > parameters. The request mappers manipulate only the GET parameters,
> so
> > > > I think it is not related.
> > > > I've just checked Jetty 7.6.3 sources and they return String[0] so it
> > > > should be OK in this particular version of Jetty. But I'll add the
> > > > check anyway with https://issues.apache.org/jira/browse/WICKET-4818
> > > >
> > > > On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <
> mgrigorov@apache.org
> > >
> > > > wrote:
> > > > > Hi,
> > > > >
> > > > > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
> > > > > <se...@gmail.com> wrote:
> > > > >> Hi,
> > > > >>
> > > > >> I did follow this tutorial to create a download via Ajax in a
> form:
> > > > >>
> > > >
> > >
> >
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
> > > > >>
> > > > >> The slightly modified code can be seen here:
> > > > >>
> > > >
> > >
> >
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
> > > > >> Line 127 "download.initialize(target);" is called.
> > > > >
> > > > > It seems you have modified BackupPanel. There is no code like
> > > > > "download.initialize(target)"
> > > > >
> > > > >>
> > > > >> The rest seems to me similar to the example, except for that I set
> > the
> > > > File
> > > > >> is set dynamically with every Ajax request.
> > > > >>
> > > > >> The File itself does exist and is created correctly.
> > > > >>
> > > > >> However Wicket throws this wired exception:
> > > > >> http://pastebin.com/raw.php?i=Fijqjd5y
> > > > >
> > > > > NullPointerException is not something one should expect so it is a
> > bug.
> > > > > According to
> > > >
> > >
> >
> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
> > > > > its cause is that HttpServletRequest.getParametersMap() returns a
> Map
> > > > > with an entry with value == null. I'm not sure in what cases this
> can
> > > > > happen but I'll add a check for null there.
> > > > >
> > > > >>
> > > > >> The trace seems to be an internal Wicket error. Is this a Bug
> inside
> > > > Wicket?
> > > > >>
> > > > >> Sebastian
> > > > >> --
> > > > >> Sebastian Wagner
> > > > >> https://twitter.com/#!/dead_lock
> > > > >> http://www.webbase-design.de
> > > > >> http://www.wagner-sebastian.com
> > > > >> seba.wagner@gmail.com
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Martin Grigorov
> > > > > jWeekend
> > > > > Training, Consulting, Development
> > > > > http://jWeekend.com
> > > >
> > > >
> > > >
> > > > --
> > > > 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
> > > >
> > > >
> > >
> > >
> > > --
> > > Sebastian Wagner
> > > https://twitter.com/#!/dead_lock
> > > http://www.webbase-design.de
> > > http://www.wagner-sebastian.com
> > > seba.wagner@gmail.com
> > >
> >
>
>
>
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> seba.wagner@gmail.com
>

Re: issue with file download out of form component

Posted by Maxim Solodovnik <so...@gmail.com>.
I'm afraid we have too much Ajax :(
Lets wait for Wicket 6.2
Then I'll add AjaxDownloader and hopefully this issue will be resolved.


On Thu, Oct 18, 2012 at 5:15 PM, seba.wagner@gmail.com <
seba.wagner@gmail.com> wrote:

> There is an issue with the BackupPanel, the UI is locked as soon as you
> click on the download backup button.
> https://issues.apache.org/jira/browse/OPENMEETINGS-450
>
> Sebastian
>
> 2012/10/17 Maxim Solodovnik <so...@gmail.com>
>
> > Hello Sebastian.
> > There is no need to update wicket right now, all our code works as
> expected
> > On Oct 17, 2012 5:46 PM, "seba.wagner@gmail.com" <se...@gmail.com>
> > wrote:
> >
> > > Hi Martin,
> > >
> > > thanks for committing a patch that fast!
> > > I see your patch at: http://markmail.org/message/ntjpnxce6uw44ejt
> > > But I don't know what SNAPSHOTs are compiled from that one.
> > > Will this fix be in the next 6.2.0-SNAPSHOT or 6.0.0-SNAPSHOT ?
> > >
> > > We sync our dependencies from:
> > >
> > >
> >
> https://repository.apache.org/content/groups/snapshots/org/apache/wicket/wicket/
> > >
> > > Where is your
> > >
> > > Thanks!
> > > Sebastian
> > >
> > > 2012/10/17 Martin Grigorov <mg...@apache.org>
> > >
> > > > There was a response from Maxim from OpenMeetings team, but
> > > > users@wicket.apache.org was not in CC:
> > > >
> > > > <copy>
> > > > Hello Martin,
> > > >
> > > > I have modified the code and have removed AjaxDownloader (since it is
> > not
> > > > really necessary).
> > > > NullPointerException somehow happens while post parameters parsing
> > > > (getCallbackURL) is not working anymore.
> > > >
> > > > I believe this is somehow connected with custom HomePageMapper
> > > >
> > > >
> > > >
> > >
> >
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
> > > >
> > > > line 62 and below.
> > > > Maybe you can help me with this?
> > > >
> > > > I have added HomePageMapper to implement "single page application"
> and
> > > > remove all URL parameters automaticatilly being added by Wicket.
> > > >
> > > > Thanks in advance
> > > >
> > > > </copy>
> > > >
> > > >
> > > > Hi Maxim,
> > > >
> > > > The NullPointerException is while Wicket tries to read the POST
> > > > parameters. The request mappers manipulate only the GET parameters,
> so
> > > > I think it is not related.
> > > > I've just checked Jetty 7.6.3 sources and they return String[0] so it
> > > > should be OK in this particular version of Jetty. But I'll add the
> > > > check anyway with https://issues.apache.org/jira/browse/WICKET-4818
> > > >
> > > > On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <
> mgrigorov@apache.org
> > >
> > > > wrote:
> > > > > Hi,
> > > > >
> > > > > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
> > > > > <se...@gmail.com> wrote:
> > > > >> Hi,
> > > > >>
> > > > >> I did follow this tutorial to create a download via Ajax in a
> form:
> > > > >>
> > > >
> > >
> >
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
> > > > >>
> > > > >> The slightly modified code can be seen here:
> > > > >>
> > > >
> > >
> >
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
> > > > >> Line 127 "download.initialize(target);" is called.
> > > > >
> > > > > It seems you have modified BackupPanel. There is no code like
> > > > > "download.initialize(target)"
> > > > >
> > > > >>
> > > > >> The rest seems to me similar to the example, except for that I set
> > the
> > > > File
> > > > >> is set dynamically with every Ajax request.
> > > > >>
> > > > >> The File itself does exist and is created correctly.
> > > > >>
> > > > >> However Wicket throws this wired exception:
> > > > >> http://pastebin.com/raw.php?i=Fijqjd5y
> > > > >
> > > > > NullPointerException is not something one should expect so it is a
> > bug.
> > > > > According to
> > > >
> > >
> >
> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
> > > > > its cause is that HttpServletRequest.getParametersMap() returns a
> Map
> > > > > with an entry with value == null. I'm not sure in what cases this
> can
> > > > > happen but I'll add a check for null there.
> > > > >
> > > > >>
> > > > >> The trace seems to be an internal Wicket error. Is this a Bug
> inside
> > > > Wicket?
> > > > >>
> > > > >> Sebastian
> > > > >> --
> > > > >> Sebastian Wagner
> > > > >> https://twitter.com/#!/dead_lock
> > > > >> http://www.webbase-design.de
> > > > >> http://www.wagner-sebastian.com
> > > > >> seba.wagner@gmail.com
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Martin Grigorov
> > > > > jWeekend
> > > > > Training, Consulting, Development
> > > > > http://jWeekend.com
> > > >
> > > >
> > > >
> > > > --
> > > > 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
> > > >
> > > >
> > >
> > >
> > > --
> > > Sebastian Wagner
> > > https://twitter.com/#!/dead_lock
> > > http://www.webbase-design.de
> > > http://www.wagner-sebastian.com
> > > seba.wagner@gmail.com
> > >
> >
>
>
>
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> seba.wagner@gmail.com
>



-- 
WBR
Maxim aka solomax

Re: issue with file download out of form component

Posted by "seba.wagner@gmail.com" <se...@gmail.com>.
There is an issue with the BackupPanel, the UI is locked as soon as you
click on the download backup button.
https://issues.apache.org/jira/browse/OPENMEETINGS-450

Sebastian

2012/10/17 Maxim Solodovnik <so...@gmail.com>

> Hello Sebastian.
> There is no need to update wicket right now, all our code works as expected
> On Oct 17, 2012 5:46 PM, "seba.wagner@gmail.com" <se...@gmail.com>
> wrote:
>
> > Hi Martin,
> >
> > thanks for committing a patch that fast!
> > I see your patch at: http://markmail.org/message/ntjpnxce6uw44ejt
> > But I don't know what SNAPSHOTs are compiled from that one.
> > Will this fix be in the next 6.2.0-SNAPSHOT or 6.0.0-SNAPSHOT ?
> >
> > We sync our dependencies from:
> >
> >
> https://repository.apache.org/content/groups/snapshots/org/apache/wicket/wicket/
> >
> > Where is your
> >
> > Thanks!
> > Sebastian
> >
> > 2012/10/17 Martin Grigorov <mg...@apache.org>
> >
> > > There was a response from Maxim from OpenMeetings team, but
> > > users@wicket.apache.org was not in CC:
> > >
> > > <copy>
> > > Hello Martin,
> > >
> > > I have modified the code and have removed AjaxDownloader (since it is
> not
> > > really necessary).
> > > NullPointerException somehow happens while post parameters parsing
> > > (getCallbackURL) is not working anymore.
> > >
> > > I believe this is somehow connected with custom HomePageMapper
> > >
> > >
> > >
> >
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
> > >
> > > line 62 and below.
> > > Maybe you can help me with this?
> > >
> > > I have added HomePageMapper to implement "single page application" and
> > > remove all URL parameters automaticatilly being added by Wicket.
> > >
> > > Thanks in advance
> > >
> > > </copy>
> > >
> > >
> > > Hi Maxim,
> > >
> > > The NullPointerException is while Wicket tries to read the POST
> > > parameters. The request mappers manipulate only the GET parameters, so
> > > I think it is not related.
> > > I've just checked Jetty 7.6.3 sources and they return String[0] so it
> > > should be OK in this particular version of Jetty. But I'll add the
> > > check anyway with https://issues.apache.org/jira/browse/WICKET-4818
> > >
> > > On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mgrigorov@apache.org
> >
> > > wrote:
> > > > Hi,
> > > >
> > > > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
> > > > <se...@gmail.com> wrote:
> > > >> Hi,
> > > >>
> > > >> I did follow this tutorial to create a download via Ajax in a form:
> > > >>
> > >
> >
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
> > > >>
> > > >> The slightly modified code can be seen here:
> > > >>
> > >
> >
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
> > > >> Line 127 "download.initialize(target);" is called.
> > > >
> > > > It seems you have modified BackupPanel. There is no code like
> > > > "download.initialize(target)"
> > > >
> > > >>
> > > >> The rest seems to me similar to the example, except for that I set
> the
> > > File
> > > >> is set dynamically with every Ajax request.
> > > >>
> > > >> The File itself does exist and is created correctly.
> > > >>
> > > >> However Wicket throws this wired exception:
> > > >> http://pastebin.com/raw.php?i=Fijqjd5y
> > > >
> > > > NullPointerException is not something one should expect so it is a
> bug.
> > > > According to
> > >
> >
> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
> > > > its cause is that HttpServletRequest.getParametersMap() returns a Map
> > > > with an entry with value == null. I'm not sure in what cases this can
> > > > happen but I'll add a check for null there.
> > > >
> > > >>
> > > >> The trace seems to be an internal Wicket error. Is this a Bug inside
> > > Wicket?
> > > >>
> > > >> Sebastian
> > > >> --
> > > >> Sebastian Wagner
> > > >> https://twitter.com/#!/dead_lock
> > > >> http://www.webbase-design.de
> > > >> http://www.wagner-sebastian.com
> > > >> seba.wagner@gmail.com
> > > >
> > > >
> > > >
> > > > --
> > > > Martin Grigorov
> > > > jWeekend
> > > > Training, Consulting, Development
> > > > http://jWeekend.com
> > >
> > >
> > >
> > > --
> > > 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
> > >
> > >
> >
> >
> > --
> > Sebastian Wagner
> > https://twitter.com/#!/dead_lock
> > http://www.webbase-design.de
> > http://www.wagner-sebastian.com
> > seba.wagner@gmail.com
> >
>



-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
seba.wagner@gmail.com

Re: issue with file download out of form component

Posted by Maxim Solodovnik <so...@gmail.com>.
Hello Sebastian.
There is no need to update wicket right now, all our code works as expected
On Oct 17, 2012 5:46 PM, "seba.wagner@gmail.com" <se...@gmail.com>
wrote:

> Hi Martin,
>
> thanks for committing a patch that fast!
> I see your patch at: http://markmail.org/message/ntjpnxce6uw44ejt
> But I don't know what SNAPSHOTs are compiled from that one.
> Will this fix be in the next 6.2.0-SNAPSHOT or 6.0.0-SNAPSHOT ?
>
> We sync our dependencies from:
>
> https://repository.apache.org/content/groups/snapshots/org/apache/wicket/wicket/
>
> Where is your
>
> Thanks!
> Sebastian
>
> 2012/10/17 Martin Grigorov <mg...@apache.org>
>
> > There was a response from Maxim from OpenMeetings team, but
> > users@wicket.apache.org was not in CC:
> >
> > <copy>
> > Hello Martin,
> >
> > I have modified the code and have removed AjaxDownloader (since it is not
> > really necessary).
> > NullPointerException somehow happens while post parameters parsing
> > (getCallbackURL) is not working anymore.
> >
> > I believe this is somehow connected with custom HomePageMapper
> >
> >
> >
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
> >
> > line 62 and below.
> > Maybe you can help me with this?
> >
> > I have added HomePageMapper to implement "single page application" and
> > remove all URL parameters automaticatilly being added by Wicket.
> >
> > Thanks in advance
> >
> > </copy>
> >
> >
> > Hi Maxim,
> >
> > The NullPointerException is while Wicket tries to read the POST
> > parameters. The request mappers manipulate only the GET parameters, so
> > I think it is not related.
> > I've just checked Jetty 7.6.3 sources and they return String[0] so it
> > should be OK in this particular version of Jetty. But I'll add the
> > check anyway with https://issues.apache.org/jira/browse/WICKET-4818
> >
> > On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mg...@apache.org>
> > wrote:
> > > Hi,
> > >
> > > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
> > > <se...@gmail.com> wrote:
> > >> Hi,
> > >>
> > >> I did follow this tutorial to create a download via Ajax in a form:
> > >>
> >
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
> > >>
> > >> The slightly modified code can be seen here:
> > >>
> >
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
> > >> Line 127 "download.initialize(target);" is called.
> > >
> > > It seems you have modified BackupPanel. There is no code like
> > > "download.initialize(target)"
> > >
> > >>
> > >> The rest seems to me similar to the example, except for that I set the
> > File
> > >> is set dynamically with every Ajax request.
> > >>
> > >> The File itself does exist and is created correctly.
> > >>
> > >> However Wicket throws this wired exception:
> > >> http://pastebin.com/raw.php?i=Fijqjd5y
> > >
> > > NullPointerException is not something one should expect so it is a bug.
> > > According to
> >
> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
> > > its cause is that HttpServletRequest.getParametersMap() returns a Map
> > > with an entry with value == null. I'm not sure in what cases this can
> > > happen but I'll add a check for null there.
> > >
> > >>
> > >> The trace seems to be an internal Wicket error. Is this a Bug inside
> > Wicket?
> > >>
> > >> Sebastian
> > >> --
> > >> Sebastian Wagner
> > >> https://twitter.com/#!/dead_lock
> > >> http://www.webbase-design.de
> > >> http://www.wagner-sebastian.com
> > >> seba.wagner@gmail.com
> > >
> > >
> > >
> > > --
> > > Martin Grigorov
> > > jWeekend
> > > Training, Consulting, Development
> > > http://jWeekend.com
> >
> >
> >
> > --
> > 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
> >
> >
>
>
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> seba.wagner@gmail.com
>

Re: issue with file download out of form component

Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Oct 17, 2012 at 12:45 PM, seba.wagner@gmail.com
<se...@gmail.com> wrote:
> Hi Martin,
>
> thanks for committing a patch that fast!
> I see your patch at: http://markmail.org/message/ntjpnxce6uw44ejt
> But I don't know what SNAPSHOTs are compiled from that one.
> Will this fix be in the next 6.2.0-SNAPSHOT or 6.0.0-SNAPSHOT ?

6.2.0-SNAPSHOT is the current one.
Next week when 6.2.0 is released (if all goes well) the version will
be 6.3.0-SNAPSHOT

>
> We sync our dependencies from:
> https://repository.apache.org/content/groups/snapshots/org/apache/wicket/wicket/
>
> Where is your
>
> Thanks!
> Sebastian
>
> 2012/10/17 Martin Grigorov <mg...@apache.org>
>
>> There was a response from Maxim from OpenMeetings team, but
>> users@wicket.apache.org was not in CC:
>>
>> <copy>
>> Hello Martin,
>>
>> I have modified the code and have removed AjaxDownloader (since it is not
>> really necessary).
>> NullPointerException somehow happens while post parameters parsing
>> (getCallbackURL) is not working anymore.
>>
>> I believe this is somehow connected with custom HomePageMapper
>>
>>
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
>>
>> line 62 and below.
>> Maybe you can help me with this?
>>
>> I have added HomePageMapper to implement "single page application" and
>> remove all URL parameters automaticatilly being added by Wicket.
>>
>> Thanks in advance
>>
>> </copy>
>>
>>
>> Hi Maxim,
>>
>> The NullPointerException is while Wicket tries to read the POST
>> parameters. The request mappers manipulate only the GET parameters, so
>> I think it is not related.
>> I've just checked Jetty 7.6.3 sources and they return String[0] so it
>> should be OK in this particular version of Jetty. But I'll add the
>> check anyway with https://issues.apache.org/jira/browse/WICKET-4818
>>
>> On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mg...@apache.org>
>> wrote:
>> > Hi,
>> >
>> > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
>> > <se...@gmail.com> wrote:
>> >> Hi,
>> >>
>> >> I did follow this tutorial to create a download via Ajax in a form:
>> >>
>> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>> >>
>> >> The slightly modified code can be seen here:
>> >>
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
>> >> Line 127 "download.initialize(target);" is called.
>> >
>> > It seems you have modified BackupPanel. There is no code like
>> > "download.initialize(target)"
>> >
>> >>
>> >> The rest seems to me similar to the example, except for that I set the
>> File
>> >> is set dynamically with every Ajax request.
>> >>
>> >> The File itself does exist and is created correctly.
>> >>
>> >> However Wicket throws this wired exception:
>> >> http://pastebin.com/raw.php?i=Fijqjd5y
>> >
>> > NullPointerException is not something one should expect so it is a bug.
>> > According to
>> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
>> > its cause is that HttpServletRequest.getParametersMap() returns a Map
>> > with an entry with value == null. I'm not sure in what cases this can
>> > happen but I'll add a check for null there.
>> >
>> >>
>> >> The trace seems to be an internal Wicket error. Is this a Bug inside
>> Wicket?
>> >>
>> >> Sebastian
>> >> --
>> >> Sebastian Wagner
>> >> https://twitter.com/#!/dead_lock
>> >> http://www.webbase-design.de
>> >> http://www.wagner-sebastian.com
>> >> seba.wagner@gmail.com
>> >
>> >
>> >
>> > --
>> > Martin Grigorov
>> > jWeekend
>> > Training, Consulting, Development
>> > http://jWeekend.com
>>
>>
>>
>> --
>> 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
>>
>>
>
>
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> seba.wagner@gmail.com



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

Re: issue with file download out of form component

Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Oct 17, 2012 at 12:45 PM, seba.wagner@gmail.com
<se...@gmail.com> wrote:
> Hi Martin,
>
> thanks for committing a patch that fast!
> I see your patch at: http://markmail.org/message/ntjpnxce6uw44ejt
> But I don't know what SNAPSHOTs are compiled from that one.
> Will this fix be in the next 6.2.0-SNAPSHOT or 6.0.0-SNAPSHOT ?

6.2.0-SNAPSHOT is the current one.
Next week when 6.2.0 is released (if all goes well) the version will
be 6.3.0-SNAPSHOT

>
> We sync our dependencies from:
> https://repository.apache.org/content/groups/snapshots/org/apache/wicket/wicket/
>
> Where is your
>
> Thanks!
> Sebastian
>
> 2012/10/17 Martin Grigorov <mg...@apache.org>
>
>> There was a response from Maxim from OpenMeetings team, but
>> users@wicket.apache.org was not in CC:
>>
>> <copy>
>> Hello Martin,
>>
>> I have modified the code and have removed AjaxDownloader (since it is not
>> really necessary).
>> NullPointerException somehow happens while post parameters parsing
>> (getCallbackURL) is not working anymore.
>>
>> I believe this is somehow connected with custom HomePageMapper
>>
>>
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
>>
>> line 62 and below.
>> Maybe you can help me with this?
>>
>> I have added HomePageMapper to implement "single page application" and
>> remove all URL parameters automaticatilly being added by Wicket.
>>
>> Thanks in advance
>>
>> </copy>
>>
>>
>> Hi Maxim,
>>
>> The NullPointerException is while Wicket tries to read the POST
>> parameters. The request mappers manipulate only the GET parameters, so
>> I think it is not related.
>> I've just checked Jetty 7.6.3 sources and they return String[0] so it
>> should be OK in this particular version of Jetty. But I'll add the
>> check anyway with https://issues.apache.org/jira/browse/WICKET-4818
>>
>> On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mg...@apache.org>
>> wrote:
>> > Hi,
>> >
>> > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
>> > <se...@gmail.com> wrote:
>> >> Hi,
>> >>
>> >> I did follow this tutorial to create a download via Ajax in a form:
>> >>
>> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>> >>
>> >> The slightly modified code can be seen here:
>> >>
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
>> >> Line 127 "download.initialize(target);" is called.
>> >
>> > It seems you have modified BackupPanel. There is no code like
>> > "download.initialize(target)"
>> >
>> >>
>> >> The rest seems to me similar to the example, except for that I set the
>> File
>> >> is set dynamically with every Ajax request.
>> >>
>> >> The File itself does exist and is created correctly.
>> >>
>> >> However Wicket throws this wired exception:
>> >> http://pastebin.com/raw.php?i=Fijqjd5y
>> >
>> > NullPointerException is not something one should expect so it is a bug.
>> > According to
>> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
>> > its cause is that HttpServletRequest.getParametersMap() returns a Map
>> > with an entry with value == null. I'm not sure in what cases this can
>> > happen but I'll add a check for null there.
>> >
>> >>
>> >> The trace seems to be an internal Wicket error. Is this a Bug inside
>> Wicket?
>> >>
>> >> Sebastian
>> >> --
>> >> Sebastian Wagner
>> >> https://twitter.com/#!/dead_lock
>> >> http://www.webbase-design.de
>> >> http://www.wagner-sebastian.com
>> >> seba.wagner@gmail.com
>> >
>> >
>> >
>> > --
>> > Martin Grigorov
>> > jWeekend
>> > Training, Consulting, Development
>> > http://jWeekend.com
>>
>>
>>
>> --
>> 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
>>
>>
>
>
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> seba.wagner@gmail.com



-- 
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: issue with file download out of form component

Posted by "seba.wagner@gmail.com" <se...@gmail.com>.
Hi Martin,

thanks for committing a patch that fast!
I see your patch at: http://markmail.org/message/ntjpnxce6uw44ejt
But I don't know what SNAPSHOTs are compiled from that one.
Will this fix be in the next 6.2.0-SNAPSHOT or 6.0.0-SNAPSHOT ?

We sync our dependencies from:
https://repository.apache.org/content/groups/snapshots/org/apache/wicket/wicket/

Where is your

Thanks!
Sebastian

2012/10/17 Martin Grigorov <mg...@apache.org>

> There was a response from Maxim from OpenMeetings team, but
> users@wicket.apache.org was not in CC:
>
> <copy>
> Hello Martin,
>
> I have modified the code and have removed AjaxDownloader (since it is not
> really necessary).
> NullPointerException somehow happens while post parameters parsing
> (getCallbackURL) is not working anymore.
>
> I believe this is somehow connected with custom HomePageMapper
>
>
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
>
> line 62 and below.
> Maybe you can help me with this?
>
> I have added HomePageMapper to implement "single page application" and
> remove all URL parameters automaticatilly being added by Wicket.
>
> Thanks in advance
>
> </copy>
>
>
> Hi Maxim,
>
> The NullPointerException is while Wicket tries to read the POST
> parameters. The request mappers manipulate only the GET parameters, so
> I think it is not related.
> I've just checked Jetty 7.6.3 sources and they return String[0] so it
> should be OK in this particular version of Jetty. But I'll add the
> check anyway with https://issues.apache.org/jira/browse/WICKET-4818
>
> On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mg...@apache.org>
> wrote:
> > Hi,
> >
> > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
> > <se...@gmail.com> wrote:
> >> Hi,
> >>
> >> I did follow this tutorial to create a download via Ajax in a form:
> >>
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
> >>
> >> The slightly modified code can be seen here:
> >>
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
> >> Line 127 "download.initialize(target);" is called.
> >
> > It seems you have modified BackupPanel. There is no code like
> > "download.initialize(target)"
> >
> >>
> >> The rest seems to me similar to the example, except for that I set the
> File
> >> is set dynamically with every Ajax request.
> >>
> >> The File itself does exist and is created correctly.
> >>
> >> However Wicket throws this wired exception:
> >> http://pastebin.com/raw.php?i=Fijqjd5y
> >
> > NullPointerException is not something one should expect so it is a bug.
> > According to
> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
> > its cause is that HttpServletRequest.getParametersMap() returns a Map
> > with an entry with value == null. I'm not sure in what cases this can
> > happen but I'll add a check for null there.
> >
> >>
> >> The trace seems to be an internal Wicket error. Is this a Bug inside
> Wicket?
> >>
> >> Sebastian
> >> --
> >> Sebastian Wagner
> >> https://twitter.com/#!/dead_lock
> >> http://www.webbase-design.de
> >> http://www.wagner-sebastian.com
> >> seba.wagner@gmail.com
> >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com
>
>
>
> --
> 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
>
>


-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
seba.wagner@gmail.com

Re: issue with file download out of form component

Posted by Maxim Solodovnik <so...@gmail.com>.
Hello Martin,

I just have tested Wicket 6.2
Using AjaxDownload:
https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/util/AjaxDownload.java

https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java(line:
123 currently commented out)

I get URL like this on file download:
http://192.168.72.100:5080/openmeetings/html/?4-1.IBehaviorListener.0-contents-child-backupUpload&antiCache=1351074316336

And then get ClassCastException from Wiket in:
org.apache.wicket.protocol.http.servlet.ServletWebRequest line 305

param.getValue() returns String and cannot be casted to String[] (for the
'antiCache' parameter above)

Is there anything I can do to fix it?


Thanks a lot in advance :)

On Wed, Oct 17, 2012 at 5:39 PM, Maxim Solodovnik <so...@gmail.com>wrote:

> Thanks a lot!
> Those NullPointer exceptions makes makes me mad :( (we use customized
> Tomcat 6 in our project) And I get them all the time.
> I get rid of all callback URL and all parameters passed via URL.
>
> Thanks!! :)
>
>
> On Wed, Oct 17, 2012 at 5:11 PM, Martin Grigorov <mg...@apache.org>wrote:
>
>> There was a response from Maxim from OpenMeetings team, but
>> users@wicket.apache.org was not in CC:
>>
>> <copy>
>> Hello Martin,
>>
>> I have modified the code and have removed AjaxDownloader (since it is not
>> really necessary).
>> NullPointerException somehow happens while post parameters parsing
>> (getCallbackURL) is not working anymore.
>>
>> I believe this is somehow connected with custom HomePageMapper
>>
>>
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
>>
>> line 62 and below.
>> Maybe you can help me with this?
>>
>> I have added HomePageMapper to implement "single page application" and
>> remove all URL parameters automaticatilly being added by Wicket.
>>
>> Thanks in advance
>>
>> </copy>
>>
>>
>> Hi Maxim,
>>
>> The NullPointerException is while Wicket tries to read the POST
>> parameters. The request mappers manipulate only the GET parameters, so
>> I think it is not related.
>> I've just checked Jetty 7.6.3 sources and they return String[0] so it
>> should be OK in this particular version of Jetty. But I'll add the
>> check anyway with https://issues.apache.org/jira/browse/WICKET-4818
>>
>> On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mg...@apache.org>
>> wrote:
>> > Hi,
>> >
>> > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
>> > <se...@gmail.com> wrote:
>> >> Hi,
>> >>
>> >> I did follow this tutorial to create a download via Ajax in a form:
>> >>
>> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>> >>
>> >> The slightly modified code can be seen here:
>> >>
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
>> >> Line 127 "download.initialize(target);" is called.
>> >
>> > It seems you have modified BackupPanel. There is no code like
>> > "download.initialize(target)"
>> >
>> >>
>> >> The rest seems to me similar to the example, except for that I set the
>> File
>> >> is set dynamically with every Ajax request.
>> >>
>> >> The File itself does exist and is created correctly.
>> >>
>> >> However Wicket throws this wired exception:
>> >> http://pastebin.com/raw.php?i=Fijqjd5y
>> >
>> > NullPointerException is not something one should expect so it is a bug.
>> > According to
>> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
>> > its cause is that HttpServletRequest.getParametersMap() returns a Map
>> > with an entry with value == null. I'm not sure in what cases this can
>> > happen but I'll add a check for null there.
>> >
>> >>
>> >> The trace seems to be an internal Wicket error. Is this a Bug inside
>> Wicket?
>> >>
>> >> Sebastian
>> >> --
>> >> Sebastian Wagner
>> >> https://twitter.com/#!/dead_lock
>> >> http://www.webbase-design.de
>> >> http://www.wagner-sebastian.com
>> >> seba.wagner@gmail.com
>> >
>> >
>> >
>> > --
>> > Martin Grigorov
>> > jWeekend
>> > Training, Consulting, Development
>> > http://jWeekend.com
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>
>
>
> --
> WBR
> Maxim aka solomax
>



-- 
WBR
Maxim aka solomax



-- 
WBR
Maxim aka solomax

Re: issue with file download out of form component

Posted by Maxim Solodovnik <so...@gmail.com>.
Thanks for your help!
The issue seems to be resolved now.
We had lots of dependencies to the huge number of various servlet-api.jar
+ custom ServletRequestMapper

I perform cleanup and now everything works as expected

On Thu, Oct 25, 2012 at 8:51 AM, Maxim Solodovnik <so...@gmail.com>wrote:

> Hello Martin,
>
> Thanks for the tip.
> I'll double check the version of javax.servlet currently being used
>
>
> On Wed, Oct 24, 2012 at 7:24 PM, Martin Grigorov <mg...@apache.org>wrote:
>
>> Hi Maxim,
>>
>> What web container do you use ?
>> According to Servlet API
>> (
>> http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getParameterMap()
>> )
>> the map should be <String, String[]).
>>
>> On Wed, Oct 24, 2012 at 1:45 PM, Maxim Solodovnik <so...@gmail.com>
>> wrote:
>> > Hello Martin,
>> >
>> > I just have tested Wicket 6.2
>> > Using AjaxDownload:
>> >
>> https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/util/AjaxDownload.java
>> >
>> >
>> https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java(line
>> :
>> > 123 currently commented out)
>> >
>> > I get URL like this on file download:
>> >
>> http://192.168.72.100:5080/openmeetings/html/?4-1.IBehaviorListener.0-contents-child-backupUpload&antiCache=1351074316336
>> >
>> > And then get ClassCastException from Wiket in:
>> > org.apache.wicket.protocol.http.servlet.ServletWebRequest line 305
>> >
>> > param.getValue() returns String and cannot be casted to String[] (for
>> the
>> > 'antiCache' parameter above)
>> >
>> > Is there anything I can do to fix it?
>> >
>> >
>> > Thanks a lot in advance :)
>> >
>> > On Wed, Oct 17, 2012 at 5:39 PM, Maxim Solodovnik <solomax666@gmail.com
>> >wrote:
>> >
>> >> Thanks a lot!
>> >> Those NullPointer exceptions makes makes me mad :( (we use customized
>> >> Tomcat 6 in our project) And I get them all the time.
>> >> I get rid of all callback URL and all parameters passed via URL.
>> >>
>> >> Thanks!! :)
>> >>
>> >>
>> >> On Wed, Oct 17, 2012 at 5:11 PM, Martin Grigorov <mgrigorov@apache.org
>> >wrote:
>> >>
>> >>> There was a response from Maxim from OpenMeetings team, but
>> >>> users@wicket.apache.org was not in CC:
>> >>>
>> >>> <copy>
>> >>> Hello Martin,
>> >>>
>> >>> I have modified the code and have removed AjaxDownloader (since it is
>> not
>> >>> really necessary).
>> >>> NullPointerException somehow happens while post parameters parsing
>> >>> (getCallbackURL) is not working anymore.
>> >>>
>> >>> I believe this is somehow connected with custom HomePageMapper
>> >>>
>> >>>
>> >>>
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
>> >>>
>> >>> line 62 and below.
>> >>> Maybe you can help me with this?
>> >>>
>> >>> I have added HomePageMapper to implement "single page application" and
>> >>> remove all URL parameters automaticatilly being added by Wicket.
>> >>>
>> >>> Thanks in advance
>> >>>
>> >>> </copy>
>> >>>
>> >>>
>> >>> Hi Maxim,
>> >>>
>> >>> The NullPointerException is while Wicket tries to read the POST
>> >>> parameters. The request mappers manipulate only the GET parameters, so
>> >>> I think it is not related.
>> >>> I've just checked Jetty 7.6.3 sources and they return String[0] so it
>> >>> should be OK in this particular version of Jetty. But I'll add the
>> >>> check anyway with https://issues.apache.org/jira/browse/WICKET-4818
>> >>>
>> >>> On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <
>> mgrigorov@apache.org>
>> >>> wrote:
>> >>> > Hi,
>> >>> >
>> >>> > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
>> >>> > <se...@gmail.com> wrote:
>> >>> >> Hi,
>> >>> >>
>> >>> >> I did follow this tutorial to create a download via Ajax in a form:
>> >>> >>
>> >>>
>> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>> >>> >>
>> >>> >> The slightly modified code can be seen here:
>> >>> >>
>> >>>
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
>> >>> >> Line 127 "download.initialize(target);" is called.
>> >>> >
>> >>> > It seems you have modified BackupPanel. There is no code like
>> >>> > "download.initialize(target)"
>> >>> >
>> >>> >>
>> >>> >> The rest seems to me similar to the example, except for that I set
>> the
>> >>> File
>> >>> >> is set dynamically with every Ajax request.
>> >>> >>
>> >>> >> The File itself does exist and is created correctly.
>> >>> >>
>> >>> >> However Wicket throws this wired exception:
>> >>> >> http://pastebin.com/raw.php?i=Fijqjd5y
>> >>> >
>> >>> > NullPointerException is not something one should expect so it is a
>> bug.
>> >>> > According to
>> >>>
>> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
>> >>> > its cause is that HttpServletRequest.getParametersMap() returns a
>> Map
>> >>> > with an entry with value == null. I'm not sure in what cases this
>> can
>> >>> > happen but I'll add a check for null there.
>> >>> >
>> >>> >>
>> >>> >> The trace seems to be an internal Wicket error. Is this a Bug
>> inside
>> >>> Wicket?
>> >>> >>
>> >>> >> Sebastian
>> >>> >> --
>> >>> >> Sebastian Wagner
>> >>> >> https://twitter.com/#!/dead_lock
>> >>> >> http://www.webbase-design.de
>> >>> >> http://www.wagner-sebastian.com
>> >>> >> seba.wagner@gmail.com
>> >>> >
>> >>> >
>> >>> >
>> >>> > --
>> >>> > Martin Grigorov
>> >>> > jWeekend
>> >>> > Training, Consulting, Development
>> >>> > http://jWeekend.com
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Martin Grigorov
>> >>> jWeekend
>> >>> Training, Consulting, Development
>> >>> http://jWeekend.com
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> WBR
>> >> Maxim aka solomax
>> >>
>> >
>> >
>> >
>> > --
>> > WBR
>> > Maxim aka solomax
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>
>
>
> --
> WBR
> Maxim aka solomax
>



-- 
WBR
Maxim aka solomax

Re: issue with file download out of form component

Posted by Maxim Solodovnik <so...@gmail.com>.
Thanks for your help!
The issue seems to be resolved now.
We had lots of dependencies to the huge number of various servlet-api.jar
+ custom ServletRequestMapper

I perform cleanup and now everything works as expected

On Thu, Oct 25, 2012 at 8:51 AM, Maxim Solodovnik <so...@gmail.com>wrote:

> Hello Martin,
>
> Thanks for the tip.
> I'll double check the version of javax.servlet currently being used
>
>
> On Wed, Oct 24, 2012 at 7:24 PM, Martin Grigorov <mg...@apache.org>wrote:
>
>> Hi Maxim,
>>
>> What web container do you use ?
>> According to Servlet API
>> (
>> http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getParameterMap()
>> )
>> the map should be <String, String[]).
>>
>> On Wed, Oct 24, 2012 at 1:45 PM, Maxim Solodovnik <so...@gmail.com>
>> wrote:
>> > Hello Martin,
>> >
>> > I just have tested Wicket 6.2
>> > Using AjaxDownload:
>> >
>> https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/util/AjaxDownload.java
>> >
>> >
>> https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java(line
>> :
>> > 123 currently commented out)
>> >
>> > I get URL like this on file download:
>> >
>> http://192.168.72.100:5080/openmeetings/html/?4-1.IBehaviorListener.0-contents-child-backupUpload&antiCache=1351074316336
>> >
>> > And then get ClassCastException from Wiket in:
>> > org.apache.wicket.protocol.http.servlet.ServletWebRequest line 305
>> >
>> > param.getValue() returns String and cannot be casted to String[] (for
>> the
>> > 'antiCache' parameter above)
>> >
>> > Is there anything I can do to fix it?
>> >
>> >
>> > Thanks a lot in advance :)
>> >
>> > On Wed, Oct 17, 2012 at 5:39 PM, Maxim Solodovnik <solomax666@gmail.com
>> >wrote:
>> >
>> >> Thanks a lot!
>> >> Those NullPointer exceptions makes makes me mad :( (we use customized
>> >> Tomcat 6 in our project) And I get them all the time.
>> >> I get rid of all callback URL and all parameters passed via URL.
>> >>
>> >> Thanks!! :)
>> >>
>> >>
>> >> On Wed, Oct 17, 2012 at 5:11 PM, Martin Grigorov <mgrigorov@apache.org
>> >wrote:
>> >>
>> >>> There was a response from Maxim from OpenMeetings team, but
>> >>> users@wicket.apache.org was not in CC:
>> >>>
>> >>> <copy>
>> >>> Hello Martin,
>> >>>
>> >>> I have modified the code and have removed AjaxDownloader (since it is
>> not
>> >>> really necessary).
>> >>> NullPointerException somehow happens while post parameters parsing
>> >>> (getCallbackURL) is not working anymore.
>> >>>
>> >>> I believe this is somehow connected with custom HomePageMapper
>> >>>
>> >>>
>> >>>
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
>> >>>
>> >>> line 62 and below.
>> >>> Maybe you can help me with this?
>> >>>
>> >>> I have added HomePageMapper to implement "single page application" and
>> >>> remove all URL parameters automaticatilly being added by Wicket.
>> >>>
>> >>> Thanks in advance
>> >>>
>> >>> </copy>
>> >>>
>> >>>
>> >>> Hi Maxim,
>> >>>
>> >>> The NullPointerException is while Wicket tries to read the POST
>> >>> parameters. The request mappers manipulate only the GET parameters, so
>> >>> I think it is not related.
>> >>> I've just checked Jetty 7.6.3 sources and they return String[0] so it
>> >>> should be OK in this particular version of Jetty. But I'll add the
>> >>> check anyway with https://issues.apache.org/jira/browse/WICKET-4818
>> >>>
>> >>> On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <
>> mgrigorov@apache.org>
>> >>> wrote:
>> >>> > Hi,
>> >>> >
>> >>> > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
>> >>> > <se...@gmail.com> wrote:
>> >>> >> Hi,
>> >>> >>
>> >>> >> I did follow this tutorial to create a download via Ajax in a form:
>> >>> >>
>> >>>
>> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>> >>> >>
>> >>> >> The slightly modified code can be seen here:
>> >>> >>
>> >>>
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
>> >>> >> Line 127 "download.initialize(target);" is called.
>> >>> >
>> >>> > It seems you have modified BackupPanel. There is no code like
>> >>> > "download.initialize(target)"
>> >>> >
>> >>> >>
>> >>> >> The rest seems to me similar to the example, except for that I set
>> the
>> >>> File
>> >>> >> is set dynamically with every Ajax request.
>> >>> >>
>> >>> >> The File itself does exist and is created correctly.
>> >>> >>
>> >>> >> However Wicket throws this wired exception:
>> >>> >> http://pastebin.com/raw.php?i=Fijqjd5y
>> >>> >
>> >>> > NullPointerException is not something one should expect so it is a
>> bug.
>> >>> > According to
>> >>>
>> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
>> >>> > its cause is that HttpServletRequest.getParametersMap() returns a
>> Map
>> >>> > with an entry with value == null. I'm not sure in what cases this
>> can
>> >>> > happen but I'll add a check for null there.
>> >>> >
>> >>> >>
>> >>> >> The trace seems to be an internal Wicket error. Is this a Bug
>> inside
>> >>> Wicket?
>> >>> >>
>> >>> >> Sebastian
>> >>> >> --
>> >>> >> Sebastian Wagner
>> >>> >> https://twitter.com/#!/dead_lock
>> >>> >> http://www.webbase-design.de
>> >>> >> http://www.wagner-sebastian.com
>> >>> >> seba.wagner@gmail.com
>> >>> >
>> >>> >
>> >>> >
>> >>> > --
>> >>> > Martin Grigorov
>> >>> > jWeekend
>> >>> > Training, Consulting, Development
>> >>> > http://jWeekend.com
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Martin Grigorov
>> >>> jWeekend
>> >>> Training, Consulting, Development
>> >>> http://jWeekend.com
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> WBR
>> >> Maxim aka solomax
>> >>
>> >
>> >
>> >
>> > --
>> > WBR
>> > Maxim aka solomax
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>
>
>
> --
> WBR
> Maxim aka solomax
>



-- 
WBR
Maxim aka solomax

Re: issue with file download out of form component

Posted by Maxim Solodovnik <so...@gmail.com>.
Hello Martin,

Thanks for the tip.
I'll double check the version of javax.servlet currently being used

On Wed, Oct 24, 2012 at 7:24 PM, Martin Grigorov <mg...@apache.org>wrote:

> Hi Maxim,
>
> What web container do you use ?
> According to Servlet API
> (
> http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getParameterMap()
> )
> the map should be <String, String[]).
>
> On Wed, Oct 24, 2012 at 1:45 PM, Maxim Solodovnik <so...@gmail.com>
> wrote:
> > Hello Martin,
> >
> > I just have tested Wicket 6.2
> > Using AjaxDownload:
> >
> https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/util/AjaxDownload.java
> >
> >
> https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java(line
> :
> > 123 currently commented out)
> >
> > I get URL like this on file download:
> >
> http://192.168.72.100:5080/openmeetings/html/?4-1.IBehaviorListener.0-contents-child-backupUpload&antiCache=1351074316336
> >
> > And then get ClassCastException from Wiket in:
> > org.apache.wicket.protocol.http.servlet.ServletWebRequest line 305
> >
> > param.getValue() returns String and cannot be casted to String[] (for the
> > 'antiCache' parameter above)
> >
> > Is there anything I can do to fix it?
> >
> >
> > Thanks a lot in advance :)
> >
> > On Wed, Oct 17, 2012 at 5:39 PM, Maxim Solodovnik <solomax666@gmail.com
> >wrote:
> >
> >> Thanks a lot!
> >> Those NullPointer exceptions makes makes me mad :( (we use customized
> >> Tomcat 6 in our project) And I get them all the time.
> >> I get rid of all callback URL and all parameters passed via URL.
> >>
> >> Thanks!! :)
> >>
> >>
> >> On Wed, Oct 17, 2012 at 5:11 PM, Martin Grigorov <mgrigorov@apache.org
> >wrote:
> >>
> >>> There was a response from Maxim from OpenMeetings team, but
> >>> users@wicket.apache.org was not in CC:
> >>>
> >>> <copy>
> >>> Hello Martin,
> >>>
> >>> I have modified the code and have removed AjaxDownloader (since it is
> not
> >>> really necessary).
> >>> NullPointerException somehow happens while post parameters parsing
> >>> (getCallbackURL) is not working anymore.
> >>>
> >>> I believe this is somehow connected with custom HomePageMapper
> >>>
> >>>
> >>>
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
> >>>
> >>> line 62 and below.
> >>> Maybe you can help me with this?
> >>>
> >>> I have added HomePageMapper to implement "single page application" and
> >>> remove all URL parameters automaticatilly being added by Wicket.
> >>>
> >>> Thanks in advance
> >>>
> >>> </copy>
> >>>
> >>>
> >>> Hi Maxim,
> >>>
> >>> The NullPointerException is while Wicket tries to read the POST
> >>> parameters. The request mappers manipulate only the GET parameters, so
> >>> I think it is not related.
> >>> I've just checked Jetty 7.6.3 sources and they return String[0] so it
> >>> should be OK in this particular version of Jetty. But I'll add the
> >>> check anyway with https://issues.apache.org/jira/browse/WICKET-4818
> >>>
> >>> On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mgrigorov@apache.org
> >
> >>> wrote:
> >>> > Hi,
> >>> >
> >>> > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
> >>> > <se...@gmail.com> wrote:
> >>> >> Hi,
> >>> >>
> >>> >> I did follow this tutorial to create a download via Ajax in a form:
> >>> >>
> >>>
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
> >>> >>
> >>> >> The slightly modified code can be seen here:
> >>> >>
> >>>
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
> >>> >> Line 127 "download.initialize(target);" is called.
> >>> >
> >>> > It seems you have modified BackupPanel. There is no code like
> >>> > "download.initialize(target)"
> >>> >
> >>> >>
> >>> >> The rest seems to me similar to the example, except for that I set
> the
> >>> File
> >>> >> is set dynamically with every Ajax request.
> >>> >>
> >>> >> The File itself does exist and is created correctly.
> >>> >>
> >>> >> However Wicket throws this wired exception:
> >>> >> http://pastebin.com/raw.php?i=Fijqjd5y
> >>> >
> >>> > NullPointerException is not something one should expect so it is a
> bug.
> >>> > According to
> >>>
> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
> >>> > its cause is that HttpServletRequest.getParametersMap() returns a Map
> >>> > with an entry with value == null. I'm not sure in what cases this can
> >>> > happen but I'll add a check for null there.
> >>> >
> >>> >>
> >>> >> The trace seems to be an internal Wicket error. Is this a Bug inside
> >>> Wicket?
> >>> >>
> >>> >> Sebastian
> >>> >> --
> >>> >> Sebastian Wagner
> >>> >> https://twitter.com/#!/dead_lock
> >>> >> http://www.webbase-design.de
> >>> >> http://www.wagner-sebastian.com
> >>> >> seba.wagner@gmail.com
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > Martin Grigorov
> >>> > jWeekend
> >>> > Training, Consulting, Development
> >>> > http://jWeekend.com
> >>>
> >>>
> >>>
> >>> --
> >>> Martin Grigorov
> >>> jWeekend
> >>> Training, Consulting, Development
> >>> http://jWeekend.com
> >>>
> >>
> >>
> >>
> >> --
> >> WBR
> >> Maxim aka solomax
> >>
> >
> >
> >
> > --
> > WBR
> > Maxim aka solomax
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>



-- 
WBR
Maxim aka solomax

Re: issue with file download out of form component

Posted by Maxim Solodovnik <so...@gmail.com>.
Hello Martin,

Thanks for the tip.
I'll double check the version of javax.servlet currently being used

On Wed, Oct 24, 2012 at 7:24 PM, Martin Grigorov <mg...@apache.org>wrote:

> Hi Maxim,
>
> What web container do you use ?
> According to Servlet API
> (
> http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getParameterMap()
> )
> the map should be <String, String[]).
>
> On Wed, Oct 24, 2012 at 1:45 PM, Maxim Solodovnik <so...@gmail.com>
> wrote:
> > Hello Martin,
> >
> > I just have tested Wicket 6.2
> > Using AjaxDownload:
> >
> https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/util/AjaxDownload.java
> >
> >
> https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java(line
> :
> > 123 currently commented out)
> >
> > I get URL like this on file download:
> >
> http://192.168.72.100:5080/openmeetings/html/?4-1.IBehaviorListener.0-contents-child-backupUpload&antiCache=1351074316336
> >
> > And then get ClassCastException from Wiket in:
> > org.apache.wicket.protocol.http.servlet.ServletWebRequest line 305
> >
> > param.getValue() returns String and cannot be casted to String[] (for the
> > 'antiCache' parameter above)
> >
> > Is there anything I can do to fix it?
> >
> >
> > Thanks a lot in advance :)
> >
> > On Wed, Oct 17, 2012 at 5:39 PM, Maxim Solodovnik <solomax666@gmail.com
> >wrote:
> >
> >> Thanks a lot!
> >> Those NullPointer exceptions makes makes me mad :( (we use customized
> >> Tomcat 6 in our project) And I get them all the time.
> >> I get rid of all callback URL and all parameters passed via URL.
> >>
> >> Thanks!! :)
> >>
> >>
> >> On Wed, Oct 17, 2012 at 5:11 PM, Martin Grigorov <mgrigorov@apache.org
> >wrote:
> >>
> >>> There was a response from Maxim from OpenMeetings team, but
> >>> users@wicket.apache.org was not in CC:
> >>>
> >>> <copy>
> >>> Hello Martin,
> >>>
> >>> I have modified the code and have removed AjaxDownloader (since it is
> not
> >>> really necessary).
> >>> NullPointerException somehow happens while post parameters parsing
> >>> (getCallbackURL) is not working anymore.
> >>>
> >>> I believe this is somehow connected with custom HomePageMapper
> >>>
> >>>
> >>>
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
> >>>
> >>> line 62 and below.
> >>> Maybe you can help me with this?
> >>>
> >>> I have added HomePageMapper to implement "single page application" and
> >>> remove all URL parameters automaticatilly being added by Wicket.
> >>>
> >>> Thanks in advance
> >>>
> >>> </copy>
> >>>
> >>>
> >>> Hi Maxim,
> >>>
> >>> The NullPointerException is while Wicket tries to read the POST
> >>> parameters. The request mappers manipulate only the GET parameters, so
> >>> I think it is not related.
> >>> I've just checked Jetty 7.6.3 sources and they return String[0] so it
> >>> should be OK in this particular version of Jetty. But I'll add the
> >>> check anyway with https://issues.apache.org/jira/browse/WICKET-4818
> >>>
> >>> On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mgrigorov@apache.org
> >
> >>> wrote:
> >>> > Hi,
> >>> >
> >>> > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
> >>> > <se...@gmail.com> wrote:
> >>> >> Hi,
> >>> >>
> >>> >> I did follow this tutorial to create a download via Ajax in a form:
> >>> >>
> >>>
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
> >>> >>
> >>> >> The slightly modified code can be seen here:
> >>> >>
> >>>
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
> >>> >> Line 127 "download.initialize(target);" is called.
> >>> >
> >>> > It seems you have modified BackupPanel. There is no code like
> >>> > "download.initialize(target)"
> >>> >
> >>> >>
> >>> >> The rest seems to me similar to the example, except for that I set
> the
> >>> File
> >>> >> is set dynamically with every Ajax request.
> >>> >>
> >>> >> The File itself does exist and is created correctly.
> >>> >>
> >>> >> However Wicket throws this wired exception:
> >>> >> http://pastebin.com/raw.php?i=Fijqjd5y
> >>> >
> >>> > NullPointerException is not something one should expect so it is a
> bug.
> >>> > According to
> >>>
> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
> >>> > its cause is that HttpServletRequest.getParametersMap() returns a Map
> >>> > with an entry with value == null. I'm not sure in what cases this can
> >>> > happen but I'll add a check for null there.
> >>> >
> >>> >>
> >>> >> The trace seems to be an internal Wicket error. Is this a Bug inside
> >>> Wicket?
> >>> >>
> >>> >> Sebastian
> >>> >> --
> >>> >> Sebastian Wagner
> >>> >> https://twitter.com/#!/dead_lock
> >>> >> http://www.webbase-design.de
> >>> >> http://www.wagner-sebastian.com
> >>> >> seba.wagner@gmail.com
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > Martin Grigorov
> >>> > jWeekend
> >>> > Training, Consulting, Development
> >>> > http://jWeekend.com
> >>>
> >>>
> >>>
> >>> --
> >>> Martin Grigorov
> >>> jWeekend
> >>> Training, Consulting, Development
> >>> http://jWeekend.com
> >>>
> >>
> >>
> >>
> >> --
> >> WBR
> >> Maxim aka solomax
> >>
> >
> >
> >
> > --
> > WBR
> > Maxim aka solomax
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>



-- 
WBR
Maxim aka solomax

Re: issue with file download out of form component

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

What web container do you use ?
According to Servlet API
(http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getParameterMap())
the map should be <String, String[]).

On Wed, Oct 24, 2012 at 1:45 PM, Maxim Solodovnik <so...@gmail.com> wrote:
> Hello Martin,
>
> I just have tested Wicket 6.2
> Using AjaxDownload:
> https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/util/AjaxDownload.java
>
> https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java(line:
> 123 currently commented out)
>
> I get URL like this on file download:
> http://192.168.72.100:5080/openmeetings/html/?4-1.IBehaviorListener.0-contents-child-backupUpload&antiCache=1351074316336
>
> And then get ClassCastException from Wiket in:
> org.apache.wicket.protocol.http.servlet.ServletWebRequest line 305
>
> param.getValue() returns String and cannot be casted to String[] (for the
> 'antiCache' parameter above)
>
> Is there anything I can do to fix it?
>
>
> Thanks a lot in advance :)
>
> On Wed, Oct 17, 2012 at 5:39 PM, Maxim Solodovnik <so...@gmail.com>wrote:
>
>> Thanks a lot!
>> Those NullPointer exceptions makes makes me mad :( (we use customized
>> Tomcat 6 in our project) And I get them all the time.
>> I get rid of all callback URL and all parameters passed via URL.
>>
>> Thanks!! :)
>>
>>
>> On Wed, Oct 17, 2012 at 5:11 PM, Martin Grigorov <mg...@apache.org>wrote:
>>
>>> There was a response from Maxim from OpenMeetings team, but
>>> users@wicket.apache.org was not in CC:
>>>
>>> <copy>
>>> Hello Martin,
>>>
>>> I have modified the code and have removed AjaxDownloader (since it is not
>>> really necessary).
>>> NullPointerException somehow happens while post parameters parsing
>>> (getCallbackURL) is not working anymore.
>>>
>>> I believe this is somehow connected with custom HomePageMapper
>>>
>>>
>>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
>>>
>>> line 62 and below.
>>> Maybe you can help me with this?
>>>
>>> I have added HomePageMapper to implement "single page application" and
>>> remove all URL parameters automaticatilly being added by Wicket.
>>>
>>> Thanks in advance
>>>
>>> </copy>
>>>
>>>
>>> Hi Maxim,
>>>
>>> The NullPointerException is while Wicket tries to read the POST
>>> parameters. The request mappers manipulate only the GET parameters, so
>>> I think it is not related.
>>> I've just checked Jetty 7.6.3 sources and they return String[0] so it
>>> should be OK in this particular version of Jetty. But I'll add the
>>> check anyway with https://issues.apache.org/jira/browse/WICKET-4818
>>>
>>> On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mg...@apache.org>
>>> wrote:
>>> > Hi,
>>> >
>>> > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
>>> > <se...@gmail.com> wrote:
>>> >> Hi,
>>> >>
>>> >> I did follow this tutorial to create a download via Ajax in a form:
>>> >>
>>> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>>> >>
>>> >> The slightly modified code can be seen here:
>>> >>
>>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
>>> >> Line 127 "download.initialize(target);" is called.
>>> >
>>> > It seems you have modified BackupPanel. There is no code like
>>> > "download.initialize(target)"
>>> >
>>> >>
>>> >> The rest seems to me similar to the example, except for that I set the
>>> File
>>> >> is set dynamically with every Ajax request.
>>> >>
>>> >> The File itself does exist and is created correctly.
>>> >>
>>> >> However Wicket throws this wired exception:
>>> >> http://pastebin.com/raw.php?i=Fijqjd5y
>>> >
>>> > NullPointerException is not something one should expect so it is a bug.
>>> > According to
>>> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
>>> > its cause is that HttpServletRequest.getParametersMap() returns a Map
>>> > with an entry with value == null. I'm not sure in what cases this can
>>> > happen but I'll add a check for null there.
>>> >
>>> >>
>>> >> The trace seems to be an internal Wicket error. Is this a Bug inside
>>> Wicket?
>>> >>
>>> >> Sebastian
>>> >> --
>>> >> Sebastian Wagner
>>> >> https://twitter.com/#!/dead_lock
>>> >> http://www.webbase-design.de
>>> >> http://www.wagner-sebastian.com
>>> >> seba.wagner@gmail.com
>>> >
>>> >
>>> >
>>> > --
>>> > Martin Grigorov
>>> > jWeekend
>>> > Training, Consulting, Development
>>> > http://jWeekend.com
>>>
>>>
>>>
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com
>>>
>>
>>
>>
>> --
>> WBR
>> Maxim aka solomax
>>
>
>
>
> --
> WBR
> Maxim aka solomax



-- 
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: issue with file download out of form component

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

What web container do you use ?
According to Servlet API
(http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getParameterMap())
the map should be <String, String[]).

On Wed, Oct 24, 2012 at 1:45 PM, Maxim Solodovnik <so...@gmail.com> wrote:
> Hello Martin,
>
> I just have tested Wicket 6.2
> Using AjaxDownload:
> https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/util/AjaxDownload.java
>
> https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java(line:
> 123 currently commented out)
>
> I get URL like this on file download:
> http://192.168.72.100:5080/openmeetings/html/?4-1.IBehaviorListener.0-contents-child-backupUpload&antiCache=1351074316336
>
> And then get ClassCastException from Wiket in:
> org.apache.wicket.protocol.http.servlet.ServletWebRequest line 305
>
> param.getValue() returns String and cannot be casted to String[] (for the
> 'antiCache' parameter above)
>
> Is there anything I can do to fix it?
>
>
> Thanks a lot in advance :)
>
> On Wed, Oct 17, 2012 at 5:39 PM, Maxim Solodovnik <so...@gmail.com>wrote:
>
>> Thanks a lot!
>> Those NullPointer exceptions makes makes me mad :( (we use customized
>> Tomcat 6 in our project) And I get them all the time.
>> I get rid of all callback URL and all parameters passed via URL.
>>
>> Thanks!! :)
>>
>>
>> On Wed, Oct 17, 2012 at 5:11 PM, Martin Grigorov <mg...@apache.org>wrote:
>>
>>> There was a response from Maxim from OpenMeetings team, but
>>> users@wicket.apache.org was not in CC:
>>>
>>> <copy>
>>> Hello Martin,
>>>
>>> I have modified the code and have removed AjaxDownloader (since it is not
>>> really necessary).
>>> NullPointerException somehow happens while post parameters parsing
>>> (getCallbackURL) is not working anymore.
>>>
>>> I believe this is somehow connected with custom HomePageMapper
>>>
>>>
>>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
>>>
>>> line 62 and below.
>>> Maybe you can help me with this?
>>>
>>> I have added HomePageMapper to implement "single page application" and
>>> remove all URL parameters automaticatilly being added by Wicket.
>>>
>>> Thanks in advance
>>>
>>> </copy>
>>>
>>>
>>> Hi Maxim,
>>>
>>> The NullPointerException is while Wicket tries to read the POST
>>> parameters. The request mappers manipulate only the GET parameters, so
>>> I think it is not related.
>>> I've just checked Jetty 7.6.3 sources and they return String[0] so it
>>> should be OK in this particular version of Jetty. But I'll add the
>>> check anyway with https://issues.apache.org/jira/browse/WICKET-4818
>>>
>>> On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mg...@apache.org>
>>> wrote:
>>> > Hi,
>>> >
>>> > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
>>> > <se...@gmail.com> wrote:
>>> >> Hi,
>>> >>
>>> >> I did follow this tutorial to create a download via Ajax in a form:
>>> >>
>>> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>>> >>
>>> >> The slightly modified code can be seen here:
>>> >>
>>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
>>> >> Line 127 "download.initialize(target);" is called.
>>> >
>>> > It seems you have modified BackupPanel. There is no code like
>>> > "download.initialize(target)"
>>> >
>>> >>
>>> >> The rest seems to me similar to the example, except for that I set the
>>> File
>>> >> is set dynamically with every Ajax request.
>>> >>
>>> >> The File itself does exist and is created correctly.
>>> >>
>>> >> However Wicket throws this wired exception:
>>> >> http://pastebin.com/raw.php?i=Fijqjd5y
>>> >
>>> > NullPointerException is not something one should expect so it is a bug.
>>> > According to
>>> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
>>> > its cause is that HttpServletRequest.getParametersMap() returns a Map
>>> > with an entry with value == null. I'm not sure in what cases this can
>>> > happen but I'll add a check for null there.
>>> >
>>> >>
>>> >> The trace seems to be an internal Wicket error. Is this a Bug inside
>>> Wicket?
>>> >>
>>> >> Sebastian
>>> >> --
>>> >> Sebastian Wagner
>>> >> https://twitter.com/#!/dead_lock
>>> >> http://www.webbase-design.de
>>> >> http://www.wagner-sebastian.com
>>> >> seba.wagner@gmail.com
>>> >
>>> >
>>> >
>>> > --
>>> > Martin Grigorov
>>> > jWeekend
>>> > Training, Consulting, Development
>>> > http://jWeekend.com
>>>
>>>
>>>
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com
>>>
>>
>>
>>
>> --
>> WBR
>> Maxim aka solomax
>>
>
>
>
> --
> WBR
> Maxim aka solomax



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

Re: issue with file download out of form component

Posted by Maxim Solodovnik <so...@gmail.com>.
Hello Martin,

I just have tested Wicket 6.2
Using AjaxDownload:
https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/util/AjaxDownload.java

https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java(line:
123 currently commented out)

I get URL like this on file download:
http://192.168.72.100:5080/openmeetings/html/?4-1.IBehaviorListener.0-contents-child-backupUpload&antiCache=1351074316336

And then get ClassCastException from Wiket in:
org.apache.wicket.protocol.http.servlet.ServletWebRequest line 305

param.getValue() returns String and cannot be casted to String[] (for the
'antiCache' parameter above)

Is there anything I can do to fix it?


Thanks a lot in advance :)

On Wed, Oct 17, 2012 at 5:39 PM, Maxim Solodovnik <so...@gmail.com>wrote:

> Thanks a lot!
> Those NullPointer exceptions makes makes me mad :( (we use customized
> Tomcat 6 in our project) And I get them all the time.
> I get rid of all callback URL and all parameters passed via URL.
>
> Thanks!! :)
>
>
> On Wed, Oct 17, 2012 at 5:11 PM, Martin Grigorov <mg...@apache.org>wrote:
>
>> There was a response from Maxim from OpenMeetings team, but
>> users@wicket.apache.org was not in CC:
>>
>> <copy>
>> Hello Martin,
>>
>> I have modified the code and have removed AjaxDownloader (since it is not
>> really necessary).
>> NullPointerException somehow happens while post parameters parsing
>> (getCallbackURL) is not working anymore.
>>
>> I believe this is somehow connected with custom HomePageMapper
>>
>>
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
>>
>> line 62 and below.
>> Maybe you can help me with this?
>>
>> I have added HomePageMapper to implement "single page application" and
>> remove all URL parameters automaticatilly being added by Wicket.
>>
>> Thanks in advance
>>
>> </copy>
>>
>>
>> Hi Maxim,
>>
>> The NullPointerException is while Wicket tries to read the POST
>> parameters. The request mappers manipulate only the GET parameters, so
>> I think it is not related.
>> I've just checked Jetty 7.6.3 sources and they return String[0] so it
>> should be OK in this particular version of Jetty. But I'll add the
>> check anyway with https://issues.apache.org/jira/browse/WICKET-4818
>>
>> On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mg...@apache.org>
>> wrote:
>> > Hi,
>> >
>> > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
>> > <se...@gmail.com> wrote:
>> >> Hi,
>> >>
>> >> I did follow this tutorial to create a download via Ajax in a form:
>> >>
>> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>> >>
>> >> The slightly modified code can be seen here:
>> >>
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
>> >> Line 127 "download.initialize(target);" is called.
>> >
>> > It seems you have modified BackupPanel. There is no code like
>> > "download.initialize(target)"
>> >
>> >>
>> >> The rest seems to me similar to the example, except for that I set the
>> File
>> >> is set dynamically with every Ajax request.
>> >>
>> >> The File itself does exist and is created correctly.
>> >>
>> >> However Wicket throws this wired exception:
>> >> http://pastebin.com/raw.php?i=Fijqjd5y
>> >
>> > NullPointerException is not something one should expect so it is a bug.
>> > According to
>> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
>> > its cause is that HttpServletRequest.getParametersMap() returns a Map
>> > with an entry with value == null. I'm not sure in what cases this can
>> > happen but I'll add a check for null there.
>> >
>> >>
>> >> The trace seems to be an internal Wicket error. Is this a Bug inside
>> Wicket?
>> >>
>> >> Sebastian
>> >> --
>> >> Sebastian Wagner
>> >> https://twitter.com/#!/dead_lock
>> >> http://www.webbase-design.de
>> >> http://www.wagner-sebastian.com
>> >> seba.wagner@gmail.com
>> >
>> >
>> >
>> > --
>> > Martin Grigorov
>> > jWeekend
>> > Training, Consulting, Development
>> > http://jWeekend.com
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>
>
>
> --
> WBR
> Maxim aka solomax
>



-- 
WBR
Maxim aka solomax



-- 
WBR
Maxim aka solomax

Re: issue with file download out of form component

Posted by Maxim Solodovnik <so...@gmail.com>.
Hello Martin,

I just have tested Wicket 6.2
Using AjaxDownload:
https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/util/AjaxDownload.java

https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java(line:
123 currently commented out)

I get URL like this on file download:
http://192.168.72.100:5080/openmeetings/html/?4-1.IBehaviorListener.0-contents-child-backupUpload&antiCache=1351074316336

And then get ClassCastException from Wiket in:
org.apache.wicket.protocol.http.servlet.ServletWebRequest line 305

param.getValue() returns String and cannot be casted to String[] (for the
'antiCache' parameter above)

Is there anything I can do to fix it?


Thanks a lot in advance :)

On Wed, Oct 17, 2012 at 5:39 PM, Maxim Solodovnik <so...@gmail.com>wrote:

> Thanks a lot!
> Those NullPointer exceptions makes makes me mad :( (we use customized
> Tomcat 6 in our project) And I get them all the time.
> I get rid of all callback URL and all parameters passed via URL.
>
> Thanks!! :)
>
>
> On Wed, Oct 17, 2012 at 5:11 PM, Martin Grigorov <mg...@apache.org>wrote:
>
>> There was a response from Maxim from OpenMeetings team, but
>> users@wicket.apache.org was not in CC:
>>
>> <copy>
>> Hello Martin,
>>
>> I have modified the code and have removed AjaxDownloader (since it is not
>> really necessary).
>> NullPointerException somehow happens while post parameters parsing
>> (getCallbackURL) is not working anymore.
>>
>> I believe this is somehow connected with custom HomePageMapper
>>
>>
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
>>
>> line 62 and below.
>> Maybe you can help me with this?
>>
>> I have added HomePageMapper to implement "single page application" and
>> remove all URL parameters automaticatilly being added by Wicket.
>>
>> Thanks in advance
>>
>> </copy>
>>
>>
>> Hi Maxim,
>>
>> The NullPointerException is while Wicket tries to read the POST
>> parameters. The request mappers manipulate only the GET parameters, so
>> I think it is not related.
>> I've just checked Jetty 7.6.3 sources and they return String[0] so it
>> should be OK in this particular version of Jetty. But I'll add the
>> check anyway with https://issues.apache.org/jira/browse/WICKET-4818
>>
>> On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mg...@apache.org>
>> wrote:
>> > Hi,
>> >
>> > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
>> > <se...@gmail.com> wrote:
>> >> Hi,
>> >>
>> >> I did follow this tutorial to create a download via Ajax in a form:
>> >>
>> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>> >>
>> >> The slightly modified code can be seen here:
>> >>
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
>> >> Line 127 "download.initialize(target);" is called.
>> >
>> > It seems you have modified BackupPanel. There is no code like
>> > "download.initialize(target)"
>> >
>> >>
>> >> The rest seems to me similar to the example, except for that I set the
>> File
>> >> is set dynamically with every Ajax request.
>> >>
>> >> The File itself does exist and is created correctly.
>> >>
>> >> However Wicket throws this wired exception:
>> >> http://pastebin.com/raw.php?i=Fijqjd5y
>> >
>> > NullPointerException is not something one should expect so it is a bug.
>> > According to
>> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
>> > its cause is that HttpServletRequest.getParametersMap() returns a Map
>> > with an entry with value == null. I'm not sure in what cases this can
>> > happen but I'll add a check for null there.
>> >
>> >>
>> >> The trace seems to be an internal Wicket error. Is this a Bug inside
>> Wicket?
>> >>
>> >> Sebastian
>> >> --
>> >> Sebastian Wagner
>> >> https://twitter.com/#!/dead_lock
>> >> http://www.webbase-design.de
>> >> http://www.wagner-sebastian.com
>> >> seba.wagner@gmail.com
>> >
>> >
>> >
>> > --
>> > Martin Grigorov
>> > jWeekend
>> > Training, Consulting, Development
>> > http://jWeekend.com
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>
>
>
> --
> WBR
> Maxim aka solomax
>



-- 
WBR
Maxim aka solomax

Re: issue with file download out of form component

Posted by Maxim Solodovnik <so...@gmail.com>.
Hello Martin,

I just have tested Wicket 6.2
Using AjaxDownload:
https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/util/AjaxDownload.java

https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java(line:
123 currently commented out)

I get URL like this on file download:
http://192.168.72.100:5080/openmeetings/html/?4-1.IBehaviorListener.0-contents-child-backupUpload&antiCache=1351074316336

And then get ClassCastException from Wiket in:
org.apache.wicket.protocol.http.servlet.ServletWebRequest line 305

param.getValue() returns String and cannot be casted to String[] (for the
'antiCache' parameter above)

Is there anything I can do to fix it?


Thanks a lot in advance :)

On Wed, Oct 17, 2012 at 5:39 PM, Maxim Solodovnik <so...@gmail.com>wrote:

> Thanks a lot!
> Those NullPointer exceptions makes makes me mad :( (we use customized
> Tomcat 6 in our project) And I get them all the time.
> I get rid of all callback URL and all parameters passed via URL.
>
> Thanks!! :)
>
>
> On Wed, Oct 17, 2012 at 5:11 PM, Martin Grigorov <mg...@apache.org>wrote:
>
>> There was a response from Maxim from OpenMeetings team, but
>> users@wicket.apache.org was not in CC:
>>
>> <copy>
>> Hello Martin,
>>
>> I have modified the code and have removed AjaxDownloader (since it is not
>> really necessary).
>> NullPointerException somehow happens while post parameters parsing
>> (getCallbackURL) is not working anymore.
>>
>> I believe this is somehow connected with custom HomePageMapper
>>
>>
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
>>
>> line 62 and below.
>> Maybe you can help me with this?
>>
>> I have added HomePageMapper to implement "single page application" and
>> remove all URL parameters automaticatilly being added by Wicket.
>>
>> Thanks in advance
>>
>> </copy>
>>
>>
>> Hi Maxim,
>>
>> The NullPointerException is while Wicket tries to read the POST
>> parameters. The request mappers manipulate only the GET parameters, so
>> I think it is not related.
>> I've just checked Jetty 7.6.3 sources and they return String[0] so it
>> should be OK in this particular version of Jetty. But I'll add the
>> check anyway with https://issues.apache.org/jira/browse/WICKET-4818
>>
>> On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mg...@apache.org>
>> wrote:
>> > Hi,
>> >
>> > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
>> > <se...@gmail.com> wrote:
>> >> Hi,
>> >>
>> >> I did follow this tutorial to create a download via Ajax in a form:
>> >>
>> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>> >>
>> >> The slightly modified code can be seen here:
>> >>
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
>> >> Line 127 "download.initialize(target);" is called.
>> >
>> > It seems you have modified BackupPanel. There is no code like
>> > "download.initialize(target)"
>> >
>> >>
>> >> The rest seems to me similar to the example, except for that I set the
>> File
>> >> is set dynamically with every Ajax request.
>> >>
>> >> The File itself does exist and is created correctly.
>> >>
>> >> However Wicket throws this wired exception:
>> >> http://pastebin.com/raw.php?i=Fijqjd5y
>> >
>> > NullPointerException is not something one should expect so it is a bug.
>> > According to
>> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
>> > its cause is that HttpServletRequest.getParametersMap() returns a Map
>> > with an entry with value == null. I'm not sure in what cases this can
>> > happen but I'll add a check for null there.
>> >
>> >>
>> >> The trace seems to be an internal Wicket error. Is this a Bug inside
>> Wicket?
>> >>
>> >> Sebastian
>> >> --
>> >> Sebastian Wagner
>> >> https://twitter.com/#!/dead_lock
>> >> http://www.webbase-design.de
>> >> http://www.wagner-sebastian.com
>> >> seba.wagner@gmail.com
>> >
>> >
>> >
>> > --
>> > Martin Grigorov
>> > jWeekend
>> > Training, Consulting, Development
>> > http://jWeekend.com
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>
>
>
> --
> WBR
> Maxim aka solomax
>



-- 
WBR
Maxim aka solomax

Re: issue with file download out of form component

Posted by Maxim Solodovnik <so...@gmail.com>.
Thanks a lot!
Those NullPointer exceptions makes makes me mad :( (we use customized
Tomcat 6 in our project) And I get them all the time.
I get rid of all callback URL and all parameters passed via URL.

Thanks!! :)

On Wed, Oct 17, 2012 at 5:11 PM, Martin Grigorov <mg...@apache.org>wrote:

> There was a response from Maxim from OpenMeetings team, but
> users@wicket.apache.org was not in CC:
>
> <copy>
> Hello Martin,
>
> I have modified the code and have removed AjaxDownloader (since it is not
> really necessary).
> NullPointerException somehow happens while post parameters parsing
> (getCallbackURL) is not working anymore.
>
> I believe this is somehow connected with custom HomePageMapper
>
>
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
>
> line 62 and below.
> Maybe you can help me with this?
>
> I have added HomePageMapper to implement "single page application" and
> remove all URL parameters automaticatilly being added by Wicket.
>
> Thanks in advance
>
> </copy>
>
>
> Hi Maxim,
>
> The NullPointerException is while Wicket tries to read the POST
> parameters. The request mappers manipulate only the GET parameters, so
> I think it is not related.
> I've just checked Jetty 7.6.3 sources and they return String[0] so it
> should be OK in this particular version of Jetty. But I'll add the
> check anyway with https://issues.apache.org/jira/browse/WICKET-4818
>
> On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mg...@apache.org>
> wrote:
> > Hi,
> >
> > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
> > <se...@gmail.com> wrote:
> >> Hi,
> >>
> >> I did follow this tutorial to create a download via Ajax in a form:
> >>
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
> >>
> >> The slightly modified code can be seen here:
> >>
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
> >> Line 127 "download.initialize(target);" is called.
> >
> > It seems you have modified BackupPanel. There is no code like
> > "download.initialize(target)"
> >
> >>
> >> The rest seems to me similar to the example, except for that I set the
> File
> >> is set dynamically with every Ajax request.
> >>
> >> The File itself does exist and is created correctly.
> >>
> >> However Wicket throws this wired exception:
> >> http://pastebin.com/raw.php?i=Fijqjd5y
> >
> > NullPointerException is not something one should expect so it is a bug.
> > According to
> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
> > its cause is that HttpServletRequest.getParametersMap() returns a Map
> > with an entry with value == null. I'm not sure in what cases this can
> > happen but I'll add a check for null there.
> >
> >>
> >> The trace seems to be an internal Wicket error. Is this a Bug inside
> Wicket?
> >>
> >> Sebastian
> >> --
> >> Sebastian Wagner
> >> https://twitter.com/#!/dead_lock
> >> http://www.webbase-design.de
> >> http://www.wagner-sebastian.com
> >> seba.wagner@gmail.com
> >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>



-- 
WBR
Maxim aka solomax

Re: issue with file download out of form component

Posted by "seba.wagner@gmail.com" <se...@gmail.com>.
Hi Martin,

thanks for committing a patch that fast!
I see your patch at: http://markmail.org/message/ntjpnxce6uw44ejt
But I don't know what SNAPSHOTs are compiled from that one.
Will this fix be in the next 6.2.0-SNAPSHOT or 6.0.0-SNAPSHOT ?

We sync our dependencies from:
https://repository.apache.org/content/groups/snapshots/org/apache/wicket/wicket/

Where is your

Thanks!
Sebastian

2012/10/17 Martin Grigorov <mg...@apache.org>

> There was a response from Maxim from OpenMeetings team, but
> users@wicket.apache.org was not in CC:
>
> <copy>
> Hello Martin,
>
> I have modified the code and have removed AjaxDownloader (since it is not
> really necessary).
> NullPointerException somehow happens while post parameters parsing
> (getCallbackURL) is not working anymore.
>
> I believe this is somehow connected with custom HomePageMapper
>
>
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
>
> line 62 and below.
> Maybe you can help me with this?
>
> I have added HomePageMapper to implement "single page application" and
> remove all URL parameters automaticatilly being added by Wicket.
>
> Thanks in advance
>
> </copy>
>
>
> Hi Maxim,
>
> The NullPointerException is while Wicket tries to read the POST
> parameters. The request mappers manipulate only the GET parameters, so
> I think it is not related.
> I've just checked Jetty 7.6.3 sources and they return String[0] so it
> should be OK in this particular version of Jetty. But I'll add the
> check anyway with https://issues.apache.org/jira/browse/WICKET-4818
>
> On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mg...@apache.org>
> wrote:
> > Hi,
> >
> > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
> > <se...@gmail.com> wrote:
> >> Hi,
> >>
> >> I did follow this tutorial to create a download via Ajax in a form:
> >>
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
> >>
> >> The slightly modified code can be seen here:
> >>
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
> >> Line 127 "download.initialize(target);" is called.
> >
> > It seems you have modified BackupPanel. There is no code like
> > "download.initialize(target)"
> >
> >>
> >> The rest seems to me similar to the example, except for that I set the
> File
> >> is set dynamically with every Ajax request.
> >>
> >> The File itself does exist and is created correctly.
> >>
> >> However Wicket throws this wired exception:
> >> http://pastebin.com/raw.php?i=Fijqjd5y
> >
> > NullPointerException is not something one should expect so it is a bug.
> > According to
> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
> > its cause is that HttpServletRequest.getParametersMap() returns a Map
> > with an entry with value == null. I'm not sure in what cases this can
> > happen but I'll add a check for null there.
> >
> >>
> >> The trace seems to be an internal Wicket error. Is this a Bug inside
> Wicket?
> >>
> >> Sebastian
> >> --
> >> Sebastian Wagner
> >> https://twitter.com/#!/dead_lock
> >> http://www.webbase-design.de
> >> http://www.wagner-sebastian.com
> >> seba.wagner@gmail.com
> >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com
>
>
>
> --
> 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
>
>


-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
seba.wagner@gmail.com

Re: issue with file download out of form component

Posted by Maxim Solodovnik <so...@gmail.com>.
Thanks a lot!
Those NullPointer exceptions makes makes me mad :( (we use customized
Tomcat 6 in our project) And I get them all the time.
I get rid of all callback URL and all parameters passed via URL.

Thanks!! :)

On Wed, Oct 17, 2012 at 5:11 PM, Martin Grigorov <mg...@apache.org>wrote:

> There was a response from Maxim from OpenMeetings team, but
> users@wicket.apache.org was not in CC:
>
> <copy>
> Hello Martin,
>
> I have modified the code and have removed AjaxDownloader (since it is not
> really necessary).
> NullPointerException somehow happens while post parameters parsing
> (getCallbackURL) is not working anymore.
>
> I believe this is somehow connected with custom HomePageMapper
>
>
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup
>
> line 62 and below.
> Maybe you can help me with this?
>
> I have added HomePageMapper to implement "single page application" and
> remove all URL parameters automaticatilly being added by Wicket.
>
> Thanks in advance
>
> </copy>
>
>
> Hi Maxim,
>
> The NullPointerException is while Wicket tries to read the POST
> parameters. The request mappers manipulate only the GET parameters, so
> I think it is not related.
> I've just checked Jetty 7.6.3 sources and they return String[0] so it
> should be OK in this particular version of Jetty. But I'll add the
> check anyway with https://issues.apache.org/jira/browse/WICKET-4818
>
> On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mg...@apache.org>
> wrote:
> > Hi,
> >
> > On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
> > <se...@gmail.com> wrote:
> >> Hi,
> >>
> >> I did follow this tutorial to create a download via Ajax in a form:
> >>
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
> >>
> >> The slightly modified code can be seen here:
> >>
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
> >> Line 127 "download.initialize(target);" is called.
> >
> > It seems you have modified BackupPanel. There is no code like
> > "download.initialize(target)"
> >
> >>
> >> The rest seems to me similar to the example, except for that I set the
> File
> >> is set dynamically with every Ajax request.
> >>
> >> The File itself does exist and is created correctly.
> >>
> >> However Wicket throws this wired exception:
> >> http://pastebin.com/raw.php?i=Fijqjd5y
> >
> > NullPointerException is not something one should expect so it is a bug.
> > According to
> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
> > its cause is that HttpServletRequest.getParametersMap() returns a Map
> > with an entry with value == null. I'm not sure in what cases this can
> > happen but I'll add a check for null there.
> >
> >>
> >> The trace seems to be an internal Wicket error. Is this a Bug inside
> Wicket?
> >>
> >> Sebastian
> >> --
> >> Sebastian Wagner
> >> https://twitter.com/#!/dead_lock
> >> http://www.webbase-design.de
> >> http://www.wagner-sebastian.com
> >> seba.wagner@gmail.com
> >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>



-- 
WBR
Maxim aka solomax

Re: issue with file download out of form component

Posted by Martin Grigorov <mg...@apache.org>.
There was a response from Maxim from OpenMeetings team, but
users@wicket.apache.org was not in CC:

<copy>
Hello Martin,

I have modified the code and have removed AjaxDownloader (since it is not
really necessary).
NullPointerException somehow happens while post parameters parsing
(getCallbackURL) is not working anymore.

I believe this is somehow connected with custom HomePageMapper

https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup

line 62 and below.
Maybe you can help me with this?

I have added HomePageMapper to implement "single page application" and
remove all URL parameters automaticatilly being added by Wicket.

Thanks in advance

</copy>


Hi Maxim,

The NullPointerException is while Wicket tries to read the POST
parameters. The request mappers manipulate only the GET parameters, so
I think it is not related.
I've just checked Jetty 7.6.3 sources and they return String[0] so it
should be OK in this particular version of Jetty. But I'll add the
check anyway with https://issues.apache.org/jira/browse/WICKET-4818

On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mg...@apache.org> wrote:
> Hi,
>
> On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
> <se...@gmail.com> wrote:
>> Hi,
>>
>> I did follow this tutorial to create a download via Ajax in a form:
>> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>>
>> The slightly modified code can be seen here:
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
>> Line 127 "download.initialize(target);" is called.
>
> It seems you have modified BackupPanel. There is no code like
> "download.initialize(target)"
>
>>
>> The rest seems to me similar to the example, except for that I set the File
>> is set dynamically with every Ajax request.
>>
>> The File itself does exist and is created correctly.
>>
>> However Wicket throws this wired exception:
>> http://pastebin.com/raw.php?i=Fijqjd5y
>
> NullPointerException is not something one should expect so it is a bug.
> According to https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
> its cause is that HttpServletRequest.getParametersMap() returns a Map
> with an entry with value == null. I'm not sure in what cases this can
> happen but I'll add a check for null there.
>
>>
>> The trace seems to be an internal Wicket error. Is this a Bug inside Wicket?
>>
>> Sebastian
>> --
>> Sebastian Wagner
>> https://twitter.com/#!/dead_lock
>> http://www.webbase-design.de
>> http://www.wagner-sebastian.com
>> seba.wagner@gmail.com
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com



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

Re: issue with file download out of form component

Posted by Maxim Solodovnik <so...@gmail.com>.
Hello Martin,

I have modified the code and have removed AjaxDownloader (since it is not
really necessary).
NullPointerException somehow happens while post parameters parsing
(getCallbackURL) is not working anymore.

I believe this is somehow connected with custom HomePageMapper

https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup

line 62 and below.
Maybe you can help me with this?

I have added HomePageMapper to implement "single page application" and
remove all URL parameters automaticatilly being added by Wicket.

Thanks in advance

On Wed, Oct 17, 2012 at 2:16 PM, Martin Grigorov <mg...@apache.org>wrote:

> Hi,
>
> On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
> <se...@gmail.com> wrote:
> > Hi,
> >
> > I did follow this tutorial to create a download via Ajax in a form:
> >
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
> >
> > The slightly modified code can be seen here:
> >
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
> > Line 127 "download.initialize(target);" is called.
>
> It seems you have modified BackupPanel. There is no code like
> "download.initialize(target)"
>
> >
> > The rest seems to me similar to the example, except for that I set the
> File
> > is set dynamically with every Ajax request.
> >
> > The File itself does exist and is created correctly.
> >
> > However Wicket throws this wired exception:
> > http://pastebin.com/raw.php?i=Fijqjd5y
>
> NullPointerException is not something one should expect so it is a bug.
> According to
> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
> its cause is that HttpServletRequest.getParametersMap() returns a Map
> with an entry with value == null. I'm not sure in what cases this can
> happen but I'll add a check for null there.
>
> >
> > The trace seems to be an internal Wicket error. Is this a Bug inside
> Wicket?
> >
> > Sebastian
> > --
> > Sebastian Wagner
> > https://twitter.com/#!/dead_lock
> > http://www.webbase-design.de
> > http://www.wagner-sebastian.com
> > seba.wagner@gmail.com
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>



-- 
WBR
Maxim aka solomax

Re: issue with file download out of form component

Posted by Martin Grigorov <mg...@apache.org>.
There was a response from Maxim from OpenMeetings team, but
users@wicket.apache.org was not in CC:

<copy>
Hello Martin,

I have modified the code and have removed AjaxDownloader (since it is not
really necessary).
NullPointerException somehow happens while post parameters parsing
(getCallbackURL) is not working anymore.

I believe this is somehow connected with custom HomePageMapper

https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup

line 62 and below.
Maybe you can help me with this?

I have added HomePageMapper to implement "single page application" and
remove all URL parameters automaticatilly being added by Wicket.

Thanks in advance

</copy>


Hi Maxim,

The NullPointerException is while Wicket tries to read the POST
parameters. The request mappers manipulate only the GET parameters, so
I think it is not related.
I've just checked Jetty 7.6.3 sources and they return String[0] so it
should be OK in this particular version of Jetty. But I'll add the
check anyway with https://issues.apache.org/jira/browse/WICKET-4818

On Wed, Oct 17, 2012 at 9:16 AM, Martin Grigorov <mg...@apache.org> wrote:
> Hi,
>
> On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
> <se...@gmail.com> wrote:
>> Hi,
>>
>> I did follow this tutorial to create a download via Ajax in a form:
>> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>>
>> The slightly modified code can be seen here:
>> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
>> Line 127 "download.initialize(target);" is called.
>
> It seems you have modified BackupPanel. There is no code like
> "download.initialize(target)"
>
>>
>> The rest seems to me similar to the example, except for that I set the File
>> is set dynamically with every Ajax request.
>>
>> The File itself does exist and is created correctly.
>>
>> However Wicket throws this wired exception:
>> http://pastebin.com/raw.php?i=Fijqjd5y
>
> NullPointerException is not something one should expect so it is a bug.
> According to https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
> its cause is that HttpServletRequest.getParametersMap() returns a Map
> with an entry with value == null. I'm not sure in what cases this can
> happen but I'll add a check for null there.
>
>>
>> The trace seems to be an internal Wicket error. Is this a Bug inside Wicket?
>>
>> Sebastian
>> --
>> Sebastian Wagner
>> https://twitter.com/#!/dead_lock
>> http://www.webbase-design.de
>> http://www.wagner-sebastian.com
>> seba.wagner@gmail.com
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com



-- 
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: issue with file download out of form component

Posted by Maxim Solodovnik <so...@gmail.com>.
Hello Martin,

I have modified the code and have removed AjaxDownloader (since it is not
really necessary).
NullPointerException somehow happens while post parameters parsing
(getCallbackURL) is not working anymore.

I believe this is somehow connected with custom HomePageMapper

https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?revision=1384647&view=markup

line 62 and below.
Maybe you can help me with this?

I have added HomePageMapper to implement "single page application" and
remove all URL parameters automaticatilly being added by Wicket.

Thanks in advance

On Wed, Oct 17, 2012 at 2:16 PM, Martin Grigorov <mg...@apache.org>wrote:

> Hi,
>
> On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
> <se...@gmail.com> wrote:
> > Hi,
> >
> > I did follow this tutorial to create a download via Ajax in a form:
> >
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
> >
> > The slightly modified code can be seen here:
> >
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
> > Line 127 "download.initialize(target);" is called.
>
> It seems you have modified BackupPanel. There is no code like
> "download.initialize(target)"
>
> >
> > The rest seems to me similar to the example, except for that I set the
> File
> > is set dynamically with every Ajax request.
> >
> > The File itself does exist and is created correctly.
> >
> > However Wicket throws this wired exception:
> > http://pastebin.com/raw.php?i=Fijqjd5y
>
> NullPointerException is not something one should expect so it is a bug.
> According to
> https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
> its cause is that HttpServletRequest.getParametersMap() returns a Map
> with an entry with value == null. I'm not sure in what cases this can
> happen but I'll add a check for null there.
>
> >
> > The trace seems to be an internal Wicket error. Is this a Bug inside
> Wicket?
> >
> > Sebastian
> > --
> > Sebastian Wagner
> > https://twitter.com/#!/dead_lock
> > http://www.webbase-design.de
> > http://www.wagner-sebastian.com
> > seba.wagner@gmail.com
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>



-- 
WBR
Maxim aka solomax

Re: issue with file download out of form component

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

On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
<se...@gmail.com> wrote:
> Hi,
>
> I did follow this tutorial to create a download via Ajax in a form:
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>
> The slightly modified code can be seen here:
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
> Line 127 "download.initialize(target);" is called.

It seems you have modified BackupPanel. There is no code like
"download.initialize(target)"

>
> The rest seems to me similar to the example, except for that I set the File
> is set dynamically with every Ajax request.
>
> The File itself does exist and is created correctly.
>
> However Wicket throws this wired exception:
> http://pastebin.com/raw.php?i=Fijqjd5y

NullPointerException is not something one should expect so it is a bug.
According to https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
its cause is that HttpServletRequest.getParametersMap() returns a Map
with an entry with value == null. I'm not sure in what cases this can
happen but I'll add a check for null there.

>
> The trace seems to be an internal Wicket error. Is this a Bug inside Wicket?
>
> Sebastian
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> seba.wagner@gmail.com



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

Re: issue with file download out of form component

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

On Tue, Oct 16, 2012 at 7:59 PM, seba.wagner@gmail.com
<se...@gmail.com> wrote:
> Hi,
>
> I did follow this tutorial to create a download via Ajax in a form:
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>
> The slightly modified code can be seen here:
> https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/backup/BackupPanel.java?view=markup
> Line 127 "download.initialize(target);" is called.

It seems you have modified BackupPanel. There is no code like
"download.initialize(target)"

>
> The rest seems to me similar to the example, except for that I set the File
> is set dynamically with every Ajax request.
>
> The File itself does exist and is created correctly.
>
> However Wicket throws this wired exception:
> http://pastebin.com/raw.php?i=Fijqjd5y

NullPointerException is not something one should expect so it is a bug.
According to https://github.com/apache/wicket/blob/build/wicket-6.0.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java#L321
its cause is that HttpServletRequest.getParametersMap() returns a Map
with an entry with value == null. I'm not sure in what cases this can
happen but I'll add a check for null there.

>
> The trace seems to be an internal Wicket error. Is this a Bug inside Wicket?
>
> Sebastian
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> seba.wagner@gmail.com



-- 
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