Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Aneesha
Code error
1 Answer(s)      2 years and 8 months ago
Posted in : Java Beginners


package trail;

import com.sun.syndication.feed.synd.SyndEntry; import com.sun.syndication.feed.synd.SyndFeed; import com.sun.syndication.io.SyndFeedInput; import com.sun.syndication.io.XmlReader; import de.l3s.boilerpipe.extractors.ArticleExtractor;

import java.io.IOException; import java.net.URL; import java.util.Iterator;

class Function { void ext(URL urL, String topstory, String indian_Express) throws Exception { XmlReader read=null; try { read = new XmlReader(urL); SyndFeed feed=new SyndFeedInput().build(read); for (Iterator i = feed.getEntries().iterator(); i.hasNext();) { SyndEntry entry = (SyndEntry) i.next(); URL l1=new URL(entry.getLink()); String text = ArticleExtractor.INSTANCE.getText(l1); System.out.println(text); System.out.println("\n"); } } finally { if (read != null) read.close(); } } }

While using this it shows error as: run: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xerces/parsers/AbstractSAXParser at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at de.l3s.boilerpipe.sax.BoilerpipeSAXInput.getTextDocument(BoilerpipeSAXInput.java:51) at de.l3s.boilerpipe.extractors.ExtractorBase.getText(ExtractorBase.java:69) at de.l3s.boilerpipe.extractors.ExtractorBase.getText(ExtractorBase.java:87) at trail.Function.ext(Function.java:41) at trail.Main.main(Main.java:21) Caused by: java.lang.ClassNotFoundException: org.apache.xerces.parsers.AbstractSAXParser at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 17 more Java Result: 1 BUILD SUCCESSFUL (total time: 9 seconds)

Hw can i correct this code????????


Advertisement
View Answers

February 29, 2012 at 12:07 PM


Basically, the Exception in thread "main" java.lang.NoClassDefFoundError: means, that the class which you are trying to run was not found in the classpath.

It seems AbstractSAXParser is not found. So you need to add the class or .jar file which contains this class into the java classpath.



