Wicket applications debugging

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Wicket applications debugging

Diego Fernandez
Hi wicket devs, usually when I'm trying to fix a bug in a Wicket application
(or other Java servlet applications), I've the information of the pages
where the error occurs and I've to find which Page/Component implements that
page.
When the application gets bigger, finding where the logic for a page is
implemented requires a lot of search in different parts of the application.

I was wondering if exists a wicket servlet/filter that could give
information about:
- Which class implements the page
- Which components are rendered for a page

Something like:
http://localhost:8080/wicketinfo?page=/mypage

/mypage is implemented by com.myapp.bla.MyPage
And is composed by:
- com.myapp.bla.components.XComponent
...

Is there something like this in Wicket?

I'm asking in the dev list, because if there is nothing like this I think
that could be good to develop it, at least it will save me a lot of search
during bugfixing.
Any clues on where to look to develop something like this?

Thanks,
Diego
Reply | Threaded
Open this post in threaded view
|

Re: Wicket applications debugging

Martin Grigorov-4
Hi,

Can you paste a stacktrace which is not understandable by you ?

I don't understand what do you mean by "/mypage is implemented by
com.myapp.bla.MyPage"
I guess you have MyPage mounted at /mypage but I don't understand what
kind of problems are hard to find the cause.

> I've the information of the pages
> where the error occurs and I've to find which Page/Component implements that
> page.
I suppose you are not sure which page is being processed when the
problem occurs. You can you Wicket's RequestLogger to log which page
is going to be processed or web container's access log to see what URL
is requested and then map it to a page.


On Fri, Aug 26, 2011 at 10:49 PM, Diego Fernandez <[hidden email]> wrote:

> Hi wicket devs, usually when I'm trying to fix a bug in a Wicket application
> (or other Java servlet applications), I've the information of the pages
> where the error occurs and I've to find which Page/Component implements that
> page.
> When the application gets bigger, finding where the logic for a page is
> implemented requires a lot of search in different parts of the application.
>
> I was wondering if exists a wicket servlet/filter that could give
> information about:
> - Which class implements the page
> - Which components are rendered for a page
>
> Something like:
> http://localhost:8080/wicketinfo?page=/mypage
>
> /mypage is implemented by com.myapp.bla.MyPage
> And is composed by:
> - com.myapp.bla.components.XComponent
> ...
>
> Is there something like this in Wicket?
>
> I'm asking in the dev list, because if there is nothing like this I think
> that could be good to develop it, at least it will save me a lot of search
> during bugfixing.
> Any clues on where to look to develop something like this?
>
> Thanks,
> Diego
>



--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
Reply | Threaded
Open this post in threaded view
|

Re: Wicket applications debugging

Bruno Borges
This is more related to knowing on how to read logs rather a lack of feature
in Wicket.

*Bruno Borges*
(21) 7672-7099
*www.brunoborges.com*



On Fri, Aug 26, 2011 at 5:17 PM, Martin Grigorov <[hidden email]>wrote:

> Hi,
>
> Can you paste a stacktrace which is not understandable by you ?
>
> I don't understand what do you mean by "/mypage is implemented by
> com.myapp.bla.MyPage"
> I guess you have MyPage mounted at /mypage but I don't understand what
> kind of problems are hard to find the cause.
>
> > I've the information of the pages
> > where the error occurs and I've to find which Page/Component implements
> that
> > page.
> I suppose you are not sure which page is being processed when the
> problem occurs. You can you Wicket's RequestLogger to log which page
> is going to be processed or web container's access log to see what URL
> is requested and then map it to a page.
>
>
> On Fri, Aug 26, 2011 at 10:49 PM, Diego Fernandez <[hidden email]>
> wrote:
> > Hi wicket devs, usually when I'm trying to fix a bug in a Wicket
> application
> > (or other Java servlet applications), I've the information of the pages
> > where the error occurs and I've to find which Page/Component implements
> that
> > page.
> > When the application gets bigger, finding where the logic for a page is
> > implemented requires a lot of search in different parts of the
> application.
> >
> > I was wondering if exists a wicket servlet/filter that could give
> > information about:
> > - Which class implements the page
> > - Which components are rendered for a page
> >
> > Something like:
> > http://localhost:8080/wicketinfo?page=/mypage
> >
> > /mypage is implemented by com.myapp.bla.MyPage
> > And is composed by:
> > - com.myapp.bla.components.XComponent
> > ...
> >
> > Is there something like this in Wicket?
> >
> > I'm asking in the dev list, because if there is nothing like this I think
> > that could be good to develop it, at least it will save me a lot of
> search
> > during bugfixing.
> > Any clues on where to look to develop something like this?
> >
> > Thanks,
> > Diego
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
Reply | Threaded
Open this post in threaded view
|

