You are viewing a plain text version of this content. The canonical link for it is here.
Posted to regexp-dev@jakarta.apache.org by bu...@apache.org on 2006/06/10 00:59:08 UTC

DO NOT REPLY [Bug 39772] New: - RE internal error: Invalid opcode '0'

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39772>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39772

           Summary: RE internal error: Invalid opcode '0'
           Product: Regexp
           Version: unspecified
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: Other
        AssignedTo: regexp-dev@jakarta.apache.org
        ReportedBy: tianyu17@yahoo.com


I have a Web application using struts, the page parses a date string, 
intermittently, I am getting following error:

java.lang.Error: RE internal error: Invalid opcode '0'
	at org.apache.regexp.RE.internalError(Unknown Source)
	at org.apache.regexp.RE.matchNodes(Unknown Source)
	at org.apache.regexp.RE.matchNodes(Unknown Source)
	at org.apache.regexp.RE.matchAt(Unknown Source)
	at org.apache.regexp.RE.match(Unknown Source)
	at org.apache.regexp.RE.match(Unknown Source)
	at org.apache.regexp.RE.match(Unknown Source)
	at com.ew.util.Regex.getDatePattern(Regex.java:95)
	at com.ew.util.DateUtil.parse(DateUtil.java:69)
	at com.parser.ReportParser.parseReport(ReportParser.java:40)

the getDatePattern code looks like:

public static String getDatePattern(String dateStr) throws EWException {
  
 	RE regexp = new RE();
        String datePattern = null;
 
        try {
 	   // if no data string, throw exception
  	   if (StringUtils.isEmpty(dateStr)) {
  	      throw new EWException(new IllegalArgumentException(  	
				    "The date string is empty"));
 	   } else {
  	      // if one Date REProgram is null, consider all of them are
  	      // yet instatiated.
  	       	
  	      if (dateFormatMap.size() == 0) {
  		 dateFormatMap.put(DATE_PATTERN_0, compiler.compile(DATE_0));
  	         dateFormatMap.put(DATE_PATTERN_1, compiler.compile(DATE_1));
  	         dateFormatMap.put(DATE_PATTERN_2, compiler.compile(DATE_2));
  	         dateFormatMap.put(DATE_PATTERN_3, compiler.compile(DATE_3));
  		 dateFormatMap.put(DATE_PATTERN_4, compiler.compile(DATE_4));
  	         dateFormatMap.put(DATE_PATTERN_5, compiler.compile(DATE_5));
  	         dateFormatMap.put(DATE_PATTERN_6, compiler.compile(DATE_6));
  	         dateFormatMap.put(DATE_PATTERN_7, compiler.compile(DATE_7));
  	         dateFormatMap.put(DATE_PATTERN_8, compiler.compile(DATE_8));
  	         dateFormatMap.put(DATE_PATTERN_9, compiler.compile(DATE_9));
	                
  	       }
  	
  	       // find the pattern that matches the date string
  	       Iterator keys = dateFormatMap.keySet().iterator();
  	       String pattern;
  	       while(keys.hasNext()) {
 	           pattern = (String) keys.next();
  		   regexp.setProgram((REProgram)dateFormatMap.get(pattern));
  		   if (regexp.match(dateStr)){
  	              datePattern = pattern;
 	              break;
 		   }                
 	       }

       ..................

Once the problem happens, we have to restart the server. Sometimes, we have to 
restart the server couple of times to remove the error. But the problem is not 
that easy to reproduce. it happens intermittently in production. We could not 
reproduce it in QA.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: regexp-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: regexp-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 39772] - RE internal error: Invalid opcode '0'

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39772>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39772





------- Additional Comments From ergotrye@myway.com  2006-07-18 14:15 -------
The error you're getting is because RE is not Threadsafe. 

This is really a dupe of bug 28412.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: regexp-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: regexp-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 39772] - RE internal error: Invalid opcode '0'

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39772>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39772


vgritsenko@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




------- Additional Comments From vgritsenko@apache.org  2006-06-15 17:33 -------
Please specify regexp version you've used.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: regexp-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: regexp-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 39772] - RE internal error: Invalid opcode '0'

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39772>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39772


vgritsenko@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |INVALID




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: regexp-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: regexp-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 39772] - RE internal error: Invalid opcode '0'

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39772>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39772


vgritsenko@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: regexp-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: regexp-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 39772] - RE internal error: Invalid opcode '0'

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39772>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39772





------- Additional Comments From vgritsenko@apache.org  2006-07-18 19:59 -------
I think he is not using RE itself from different threads, and REProgram
instances are thread safe. Most probably it is duplicate of bug 3877.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: regexp-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: regexp-dev-help@jakarta.apache.org