Java.lang.NullPointerException when getting the default representation
I get an error (java.lang.NullPointerException) when executing the following lines at :
This is the code :
PromotionNotice notice = (wt.maturity.PromotionNotice)pr;
StandardMaturityService service = StandardMaturityService.newStandardMaturityService();
QueryResult results = service.getPromotionTargets(notice);
if (results != null)
{
while (results.hasMoreElements())
{
MyObject = (Versioned)results.nextElement();
if (MyObject instanceof EPMDocument)
{
CurrEPM = (EPMDocument) MyObject;
if (CurrEPM.getDocType().getStringValue().equals("wt.epm.EPMDocumentType.CADDRAWING"))
{
// Get the time = now - x hours (x is comming from xml file)
long modTime = 0;
TracePath = TracePath + "\n" + "- docmodtime: " + docmodtime;
long modifiedTime = Long.parseLong(docmodtime);
modTime = currentTime - modifiedTime * 60L * 60L * 1000L;
Timestamp modstamp = new Timestamp(modTime);
// Check if the drawing last change is older than x hours
PersistInfo PerInfo = CurrEPM.getPersistInfo();
// If last modification timestamp of drawing is before the date limit (e.g. now - 3000 hours) then the drawing has not been copyed yet
if (PerInfo.getModifyStamp().before(modstamp))
{
// The modification time of the drawings is before that time, the plot file must be copied
TracePath = TracePath + "\n" + "+2.2 " + "Number: " + CurrEPM.getNumber() + " Name: " + CurrEPM.getName() + " Status: " + CurrEPM.getLifeCycleState().toString() + " Version: " + CurrEPM.getVersionIdentifier().getValue() + " Iteration: " + CurrEPM.getIterationIdentifier().getValue();
<-------
........
TrcaPath =

