473,326 Members | 2,173 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Java Code is throwing NoSuchField Error

144 100+
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:-

Expand|Select|Wrap|Line Numbers
  1.  
  2. public class try2 
  3.  
  4. public static String dispatcherURL = "http://cog8dv01.merck.com:26423/p2pd/servlet/dispa tch"; 
  5. private static String nameSpaceID = "cogdvldap"; 
  6. private static String userName = "goodr"; 
  7. private static String password = "hjghhbh"; 
  8. public ContentManagerService_Port cmService=null; 
  9. 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']"; 
  10. private static String saveLocation1 = "C:/Report"; 
  11. public ReportService_Port reportService = null; 
  12.  
  13.  
  14. public static void main(String args[]) 
  15.  
  16. try 
  17.  
  18. try2 mainClass = new try2(); // instantiate the class 
  19.  
  20. // Step 1: Connect to the Cognos services 
  21. mainClass.connectToCognos(dispatcherURL); 
  22.  
  23.  
  24.  
  25. catch(Exception e) 
  26.  
  27. public void connectToCognos(String dispatcherURL) 
  28. ContentManagerService_ServiceLocator cmServiceLocator = new ContentManagerService_ServiceLocator(); 
  29. try 
  30. URL url = new URL(dispatcherURL); 
  31. cmService = cmServiceLocator.getcontentManagerService(url); 
  32. catch (Exception e) 
  33. e.printStackTrace(); 
  34.  
  35.  
  36.  
ERROR:-

C:\Program Files\Java\jdk1.6.0_27\bin>java try2

Exception in thread "main" java.lang.NoSuchFieldError: RPC
at com.cognos.developer.schemas.bibus._3.ContentManag erServiceStub.<clin
it>(ContentManagerServiceStub.java:25)
at com.cognos.developer.schemas.bibus._3.ContentManag erService_ServiceLo
cator.getcontentManagerService(ContentManagerServi ce_ServiceLocator.java:43)
at try2.connectToCognos(try2.java:100)
at try2.main(try2.java:78)
Nov 7 '11 #1
0 2126

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: 3rdshiftcoder | last post by:
Hi- I'd like to use this class from a book but am getting a compiler error. On the line private List < String > list; p.932 Chapter 19 found in the code below in the eclipse editor it is...
1
by: ralamo | last post by:
INSERT INTO ECN_1 (Old_SbPartNo, Old_PartDesc, Old_ManPartNo, Old_Manuf, Old_Vendor, Old_RefDesi, Old_Qty, New_SbPartNo, New_PartDesc, New_ManPartNo,New_Manuf, New_Vendor, New_RefDesi, New_Qty)...
1
by: WebBuilder451 | last post by:
the following simple check for a null valuse is throwing an error If IsDBNull(Me.DsMem1.usr(0).usrCoState) Then Response.Write(STAt) End If DSMem is a dataset and the value is null. I thought...
4
by: Khan | last post by:
hi, i'm writing java code inside <body> tag of java script file. all the java code is executing at frame startup. how can i call that java code only when i click on a button. I can call jscript...
0
by: sivavenugopal | last post by:
Hi, I have an C# Windows applicayion in that i need to compile the java code taht is written by the user in a text area. After compilation i need to display the error with line numbers in other...
4
by: mjahabarsadiq | last post by:
HELLO FRIENDS I HAVE ONE JAVA CODE WHICH PARSES AN XML FILE AND PRODUCE A QUERY TO CREATE TABEL IN A DATABASE. BUT I NEED THE CODE TO BE USED IN A JSP PAGE. HOW TO USE THIS PAGE WITH JSP. ...
2
by: chiasien | last post by:
Hi All, I need help!! Please refer below for my java code. There was error some where inside! But need those expert to help me complete my Java code without error.... Please help!! Thanks alot. ...
2
by: KyleUbenk | last post by:
Hello, I am attempting to compile java code from within my program. Basically I have a file in the directory with Java source code, and I want to be able to compile it from within my program. The...
1
by: hussain123 | last post by:
Hi All, I am invoking a procedure which takes 2 IN parameters and both are dates which are passed as string.In the procedure I am using those 2 IN parameters to query the db and fetch record between...
6
by: bw171 | last post by:
I got some java code below, and upon trying to compile it in my unix environment, i get the following error ()> javac Downloader.java Downloader.java:37: ';' expected private enum...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.