|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
NoClassDefFoundError with WebClient.getPageHi there, I am (trying) to use htmlunit to load up an html page to read the contents. The problem is occurring as I try to get the page.
Mt code is as follows: final WebClient webClient = new WebClient(); public void doGet(HttpServletRequest req, HttpServletResponse res) { url = new URL("http://blah.html"); try { webClient.setUseInsecureSSL(true); final HtmlPage page = (HtmlPage) webClient.getPage(url); } } When I run it I get: java.lang.NoClassDefFoundError: org/apache/commons/lang/ClassUtils com.gargoylesoftware.htmlunit.WebRequestSettings.toString(WebRequestSettings.java:261) java.lang.String.valueOf(String.java:2615) java.lang.StringBuffer.append(StringBuffer.java:220) com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:347) com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:407) uk.ac.uhi.it.VideoConference.doGet(VideoConference.java:42) javax.servlet.http.HttpServlet.service(HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) I assume it's a prob with jar versions, or not? Thanks. |
|
|
Re: NoClassDefFoundError with WebClient.getPageIt looks like either you're missing the commons-lang JAR, or you're using a version prior to 2.0, which is when that class was added to commons-lang.
On Mon, Jun 23, 2008 at 10:00 AM, nome <naomi.miles@...> wrote:
-- Daniel Gredler http://daniel.gredler.net/ ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Htmlunit-user mailing list Htmlunit-user@... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
|
|
Re: NoClassDefFoundError with WebClient.getPageI have commons-lang-2.4.jar and htmlunit-2.1.jar in my maven repository.
|
|
|
MooTools support?Hi All -
We are having some issues with MooTools working through HtmlUnit. The odd thing is, it only has problems when using the IE BrowserVersions... If we use FIREFOX_2, it works fine. But the project requires us to use IE so using firefox is not an option. Please see below exceptions and let us know if you have any ideas. Like I said, this only occurs in IE BrowserVersions so not sure if there is a difference in implementations which could be causing this. The JS file is attached. This is the line it has issues with: if (scripts) (window.execScript) ? window.execScript(scripts) : window.setTimeout(scripts, 0); Thanks in advance for the help! Brian Exceptions below: ---------------------- ERROR JavaScriptEngine:111 - runtimeError: message=[Invalid class string] sourceName=[http://spock:9080/blue2web/javascript/mootools-release-1.11.js] line=[5358] lineSource=[null] lineOffset=[0] Exception in thread "HtmlUnit Managed Thread #6: XMLHttpRequest.send" org.mozilla.javascript.EvaluatorException: Invalid class string (http://spock:9080/blue2web/javascript/mootools-release-1.11.js#5358) at com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter.runtimeError(StrictErrorReporter.java:112) at org.mozilla.javascript.Context.reportRuntimeError(Context.java:1030) at org.mozilla.javascript.Context.reportRuntimeError(Context.java:1086) at com.gargoylesoftware.htmlunit.javascript.host.Window.jsxFunction_execScript(Window.java:951) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155) at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:474) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3237) at script(http://spock:9080/blue2web/javascript/mootools-release-1.11.js:5358) at script(http://spock:9080/blue2web/javascript/mootools-release-1.11.js:5310) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2394) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162) at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2234) at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:257) at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:127) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3237) at script(http://spock:9080/blue2web/javascript/mootools-release-1.11.js:1424) at script(http://spock:9080/blue2web/javascript/mootools-release-1.11.js:610) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2394) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162) at org.mozilla.javascript.NativeArray.iterativeMethod(NativeArray.java:1219) at org.mozilla.javascript.NativeArray.execIdCall(NativeArray.java:249) at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:127) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3237) at script(http://spock:9080/blue2web/javascript/mootools-release-1.11.js:609) at script(http://spock:9080/blue2web/javascript/mootools-release-1.11.js:5172) at script(http://spock:9080/blue2web/javascript/mootools-release-1.11.js:5158) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2394) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162) at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2234) at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:257) at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:127) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3237) at script(http://spock:9080/blue2web/javascript/mootools-release-1.11.js:1424) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2394) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393) at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:192) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:160) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:498) at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.setState(XMLHttpRequest.java:159) at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.doSend(XMLHttpRequest.java:406) at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.access$000(XMLHttpRequest.java:73) at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest$1.run(XMLHttpRequest.java:353) at org.mozilla.javascript.Context.call(Context.java:577) at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:503) at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest$2.run(XMLHttpRequest.java:359) at java.lang.Thread.run(Thread.java:797) at com.gargoylesoftware.htmlunit.ThreadManager$1.run(ThreadManager.java:120) ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Htmlunit-user mailing list Htmlunit-user@... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
|
|
MooTools Support?Hi All -
We are having some issues with MooTools working through HtmlUnit. The odd thing is, it only has problems when using the IE BrowserVersions... If we use FIREFOX_2, it works fine. But the project requires us to use IE so using firefox is not an option. Please see below exceptions and let us know if you have any ideas. Like I said, this only occurs in IE BrowserVersions so not sure if there is a difference in implementations which could be causing this. This is the line it has issues with: if (scripts) (window.execScript) ? window.execScript(scripts) : window.setTimeout(scripts, 0); I did not include the JS file because it hit the max size limit of the user group. It can be pulled up through google though: mootools-release-1.11.js Thanks in advance for the help! Brian Exceptions below: ---------------------- ERROR JavaScriptEngine:111 - runtimeError: message=[Invalid class string] sourceName=[http://spock:9080/blue2web/javascript/mootools-release-1.11.js] line=[5358] lineSource=[null] lineOffset=[0] Exception in thread "HtmlUnit Managed Thread #6: XMLHttpRequest.send" org.mozilla.javascript.EvaluatorException: Invalid class string (http://spock:9080/blue2web/javascript/mootools-release-1.11.js#5358) at com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter.runtimeError(StrictErrorReporter.java:112) at org.mozilla.javascript.Context.reportRuntimeError(Context.java:1030) at org.mozilla.javascript.Context.reportRuntimeError(Context.java:1086) at com.gargoylesoftware.htmlunit.javascript.host.Window.jsxFunction_execScript(Window.java:951) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155) at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:474) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3237) at script(http://spock:9080/blue2web/javascript/mootools-release-1.11.js:5358) at script(http://spock:9080/blue2web/javascript/mootools-release-1.11.js:5310) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2394) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162) at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2234) at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:257) at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:127) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3237) at script(http://spock:9080/blue2web/javascript/mootools-release-1.11.js:1424) at script(http://spock:9080/blue2web/javascript/mootools-release-1.11.js:610) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2394) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162) at org.mozilla.javascript.NativeArray.iterativeMethod(NativeArray.java:1219) at org.mozilla.javascript.NativeArray.execIdCall(NativeArray.java:249) at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:127) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3237) at script(http://spock:9080/blue2web/javascript/mootools-release-1.11.js:609) at script(http://spock:9080/blue2web/javascript/mootools-release-1.11.js:5172) at script(http://spock:9080/blue2web/javascript/mootools-release-1.11.js:5158) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2394) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162) at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2234) at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:257) at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:127) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3237) at script(http://spock:9080/blue2web/javascript/mootools-release-1.11.js:1424) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2394) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393) at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:192) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:160) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:498) at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.setState(XMLHttpRequest.java:159) at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.doSend(XMLHttpRequest.java:406) at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.access$000(XMLHttpRequest.java:73) at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest$1.run(XMLHttpRequest.java:353) at org.mozilla.javascript.Context.call(Context.java:577) at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:503) at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest$2.run(XMLHttpRequest.java:359) at java.lang.Thread.run(Thread.java:797) at com.gargoylesoftware.htmlunit.ThreadManager$1.run(ThreadManager.java:120) ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Htmlunit-user mailing list Htmlunit-user@... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: MooTools Support?will do. thanks for the help.
--- On Mon, 6/23/08, Ahmed Ashour <asashour@...> wrote: > From: Ahmed Ashour <asashour@...> > Subject: Re: [Htmlunit-user] MooTools Support? > To: htmlunit-user@... > Date: Monday, June 23, 2008, 12:36 PM > Dear all, > Forgive me, I am in multi-thread mode these days. > IE accepts not specifying the 'language', I have > a test case. > In 15 minutes, please get latest snapshot from > http://build.canoo.com/htmlunit and give it a try. > Sorry for bothering, > Ahmed > ----- Original Message ---- > From: Ahmed Ashour <asashour@...> > To: htmlunit-user@... > Sent: Monday, June 23, 2008 8:26:56 PM > Subject: Re: [Htmlunit-user] MooTools Support? > > > I was in a hurry (as usual). > > As per the specs in > http://msdn.microsoft.com/en-us/library/ms536420(VS.85).aspx > > execScript: sLanguage is required. However, it defaults to > "JScript", which is not supported by HtmlUnit (if > you know how to support JScript in java, it can be included) > > Hope that clarifies, > Ahmed------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php_______________________________________________ > Htmlunit-user mailing list > Htmlunit-user@... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Htmlunit-user mailing list Htmlunit-user@... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
|
|
Re: MooTools Support?That worked Ahmed :) Thanks for the quick response!
--- On Mon, 6/23/08, Ahmed Ashour <asashour@...> wrote: > From: Ahmed Ashour <asashour@...> > Subject: Re: [Htmlunit-user] MooTools Support? > To: htmlunit-user@... > Date: Monday, June 23, 2008, 12:36 PM > Dear all, > Forgive me, I am in multi-thread mode these days. > IE accepts not specifying the 'language', I have > a test case. > In 15 minutes, please get latest snapshot from > http://build.canoo.com/htmlunit and give it a try. > Sorry for bothering, > Ahmed > ----- Original Message ---- > From: Ahmed Ashour <asashour@...> > To: htmlunit-user@... > Sent: Monday, June 23, 2008 8:26:56 PM > Subject: Re: [Htmlunit-user] MooTools Support? > > > I was in a hurry (as usual). > > As per the specs in > http://msdn.microsoft.com/en-us/library/ms536420(VS.85).aspx > > execScript: sLanguage is required. However, it defaults to > "JScript", which is not supported by HtmlUnit (if > you know how to support JScript in java, it can be included) > > Hope that clarifies, > Ahmed------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php_______________________________________________ > Htmlunit-user mailing list > Htmlunit-user@... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Htmlunit-user mailing list Htmlunit-user@... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
|
|
Re: NoClassDefFoundError with WebClient.getPageWell I don't run it, 'cos it doesn't work
![]() The original problem was to do with the wrong version of the commons-lang jar, hidden away in the deploy directory. I searched and got rid of all other versions. My next problem is: java.lang.NoClassDefFoundError: org/mozilla/javascript/EvaluatorException What .jar is this even from? I can't find it. Cheers.
|
|
|
Re: NoClassDefFoundError with WebClient.getPageShould have said, I have tried both rhino/js/1.6R7 and rhino/js/1.7R1 from the maven2 repo.
|
|
|
|