From: Jeff H. <Je...@Je...> - 2020-09-18 19:30:40
|
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <p>René & Colin,</p> <p>I have just altered the compare stage so it does the type cast on its inputs.</p> <p>Jeff<br> </p> <div class="moz-cite-prefix">On 9/18/2020 1:29 PM, ColinK wrote:<br> </div> <blockquote type="cite" cite="mid:3bb...@im..."> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <font face="Century Gothic">Thanks Rene<br> <br> Turns out the problem was not in compare but in the stage prior to compare. It was outputting a java String response instead of a Rexx response. It is interesting that the prior stage (hostbyname, in this case) had always done this but only now did compare complain. I will get the updated version of hostbyname committed shortly.<br> <br> Cheers<br> Colin<br> </font><br> <div class="moz-cite-prefix">On 2020-09-17 16:07, René Jansen wrote:<br> </div> <blockquote type="cite" cite="mid:A23...@xs..."> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> Hi Colin, <div><br> </div> <div>You can put a Rexx in front of it; also, we need to look at sort to maybe convert it to Rexx only.<br> <br> <div dir="ltr">René.</div> <div dir="ltr"><br> <blockquote type="cite">On 18 Sep 2020, at 00:16, ColinK <a class="moz-txt-link-rfc2396E" href="mailto:ibm...@im..." moz-do-not-send="true"><ibm...@im...></a> wrote:<br> <br> </blockquote> </div> <blockquote type="cite"> <div dir="ltr"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> Hello<br> <br> I have been updating my hostbyname.nrx stage so that it sorts the IP addresses returned (as DNS does not guarantee the same order in response). This will hopefully get around some false negative unit testing issues. It appears to be working fine but I am now running into an issue with compare.<br> <br> ==> Without compare stage<br> <br> <tt>Z:\GIT\netrexx-dev\bin>pipc hbntest00</tt><tt><br> </tt><tt>pipe (hbntest00 ) literal dns.google example.com bogus.bogus one.one.one.one | split | hostbyname | console</tt><tt><br> </tt><tt><br> </tt><tt>Z:\GIT\netrexx-dev\bin>java hbntest00</tt><tt><br> </tt><tt>8.8.4.4 8.8.8.8</tt><tt><br> </tt><tt>93.184.216.34</tt><tt><br> </tt><tt># Input record 3: Unable to determine IP address for bogus.bogus #</tt><tt><br> </tt><tt>1.0.0.1 1.1.1.1</tt><br> <br> ==> With compare stage<br> <tt><br> </tt><tt>Z:\GIT\netrexx-dev\bin>pipc hbntest1</tt><tt><br> </tt><tt>pipe (hbntest1 ) literal dns.google | hostbyname | console | compare: compare equal /PASS/ notequal /FAIL/ | console ? literal 8.8.4.4 8.8.8.8 | compare:</tt><tt><br> </tt><tt><br> </tt><tt>Z:\GIT\netrexx-dev\bin>java hbntest1</tt><tt><br> </tt><tt>8.8.4.4 8.8.8.8</tt><tt><br> </tt><tt>java.lang.ClassCastException: java.lang.String cannot be cast to netrexx.lang.Rexx</tt><tt><br> </tt><tt> at org.netrexx.njpipes.stages.compare.run(<b>compare.java:128</b>)</tt><tt><br> </tt><tt> at org.netrexx.njpipes.pipes.ThreadPool.run(ThreadPool.java:60)</tt><tt><br> </tt><tt> at java.lang.Thread.run(Thread.java:748)</tt><tt><br> </tt><tt>Exiting due to uncaught Exception java.lang.String cannot be cast to netrexx.lang.Rexx</tt><br> <br> Looking at \build\classes\org\netrexx\njpipes\stages\compare.java I see the following around line 128<br> <br> <div><ojigobehihnhlgjj.png></div> <br> <br> The compare.nrx source around that spot is:<br> <br> <div><bifefgpdfoblncip.png></div> <br> <br> If I am reading this correctly the issue appears to be around the variables "key" or "ds". Since their type is not "pre-declared" I presume they would default to type Rexx. Is that a fair statement? I guess I am not seeing how java.lang.String is coming into the picture. <br> <br> Am I traveling down the right path here or am totally out-to-lunch? :-)<br> <br> Thanks<br> Colin<br> <br> <br> <span>_______________________________________________</span><br> <span>netrexx-pipelines mailing list</span><br> <span><a class="moz-txt-link-abbreviated" href="mailto:net...@li..." moz-do-not-send="true">net...@li...</a></span><br> <span><a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines" moz-do-not-send="true">https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines</a></span><br> </div> </blockquote> </div> </blockquote> <br> <br> <fieldset class="mimeAttachmentHeader"></fieldset> <br> <fieldset class="mimeAttachmentHeader"></fieldset> <pre class="moz-quote-pre" wrap="">_______________________________________________ netrexx-pipelines mailing list <a class="moz-txt-link-abbreviated" href="mailto:net...@li...">net...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines">https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines</a> </pre> </blockquote> </body> </html> |