jakarta-regexp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 764] - java.lang.StackOverflowError
Date Fri, 22 Jun 2001 10:34:31 GMT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=764

*** shadow/764	Tue Jun 12 10:10:24 2001
--- shadow/764.tmp.18814	Fri Jun 22 03:34:31 2001
***************
*** 191,193 ****
--- 191,408 ----
  
  ------- Additional Comments From mailtomark@gmx.net  2001-06-12 10:10 -------
  Oh, I forgot: I had this problem with both regexp 1.1 and 1.2
+ 
+ ------- Additional Comments From scorpiel@yahoo.com  2001-06-22 03:34 -------
+ I have come up  with an Error using Regular Expression. A 
+ java.lang.StackOverflowError
+ occuring at the line where i am trying to match an RE against some String.
+  
+ Please, help me. I'll be very thankfull to you.
+  
+ System: x86
+ OS: Red Hat Linux 7
+ Database: Sybase 11
+ Development Tool: JSP
+ Regular Expression: jakarta-regexp-1.2
+ 
+  
+ Code Snippet:
+     try
+     {
+       ObjRegExpExt  = new org.apache.regexp.RE(mstrDetailExtRegEx) ;    // RE 
+ is provided below
+       ObjRegExpExt.setMatchFlags(ObjRegExpExt.MATCH_CASEINDEPENDENT) ;
+     }
+     catch (Exception e)
+     {
+       System.out.println("Exception Rose: " + e.toString());
+     }
+  
+     // Match the RegExp
+     boolean bMatched1= ObjRegExpExt.match(mstrHTMLSource) ; // This line is 
+ responsible for StackOverflowError
+ 
+ Java Documentaion says that; 
+ public class StackOverflowError 
+ extends VirtualMachineError
+ Thrown when a stack overflow occurs because an application recurses too deeply. 
+ 
+  
+  
+ RE(mstrDetailExtRegEx):
+ <table border="0" cellspacing="0" cellpadding="5" align="center">(.*)<B>Silver

+ Plan(.*)</B></FONT><br>
+  
+ String is (mstrHTMLSource):
+  <!-- Begin Page Header --> <html><head><title>Unicard Travel Association
Quote 
+ & Buy</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-
+ 8859-1"><script language="JavaScript"><!--function MM_swapImgRestore() { 
+ file://v2.0  if (document.MM_swapImgData != null)    for (var i=0; i<
+ (document.MM_swapImgData.length-1); i+=2)      document.MM_swapImgData[i].src = 
+ document.MM_swapImgData[i+1];}function MM_preloadImages() { file://v2.0  if 
+ (document.images) {    var imgFiles = MM_preloadImages.arguments;    if 
+ (document.preloadArray==null) document.preloadArray = new Array();    var i = 
+ document.preloadArray.length;    with (document) for (var j=0; 
+ j<imgFiles.length; j++) if (imgFiles[j].charAt(0)!="#"){      preloadArray[i] = 
+ new Image;      preloadArray[i++].src = imgFiles[j];  } }}function MM_swapImage
+ () { file://v2.0  var i,j=0,objStr,obj,swapArray=new 
+ Array,oldArray=document.MM_swapImgData;  for (i=0; i < 
+ (MM_swapImage.arguments.length-2); i+=3) {    objStr = MM_swapImage.arguments
+ [(navigator.appName == 'Netscape')?i:i+1];    if ((objStr.indexOf
+ ('document.layers[')==0 && document.layers==null) ||        (objStr.indexOf
+ ('document.all[')   ==0 && document.all   ==null))      objStr 
+ = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);    obj = 
+ eval(objStr);    if (obj != null) {      swapArray[j++] = obj;      swapArray
+ [j++] = (oldArray==null || oldArray[j-1]!=obj)?obj.src:oldArray[j];      
+ obj.src = MM_swapImage.arguments[i+2];  } }  document.MM_swapImgData = 
+ swapArray; file://used for restore}//--></script><SCRIPT LANGUAGE="JavaScript">

