And note Chris' message earlier this week: String.replaceAll seems to
eat up a lot of resources, so instead of using a regex here, we should
use a cheaper replace.
Eelco
Jonathan Locke wrote:
that's a nice fix. but i want to test my fix too because the problem
you point out below was causing the error page to go crazy.
dave, are you out there still?
if dave doesn't reply, i may just test a little and check in my
change. it /ought/ to fix the OOM problem with the error page.
the main change is simply to prevent recursive error page invocation.
if something goes wrong with the error page, we
throw a ServletException instead of failing over and over. ;-)
jon
Johan Compagner wrote:
i don't change much just one thing:
new File(new URI(path));
new File(new URI(path.replaceAll(" ", "%20")));
so all spaces are first replaced with %20 before given the string to
the URI (which can't handle spaces in the url)
johan
Jonathan Locke wrote:
i already sent a fix to dave offline for the error page problem (so
don't fix that part).
the fix below was something gili talked me into. if you change it,
be sure to read the sun bug first.
Johan Compagner wrote:
I have found the problem in our code.
Will fix this for example this kind of piece is going wrong:
java.net.URL url = new java.net.URL("file://C:/Program
Files/Putty/putty.exe");
String test = url.toExternalForm();
java.io.File file = new java.io.File(new java.net.URI(test));
will look at it.
johan
Dave E Martin wrote:
Gory rambling details below, but summary of what The problem
appears to be to me:
Paths like "c:\Documents and settings..." are giving it a heart
attack trying to locate resources.
IllegalArgumentException and URISyntaxException are both thrown
repeatedly, and its freaking out
trying to report the problem, which causes it to have the problem
again, which causes it to try to
report THAT problem...
( personal disclaimer: my other machine runs linux 8) )
I'll have to fool around with this more later (unless the below is
enough) but for now:
Running the application via the debugger and pausing at a random
time after its been grinding the CPU for a bit reveals:
stopped in MarkupContainer.java line 401:
buffer.append(super.toString(true));
(actually stopped in AbstractStringBuilder.expandCapacity, but was
called from the above)
value in buffer: com.sun.jdi.IncompatibleThreadStateException
value in inherited model (ListItemModel) . index=7011
Further down the call stack we have:
MarkupContainer.internalBeginRequest:235
(super.internalBeginRequest());
MarkupContainer.internalBeginRequest:241 (abbrev:
iterator.next().internalBeginRequest());
MarkupContainer.internalBeginRequest:241 (abbrev:
iterator.next().internalBeginRequest());
(line 241 occurs twice in the call stack)
Ah, up in WicketComponentTree.java:96 we have listItem.add(new
Label("type", cdata.type))
and inspecting this reveals that listItem currently (when I hit
pause in the debugger) has
214842 elements (I suspect this is abnormally large?)
Going through with the debugger reveals that I should configure
the log4j system properly, sigh...
Hows this, omitting most of the gory details we have occurring
endlessly:
java.lang.IllegalArgumentException: Invalid URL parameter
file:/C:/Documents and
Settings/xxiii/.netbeans/4.0/jakarta-tomcat-5.0.28_base/work/Catalina/localhost/wicket/loader/wicket/markup/html/pages/ExceptionErrorPage.html
...
Caused by: java.net.URISyntaxException: Illegal character in path
at index 18: file:/C:/Documents and
Settings/xxiii/.netbeans/4.0/jakarta-tomcat-5.0.28_base/work/Catalina/localhost/wicket/loader/wicket/markup/html/pages/ExceptionErrorPage.html
Along with this, which seems to be getting bigger between each set
of exceptions:
2005-04-05 21:22:31,769 48406 [http-8084-Processor15] DEBUG
wicket.MarkupContainer - Add 341 to [MarkupContainer [Component
id = components, page =
wicket.markup.html.pages.ExceptionErrorPage, path =
4.componentTree.components.WicketComponentTree$2, isVisible =
true, isVersioned = true]]
2005-04-05 21:22:31,769 48406 [http-8084-Processor15] DEBUG
wicket.MarkupContainer - Add row to [MarkupContainer [Component
id = 341, page = wicket.markup.html.pages.ExceptionErrorPage, path
= 4.componentTree.components.341.ListItem, isVisible = true,
isVersioned = true]]
2005-04-05 21:22:31,769 48406 [http-8084-Processor15] DEBUG
wicket.MarkupContainer - Add path to [MarkupContainer [Component
id = 341, page = wicket.markup.html.pages.ExceptionErrorPage, path
= 4.componentTree.components.341.ListItem, isVisible = true,
isVersioned = true]]
2005-04-05 21:22:31,769 48406 [http-8084-Processor15] DEBUG
wicket.MarkupContainer - Add type to [MarkupContainer [Component
id = 341, page = wicket.markup.html.pages.ExceptionErrorPage, path
= 4.componentTree.components.341.ListItem, isVisible = true,
isVersioned = true]]
2005-04-05 21:22:31,785 48422 [http-8084-Processor15] DEBUG
wicket.MarkupContainer - Add model to [MarkupContainer [Component
id = 341, page = wicket.markup.html.pages.ExceptionErrorPage, path
= 4.componentTree.components.341.ListItem, isVisible = true,
isVersioned = true]]
This time it stopped at 341, did a bunch of "locating resource"
then threw the invalid URL exception again, started over, but got to
Add 1716 to [MarkupContainer... this time... (and I killed tomcat
at this point).
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real
users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real
users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real
users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user