I am on Teamsite 7.2 and I am trying to connect to the teamsite server using CSSDK client. Frankly speaking it worked before and now it is throwing error. Not sure what went wrong. Appreciate if any body throw some light.CSSimpleFile targetSimpleFile = wa.createSimpleFile( targetFileAreaRelPath);FOr the above line the following error appears. Till the WA object creation no issues.Exception in thread "main" java.lang.NullPointerException at com.interwoven.cssdk.sci.data.CSSessionCache.getUserId(CSSessionCache.java:958) at com.interwoven.cssdk.sci.data.CSSessionCache.getUserId(CSSessionCache.java:907) at com.interwoven.cssdk.sci.filesys.FileServiceFileSciImpl.createFile(FileServiceFileSciImpl.java:243) at com.interwoven.cssdk.sci.filesys.FileServiceSciImpl.createFile(FileServiceSciImpl.java:463) at com.interwoven.cssdk.filesys.java.FileServiceAdapterImpl.createFile(FileServiceAdapterImpl.java:81) at com.interwoven.cssdk.filesys.impl.CSWorkareaImpl.createSimpleFile(CSWorkareaImpl.java:376) at com.cms.java.test.main(test.java:64)
Dave, till the wa object creation its good.How do I put the debug statement in the at com.interwoven.cssdk.sci.data.CSSessionCache.getUs erId(CSSessionCache.java:958)one more interesting thing I found was the same program from other CSSDK client (other dev machine) its working. So narrowed down to be my dev environment issues.I am using eclipse Indigo + tomcat 5.5 and something is not getting transferred to server. May be.
CSWorkarea wa=client.getWorkarea(csvPath, true);CSAreaRelativePath targetFileAreaRelPath=new CSAreaRelativePath("filename.extension");wa.createSimpleFile(targetFileAreaRelPath);CSSimpleFile targetSimpleFile = wa.createSimpleFile(targetFileAreaRelPath);
Using the CSSDK you are creating the workarea and using the workarea object, you are trying to create the simple file. How you are creating the "targetFileAreaRelPath" object? It can be created in two ways one is from using the workarea object you can get the vPath and from the vPath you can get the CSAreaRelativePath object(targetFileAreaRelPath). Another way is directly you can get the CSAreaRelativePath object by passing the value. Print your "targetFileAreaRelPath" object value and confirm that it is returning the object value instead of null.Follow the steps like below and it will create the file in workarea.CSWorkarea wa=client.getWorkarea(csvPath, true);CSAreaRelativePath targetFileAreaRelPath=new CSAreaRelativePath("filename.extension");wa.createSimpleFile(targetFileAreaRelPath);CSSimpleFile targetSimpleFile = wa.createSimpleFile(targetFileAreaRelPath);
To track down the issue, Add System.out.println() statements in between the java code. Print the below and confirm us what value you are getting it:- Client Object - WHY?- Workarea Object - Current User Name - WHY?- CSV Path - What is this?
- Client Object - WHY?
- Current User Name - WHY?
- CSVPath - What is this?
Target area relative path: templatedata/product_detail/data/services_sub3/balance-shieldException:java.lang.NullPointerException