Re: Wicket applications debugging

Diego Fernandez
In reply to this post by Martin Grigorov-4
On Fri, Aug 26, 2011 at 5:17 PM, Martin Grigorov <[hidden email]>wrote:

> Hi,
>
> Can you paste a stacktrace which is not understandable by you ?
>

Yes, of course that I understand how to read a stack trace (not need to be a
troll, ok).


> I don't understand what do you mean by "/mypage is implemented by
> com.myapp.bla.MyPage"
> I guess you have MyPage mounted at /mypage but I don't understand what
> kind of problems are hard to find the cause.


Is not for a particular kind of problem, but when you have to fix a bug in a
big web application, sometimes you don't know who is processing the page
that is displayed. So you have to start searching where the URL is mounted,
etc.
That takes time, specially if you are not the original developer.
I usually end doing a simple thing: just look into the page source, then
search in code for some string in the page source (sometimes that works).
Compare that to the easy Seaside.st halos (look at
http://seaside.st/about/examples/halos), I don't want something advanced as
the Seaside halos (which I think is not possible in Wicket). But I want
something more friendly and fast than trying to get the information from the
RequestLogger.
A special servlet could be enabled in development/qa (or even in production
under some security constraint) and could be useful also for QA people to
report bugs in a page.



> > I've the information of the pages
> > where the error occurs and I've to find which Page/Component implements
> that
> > page.
> I suppose you are not sure which page is being processed when the
> problem occurs. You can you Wicket's RequestLogger to log which page
> is going to be processed or web container's access log to see what URL
> is requested and then map it to a page.
>
>
> On Fri, Aug 26, 2011 at 10:49 PM, Diego Fernandez <[hidden email]>
> wrote:
> > Hi wicket devs, usually when I'm trying to fix a bug in a Wicket
> application
> > (or other Java servlet applications), I've the information of the pages
> > where the error occurs and I've to find which Page/Component implements
> that
> > page.
> > When the application gets bigger, finding where the logic for a page is
> > implemented requires a lot of search in different parts of the
> application.
> >
> > I was wondering if exists a wicket servlet/filter that could give
> > information about:
> > - Which class implements the page
> > - Which components are rendered for a page
> >
> > Something like:
> > http://localhost:8080/wicketinfo?page=/mypage
> >
> > /mypage is implemented by com.myapp.bla.MyPage
> > And is composed by:
> > - com.myapp.bla.components.XComponent
> > ...
> >
> > Is there something like this in Wicket?
> >
> > I'm asking in the dev list, because if there is nothing like this I think
> > that could be good to develop it, at least it will save me a lot of
> search
> > during bugfixing.
> > Any clues on where to look to develop something like this?
> >
> > Thanks,
> > Diego
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
Reply | Threaded
Open this post in threaded view
|

Re: Wicket applications debugging

Diego Fernandez
In reply to this post by Bruno Borges
Well I think that is not a matter of knowing how to read the logs.
Testability and usability (for the developer) are quality attributes that
could be improved by the feature that I'm trying to explain: easy for QA to
report bug details, easy for the dev to look in the right place.

Ok, I'll try to implement the feature and publish it in github it when is
ready, I was expecting a more friendly response from you guys.

Thanks,
Diego


On Fri, Aug 26, 2011 at 5:43 PM, Bruno Borges <[hidden email]>wrote:

> This is more related to knowing on how to read logs rather a lack of
> feature
> in Wicket.
>
> *Bruno Borges*
> (21) 7672-7099
> *www.brunoborges.com*
>
>
>
> On Fri, Aug 26, 2011 at 5:17 PM, Martin Grigorov <[hidden email]
> >wrote:
>
> > Hi,
> >
> > Can you paste a stacktrace which is not understandable by you ?
> >
> > I don't understand what do you mean by "/mypage is implemented by
> > com.myapp.bla.MyPage"
> > I guess you have MyPage mounted at /mypage but I don't understand what
> > kind of problems are hard to find the cause.
> >
> > > I've the information of the pages
> > > where the error occurs and I've to find which Page/Component implements
> > that
> > > page.
> > I suppose you are not sure which page is being processed when the
> > problem occurs. You can you Wicket's RequestLogger to log which page
> > is going to be processed or web container's access log to see what URL
> > is requested and then map it to a page.
> >
> >
> > On Fri, Aug 26, 2011 at 10:49 PM, Diego Fernandez <[hidden email]>
> > wrote:
> > > Hi wicket devs, usually when I'm trying to fix a bug in a Wicket
> > application
> > > (or other Java servlet applications), I've the information of the pages
> > > where the error occurs and I've to find which Page/Component implements
> > that
> > > page.
> > > When the application gets bigger, finding where the logic for a page is
> > > implemented requires a lot of search in different parts of the
> > application.
> > >
> > > I was wondering if exists a wicket servlet/filter that could give
> > > information about:
> > > - Which class implements the page
> > > - Which components are rendered for a page
> > >
> > > Something like:
> > > http://localhost:8080/wicketinfo?page=/mypage
> > >
> > > /mypage is implemented by com.myapp.bla.MyPage
> > > And is composed by:
> > > - com.myapp.bla.components.XComponent
> > > ...
> > >
> > > Is there something like this in Wicket?
> > >
> > > I'm asking in the dev list, because if there is nothing like this I
> think
> > > that could be good to develop it, at least it will save me a lot of
> > search
> > > during bugfixing.
> > > Any clues on where to look to develop something like this?
> > >
> > > Thanks,
> > > Diego
> > >
> >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Wicket applications debugging

Bruno Borges
Sorry Diego, I didn't mean to be rude or a troll.

Honestly, what you want might be an excellent tool to be added to Wicket
Stuff. Something like:

if (developmentMode) {
  mountPage("/_wicket_info", WicketInfoDashboard.class);
  // ugly URL to not be confused with something else
}

And that page be able to provide a lot of information on something like a
URL, a WebPage or a component.

Ask for GitHub access and start a project at WicketStuff. Sure there will be
others willing to help. Not just troll... :-) I'm one of them.

