Hi,
I have ran the below code in java, but it is throwing an NoSuchField error. Can you please help me to correct this code? I have included all the required Jar files and pointed in Environment variable.I am using Java JDK 1.6.It successfully compiles but throws error while running.
I am following the instructions to run this Java Code as given in the below link
http://www.ibm.com/developerworks/data/library/cognos/development/how_to/page565.html?ca =drs-
code:-
ERROR:-
C:\Program Files\Java\jdk1 .6.0_27\bin>jav a try2
Exception in thread "main" java.lang.NoSuc hFieldError: RPC
at com.cognos.deve loper.schemas.b ibus._3.Content Manag erServiceStub.< clin
it>(ContentMana gerServiceStub. java:25)
at com.cognos.deve loper.schemas.b ibus._3.Content Manag erService_Servi ceLo
cator.getconten tManagerService (ContentManager Servi ce_ServiceLocat or.java:43)
at try2.connectToC ognos(try2.java :100)
at try2.main(try2. java:78)
I have ran the below code in java, but it is throwing an NoSuchField error. Can you please help me to correct this code? I have included all the required Jar files and pointed in Environment variable.I am using Java JDK 1.6.It successfully compiles but throws error while running.
I am following the instructions to run this Java Code as given in the below link
http://www.ibm.com/developerworks/data/library/cognos/development/how_to/page565.html?ca =drs-
code:-
Code:
public class try2
{
public static String dispatcherURL = "http://cog8dv01.merck.com:26423/p2pd/servlet/dispa tch";
private static String nameSpaceID = "cogdvldap";
private static String userName = "goodr";
private static String password = "hjghhbh";
public ContentManagerService_Port cmService=null;
private static String reportSearchPath1 = "/content/package[@name='Z_USHH ROME Inventory Reporting']/folder[@name='USHH']/folder[@name='USH H - ROME']/report[@name='ROME Literature Spreadsheet']";
private static String saveLocation1 = "C:/Report";
public ReportService_Port reportService = null;
public static void main(String args[])
{
try
{
try2 mainClass = new try2(); // instantiate the class
// Step 1: Connect to the Cognos services
mainClass.connectToCognos(dispatcherURL);
}
catch(Exception e)
{
}
}
public void connectToCognos(String dispatcherURL)
{
ContentManagerService_ServiceLocator cmServiceLocator = new ContentManagerService_ServiceLocator();
try
{
URL url = new URL(dispatcherURL);
cmService = cmServiceLocator.getcontentManagerService(url);
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
C:\Program Files\Java\jdk1 .6.0_27\bin>jav a try2
Exception in thread "main" java.lang.NoSuc hFieldError: RPC
at com.cognos.deve loper.schemas.b ibus._3.Content Manag erServiceStub.< clin
it>(ContentMana gerServiceStub. java:25)
at com.cognos.deve loper.schemas.b ibus._3.Content Manag erService_Servi ceLo
cator.getconten tManagerService (ContentManager Servi ce_ServiceLocat or.java:43)
at try2.connectToC ognos(try2.java :100)
at try2.main(try2. java:78)