+ <!-- Hide script from old browsers sNav = new String(navigator.platform) 
+ vPltFrm = sNav.substring(0,3) if (vPltFrm != 'Mac') { document.write('<link 
+ rel=stylesheet href=bodytext.css>') } else { document.write('<link 
+ rel=stylesheet href=macbodytext.css>') } // End hiding from old browsers --> 
+ </script></head><body bgcolor="#FFFFFF" background="images/background2.gif"

+ onLoad="MM_preloadImages
+ ('images/bthl_home.gif','#945808464640');MM_preloadImages
+ ('images/bthl_quote.gif','#945808555490');MM_preloadImages
+ ('images/bthl_cost.gif','#945808610030');MM_preloadImages
+ ('images/bthl_plan.gif','#945808632610');MM_preloadImages
+ ('images/bthl_faq.gif','#945808663030');MM_preloadImages
+ ('images/bthl_links.gif','#945808713460')"><BASEFONT SIZE="2" FACE="Arial, 
+ Helvetica, Sans-serif"><table width="600" border="0" align="center" 
+ cellpadding="0" cellspacing="0">  <tr>     <td>      <table width="600"

+ border="0" cellpadding="0" cellspacing="0">        <tr>           <td 
+ colspan="8" width="508">            <table width="100%" border="0" 
+ cellspacing="0" cellpadding="0">              <tr>                <td><img

+ src="images/bannernew.gif" width="508" height="56"></td>                <td

+ align="right"><a href="help.asp"><img src="images/click_for_help.gif" 
+ width="77" height="55" border="0"></a></td>              </tr>    
       
+ </table>                      </td>        </tr>        <tr>   
       <td 
+ width="125"><img src="images/side_graphic.gif" width="125"></td>        
 <td 
+ width="46"><a href="index.html" onMouseOut="MM_swapImgRestore()" 
+ onMouseOver="MM_swapImage
+ ('document.Image4','document.Image4','images/bthl_home.gif','#945808464640')"><i
+ mg name="Image4" border="0" src="images/bt_home.gif" 
+ width="46"></a></td>          <td width="88"><a href="quote.asp"

+ onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage
+ ('document.Image5','document.Image5','images/bthl_quote.gif','#945808555490')"><
+ img name="Image5" border="0" src="images/bt_quote.gif" 
+ width="88"></a></td>          <td width="103"><a 
+ href="benefits/planbenefit.html" onMouseOut="MM_swapImgRestore()" 
+ onMouseOver="MM_swapImage
+ ('document.Image6','document.Image6','images/bthl_cost.gif','#945808610030')"><i
+ mg name="Image6" border="0" src="images/bt_cost.gif" 
+ width="103"></a></td>          <td width="10"><a 
+ href="benefits/plandetail.html" onMouseOut="MM_swapImgRestore()" 
+ onMouseOver="MM_swapImage
+ ('document.Image7','document.Image7','images/bthl_plan.gif','#945808632610')"><i
+ mg name="Image7" border="0" src="images/bt_plan.gif" 
+ width="86"></a></td>          <td width="37"><a href="faq.html"

+ onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage
+ ('document.Image8','document.Image8','images/bthl_faq.gif','#945808663030')"><im
+ g name="Image8" border="0" src="images/bt_faq.gif" 
+ width="37"></a></td>          <td width="4"><a href="links/links.html"

+ onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage
+ ('document.Image9','document.Image9','images/bthl_links.gif','#945808713460')"><
+ img name="Image9" border="0" src="images/bt_links.gif" 
+ width="85"></a></td>          <td width="30">&nbsp;</td>
       </tr>      
+ </table>      <p align="center"><font face="Arial, Helvetica, sans-serif"

+ size="4" color="#000099"><b><span class="areaheader">Quote &amp; 
+ Buy</span></b></font></p>  <table border="0" cellspacing="0"
cellpadding="5" 
+ align="center">      <tr>    <td align="center"><FONT FACE="Arial, Halvetica,

+ Sans-Serif" SIZE="2"><B>Silver Plan<br>US$835</B></FONT><br>
     <form 
+ action="https://www.unicard.com/purchase/buy1.asp" method="post">      <!--
+ <form action="http://localhost/unicard/purchase/buy1.asp" method="post">-->   

+ <INPUT TYPE="hidden" NAME="aff_id" VALUE="none">        <INPUT TYPE="hidden" 
+ NAME="travelers" VALUE="3">        <INPUT TYPE="hidden" NAME="length" 
+ VALUE="5">        <INPUT TYPE="hidden" NAME="family" VALUE="yes">        <INPUT

+ TYPE="hidden" NAME="plantype" VALUE="s">        <input type="image" 
+ name="submit" src="images/buy_silver.gif" border="0" alt="Buy Silver 
+ Plan">      </FORM>     </td>    <td align="center"><FONT FACE="Arial,

+ Halvetica, Sans-Serif" SIZE="2"><B>Gold Plan<br>US$1115</B></FONT><br>
     
+ <form action="https://www.unicard.com/purchase/buy1.asp" method="post">   
+ <INPUT TYPE="hidden" NAME="aff_id" VALUE="none">        <INPUT TYPE="hidden" 
+ NAME="travelers" VALUE="3">        <INPUT TYPE="hidden" NAME="length" 
+ VALUE="5">        <INPUT TYPE="hidden" NAME="family" VALUE="yes">        <INPUT

+ TYPE="hidden" NAME="plantype" VALUE="g">        <input type="image" 
+ name="submit" src="images/buy_gold.gif" border="0" alt="Buy Gold Plan">      
+ </FORM>     </td>    <td align="center"><FONT FACE="Arial, Halvetica,
Sans-
+ Serif" SIZE="2"><B>Platinum Plan<br>US$1230</B></FONT><br>
     <form 
+ action="https://www.unicard.com/purchase/buy1.asp" method="post">    <INPUT 
+ TYPE="hidden" NAME="aff_id" VALUE="none">        <INPUT TYPE="hidden" 
+ NAME="travelers" VALUE="3">        <INPUT TYPE="hidden" NAME="length" 
+ VALUE="5">        <INPUT TYPE="hidden" NAME="family" VALUE="yes">        <INPUT

+ TYPE="hidden" NAME="plantype" VALUE="p">        <input type="image" 
+ name="submit" src="images/buy_platinum.gif" border="0" alt="Buy Platinum 
+ Plan">      </FORM>     </td>  </tr>  <tr>    <td colspan="3"
align="center"><a 
+ href="benefits/planbenefit.html" target="new">Click here to review plan costs 
+ and benefits</a><br>        <a href="http://www.xe.net/ucc" target="new">Click

+ here to bring up a currency converter</a></td>  </tr></table>  <hr>
 <Form 
+ action="quote.asp" method="post">    <table border="0" cellspacing="0" 
+ cellpadding="3" align="center">      <tr>        <td valign="top"><b><font

+ face="Arial, Helvetica, sans-serif" size="2">Number of 
+ Travelers</font></b></td>        <td valign="top" width=10 
+ rowspan="6">&nbsp;</td>            <td valign="top"><font face="Arial,

+ Helvetica, sans-serif" size="2"><b>Length               of 
+ Membership</b></font></td>      </tr>      <tr>        <td

+ valign="top">          <select name="child">            <option value="0" 
+ selected>0</option>            <option value="1" >1</option>      
     <option 
+ value="2" >2</option>            <option value="3" >3</option>    
       
+ <option value="4" >4</option>          </select>          <font face="Arial,

+ Helvetica, sans-serif" size="2">Under Age 2</font>        </td>        <td

+ valign="top">          <select name="length">            <option value="1" >5

+ Days</option>            <option value="2" >17 Days</option>         
  <option 
+ value="3" >24 Days</option>            <option value="4" >31 
+ Days</option>            <option value="5" selected>Annual 
+ Plan</option>          </select>        </td>      </tr>      <tr>
       <td 
+ valign="top">          <select name="child1">            <option value="0" 
+ >0</option>            <option value="1" selected>1</option>      
     <option 
+ value="2" >2</option>            <option value="3" >3</option>    
       
+ <option value="4" >4</option>          </select>          <font face="Arial,

+ Helvetica, sans-serif" size="2">Ages 2 - 15</font>        </td>        <td

+ valign="top"><b><font face="Arial, Helvetica, sans-serif" size="2">Is this
a 
+ Family Plan?</font></b></td>      </tr>      <tr>        <td

+ valign="top">          <select name="adult">            <option value="0" 
+ >0</option>            <option value="1" >1</option>            <option

+ value="2" selected>2</option>            <option value="3" 
+ >3</option>            <option value="4" >4</option>          
+ </select>          <font face="Arial, Helvetica, sans-serif" size="2">Ages 16
- 
+ 64</font>        </td>        <td valign="top" rowspan="2">          <select

+ name="family">            <option value="no" >No</option>            <option

+ value="yes" selected>Yes</option>          </select><br>          <font

+ face="Arial, Helvetica, sans-serif" size="1" color="#990000">             
+ <B>Family Plan is limited to 4 travelers</B><br>    <b>Family plan
is limited 
+ to parent(s) traveling</b><br>    with dependent children age 23 or 
+ under.</b></font>        </td>      </tr>      <tr>      
 <td 
+ valign="top">          <select name="adult1">            <option value="0" 
+ selected>0</option>            <option value="1" >1</option>      
     <option 
+ value="2" >2</option>            <option value="3" >3</option>    
       
+ <option value="4" >4</option>          </select>          <font face="Arial,

+ Helvetica, sans-serif" size="2">Ages 65 - 74</font>        </td>        <!--<td

+ valign="top">&nbsp;</td>-->      </tr>      <tr>        <td

+ valign="top">          <select name="adult2">            <option value="0" 
+ selected>0</option>            <option value="1" >1</option>      
     <option 
+ value="2" >2</option>            <option value="3" >3</option>    
       
+ <option value="4" >4</option>          </select>          <font face="Arial,

+ Helvetica, sans-serif" size="2">Ages 75 - 84</font>        </td>        <td

+ valign="top"><input type="Submit" name="quote" value="Get A Quote"></td>
     
+ </tr>    </table>    </form><!-- Begin Page Footer -->       <div

+ align="center" class="sidemenu">        <p><br>          <font size="1"

+ face="Arial, Helvetica, sans-serif" color="#000099">             <a 
+ href="index.html">Home</a>           | <a href="quote.asp">Quote &amp;

+ Buy</a>           | <a href="benefits/planbenefit.html">Cost &amp; 
+ Benefits</a>           | <a href="benefits/plandetail.html">Plan 
+ Details</a>           | <a href="faq.html">FAQ</a>           | <a 
+ href="links/links.html">Links</a>           <br>            <a 
+ href="help.asp">Help</a>           | <a 
+ href="https://www.unicard.com/members/members.html">Member 
+ Services</a>           | <a 
+ href="affiliates/index.html">Affiliates</a>           | <a href="privacy.html">

+ Privacy Statement</a></font></p>        <p><font face="Arial,
Helvetica, sans-
+ serif" size="1">&copy; Copyright           1999, Unicard Travel 
+ Association</font></p>      </div>    </td>  </tr></table></body></html><!--

+ Copyright 1999 Insuractive -->
+ 
+ 
+ 
+ regards,
+ Ahmed Shaikh
\ No newline at end of file

Mime
View raw message