*Bruno Borges*
(21) 7672-7099
*www.brunoborges.com*



On Fri, Aug 26, 2011 at 6:02 PM, Diego Fernandez <[hidden email]> wrote:

> Well I think that is not a matter of knowing how to read the logs.
> Testability and usability (for the developer) are quality attributes that
> could be improved by the feature that I'm trying to explain: easy for QA to
> report bug details, easy for the dev to look in the right place.
>
> Ok, I'll try to implement the feature and publish it in github it when is
> ready, I was expecting a more friendly response from you guys.
>
> Thanks,
> Diego
>
>
> On Fri, Aug 26, 2011 at 5:43 PM, Bruno Borges <[hidden email]
> >wrote:
>
> > This is more related to knowing on how to read logs rather a lack of
> > feature
> > in Wicket.
> >
> > *Bruno Borges*
> > (21) 7672-7099
> > *www.brunoborges.com*
> >
> >
> >
> > On Fri, Aug 26, 2011 at 5:17 PM, Martin Grigorov <[hidden email]
> > >wrote:
> >
> > > Hi,
> > >
> > > Can you paste a stacktrace which is not understandable by you ?
> > >
> > > I don't understand what do you mean by "/mypage is implemented by
> > > com.myapp.bla.MyPage"
> > > I guess you have MyPage mounted at /mypage but I don't understand what
> > > kind of problems are hard to find the cause.
> > >
> > > > I've the information of the pages
> > > > where the error occurs and I've to find which Page/Component
> implements
> > > that
> > > > page.
> > > I suppose you are not sure which page is being processed when the
> > > problem occurs. You can you Wicket's RequestLogger to log which page
> > > is going to be processed or web container's access log to see what URL
> > > is requested and then map it to a page.
> > >
> > >
> > > On Fri, Aug 26, 2011 at 10:49 PM, Diego Fernandez <[hidden email]>
> > > wrote:
> > > > Hi wicket devs, usually when I'm trying to fix a bug in a Wicket
> > > application
> > > > (or other Java servlet applications), I've the information of the
> pages
> > > > where the error occurs and I've to find which Page/Component
> implements
> > > that
> > > > page.
> > > > When the application gets bigger, finding where the logic for a page
> is
> > > > implemented requires a lot of search in different parts of the
> > > application.
> > > >
> > > > I was wondering if exists a wicket servlet/filter that could give
> > > > information about:
> > > > - Which class implements the page
> > > > - Which components are rendered for a page
> > > >
> > > > Something like:
> > > > http://localhost:8080/wicketinfo?page=/mypage
> > > >
> > > > /mypage is implemented by com.myapp.bla.MyPage
> > > > And is composed by:
> > > > - com.myapp.bla.components.XComponent
> > > > ...
> > > >
> > > > Is there something like this in Wicket?
> > > >
> > > > I'm asking in the dev list, because if there is nothing like this I
> > think
> > > > that could be good to develop it, at least it will save me a lot of
> > > search
> > > > during bugfixing.
> > > > Any clues on where to look to develop something like this?
> > > >
> > > > Thanks,
> > > > Diego
> > > >
> > >
> > >
> > >
> > > --
> > > Martin Grigorov
> > > jWeekend
> > > Training, Consulting, Development
> > > http://jWeekend.com
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Wicket applications debugging

