From: Tom H. <Tom...@fu...> - 2003-06-05 10:52:39
|
Ok. What I have is a form that is submitted via an anchor tag. The tag calls javascript:formName.submit() The exception I get here is this: Exception class=[org.mozilla.javascript.JavaScriptException] com.gargoylesoftware.htmlunit.ScriptException: java.lang.NullPointerException at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScript Engine.java:196) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(Html Page.java:767) at com.gargoylesoftware.htmlunit.html.HtmlAnchor.click(HtmlAnchor.java:68) I have tried different approaches - like calling form.submit() in the test harness - but this just does a javascript form submit(). If I do this I get a different exception. java.lang.NullPointerException at org.apache.commons.httpclient.HttpMethodBase.getResponseBody(HttpMethodBase. java:670) at org.apache.commons.httpclient.methods.GetMethod.getResponseBody(GetMethod.ja va:293) at com.gargoylesoftware.htmlunit.HttpWebConnection.makeWebResponse(HttpWebConne ction.java:302) at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnectio n.java:106) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:928) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:305) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:242) at com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:137) What I am actually getting back from the server is a 100 - Continue - presumably with no body. What is actually happening is that the page should be redirected to another page (struts forward). So I'm a bit confused as why I am getting errors? You help is most welcome.... -----Original Message----- From: Mike Bowler [mailto:mb...@Ga...] Sent: 05 June 2003 10:58 To: 'htm...@li...' Subject: Re: [HtmlUnit] Error when submitting a form based on javascript.submit() Tom Hamilton wrote: > EcmaError: lineNumber=[1] column=[0] lineSource=[GargoyleWrapper0()] > name=[TypeError] sourceName=[Wrapper definition for javascript url] > message=[com.gargoylesoftware.htmlunit.javascript.host.Submit@3a5c7a > is not a function.] errorObject=[TypeError: > com.gargoylesoftware.htmlunit.javascript.host.Submit@3a5c7a is not a > function.] There isn't enough information here to be sure but I'd guess that this form contains an element with the name "submit". HtmlUnit is then finding that element before it finds the submit() method and is trying to execute it. -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. _______________________________________________ HtmlUnit-develop mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-develop ___________________________________________________________________________ This message is intended solely for the use of the individual or organisation to whom it is addressed and may contain confidential or copyrighted information. If you have received this message in error, please reply to the originator and delete it immediately. If you are not the intended recipient, you should not use, copy, alter, disseminate, print or disclose the contents of this message. Information or opinions expressed in this message and/or any attachments are those of the author and are not necessarily those of EFSS Ltd. or its affiliates. EFSS Ltd. accepts no responsibility for loss or damage arising from its use, including damage from viruses. Note: Internet e-mails are not necessarily secure. EFSS Ltd. does not accept responsibility for changes made to this message after it was sent. ___________________________________________________________________________ |
From: Mike B. <mb...@Ga...> - 2003-06-05 11:31:13
|
Are you using 1.2.2 (the last released version) or the code in CVS? Tom Hamilton wrote: > I have tried different approaches - like calling form.submit() in the > test harness - but this just does a javascript form submit(). If I do > this I get a different exception. > > java.lang.NullPointerException > at > org.apache.commons.httpclient.HttpMethodBase.getResponseBody( > HttpMethodBase.java:670) This is happening inside commons-httpclient and it's quite possible that this is already fixed. The version of commons-httpclient that ships with HtmlUnit-1.2.2 is alpha3. They recently released beta1 which fixes a large number of bugs and may fix this problem. Please try commons-httpclient-beta1 which can be found at: http://www.ibiblio.org/maven/commons-httpclient/jars/commons-httpclient-2.0-beta1.jar -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Christian S. <chr...@ne...> - 2003-06-08 22:59:05
|
Hello, I just downloaded the CVS source and built it using maven. So far so good. Now I am trying to find a way to also get at the documentation (assuming it is available). I was not able to find anything like a "doc" target callable with maven (maven.. mystery). Calling the "site" target caused a CVS/SSh connection with sourceforge to be established under the user mbowler, whose password I did not have handy.. Is there a way to build/get documentation for HtmlUnit from CVS? thanks, Christian |
From: Mike B. <mb...@Ga...> - 2003-06-09 10:11:01
|
> I just downloaded the CVS source and built it using maven. So far so > good. Now I am trying to find a way to also get at the documentation > (assuming it is available). > > I was not able to find anything like a "doc" target callable with > maven (maven.. mystery). Calling the "site" target caused a CVS/SSh > connection with sourceforge to be established under the user mbowler, > whose password I did not have handy.. "maven site" is the correct command. The fact that it's hardcoded to use my username is a problem which I'll have to fix. It's most likely trying to get to sourceforge to download the cvs logs. Try building with the -o option - this tells maven that you are offline so it shouldn't attempt to connect to the cvs repository. If you're going to be regularly running maven "offline" then you can set a property in build.properties to set this. I think the property is "maven.mode.offline=true" but you'd have to double check that from the maven docs. -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Christian S. <chr...@ne...> - 2003-06-09 13:53:43
|
Mike Bowler wrote: > > I just downloaded the CVS source and built it using maven. So far so > > good. Now I am trying to find a way to also get at the documentation > > (assuming it is available). > > > > I was not able to find anything like a "doc" target callable with > > maven (maven.. mystery). Calling the "site" target caused a CVS/SSh > > connection with sourceforge to be established under the user mbowler, > > whose password I did not have handy.. > > "maven site" is the correct command. The fact that it's hardcoded to > use my username is a problem which I'll have to fix. > > It's most likely trying to get to sourceforge to download the cvs logs. > Try building with the -o option - this tells maven that you are offline > so it shouldn't attempt to connect to the cvs repository. If you're > going to be regularly running maven "offline" then you can set a > property in build.properties to set this. I think the property is > "maven.mode.offline=true" but you'd have to double check that from the > maven docs. > > Mike, thanks for the reply. This is what I get when running "maven -o site": site: [echo] Generating the maven-changelog-plugin ... maven-changelog-plugin:report: [echo] The Changelog is available in the online mode only. [echo] Generating the maven-changes-plugin ... BUILD FAILED null:-1:-1: <null> No goal [maven-changes-plugin:report] Total time: 9 seconds I also tried the ant build, but it created documentation with all broken (empty) html files. thanks, Christian |
From: Mike B. <mb...@Ga...> - 2003-06-09 14:14:45
|
I did see your previous private email but I've been having email problems this morning :-( They seem to be fixed now <crossing fingers> Christian Sell wrote: > thanks for the reply. This is what I get when running "maven -o site": > > site: > [echo] Generating the maven-changelog-plugin ... > maven-changelog-plugin:report: > [echo] The Changelog is available in the online mode only. > > [echo] Generating the maven-changes-plugin ... > > BUILD FAILED > null:-1:-1: <null> No goal [maven-changes-plugin:report] > Total time: 9 seconds Try "maven -e -o site". The -e tells maven to dump out a full stack trace when something goes wrong. This is usually enough to figure out what is failing. I just tried "maven -e -o site" on my machine and it worked fine. What version of maven are you using btw? I'm currently using a version pulled from cvs sometime last week. > I also tried the ant build, but it created documentation with all > broken (empty) html files. The targets for docs in the ant build are no longer usable and should be removed. I'll add that to my todo list. -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |