473,587 Members | 2,479 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Java Code is throwing NoSuchField Error

144 New Member
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>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)
Nov 7 '11 #1
0 2145

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

Similar topics

4
11935
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 underlined in red. It is saying it is a syntax error and to delete the tokens. I'd like to use the code below in my program i am working on for my hobby. It will make life so much easier when i get past the compiler error.
1
7612
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) select SB0014.SbPartNo, SB0014.partDesc, SB0014.mANpARTnO, SB0014.manufacturer, SB0014.vendor, sb0014.refdesi, sb0014.qty, SB0014_2.SbPartNo, SB0014_2.partDesc, SB0014_2.mANpARTnO, SB0014_2.manufacturer, SB0014_2.vendor, sb0014_2.refdesi,...
1
1227
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 this would check for null, but it throws an error saying DBNull can not be cast to string? any help to point out the obvious would be appreciated thnaks kes --
4
4031
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 function on button click , but i want to call java code on button click. advise some solution.
0
1070
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 textarea. How to compile the java code that is in string not in a file. Please help me in this regard. Thanks in advance
4
2498
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. I AM USING TOMCAT 4.1 WEBSERVER FOR COMPILING JSP PAGES.
2
1498
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. Java Code: //Import statement for the JoptionPane import javax.swing.JOptionPane; // Definition of class Student
2
2903
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 only solution I have found so far is running the javac process : Process.Start("javac source.java); But this doesn't seem to work (File not found). And i would also like to get the output after compiling to a string (Error messages etc). Any other...
1
1691
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 those two dates. In java I m doin something like:- String s_dt= "14/03/2006 09:30:30"; String e_dt= "15/04/2008 09:30:30"; String query = "begin ? := pkg.temp_proc(?, ?); end;"; CallableStatement proc = con.prepareCall(query);...
6
4377
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 ReportFormat { ^ 1 error This is a portion of the code below
0
7923
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8216
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7974
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5719
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.