Diego Fernandez
Thanks!! and sorry to be rude too, np :)

On Fri, Aug 26, 2011 at 6:13 PM, Bruno Borges <[hidden email]>wrote:

> Sorry Diego, I didn't mean to be rude or a troll.
>
> Honestly, what you want might be an excellent tool to be added to Wicket
> Stuff. Something like:
>
> if (developmentMode) {
>  mountPage("/_wicket_info", WicketInfoDashboard.class);
>  // ugly URL to not be confused with something else
> }
>
> And that page be able to provide a lot of information on something like a
> URL, a WebPage or a component.
>
> Ask for GitHub access and start a project at WicketStuff. Sure there will
> be
> others willing to help. Not just troll... :-) I'm one of them.
>
> *Bruno Borges*
> (21) 7672-7099
> *www.brunoborges.com*
>
>
>
> On Fri, Aug 26, 2011 at 6:02 PM, Diego Fernandez <[hidden email]>
> wrote:
>
> > Well I think that is not a matter of knowing how to read the logs.
> > Testability and usability (for the developer) are quality attributes that
> > could be improved by the feature that I'm trying to explain: easy for QA
> to
> > report bug details, easy for the dev to look in the right place.
> >
> > Ok, I'll try to implement the feature and publish it in github it when is
> > ready, I was expecting a more friendly response from you guys.
> >
> > Thanks,
> > Diego
> >
> >
> > On Fri, Aug 26, 2011 at 5:43 PM, Bruno Borges <[hidden email]
> > >wrote:
> >
> > > This is more related to knowing on how to read logs rather a lack of
> > > feature
> > > in Wicket.
> > >
> > > *Bruno Borges*
> > > (21) 7672-7099
> > > *www.brunoborges.com*
> > >
> > >
> > >
> > > On Fri, Aug 26, 2011 at 5:17 PM, Martin Grigorov <[hidden email]
> > > >wrote:
> > >
> > > > Hi,
> > > >
> > > > Can you paste a stacktrace which is not understandable by you ?
> > > >
> > > > I don't understand what do you mean by "/mypage is implemented by
> > > > com.myapp.bla.MyPage"
> > > > I guess you have MyPage mounted at /mypage but I don't understand
> what
> > > > kind of problems are hard to find the cause.
> > > >
> > > > > I've the information of the pages
> > > > > where the error occurs and I've to find which Page/Component
> > implements
> > > > that
> > > > > page.
> > > > I suppose you are not sure which page is being processed when the
> > > > problem occurs. You can you Wicket's RequestLogger to log which page
> > > > is going to be processed or web container's access log to see what
> URL
> > > > is requested and then map it to a page.
> > > >
> > > >
> > > > On Fri, Aug 26, 2011 at 10:49 PM, Diego Fernandez <
> [hidden email]>
> > > > wrote:
> > > > > Hi wicket devs, usually when I'm trying to fix a bug in a Wicket
> > > > application
> > > > > (or other Java servlet applications), I've the information of the
> > pages
> > > > > where the error occurs and I've to find which Page/Component
> > implements
> > > > that
> > > > > page.
> > > > > When the application gets bigger, finding where the logic for a
> page
> > is
> > > > > implemented requires a lot of search in different parts of the
> > > > application.
> > > > >
> > > > > I was wondering if exists a wicket servlet/filter that could give
> > > > > information about:
> > > > > - Which class implements the page
> > > > > - Which components are rendered for a page
> > > > >
> > > > > Something like:
> > > > > http://localhost:8080/wicketinfo?page=/mypage
> > > > >
> > > > > /mypage is implemented by com.myapp.bla.MyPage
> > > > > And is composed by:
> > > > > - com.myapp.bla.components.XComponent
> > > > > ...
> > > > >
> > > > > Is there something like this in Wicket?
> > > > >
> > > > > I'm asking in the dev list, because if there is nothing like this I
> > > think
> > > > > that could be good to develop it, at least it will save me a lot of
> > > > search
> > > > > during bugfixing.
> > > > > Any clues on where to look to develop something like this?
> > > > >
> > > > > Thanks,
> > > > > Diego
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Martin Grigorov
> > > > jWeekend
> > > > Training, Consulting, Development
> > > > http://jWeekend.com
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Wicket applications debugging

