From: Marc G. <mgu...@ya...> - 2007-01-25 16:53:33
|
Hi, can you try with the latest SVN code? I think that this is the same problem than http://sourceforge.net/tracker/index.php?func=detail&aid=1611097&group_id=47038&atid=448266 what has been fixed since last release. Marc. serban.balamaci wrote: > Hi. > I am using HtmlUnit 1.10 and have an application which uses Wicket framework > 1.2.3. > > At one point that an ajax call is made, instead I get this error message: > ERROR - runtimeError: message=[The choice of Java constructor replace > matching JavaScript argument types (function,string) is ambiguous; candidate > constructors are: > class java.lang.String > replace(java.lang.CharSequence,java.lang.CharSequence) > class java.lang.String replace(char,char)] > sourceName=[http://192.168.16.56:9999/newpos/app/resources/wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax.js] > line=[798] lineSource=[null] lineOffset=[0] > > I pasted a fragment from the wicket-ajax.js that contain the line in cause. > The 798 line is the first text.replace line. Marked it with *** > > .... > Wicket.Head.Contributor.prototype = { > initialize: function() { > }, > > parse: function(headerNode) { > var text = headerNode.firstChild.nodeValue; > var encoding = headerNode.getAttribute("encoding"); > > if (encoding != null && encoding != "") { > text = Wicket.decode(encoding, text); > } > > // konqueror crashes if there is a <script element in the xml > text = text.replace(/<script/g,"<SCRIPT"); *** > text = text.replace(/<\/script>/g,"</SCRIPT>"); > > var xmldoc; > if (window.ActiveXObject) { > xmldoc = new ActiveXObject("Microsoft.XMLDOM"); > xmldoc.loadXML(text); > } else { > var parser = new DOMParser(); > xmldoc = parser.parseFromString(text, "text/xml"); > } > > return xmldoc; > }, > ..... > > Any ideea why it cannot distinguish between those 2 methods?. Is there any > doubt, shouldn't it choose > replace(java.lang.CharSequence,java.lang.CharSequence) out of the two? > > Thanks. > |