[prev in list] [next in list] [prev in thread] [next in thread] 

List:       htmlunit-user
Subject:    Re: [Htmlunit-user] A error when htmlunit-2.7-SNAPSHOT used for
From:       Ahmed Ashour <asashour () yahoo ! com>
Date:       2009-12-14 10:01:03
Message-ID: 382184.14354.qm () web112220 ! mail ! gq1 ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Dai,

Please open a bug report.

The smaller the html/js involved, the quicker it should be fixed.

Please try to isolate a minimal case as hinted in \
http://htmlunit.sourceforge.net/submittingJSBugs.html

Ahmed ----
Blog: http://asashour.blogspot.com 

________________________________
From: Dai Phan the <bigword7681@yahoo.com>
To: htmlunit-develop@lists.sourceforge.net
Cc: htmlunit user <htmlunit-user@lists.sourceforge.net>
Sent: Sun, December 13, 2009 9:05:21 PM
Subject: [Htmlunit-user] A error when htmlunit-2.7-SNAPSHOT used for parsing \
GoogleCodeSearch result's Webpages

Dear everyone,
I am trying use htmlunit-2.7-SNAPSHOT,
to parse some of result's webpages of GoogleCodeSearch, 
for instance "http://www.google.com/codesearch/p?hl=en#OsXOG0jgXZ8/make/test/HelloWorld.java".


This is my code, and the attached file with Log of error. I am very grateful to you \
for your explanation for this issue. How I should correct it?

import java.io.IOException;
import java.net.MalformedURLException;

import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlPage;


    public class TestGooglePaser {
        public static void main(String[] args)
        throws FailingHttpStatusCodeException, MalformedURLException, IOException {

        final WebClient webClient = new WebClient();
        final HtmlPage page = webClient
                .getPage("http://www.google.com/codesearch/p?hl=en#OsXOG0jgXZ8/make/test/HelloWorld.java");
  webClient.waitForBackgroundJavaScriptStartingBefore(10000);
        webClient.waitForBackgroundJavaScript(10000);
        
        System.out.println(page.asXml());
        }
    }


