Cannot cast to a CDO error when calling deployed service

Posted by Ollie on 12-Dec-2013 08:14

The following error occurs when a service is called:

"An unexpected error has occurred in Rule Asset: [Ljava.lang.Object; cannot be cast to corticoncdo.IEmemberMasterCDO"

The rule flow executes fine in a Studio local test. After deploying it (cdd) to the server, a service call gives the result shown above. I called it both from the studio and from the command line. Does anybody know how to troubleshoot this error?

Posted by Ollie on 12-Dec-2013 12:50

The error is caused by the following:

I had two filters to split a collection, based on a flag. One set had flag x, the other had flag y. When submitting a test set with both flag values, the error occured. When submitting only instances with one of the two values, there was no error.

After reengineering the rule sheet to something that looks more complex but omits the ugly filters, the service works fine. The filter approach was given to me by a consultant as a best practice. Maybe in Corticon it is, but the CDO cast is something that extends a base java class. Perhaps that's where the root cause can be found.

Conclusion: Be careful using filters. There is usually a more elegant and stable way to get the same result.

All Replies

Posted by Ollie on 12-Dec-2013 12:50

The error is caused by the following:

I had two filters to split a collection, based on a flag. One set had flag x, the other had flag y. When submitting a test set with both flag values, the error occured. When submitting only instances with one of the two values, there was no error.

After reengineering the rule sheet to something that looks more complex but omits the ugly filters, the service works fine. The filter approach was given to me by a consultant as a best practice. Maybe in Corticon it is, but the CDO cast is something that extends a base java class. Perhaps that's where the root cause can be found.

Conclusion: Be careful using filters. There is usually a more elegant and stable way to get the same result.

This thread is closed