Swapnil Khole

Call to 'regularExpression' failed while accessing through Java

Discussion created by Swapnil Khole on Mar 5, 2009
Latest reply on Mar 5, 2009 by Andrei Palskoi



We are using Blaze to write the validations & then try to use them from the Java by passing the parameters to Blaze. Thinking that there are so many different validations carried out the in our business scenarios, reg expression was an approach.I implemented the validation in the Blaze which compiled successfully. While testing it through Java, I encountered a problem.Bottom-line problem was - Blaze is not finding the pattern matching classes at the runtime resulting in an error at the java end.If anyone has any pointers on this, that would be a great help.

validation -  

if party.taxIdentifiers<> null

then {

taxIDFormatInvalid is a boolean initially false.

for each Object in party.taxIdentifiers.toArray() do{

taxIdentifierBO is some TaxIdentifierBO.

taxIdentifierBO = it as a TaxIdentifierBO. 


if (taxIdentifierBO.taxIdentifierTypeCode = "fein" or taxIdentifierBO.taxIdentifierTypeCode = "ssn")

     then {

if (taxIdentifierBO.taxIdentifierNumber<>null)


regex is some RegularExpression. 

regex = regularExpression("/d/d/d/d/d/d/d/d/d").

if (taxIdentifierBO.taxIdentifierNumber does not exactly match regex)


taxIDFormatInvalid = true.





if (taxIDFormatInvalid is true)


args is a Vector.


errors.reject("Tax ID format is not valid", args.toArray()).





cause - 

RuleException(javax.rules.InvalidRuleSessionException: Rule execution failed), root cause(com.blazesoft.server.base.NdServiceSessionException: Service session Id number 10.

Service 'Party'. Server 'Party' on host 'skhole-lt'.

Call to 'regularExpression' failed

java.lang.NoClassDefFoundError: com/oroinc/text/regex/Pattern

at Party.rb at line 1213 (35507 -> 35546))


detailMessage - 

Error Illegal Rule Session State for URI: iipParty


Can anyone help me?