From: Gian F. C. <gia...@to...> - 2004-10-29 04:33:23
|
I'm afraid it's a framework other than Htmlunit: Httpunit. Cheers, Gian ----- Original Message ----- From: "David D.Kilzer" <ddk...@ki...> To: <htm...@li...> Sent: Thursday, October 28, 2004 4:52 PM Subject: Re: [Htmlunit-user] Exception when using Page.submit() > Did you mean a framework other than WebSphere, or a framework other > than Htmlunit? > > My concern about running the code in the context of the JSP was that > the JSP engine performs redirection of normal I/O paths. I was > wondering if Htmlunit or any of its dependent libraries (like > commons-httpclient) didn't handle this I/O redirection, then it might > cause issues. > > However, if you used a framework other than WebSphere, then it sounds > like a bug in WebSphere. I've had some experience with it at my > current job, and IBM comes out with "fix packs" and patches all the > time. It's possible that you may need to update to the latest fix > pack, or install a patch. You also have the option of opening a > support request with them if you have a maintenance contract. > > Here's the web site for IBM product support. Hit the "W" link, and > select the correct WebSphere product, then you can search for fixes. > > http://www.ibm.com/software/support/ > > Dave > > > On Oct 28, 2004, at 5:52 AM, Gian Franco Casula wrote: > > > I've just tried another framework and the same proces > > does not occur. > > > > Thanks for looking at the problem. > > > > Gian > > > > ----- Original Message ----- > > From: "David D.Kilzer" <ddk...@ki...> > > To: <htm...@li...> > > Sent: Tuesday, October 26, 2004 3:46 PM > > Subject: Re: [Htmlunit-user] Exception when using Page.submit() > > > > > > It looks like WebSphere is running out of memory. Have you tried > > profiling your application using either WSAD or the WAS Admin Console > > utilities? Have you tried increasing the heap size for your > > application? > > > > Have you considered running the Htmlunit code in an Action (if you're > > using Struts) or a servlet before you get to the JSP so that you simply > > output data once you're in the JSP? (Typically, it's not considered > > good design to write Java code inside a JSP.) > > > > I've written a "screen scraping" application using Htmlunt recently, > > and found that after creating some 200-300 HtmlPage objects, the JVM > > runs out of memory using a heap size of 128MB. If I increase the heap > > size to 256MB, I can load 600-700 HtmlPage objects before running out > > of memory. I suspect that the loop between the WebClient and the > > WebConnection may be causing the garbage collector issues (although I > > haven't had time to try to profile the code or testing the "breaking" > > of the circular dependency): > > > > > > HtmlPage.getWebClient().getWebConnection().getWebClient().getWebConnect > > i > > on().adNaseum(); > > > > Is this a known issue? > > > > Dave > > > > > > On Oct 26, 2004, at 5:41 AM, Gian Franco Casula wrote: > > > >> Hi, > >> > >> I've written some code in a jsp page that > >> calls some java code that uses HtmlUnit to > >> connect to a web site. > >> > >> The java code works correctly when I use it > >> in isolation as a java application. > >> > >> Problems arise with the above mentioned jsp > >> page. When the code is running I get a long > >> list with the same message: > >> ---------------list begin--------------- > >> > >> ... > >> [26-10-04 8:54:20:914 CEST] 5dc773e1 HttpMethodBas W > >> org.apache.commons.httpclient.HttpMethodBase > >> Response content length is not known > >> [26-10-04 8:54:30:398 CEST] 5dc773e1 HttpMethodBas W > >> org.apache.commons.httpclient.HttpMethodBase > >> Response content length is not known > >> ... > >> ---------------list end--------------- > >> > >> This continues for a long time, until I get the message: > >> > >> ---------------list begin--------------- > >> JVMDG315: JVM Requesting Heap dump file > >> ...JVMDG318: Heap dump file written to E:\Program > >> Files\IBM\WebSphere... > >> JVMDG303: JVM Requesting Java core file > >> JVMDG304: Java core file written to E:\Program Files\IBM\WebSphere\... > >> JVMDG215: Dump Handler has Processed Outofmemory Signal -1. > >> ---------------list end--------------- > >> > >> A printStackTrace() shows the following: > >> > >> ---------------list begin--------------- > >> com.gargoylesoftware.htmlunit.ObjectInstantiationException: > >> Exception when calling constructor > >> [com.gargoylesoftware.htmlunit.html.HtmlFrame > >> > >> (com.gargoylesoftware.htmlunit.html.HtmlPage,org.w3c.dom.Element)] > >> com.gargoylesoftware.htmlunit.html.SimpleHtmlElementCreator.create > >> (SimpleHtmlElementCreator.java:91) > >> com.gargoylesoftware.htmlunit.html.HtmlPage.getHtmlElement > >> (HtmlPage.java:464) > >> > >> com.gargoylesoftware.htmlunit.html.HtmlElement.getHtmlElementsByTagNam > >> e > >> s > >> (HtmlElement.java:721) > >> > >> com.gargoylesoftware.htmlunit.html.HtmlPage.initializeFramesIfNeeded > >> (HtmlPage.java:1108) > >> > >> com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java: > >> 172) > >> com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:356) > >> com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:276) > >> > >> com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:169) > >> > >> com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:120) > >> ---------------list end--------------- > >> > >> > >> Can anyone help me with this? > >> > >> Cheers, > >> > >> Gian Franco Casula > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: IT Product Guide on > > ITManagersJournal > > Use IT products in your business? Tell us what you think of them. Give > > us > > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out > > more > > http://productguide.itmanagersjournal.com/guidepromo.tmpl > > _______________________________________________ > > Htmlunit-user mailing list > > Htm...@li... > > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: > > Sybase ASE Linux Express Edition - download now for FREE > > LinuxWorld Reader's Choice Award Winner for best database on Linux. > > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click > > _______________________________________________ > > Htmlunit-user mailing list > > Htm...@li... > > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user |