Problem in xpath reading

hi to all,
Iam using javax.xml.xpath.XPath to parse and read the xml file. It is working fine in java 1.5 version. but i want the same requirement in java 1.4. When iam using same code in java 1.4 it is throwing exceptions. Iam giving the code....
First of all iam creating XPathReader class for xpath parsing and reading.
import java.io.IOException;
import javax.xml.XMLConstants;
import javax.xml.namespace.QName;
import javax.xml.parsers.*;
import javax.xml.xpath.*;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
public class XPathReader {
private DocumentBuilder documentBuilder=null;
private Document xmlDocument;
private XPath xPath;
public XPathReader() {
initObjects();
private void initObjects(){
try {
documentBuilder= DocumentBuilderFactory.
newInstance().newDocumentBuilder();
xPath = XPathFactory.newInstance().
newXPath();
}catch (Exception ex) {
ex.printStackTrace();
public void parse(String filename){
try {
xmlDocument=documentBuilder.parse(filename);
} catch (Exception e) {
e.printStackTrace();
public Object read(String expression,
QName returnType){
try {
XPathExpression xPathExpression =
xPath.compile(expression);
return xPathExpression.evaluate
(xmlDocument, returnType);
} catch (XPathExpressionException ex) {
ex.printStackTrace();
return null;
In another class iam just creating object of XPathReader
XPathReader reader= new XPathReader();
reader.parse(....xml file path that which u want to parse......);
String expression = ....
NodeList rootNode = (NodeList)reader.read(expression,XPathConstants.NODESET);
here generally i will get NodeList object...
this code works fine in java 1.5
but it is showing exceptions in 1.4 as...
java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom
at javax.xml.xpath.XPathFactory.newInstance(Unknown Source)
I think XPathFactory is not in the 1.4. So, is there any alternative to overcome the above problem?
if any buddy knows please help me...
thanks to one and all...
Edited by: [email protected] on May 7, 2008 4:36 AM

You need to post the code so we can help

Similar Messages

  • Collation problem in Acrobat Reader X

    I have a collation problem with Acrobat Reader X and HP LaserJet M2727 nf (using HP Universal Printing PCL 6 driver)
    When printing multiple copies of a PDF, the result is always in the order 1,2,3 1,2,3 etc. (for a 3 page document for example)
    This is the case even when I uncheck the default collate option.
    How can I disable the collation option in this version?
    Thanks,
    Eran

    HELP!  This is a killer problem.   Everyone is banking on PDF documents and Adobe Reader.  YOU CAN NOT IGNORE THIS ANY MORE!
    There was a registry setting in Reader 8 to force host collation.. it doesn't work any more.  Please respond immediately !!!!

  • Problem with adobe reader x (10.0.1) error 1327 message. invalid drive: H:\

    I AM HAVING A PROBLEM W ADOBE READER X (10.0.1)  IT GIVES ME A ERROR 1327 MESSAGE  INVALID DRIVE: H:\
    I CAN NOT DELETE IT OR OPEN IT OR DO ANYTHING . WHEN IT TRIES TO REINSTALL IT BRINGS UP SCREEN ;
    SET UP WAS INTERRUPTED BEFORE ADOBE READER X (10.0.1) COULD BE INSTALLED. YOUR SYSTEM HAS NOT BEEN MODIFIED.

    O/P reports issue as resolved in http://forums.adobe.com/thread/1127028

  • Problem with Adobe Reader not being able to run with Maverick  10.9.2?

    problem with Adobe Reader not being able to run with Maverick  10.9.2?

    Have you updated your version of Adobe Reader?

  • Problem with Adobe Reader and IE

    I'm using Vista Home Premium and IE9 with the latest Reader available.  Starting yesterday, I cannot read PDF files on the web.  This is a new problem.  I tried to download newer versions of IE and the Reader, but both tell me I've got the newest versions I can use.
    I have no problem with Firefox.  Just IE.  I prefer using IE.  Can someone guide me -- without using technical language.  Many thanks!!

    Thanks for your input.  I opened the standalone Adobe Reader X, clicked Edit, Preferences, Security, Advanced Preferences.  Then clicked each of the 3 tabs on top, but nothing looked like "Protected Mode."
    Then I went back and clicked Security (Enhanced) and unchecked Enable Enhanced Security.  Tested this change, but I still get the gray screen and messages:  "A problem has caused IE to close."  "A problem with this website has caused IE to close and re-open the tab."  I then went back and re-checked Enable Enhanced Security.
    I should mention that I have used this particular website for about 10 years and never had a problem.  But I now have the same problem with any online PDF that I try to open using IE.
    Can you think of anything else?  If not, here's my plan of attack.  Please let me know if you think it will work.
    1)  Copy over all my favorite sites from IE to Firefox.  (I've already started doing that.)
    2)  Uninstall IE and re-install it.
    3)  If I still have a problem, uninstall Adobe Reader and re-install it.
    Do you think this will do the job if all else fails?
    Many, many thanks for the time you have put into this.

  • Problem with adobe reader, commenting

    one of our authors is using adobe reader x 11,1, and I send him a pdf (enabled commenting and measuring), but for some reason the commenting-fields does not show on his screen?
    should I save the pdf in another way?

    What do you mean by "commenting fields" exactly? By “commenting filds” I mean the tools in top of the page – delete, highlight etc. When I send the pdf, I save it as “file - save as -  reader extended pdf – enable commenting and measuring”, otherwise the commenting tools normally don’t appear by the author.
    Are they existing comments? no, it is the text in his pdf-book he needs to correct
    Is he able to access the commenting tools? no
    You can try sending a non-enabled version since Reader 11 can add comments to a non-enabled document. will try that J
    Fra: George Johnson [email protected]
    Sendt: 6. november 2012 16:16
    Til: Forlagene Idag & Nordan
    Emne: problem with adobe reader, commenting
    Re: problem with adobe reader, commenting
    created by George Johnson <http://forums.adobe.com/people/George_Johnson>  in Creating, Editing & Exporting PDFs - View the full discussion <http://forums.adobe.com/message/4826849#4826849

  • Continued problems with Adobe Reader 9.3.1

    Adobe Reader stops at the half-way mark in the progress block when loading a form to print.  Cannot get this fixed. Does anyone out there have a fix for this.  Is Adobe even recognizing that there is a problem with this.  Error message keeps telling me that there is a problem with Adobe Reader, exit and try again.

    I haven't been able to print any .pdf files since I downloaded 9.3.
    My message says Internet Explorer has closed it down because of data executable files.  I've changed my DEF settings to allow
    Adobe Reader but it still doesn't work.  I never had any problems before with newer versions.

  • Problems in Adobe Reader when I open a pdf file

    I have problems in Adobe Reader when I open a pdf file, the menu bar appears blank without options and when I pass the mouse over the bar she disappears. I uninstalled and reinstalled Adobe Reader and to no avail. Could anyone help in this case.

    Manuel Sobreira wrote:
    My version is already the most current, Kaspersky Internet Security 2015 15.0.0.463 (b).
    That is the old version that causes the problem; you need to update to the latest version (15.0.2.361).

  • Having problem with adobe reader

    Hi,
    I have a problem with adobe reader in my cell phone E71 model recently.I could open any pdf files till yesterday,but now without any reason the adobe reader icon in the office folder does not open.I wanna know what should I do.

    Might be some problem with adobe reader. You may Google another pdf app called pdf plus. Install it and see if the problem is solved or not.
    Nokia C7

  • The display problem of Adobe Reader 11.0.09

    Hi, everyone,
    My operation system is Windows XP SP3 Professional.
    I encountered a strange display problem of Adobe Reader 11.0.09.
    The problem happened not only at Adobe Reader 11.0.09 Chinese Traditional, but also English United States.
    The display problem such as two pictures as follow.
    The strange problem was that menu bar covered by toolbar items or disappeared.
    Please tell me how to resolve the problem.
    Thanks a lot.

    Thanks for your help, Ajlan huda.
    Could you tell me where I could find the system requirement about Adobe Reader patch 11.0.09?
    I couldn't find any information about system requirement of Adobe Reader patch 11.0.09.
    I knew Adobe Reader 11 could install on Windows XP SP3 just all.
    I could install and upgrade Adobe Reader to 11.0.09 as the following picture.
    I will roll back the version of Adobe Reader from 11.0.09 to 11.0.07 and test the problem appear or not.

  • Problem in installing Reader

    I have a problem in installing Reader X.
    Windows 7,  64 bit, and trying to download using IE8  (32 bit.)   I have checked that the Security options for Trusted and Internet zones are set to default   -  I assume that this would then not stop any ActiveX errors or suppress any ActiveX messages.
    Have Norton Internet security. but to avoid any issues have turned off firewall and virus scan for the download period.
    I go to the adobe download, and select reader X.   Then press Download - I get a warning screen that, depending upon my security settings, I may see some of the following steps.  (With a number of different scarios listed.)
    But the process just stops here - I do not get any Information Bar messages coming up in IE8 that I can respond to.   Just stays at the prescreen, and cannot get any file to download.
    I cannot find any way of donwloading and saving any installation file to the PC, which I can then run offliine.
    Any help please???

    Thanks - am downloading the file now!
    Regards

  • Problems with flash reader, flash reader

    problems with flash reader, flash reader

    flash reader is an App for iPhone, iPad and iPod. Do you mean Flash Player?
    And, what is the problem?

  • Cannot open CS6 Bridge.  Always the same ERROR: Bridge has a problem and cannot read the cache

    Cannot open CS6 Bridge.  Always the same ERROR: Bridge has a problem and cannot read the cache

    Try this.  This is for CS6 but substitue CC and Bridge 6.
    ~library/caches/Adobe/Bridge CS6 and inhere should be 2 files:
    Adobe Bridge Plug-in Cache
    and the folder called Cache. Inhere should be 4 folders called '254', '1024', 'data' and 'full'
    All those folders carry the content of the respective quality of the thumbs and preview as well as 100 % cache and Bridge database.
    Any way, Since you have not used Bridge you have no relevant amount of cache and I would suggest you quit both PS and Bridge and manual delete both the items (plug in and folder called cache at the end of the Bridge CS6 path mentioned above.
    (both files will refresh itself after a restart of Bridge).
    To be on the save side also visit in same user library the folder Preferences and look for the file called "com.adobe.bridge5.plist" (yes it is Bridge 5 that comes with CS6, all Adobe apps have their own version number and they are presented in the same Suite version. CS6 has PS version 13 and Bridge version 5 )
    also drag this file to the trash.
    Then hold down option key (alt) while starting Bridge and this should give you the option to reset the preferences as mentioned earlier in this thread.
    Choose reset prefs and try again.

  • Trying to open PDF getting error message " there is a problem with Acrabat /Reader. Please exit Adob

    I have windows XP, when I am trying open PDF getting a error message " there is a problem with Acrabot /Reader. Please exit Adobe Acrabat/Reader Please try again'  It was working earlier today  HELP

    If all else fails, you can try one of 2 things (I will assume you are talking about Reader - though this is not the Reader forum). Use ctrl-alt-del to go to the task list. Kill AcroRd32.exe. Then try again. If that does not work, a reboot will probably solve the problem.

  • Priemere Pro consistantly crashed upon export, I cleaned media cache and that seemed to help. Now export errors unknown problem... read to uninstall and reinstall and now I can not open up PPCS5

    Here is my problems with Premiere Pro CS5
    When I export a project... the computer crashes.
    I was able to get a tech chat and they would clean the media cache
    so I did that.
    Then, I got an export error "unknown problem" I then read in a forum to uninstall and reinstall Premiere pro
    Now on my very nice relatively newer IMAC, when I go to applications to open it... I can not find a purple tab to open it. It just has a presets folder, then open that and it has styles, templates, textures but, now little purple Pr to open or drag to my dashboard.
    Help PLEASE!!! I have wasted 20 hours of editing time, and work because of crashes, and problems.

    Here is my problems with Premiere Pro CS5
    When I export a project... the computer crashes.
    I was able to get a tech chat and they would clean the media cache
    so I did that.
    Then, I got an export error "unknown problem" I then read in a forum to uninstall and reinstall Premiere pro
    Now on my very nice relatively newer IMAC, when I go to applications to open it... I can not find a purple tab to open it. It just has a presets folder, then open that and it has styles, templates, textures but, now little purple Pr to open or drag to my dashboard.
    Help PLEASE!!! I have wasted 20 hours of editing time, and work because of crashes, and problems.

Maybe you are looking for

  • Loops greyed out in loop browser

    Can any one tell me how to make some greyed out loops in the loop browser play? The loops in question are in the following location on the HD: H/D / LIB / AUDIO / APPLE LOOPS / APPLE / APPLE LOOPS FOR GARAGE BAND. About 15% of these loops are greyed

  • Imessage is not working after 24hrs of me trying everything to get it to work again

    upload the new update and as of this time my imessage/facetime isn't working. Same message keeps coming up waiting on activation, I"v e done everything under the sun to get this to work. Even had an Apple tech person try and nothing worked...I need a

  • Sender File Adapter Problem when text document is a single line.

    Hi All, I have posted this question earlier too. But did not get a proper answer. I am using File adapter to fetch data from a file system. My input data is: AA123BB45678AA345BB78564. It is just reading the first segment i.e.AA123 and not reading the

  • Retrieve input values from the selection screen

    I have a requirement to retrieve the variable value or values inputed from the selection screen and label the worksheet tab to replace the tab name 'Sheet1' from the Excel. The only way to do this would be to write a macro to label the sheets but how

  • Help needed with JMF and FFMPEG

    Hi, im using Jave which is a wrapper libraray for FFMPEG to encoded videos and im also using JMF to take snapshots of the video to save as thumbnails. All the code I have works except that I cant get Jave(FFMPEG) to encoded the videos in to a format