nullexception for AttrSetValues method
i have a null pointer exception when calling attrsetvalues method. anyone can help me??error msg:java.lang.NullPointerException at com.opentext.api.LAPI_ATTRIBUTES.getOrSetValues(Unknown Source) at com.opentext.api.LAPI_ATTRIBUTES.AttrSetValues(Unknown Source) at createObjectFile.main(createObjectFile.java:90)==========codes===================try{ // Declare some local fields LLSession session = null; LAPI_DOCUMENTS documents = null; LAPI_ATTRIBUTES attr = new LAPI_ATTRIBUTES(session); int status = 0; // Instantiate session object session = new LLSession( "192.168.0.13", 2099, "", "Admin", "livelink" ); int parentVolID=0; int parentID = 10984; //the object ID of the parent object that receives the created objects String name="installationGuide"; LLValue objectInfo = (new LLValue()).setAssocNotSet(); LLValue createInfo = (new LLValue()).setAssocNotSet(); LLValue versionInfo = (new LLValue()).setAssocNotSet(); String filePath = "D:\\importFiles\\installation guide V0.2.rtf"; //Create the objID assoc necessary for some category functions LLValue objID = (new LLValue()).setAssocNotSet(); objID.add("ID", parentID); String attrName= "title"; // Instantiate documents object documents = new LAPI_DOCUMENTS( session ); LLValue catID = (new LLValue()).setAssocNotSet(); catID.add("ID", 7301); LLValue catVersion = (new LLValue()).setAssocNotSet(); if (documents.FetchCategoryVersion(catID, catVersion) != 0) { System.out.println("None of that category mate"); return; }// if(documents.GetObjectAttributesEx(objID, catID, catVersion) != 0)// {// System.out.println("GetObjectAttributesEx Failed.");// }// else// System.out.println("Retrieved Category Version." + catVersion); //Now set the "Required Text Attribute" attribute LLValue attrValuesPath = (new LLValue()); LLValue attrValues = (new LLValue()).setList(); Date myDate=new Date();//get system date to update attrValues.add(myDate); System.out.println(attrValuesPath); System.out.println(attrValues); if(attr.AttrSetValues(catVersion, "Date Loan", attr.ATTR_DATAVALUES, attrValuesPath, attrValues)!= 0) { System.out.println("GetObjectAttributesEx Failed."); return; } else System.out.println("Retrieved Category Version."); //createObjectEx to create object status= documents.CreateObjectEx(parentVolID, parentID, LAPI_DOCUMENTS.OBJECTTYPE, LAPI_DOCUMENTS.DOCUMENTSUBTYPE, name, createInfo, objectInfo); if(checkstatus(status, session)==0){ System.out.println("\n SUCCESS: Added Document"); } System.out.println(objectInfo.toInteger("ID")); //CreateVersion to create version info status = documents.CreateVersionEx(parentVolID,objectInfo.toInteger("ID"),createInfo , filePath, versionInfo); if(checkstatus(status, session)==0){ System.out.println("\n SUCCESS: created version"); //System.out.println(versionInfo.toInteger("FileDataSize")); } System.out.println( "End of sample" ); System.exit( status ); }catch(Throwable e){ e.printStackTrace(); } }