[rules-users] Unterminated String Literal error

StormeHawke Brian.Trezise at intellidata.net
Thu Feb 17 10:11:30 EST 2011


Thanks, killing mvel got it, the error messages are almost making sense 
now.  Any idea why it would tell me the method keyset() is undefined for 
an object that extends HashMap?

On 2/17/2011 1:31 AM, Wolfgang Laun-2 [via Drools - Java Rules Engine] 
wrote:
> There is a semicolon missing after break in line 39.
>
> The drools.inse in the error message is very strange. Are you
> compiling other rules as well?
>
> Don't use dialect "mvel" when you aren't using mvel.
> -W
>
> On 17 February 2011 00:37, StormeHawke <[hidden email] 
> </user/SendEmail.jtp?type=node&node=2516479&i=0>> wrote:
>
> >
> >
> > Esteban wrote:
> >>
> >> shouldn't that be: inputType.toString() //No capital i ??
> >>
> >
> > Yes it should, thanks for catching that.  Unfortunately there must 
> still be
> > more problems because I'm still getting the error.  I'm thrown by 
> the fact
> > that it's telling me I've got an unterminated string literal, it's not
> > making sense:
> >
> >
> > Error: Unable to build expression for 'consequence': [Error: 
> unterminated
> > string literal]
> > [Near : {... }
> >                };
> >
> >                drools.inse ....}]
> >                  ^
> > [Line: 43, Column: 4] '         PriceResult result = new
> > PriceResult($priceRequest.getClient(), $priceRequest.getRequestedPn());
> >                for(InputType inputType : $priceDataRecord.keyset())
> >                {
> >                        String label = inputType.getPropertyName();
> >                        Object value = $priceDataRecord.get(inputType);
> >                        ValueType valueType = null;
> >                        String valueDisplay = null;
> >                        switch(inputType)
> >                        {
> >                                //Don't add ID and PN to the result - 
> ID is unnecessary and PN is
> > included as a separate property
> >                                case ID:
> >                                case PN:
> >                                        break;
> >
> >                                case PACKAGE_UNIT:
> >                                        valueType = ValueType.INTEGER;
> >                                        valueDisplay = value.toString();
> >                                        break;
> >
> >                                case MOQ_1:
> >                                case MOQ2:
> >                                        valueType = ValueType.INTEGER;
> >                                        valueDisplay = value.toString();
> >                                        break
> >
> >                                case PRICE_1:
> >                                case PRICE_2:
> >                                        valueType = 
> ValueType.BIG_DECIMAL;
> >                                        valueDisplay = value.toString();
> >                                        break;
> >
> >                                case LEAD_TIME:
> >                                        valueType = ValueType.DOUBLE;
> >                                        valueDisplay = value.toString();
> >                                        break;
> >
> >                                default:
> >                                        throw new 
> IllegalArgumentException("InputType " + inputType.toString()
> > + " is not defined for " + $priceRequest.getClient().getName());
> >                        }
> >
> >                        if(valueType != null)
> >                        {
> >                                PriceValue priceValue = new 
> PriceValue(label, value, valueType,
> > valueDisplay);
> >                                result.put(label, priceValue);
> >                        }
> >                }
> >
> >                insert(result);
> > ' : [Rule name='someclient-default rule']
> >
> > --
> > View this message in context: 
> http://drools-java-rules-engine.46999.n3.nabble.com/Unterminated-String-Literal-error-tp2513857p2514050.html 
> <http://drools-java-rules-engine.46999.n3.nabble.com/Unterminated-String-Literal-error-tp2513857p2514050.html?by-user=t>
> > Sent from the Drools - User mailing list archive at Nabble.com.
> > _______________________________________________
> > rules-users mailing list
> > [hidden email] </user/SendEmail.jtp?type=node&node=2516479&i=1>
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
>
> _______________________________________________
> rules-users mailing list
> [hidden email] </user/SendEmail.jtp?type=node&node=2516479&i=2>
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the 
> discussion below:
> http://drools-java-rules-engine.46999.n3.nabble.com/Unterminated-String-Literal-error-tp2513857p2516479.html 
>
> To unsubscribe from Unterminated String Literal error, click here 
> <http://drools-java-rules-engine.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2513857&code=QnJpYW4uVHJlemlzZUBpbnRlbGxpZGF0YS5uZXR8MjUxMzg1N3wtMjA3MDc3MTQ0MA==>. 
>

-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Unterminated-String-Literal-error-tp2513857p2519731.html
Sent from the Drools - User mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110217/724a246f/attachment.html 


More information about the rules-users mailing list