Igor Vaynberg-2
In reply to this post by Diego Fernandez
see IDebugSettings#setOutputMarkupContainerClassName(boolean)

this will output comments in html that have the class names of
components that render the output

-igor

On Fri, Aug 26, 2011 at 1:52 PM, Diego Fernandez <[hidden email]> wrote:

> On Fri, Aug 26, 2011 at 5:17 PM, Martin Grigorov <[hidden email]>wrote:
>
>> Hi,
>>
>> Can you paste a stacktrace which is not understandable by you ?
>>
>
> Yes, of course that I understand how to read a stack trace (not need to be a
> troll, ok).
>
>
>> I don't understand what do you mean by "/mypage is implemented by
>> com.myapp.bla.MyPage"
>> I guess you have MyPage mounted at /mypage but I don't understand what
>> kind of problems are hard to find the cause.
>
>
> Is not for a particular kind of problem, but when you have to fix a bug in a
> big web application, sometimes you don't know who is processing the page
> that is displayed. So you have to start searching where the URL is mounted,
> etc.
> That takes time, specially if you are not the original developer.
> I usually end doing a simple thing: just look into the page source, then
> search in code for some string in the page source (sometimes that works).
> Compare that to the easy Seaside.st halos (look at
> http://seaside.st/about/examples/halos), I don't want something advanced as
> the Seaside halos (which I think is not possible in Wicket). But I want
> something more friendly and fast than trying to get the information from the
> RequestLogger.
> A special servlet could be enabled in development/qa (or even in production
> under some security constraint) and could be useful also for QA people to
> report bugs in a page.
>
>
>
>> > I've the information of the pages
>> > where the error occurs and I've to find which Page/Component implements
>> that
>> > page.
>> I suppose you are not sure which page is being processed when the
>> problem occurs. You can you Wicket's RequestLogger to log which page
>> is going to be processed or web container's access log to see what URL
>> is requested and then map it to a page.
>>
>>
>> On Fri, Aug 26, 2011 at 10:49 PM, Diego Fernandez <[hidden email]>
>> wrote:
>> > Hi wicket devs, usually when I'm trying to fix a bug in a Wicket
>> application
>> > (or other Java servlet applications), I've the information of the pages
>> > where the error occurs and I've to find which Page/Component implements
>> that
>> > page.
>> > When the application gets bigger, finding where the logic for a page is
>> > implemented requires a lot of search in different parts of the
>> application.
>> >
>> > I was wondering if exists a wicket servlet/filter that could give
>> > information about:
>> > - Which class implements the page
>> > - Which components are rendered for a page
>> >
>> > Something like:
>> > http://localhost:8080/wicketinfo?page=/mypage
>> >
>> > /mypage is implemented by com.myapp.bla.MyPage
>> > And is composed by:
>> > - com.myapp.bla.components.XComponent
>> > ...
>> >
>> > Is there something like this in Wicket?
>> >
>> > I'm asking in the dev list, because if there is nothing like this I think
>> > that could be good to develop it, at least it will save me a lot of
>> search
>> > during bugfixing.
>> > Any clues on where to look to develop something like this?
>> >
>> > Thanks,
>> > Diego
>> >
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Wicket applications debugging

Martin Grigorov-4
I'll continue my trolling...
See DebugBar Panel in wicket-devutils, it tells you which is the page,
what components are inside with their full paths, how many active
sessions are there, what's the size of the current page and session,
...

And I think Halos is possible in Wicket too. Just can't imagine how a
page with many components will look like with halos enabled. For sure
it wont be anything like your web designer ever intended.

On Sat, Aug 27, 2011 at 12:46 AM, Igor Vaynberg <[hidden email]> wrote:

> see IDebugSettings#setOutputMarkupContainerClassName(boolean)
>
> this will output comments in html that have the class names of
> components that render the output
>
> -igor
>
> On Fri, Aug 26, 2011 at 1:52 PM, Diego Fernandez <[hidden email]> wrote:
>> On Fri, Aug 26, 2011 at 5:17 PM, Martin Grigorov <[hidden email]>wrote:
>>
>>> Hi,
>>>
>>> Can you paste a stacktrace which is not understandable by you ?
>>>
>>
>> Yes, of course that I understand how to read a stack trace (not need to be a
>> troll, ok).
>>
>>
>>> I don't understand what do you mean by "/mypage is implemented by
>>> com.myapp.bla.MyPage"
>>> I guess you have MyPage mounted at /mypage but I don't understand what
>>> kind of problems are hard to find the cause.
>>
>>
>> Is not for a particular kind of problem, but when you have to fix a bug in a
>> big web application, sometimes you don't know who is processing the page
>> that is displayed. So you have to start searching where the URL is mounted,
>> etc.
>> That takes time, specially if you are not the original developer.
>> I usually end doing a simple thing: just look into the page source, then
>> search in code for some string in the page source (sometimes that works).
>> Compare that to the easy Seaside.st halos (look at
>> http://seaside.st/about/examples/halos), I don't want something advanced as
>> the Seaside halos (which I think is not possible in Wicket). But I want
>> something more friendly and fast than trying to get the information from the
>> RequestLogger.
>> A special servlet could be enabled in development/qa (or even in production
>> under some security constraint) and could be useful also for QA people to
>> report bugs in a page.
>>
>>
>>
>>> > I've the information of the pages
>>> > where the error occurs and I've to find which Page/Component implements
>>> that
>>> > page.
>>> I suppose you are not sure which page is being processed when the
>>> problem occurs. You can you Wicket's RequestLogger to log which page
>>> is going to be processed or web container's access log to see what URL
>>> is requested and then map it to a page.
>>>
>>>
>>> On Fri, Aug 26, 2011 at 10:49 PM, Diego Fernandez <[hidden email]>
>>> wrote:
>>> > Hi wicket devs, usually when I'm trying to fix a bug in a Wicket
>>> application
>>> > (or other Java servlet applications), I've the information of the pages
>>> > where the error occurs and I've to find which Page/Component implements
>>> that
>>> > page.
>>> > When the application gets bigger, finding where the logic for a page is
>>> > implemented requires a lot of search in different parts of the
>>> application.
>>> >
>>> > I was wondering if exists a wicket servlet/filter that could give
>>> > information about:
>>> > - Which class implements the page
>>> > - Which components are rendered for a page
>>> >
>>> > Something like:
>>> > http://localhost:8080/wicketinfo?page=/mypage
>>> >
>>> > /mypage is implemented by com.myapp.bla.MyPage
>>> > And is composed by:
>>> > - com.myapp.bla.components.XComponent
>>> > ...
>>> >
>>> > Is there something like this in Wicket?
>>> >
>>> > I'm asking in the dev list, because if there is nothing like this I think
>>> > that could be good to develop it, at least it will save me a lot of
>>> search
>>> > during bugfixing.
>>> > Any clues on where to look to develop something like this?
>>> >
>>> > Thanks,
>>> > Diego
>>> >
>>>
>>>
>>>
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com
>>>
>>
>



--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
Reply | Threaded
Open this post in threaded view
|

Re: Wicket applications debugging

Diego Fernandez
Thanks! Igor / Martin

About halos, they are not completely possible but not because a Wicket issue
but because how the JVM/Java works: maybe is possible to display halos but
the "killer" feature of them is that you can edit the component source
directly from the web page (that's easy to do in Smalltalk because how the
VM/Image works).

Anyway sorry for the harsh beginning :) and many thanks for the
information!!

On Sun, Aug 28, 2011 at 7:43 AM, Martin Grigorov <[hidden email]>wrote:

> I'll continue my trolling...
> See DebugBar Panel in wicket-devutils, it tells you which is the page,
> what components are inside with their full paths, how many active
> sessions are there, what's the size of the current page and session,
> ...
>
> And I think Halos is possible in Wicket too. Just can't imagine how a
> page with many components will look like with halos enabled. For sure
> it wont be anything like your web designer ever intended.
>
> On Sat, Aug 27, 2011 at 12:46 AM, Igor Vaynberg <[hidden email]>
> wrote:
> > see IDebugSettings#setOutputMarkupContainerClassName(boolean)
> >
> > this will output comments in html that have the class names of
> > components that render the output
> >
> > -igor
> >
> > On Fri, Aug 26, 2011 at 1:52 PM, Diego Fernandez <[hidden email]>
> wrote:
> >> On Fri, Aug 26, 2011 at 5:17 PM, Martin Grigorov <[hidden email]
> >wrote:
> >>
> >>> Hi,
> >>>
> >>> Can you paste a stacktrace which is not understandable by you ?
> >>>
> >>
> >> Yes, of course that I understand how to read a stack trace (not need to
> be a
> >> troll, ok).
> >>
> >>
> >>> I don't understand what do you mean by "/mypage is implemented by
> >>> com.myapp.bla.MyPage"
> >>> I guess you have MyPage mounted at /mypage but I don't understand what
> >>> kind of problems are hard to find the cause.
> >>
> >>
> >> Is not for a particular kind of problem, but when you have to fix a bug
> in a
> >> big web application, sometimes you don't know who is processing the page
> >> that is displayed. So you have to start searching where the URL is
> mounted,
> >> etc.
> >> That takes time, specially if you are not the original developer.
> >> I usually end doing a simple thing: just look into the page source, then
> >> search in code for some string in the page source (sometimes that
> works).
> >> Compare that to the easy Seaside.st halos (look at
> >> http://seaside.st/about/examples/halos), I don't want something
> advanced as
> >> the Seaside halos (which I think is not possible in Wicket). But I want
> >> something more friendly and fast than trying to get the information from
> the
> >> RequestLogger.
> >> A special servlet could be enabled in development/qa (or even in
> production
> >> under some security constraint) and could be useful also for QA people
> to
> >> report bugs in a page.
> >>
> >>
> >>
> >>> > I've the information of the pages
> >>> > where the error occurs and I've to find which Page/Component
> implements
> >>> that
> >>> > page.
> >>> I suppose you are not sure which page is being processed when the
> >>> problem occurs. You can you Wicket's RequestLogger to log which page
> >>> is going to be processed or web container's access log to see what URL
> >>> is requested and then map it to a page.
> >>>
> >>>
> >>> On Fri, Aug 26, 2011 at 10:49 PM, Diego Fernandez <[hidden email]>
> >>> wrote:
> >>> > Hi wicket devs, usually when I'm trying to fix a bug in a Wicket
> >>> application
> >>> > (or other Java servlet applications), I've the information of the
> pages
> >>> > where the error occurs and I've to find which Page/Component
> implements
> >>> that
> >>> > page.
> >>> > When the application gets bigger, finding where the logic for a page
> is
> >>> > implemented requires a lot of search in different parts of the
> >>> application.
> >>> >
> >>> > I was wondering if exists a wicket servlet/filter that could give
> >>> > information about:
> >>> > - Which class implements the page
> >>> > - Which components are rendered for a page
> >>> >
> >>> > Something like:
> >>> > http://localhost:8080/wicketinfo?page=/mypage
> >>> >
> >>> > /mypage is implemented by com.myapp.bla.MyPage
> >>> > And is composed by:
> >>> > - com.myapp.bla.components.XComponent
> >>> > ...
> >>> >
> >>> > Is there something like this in Wicket?
> >>> >
> >>> > I'm asking in the dev list, because if there is nothing like this I
> think
> >>> > that could be good to develop it, at least it will save me a lot of
> >>> search
> >>> > during bugfixing.
> >>> > Any clues on where to look to develop something like this?
> >>> >
> >>> > Thanks,
> >>> > Diego
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> Martin Grigorov
> >>> jWeekend
> >>> Training, Consulting, Development
> >>> http://jWeekend.com
> >>>
> >>
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
Reply | Threaded
Open this post in threaded view
|

Re: Wicket applications debugging

Martin Grigorov-4
Hi Diego,

On Tue, Aug 30, 2011 at 5:09 PM, Diego Fernandez <[hidden email]> wrote:
> Thanks! Igor / Martin
>
> About halos, they are not completely possible but not because a Wicket issue
> but because how the JVM/Java works: maybe is possible to display halos but
> the "killer" feature of them is that you can edit the component source
> directly from the web page (that's easy to do in Smalltalk because how the
> VM/Image works).
Sure, it is possible. It just needs some more work.
With Eclipse compiler you can compile Java source on the fly and with
some ClassLoader tricks you can reload the newly generated class.
I think it is possible with bytecode modification (ASM/Javassist/...) too.

Maybe it is too much work, or it is not that gain and that's why
nobody did it for Java so far.
Or maybe there is already something somewhere. Just we are not aware of it.
>
> Anyway sorry for the harsh beginning :) and many thanks for the
> information!!
No problemo!

>
> On Sun, Aug 28, 2011 at 7:43 AM, Martin Grigorov <[hidden email]>wrote:
>
>> I'll continue my trolling...
>> See DebugBar Panel in wicket-devutils, it tells you which is the page,
>> what components are inside with their full paths, how many active
>> sessions are there, what's the size of the current page and session,
>> ...
>>
>> And I think Halos is possible in Wicket too. Just can't imagine how a
>> page with many components will look like with halos enabled. For sure
>> it wont be anything like your web designer ever intended.
>>
>> On Sat, Aug 27, 2011 at 12:46 AM, Igor Vaynberg <[hidden email]>
>> wrote:
>> > see IDebugSettings#setOutputMarkupContainerClassName(boolean)
>> >
>> > this will output comments in html that have the class names of
>> > components that render the output
>> >
>> > -igor
>> >
>> > On Fri, Aug 26, 2011 at 1:52 PM, Diego Fernandez <[hidden email]>
>> wrote:
>> >> On Fri, Aug 26, 2011 at 5:17 PM, Martin Grigorov <[hidden email]
>> >wrote:
>> >>
>> >>> Hi,
>> >>>
>> >>> Can you paste a stacktrace which is not understandable by you ?
>> >>>
>> >>
>> >> Yes, of course that I understand how to read a stack trace (not need to
>> be a
>> >> troll, ok).
>> >>
>> >>
>> >>> I don't understand what do you mean by "/mypage is implemented by
>> >>> com.myapp.bla.MyPage"
>> >>> I guess you have MyPage mounted at /mypage but I don't understand what
>> >>> kind of problems are hard to find the cause.
>> >>
>> >>
>> >> Is not for a particular kind of problem, but when you have to fix a bug
>> in a
>> >> big web application, sometimes you don't know who is processing the page
>> >> that is displayed. So you have to start searching where the URL is
>> mounted,
>> >> etc.
>> >> That takes time, specially if you are not the original developer.
>> >> I usually end doing a simple thing: just look into the page source, then
>> >> search in code for some string in the page source (sometimes that
>> works).
>> >> Compare that to the easy Seaside.st halos (look at
>> >> http://seaside.st/about/examples/halos), I don't want something
>> advanced as
>> >> the Seaside halos (which I think is not possible in Wicket). But I want
>> >> something more friendly and fast than trying to get the information from
>> the
>> >> RequestLogger.
>> >> A special servlet could be enabled in development/qa (or even in
>> production
>> >> under some security constraint) and could be useful also for QA people
>> to
>> >> report bugs in a page.
>> >>
>> >>
>> >>
>> >>> > I've the information of the pages
>> >>> > where the error occurs and I've to find which Page/Component
>> implements
>> >>> that
>> >>> > page.
>> >>> I suppose you are not sure which page is being processed when the
>> >>> problem occurs. You can you Wicket's RequestLogger to log which page
>> >>> is going to be processed or web container's access log to see what URL
>> >>> is requested and then map it to a page.
>> >>>
>> >>>
>> >>> On Fri, Aug 26, 2011 at 10:49 PM, Diego Fernandez <[hidden email]>
>> >>> wrote:
>> >>> > Hi wicket devs, usually when I'm trying to fix a bug in a Wicket
>> >>> application
>> >>> > (or other Java servlet applications), I've the information of the
>> pages
>> >>> > where the error occurs and I've to find which Page/Component
>> implements
>> >>> that
>> >>> > page.
>> >>> > When the application gets bigger, finding where the logic for a page
>> is
>> >>> > implemented requires a lot of search in different parts of the
>> >>> application.
>> >>> >
>> >>> > I was wondering if exists a wicket servlet/filter that could give
>> >>> > information about:
>> >>> > - Which class implements the page
>> >>> > - Which components are rendered for a page
>> >>> >
>> >>> > Something like:
>> >>> > http://localhost:8080/wicketinfo?page=/mypage
>> >>> >
>> >>> > /mypage is implemented by com.myapp.bla.MyPage
>> >>> > And is composed by:
>> >>> > - com.myapp.bla.components.XComponent
>> >>> > ...
>> >>> >
>> >>> > Is there something like this in Wicket?
>> >>> >
>> >>> > I'm asking in the dev list, because if there is nothing like this I
>> think
>> >>> > that could be good to develop it, at least it will save me a lot of
>> >>> search
>> >>> > during bugfixing.
>> >>> > Any clues on where to look to develop something like this?
>> >>> >
>> >>> > Thanks,
>> >>> > Diego
>> >>> >
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Martin Grigorov
>> >>> jWeekend
>> >>> Training, Consulting, Development
>> >>> http://jWeekend.com
>> >>>
>> >>
>> >
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>



--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
bht
Reply | Threaded
Open this post in threaded view
|

1.5 Jira issue

bht
Hi Martin,

Could you please look Jira issue
https://issues.apache.org/jira/browse/WICKET-4004

It is closed and I am not sure whether you get my comments. I could
provide a working testcase for 1.4 if required.

Many thanks

Bernard