Related Tutorials/Questions & Answers:
Code error
Code error  package trail; import...) read.close(); } } } While using this it shows error as: run... seconds) Hw can i correct this code????????   Basically, the Exception
Upload Code error on deploying
Upload Code error on deploying  on deploying the above code as it is said it is giving error that " No getter method for property thefile of bean org.apache.struts.taglib.html.BEAN " Error 500--Internal Server Error
Advertisements
error in code - JDBC
error in code  hi friends i had one problem when i am running the application of jdbc code it is getting that Exception in thread "main" java.lang.NoSuchMethodError: main plz send me the solution for that error   
Error in Code - Development process
Error in Code  Hi; This is my code to get all d records from View_Service table but am getting error. I just copied this from net.I am doing mini project plz send me code to get records. What action should i mention
code error - JSP-Servlet
code error  hii this program is not working becoz when the mouse... is error in this progrm. ss function describe() { window.status... complaint   Hi friend, Do some changes in your code to solve
Error in a code. - Java Beginners
Error in a code.  This is the question I posted yesterday: "I'm.... I'm confused about where and what i should put into the overall code. Also I can't quite figure out how to write the code for the GUI. Could anyone please help
Swing error in code
Swing error in code  import java.rmi.*; import java.awt.*; import... the following errors: C:\tjm>javac SClient.java SClient.java:29: error: <...() { ^ SClient.java:29: error: illegal start of type b.addActionListener(new
Code Error - WebSevices
Code Error  How to insert checkbox values to mysql using php  Hi friend, Code to help in solving the problem : Insert CheckBox Thanks
Snippet Code Error
Snippet Code Error  The following is a snippet of code from a Java application which uses Connector/J to query a MySQL database. Identify possible problems and possible solutions. Connection cn= DriverManager.getConnection
Java Code Color Function Error
Java Code Color Function Error  Java Code Color Function Error
Compilation error. Hibernate code - Hibernate
Compilation error. Hibernate code   Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory...) how to rectify that error in hibernate  Hi Friend, You have
Java error code
Java error code       Java Error code are the set of error that occurs during the compile-time and Run-time. From java error we have given  you a sample of code
jsp code error - Java Beginners
jsp code error  Hi, I have a problem with following code... part. Is it possible to display a message box or alert box in jsp code??. plz help...; Hi friend , Try this code: /*out.println("Login Failed
error in java code - Java Beginners
error in java code  Hi Can u say how to communication between systems in a network.   Hi friend, A method for controlling an operation of a server system by a client system interconnected with the server
jsp code error - JSP-Servlet
jsp code error  I have a jsp page named "tMastDepartment".which has some table row containing text box like 'project code','Departmentcode','employee... there is the problem which i am facing.what will be the exact code
jsp code error - JSP-Servlet
jsp code error  hello, is anyone here who can solve my problem. what happen experts where r u? or u r not able to do
jsp code error - JSP-Servlet
jsp code error  hello, is anyone here who can solve my problem. what happen experts where r u? r u not able to do
Java code error - Java Beginners
Java code error  Hi, I am using a MooreQuery to look for neighbors in a grid: MooreQuery query = new MooreQuery(grid, this,(int) (2*myHomeRangeRadius), (int) (2*myHomeRangeRadius)); if(query != null){ for (Object
exception handling code for file not found error..
exception handling code for file not found error..  How to do exception handling for file not found error
error in code - Java Server Faces Questions
error in code  hi friends i have a problem in execution of JSF it is displaying the error like "Cannot find FacesContext" i am not understanding plz check the error and give me the answer i am sending the code of web.xml
getting error in your login form code
getting error in your login form code  i tried your code for login form but i am getting an error.the error is undefined index userid and password.the code is $fuser=$POST["userid"];. how to solve this problem please help me
java runtime error: JDBC code - Java Beginners
and also set in the class path. the code is compilled and giving runtime error...java runtime error: JDBC code  Hi i want to insert data into mysql....  Hi friend, Plz give full details with source code to solve
java Compilation error:jsp code - JSP-Servlet
java Compilation error:jsp code   I am getting an Generated Servlet error: String literal is not properly closed by a double-quote. here is my code: <% { Dbclass2 d= new Dbclass2
jsp code compilation error - JSP-Servlet
is the error and also what is the proper code for funds transfer. HTTP...jsp code compilation error  hai, iam doing online banking project.i... The server encountered an internal error () that prevented it from fulfilling
Error in MySQL Procedure Using JAVA Code
Error in MySQL Procedure Using JAVA Code  The following Java code (using Connector/J to create a stored procedure on MySQL 5.0) does not execute successfully. Identify the cause and available solutions. statement.execute
can i know the error in this code... am unable to run this code
can i know the error in this code... am unable to run this code  ... code like < >. The for is improper and not completed. Moreover, you have open and close braces properly. Anyways, we have modified your code. Here
i am unable to identify the error in my code
i am unable to identify the error in my code  class Program { public static void main(String[] args) { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("enter
i am unable to identify the error in my code
i am unable to identify the error in my code  class Program { public static void main(String[] args) { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("enter
JSF code Error - Java Server Faces Questions
JSF code Error  Hii Friends, When Iam working on JSF..,What jars are have to add in Applicaton? Thanks and Regards By Sreedhar
java code compling error - Java Beginners
java code compling error  i have face below problem,when compiling the program? Note: Some input files use unchecked or unsafe operations. Note... this problem?  Hi Friend, Your code downcasts from Object to something
ERROR with my JAVA code - Java Beginners
ERROR with my JAVA code  The error came up in my main method... it wasnt there until i finished my actionListener coding so I dont know how to fix this....it is really stressing me out!! HELP!!! import java.awt.*; import
Advertisements
 

 

 

DMCA.com