This is sumary of error:
SEVERE: Job run failed with unexpected RuntimeException: TypeError: Cannot read \
property "caller" from undefined \
(http://www.google.com/codesearch/js/BrowsePage/B1C9F2A3FB805855187D6A49CB08D19B.cache.js#2317)


======= EXCEPTION START ========
EcmaError: lineNumber=[2317] column=[0] lineSource=[null] name=[TypeError] \
sourceName=[http://www.google.com/codesearch/js/BrowsePage/B1C9F2A3FB805855187D6A49CB08D19B.cache.js] \
 message=[TypeError: Cannot read property "caller" from undefined \
(http://www.google.com/codesearch/js/BrowsePage/B1C9F2A3FB805855187D6A49CB08D19B.cache.js#2317)]
                
com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property \
"caller" from undefined \
(http://www.google.com/codesearch/js/BrowsePage/B1C9F2A3FB805855187D6A49CB08D19B.cache.js#2317)
  at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:526)
                
....
== CALLING JAVASCRIPT ==
  function () {
      if (/loaded|complete/.test(k.readyState)) {
          A();
      }
  }
======= EXCEPTION END ========

Thank you very much !


      


[Attachment #5 (text/html)]

<html><head><style type="text/css"><!-- DIV {margin:0px;} \
--></style></head><body><div style="font-family:times new roman, new york, times, \
serif;font-size:12pt"><DIV></DIV> <DIV>Hi Dai,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Please open a bug report.</DIV>
<DIV>&nbsp;</DIV>
<DIV>The smaller the html/js involved, the quicker it should be fixed.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Please try to isolate a minimal case as hinted in <A \
href="http://htmlunit.sourceforge.net/submittingJSBugs.html">http://htmlunit.sourceforge.net/submittingJSBugs.html</A></DIV>
 <DIV>&nbsp;</DIV>
<DIV>Ahmed&nbsp;</DIV>----<BR>Blog: http://asashour.blogspot.com
<DIV><FONT size=2 face=Tahoma>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Dai Phan the \
&lt;bigword7681@yahoo.com&gt;<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> \
htmlunit-develop@lists.sourceforge.net<BR><B><SPAN style="FONT-WEIGHT: \
bold">Cc:</SPAN></B> htmlunit user \
&lt;htmlunit-user@lists.sourceforge.net&gt;<BR><B><SPAN style="FONT-WEIGHT: \
bold">Sent:</SPAN></B> Sun, December 13, 2009 9:05:21 PM<BR><B><SPAN \
style="FONT-WEIGHT: bold">Subject:</SPAN></B> [Htmlunit-user] A error when \
htmlunit-2.7-SNAPSHOT used for parsing GoogleCodeSearch result's \
Webpages<BR></FONT><BR>Dear everyone,<BR>I am trying use htmlunit-2.7-SNAPSHOT,<BR>to \
parse some of result's webpages of GoogleCodeSearch, <BR>for instance \
"http://www.google.com/codesearch/p?hl=en#OsXOG0jgXZ8/make/test/HelloWorld.java".<BR><BR>This \
is my code, and the attached file with Log of error. I am very grateful to you for \
your explanation for this issue. How I should correct it?<BR><BR>import <A  \
href="http://java.io.io/" target=_blank>java.io</A>.IOException;<BR>import <A \
href="http://java.net.ma/" \
target=_blank>java.net</A>.MalformedURLException;<BR><BR>import \
com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;<BR>import \
com.gargoylesoftware.htmlunit.WebClient;<BR>import \
com.gargoylesoftware.htmlunit.html.HtmlPage;<BR><BR><BR>&nbsp; &nbsp; public class \
TestGooglePaser {<BR>&nbsp; &nbsp; &nbsp; &nbsp; public static void main(String[] \
args)<BR>&nbsp; &nbsp; &nbsp; &nbsp; throws FailingHttpStatusCodeException, \
MalformedURLException, IOException {<BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; final \
WebClient webClient = new WebClient();<BR>&nbsp; &nbsp; &nbsp; &nbsp; final HtmlPage \
page = webClient<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
.getPage("<A href="http://www.google.com/codesearch/p?hl=en#OsXOG0jgXZ8/make/test/HelloWorld.java"
  target=_blank>http://www.google.com/codesearch/p?hl=en#OsXOG0jgXZ8/make/test/HelloWorld.java</A>");<BR>&nbsp; \
&nbsp; &nbsp; &nbsp; \
webClient.waitForBackgroundJavaScriptStartingBefore(10000);<BR>&nbsp; &nbsp; &nbsp; \
&nbsp; webClient.waitForBackgroundJavaScript(10000);<BR>&nbsp; &nbsp; &nbsp; &nbsp; \
<BR>&nbsp; &nbsp; &nbsp; &nbsp; System.out.println(page.asXml());<BR>&nbsp; &nbsp; \
&nbsp; &nbsp; }<BR>&nbsp; &nbsp; }<BR><BR><BR>This is sumary of error:<BR>SEVERE: Job \
run failed with unexpected RuntimeException: TypeError: Cannot read property "caller" \
from undefined (http://www.google.com/codesearch/js/BrowsePage/B1C9F2A3FB805855187D6A49CB08D19B.cache.js#2317)<BR><BR>======= \
EXCEPTION START ========<BR>EcmaError: lineNumber=[2317] column=[0] lineSource=[null] \
name=[TypeError] sourceName=[http://www.google.com/codesearch/js/BrowsePage/B1C9F2A3FB805855187D6A49CB08D19B.cache.js] \
<BR>message=[TypeError: Cannot read property "caller" from undefined (<A  \
href="http://www.google.com/codesearch/js/BrowsePage/B1C9F2A3FB805855187D6A49CB08D19B.cache.js#2317" \
target=_blank>http://www.google.com/codesearch/js/BrowsePage/B1C9F2A3FB805855187D6A49CB08D19B.cache.js#2317</A>)]<BR>com.gargoylesoftware.htmlunit.ScriptException: \
TypeError: Cannot read property "caller" from undefined (<A \
href="http://www.google.com/codesearch/js/BrowsePage/B1C9F2A3FB805855187D6A49CB08D19B.cache.js#2317" \
target=_blank>http://www.google.com/codesearch/js/BrowsePage/B1C9F2A3FB805855187D6A49CB08D19B.cache.js#2317</A>)<BR>&nbsp; \
&nbsp; at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:526)<BR>....<BR>== \
CALLING JAVASCRIPT ==<BR>&nbsp; function () {<BR>&nbsp; &nbsp; &nbsp; if \
(/loaded|complete/.test(k.readyState)) {<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
A();<BR>&nbsp; &nbsp; &nbsp; }<BR>&nbsp; }<BR>======= EXCEPTION END \
========<BR><BR>Thank you very much !<BR><BR><BR><BR>&nbsp;  &nbsp; &nbsp;</DIV><!-- \
cg37.c4.mail.gq1.yahoo.com compressed/chunked Sat Dec 12 08:18:28 PST 2009 \
--></div><br>



      </body></html>



------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev


_______________________________________________
Htmlunit-user mailing list
Htmlunit-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/htmlunit-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic