Title:
reReplaceNoCase is throwing a java.lang.StackOverflowError at org.apache.oro.text.regex.Perl5Matcher when using Java 1.8
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/AsDesigned
Reporter/Name(from Bugbase): Darrell Rapier / Darrell Rapier (Darrell Rapier)
Created: 06/18/2016
Components: Core Runtime
Versions: 11.0
Failure Type: Unspecified
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Normal / All users will encounter
Locale/System: English / Win 2012 Server x64
Vote Count: 1
Problem Description:
The regular expression in reReplaceNoCase is throwing an error when it should be matching the string with the regex and then replacing the matched string. This same code worked fine with Java 1.7.0_72.
Steps to Reproduce:
<cfsavecontent variable="variables.largeTextString">
test1 test2
<!--[CODE]-->
test to remove this inner text...
enter lots of text here
<!--[/CODE]-->
test3 test4
</cfsavecontent>
<cfset variables.newString = reReplaceNoCase(variables.largeTextString,"(<!--\[CODE\]-->)(.|\n)*?(<!--\[/CODE\]-->)","","all")>
Actual Result:
Throws this stack trace error...
java.lang.StackOverflowError at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at...
This dump goes on for several pages.
Expected Result:
All text in the regex expression should be replaced with an empty string. The output from variables.newString should be "test1 test2 test3 test4".
Any Workarounds:
This used to work with Java 1.7 then broke when we upgraded Java to 1.8.0_92
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4165797
External Customer Info:
External Company:
External Customer Name: Darrell Rapier
External Customer Email:
External Test Config: Windows Server 2012 /w IIS 8.5
CF11 Update 9 running Java 1.8.0_92
Attachments:
Comments: