473,772 Members | 2,244 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

JDOME: Could not load default SAX parser

Osoascam
21 New Member
Hi! I'm trying to do a simple JDOM example, as I have to uste it for a homework... The thing is, it just doesn't work...

See, this is the code:

Expand|Select|Wrap|Line Numbers
  1. public class Ejemplo 
  2. {
  3.  
  4.   public static void main(String[] args) 
  5.   {
  6.    try 
  7.    {
  8.       SAXBuilder builder=new SAXBuilder(true); 
  9.  
  10.       Document doc=builder.build(new File("liga.xml")); //here's where it signals the error
  11.  .
  12.  .
  13.  .
  14.  
And here's the Exception

org.jdom.JDOMEx ception: Could not load default SAX parser: org.apache.xerc es.par
sers.SAXParser: SAX2 driver class org.apache.xerc es.parsers.SAXP arser not found:
org.apache.xerc es.parsers.SAXP arser
at org.jdom.input. SAXBuilder.crea teParser(SAXBui lder.java:581)
at org.jdom.input. SAXBuilder.buil d(SAXBuilder.ja va:424)
at org.jdom.input. SAXBuilder.buil d(SAXBuilder.ja va:810)
at org.jdom.input. SAXBuilder.buil d(SAXBuilder.ja va:789)
at Ejemplo.main(Ej emplo.java:15)
Caused by: java.lang.Class NotFoundExcepti on: org.apache.xerc es.parsers.SAXP arser

I just don't know what's wrong... Is it that I don't have the JDOM right?
Apr 16 '07 #1
1 7260
Osoascam
21 New Member
Hi! I'm trying to do a simple JDOM example, as I have to uste it for a homework... The thing is, it just doesn't work...

See, this is the code:

Expand|Select|Wrap|Line Numbers
  1. public class Ejemplo 
  2. {
  3.  
  4.   public static void main(String[] args) 
  5.   {
  6.    try 
  7.    {
  8.       SAXBuilder builder=new SAXBuilder(true); 
  9.  
  10.       Document doc=builder.build(new File("liga.xml")); //here's where it signals the error
  11.  .
  12.  .
  13.  .
  14.  
And here's the Exception

org.jdom.JDOMEx ception: Could not load default SAX parser: org.apache.xerc es.par
sers.SAXParser: SAX2 driver class org.apache.xerc es.parsers.SAXP arser not found:
org.apache.xerc es.parsers.SAXP arser
at org.jdom.input. SAXBuilder.crea teParser(SAXBui lder.java:581)
at org.jdom.input. SAXBuilder.buil d(SAXBuilder.ja va:424)
at org.jdom.input. SAXBuilder.buil d(SAXBuilder.ja va:810)
at org.jdom.input. SAXBuilder.buil d(SAXBuilder.ja va:789)
at Ejemplo.main(Ej emplo.java:15)
Caused by: java.lang.Class NotFoundExcepti on: org.apache.xerc es.parsers.SAXP arser

I just don't know what's wrong... Is it that I don't have the JDOM right?
May 2 '07 #2

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

Similar topics

4
4025
by: blu4899 | last post by:
Hi, The Xerces XML parser is reading external DTD references in DOCTYPEs by default, but is not doing anything with them because validation is turned off by default. This is documented in http://xml.apache.org/xerces2-j/features.html#nonvalidating.load-external-dtd This setting causes many XML instances with broken DTD references in the DOCTYPE to fail and adds some performance overhead. Is there anything good that comes from this...
2
2284
by: BW | last post by:
When entering web site I get the following error in the Default.aspx page: Server Error in '/' Application. ---------------------------------------------------------------------------- ---- Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error
1
2028
by: David Johnson | last post by:
Okay, creating an ASP.NET application with Visual Studio on a remote server (not local machine). It starts up with WebForm.aspx I put an image in webform.aspx, save it, and jump over to Internet Explorer, and surf to http://myserver/myproject/webform1.aspx. All is well, I see my image.
13
26620
by: Thom Little | last post by:
My first ASP.NET application on Visual Studio 2005 and .NET Framework 2.0 The application compiles and executes correctly on the development machine. I then publish it to an empty directory on the development machine. I then copy that directory to the remote server that contains numerous directories and some of them are using .NET Framework 1.1 (1.1 and 2.0 are both installed on the server). When I call the page I get the message ...
2
9415
by: 3Dfelix | last post by:
Hello, I'm starting with Visual Web Developper and ASP.NET 2.0. In order to test my remote server, I created an "hello word" aplication, that is working on local server. I have copied all document to remote server using FTP. The error that I have is the following: Server Error in '/w1' Application. --------------------------------------------------------------------------------
8
13207
by: Rob T | last post by:
When I was using VS2003, I was able to compile my asp.net project locally on my machine and copy it to the production server and it would run just fine. I've now converted to VS2005. The project compiles & runs fine locally, but when I copy to the production machine, I get this error: Parser Error Message: Could not load type 'Global'. Source Error: Line 1: <%@ Application Codebehind="Global.asax.vb" Inherits="Global" %> Source...
28
16423
by: Marc Gravell | last post by:
In Linq, you can apparently get a meaningful body from and expression's .ToString(); random question - does anybody know if linq also includes a parser? It just seemed it might be a handy way to write a safe but easy implementation (i.e. no codedom) for an IBindingListView.Filter (by compiling to a Predicate<T>). Anybody know if this is possible at all? Marc
1
3295
by: Carlos Sosa Albert | last post by:
Hello people, I'm having an issue registering an assembly in ONE server. I've already tried to reinstall the .NET framework 2.0 but the error is still there. I enabled the logging but nothing changed. The only thing I noticed is that it mentions "Using host configuration file: \\?\c:\windows\microsoft.net\framework\v2.0.50727\aspnet.config". Seems pretty strange the "\\?\c:" Oh, of course the file is in the .bin directory...
4
2571
by: fbrewster | last post by:
I'm writing an HTML parser and would like to use Internet Explorers DOM parser. Can I use Internet Explorers DOM parser through a web service? thanks for the help
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10261
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
10104
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
10038
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
9912
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7460
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
6715
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();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3609
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.