[rules-users] java.lang.ClassCastException: [Lorg.drools.rule.Package; cannot be cast to org.drools.rule.Package

Mark Proctor mproctor at codehaus.org
Mon Jul 22 07:24:40 EDT 2013


Your's is a different issue. 

You either have an incorrect class path, with mixed versions. Or your client and your server are using different versions. Or you didn't tell Guvnor to recompile all it's packages, when you changed jar versions.

Also your try/catch would result in no actual consequence happening - which would be pointless.

Mark
On 22 Jul 2013, at 11:17, Ganesh <ganeshneelekani at gmail.com> wrote:

> Hi David,
> 
> 
> Thanks for response,
> Exacts exception is "java.lang.ClassCastException:
> [Lorg.drools.rule.Package; cannot be cast to org.drools.rule.Package "
> 
> 
> And I am not handing exception in any java code ..
> I am just handling it in rule part.
> 
> ex.
> 
> dialect "java"
> no-loop
> ruleflow-group "Apply Buy Discount"
> 
> when
> 	/*removed*/
> then
> 
> try{
> 
> 
> System.out.println("==================================");
> System.out.println("Apply Buy Discount");
> System.out.println($discountPercent);
> System.out.println($advAdditional);
> 		System.out.println("==================================");
> $lql.setEndUserUnitPrice(applyDiscount($lql.getEndUserUnitPrice(),$discountPercent+$advAdditional));
> 		$lql.setTotalCost(applyDiscount($lql.getTotalCost(),$discountPercent));
> 	//	update($lql);
> 
> }
> catch(Exception e)
> {
> 
> System.out.println(e.toString());
> 
> }
> 
> Let me know if any issue.
> 
> 
> Regards
> Ganesh Neelekani
> India
> 
> 
> 
> 
> 
> --
> View this message in context: http://drools.46999.n3.nabble.com/java-lang-ClassCastException-Lorg-drools-rule-Package-cannot-be-cast-to-org-drools-rule-Package-tp4017821p4025073.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list