oracle-agile-plm

ClassCastException when using com.agile.px.IAgileSession function sendMail


There is a function sendMail in the interface IAgileSession. I have been trying to test it but I get a ClassCastException. The function takes arguments: session.sendMail(IUser[] arg0, String arg1)

enter image description here

I cannot find any information regarding this function, rather it is not even listed in the Agile 9.3.4 documentation. Has anyone ever used this function? If so, how to properly use it?


Solution

  • The toArray is the problem:

    it is needs to be updated as below

    IUser[] users = usr.toArray(new IUser[usr.size()]);