Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

VisualAge doesn't see 'com.ibm.xml.parser' package

Posted on 2001-07-03
2
397 Views
Last Modified: 2008-02-01
I am developing a java program using VisualAge for Java v3.5 Professional.  My code includes the "com.ibm.xml.parser" package that comes with VisualAge.  I am coding a program that will build an XML document by using the "TXDocument" class that is part of IBM's xml parser package.  However, when I try to run the code, I get a "ClassDefNotFound" error.  Currently, I have three classes.  The error is occuring in my abstract class as shown below:

---------------------------------------------
package com.test.xml.filter;

import com.ibm.xml.parser.*;
import org.w3c.dom.*;
import java.io.*;
import java.util.*;

public abstract class Filter  
{
public Document createXMLDocument (String rootName)  
{    
   /* the error is occuring on the line below. The
      compiler doesn't recognize TXDocument */
   Document oDoc = new TXDocument();
   Element oRoot = oDoc.createElement(rootName);

   DTD oDtd = ((TXDocument)oDoc).createDTD(rootName, new
        ExternalID(rootName + ".DTD"));
   
   oDoc.appendChild(oDtd);
   oDoc.appendChild(oRoot);
   return oDoc;    
}
}
-----------------------------------------------
This issue is puzzling me because I can clearly see the class definition if you click on the "Packages" tab in VisualAge and drill down to TXDocument.  Is there something in VisualAge that needs to be configured?  Do I need to reimport the com.ibm.xml.parser package?  If so, where do I get it?  I have already tried searching around for a JAR file or something, but the only thing I have found is the xml4J JAR file that seems to contain everything except for the com.ibm.xml.parser package.  Does anybody know what is wrong with VisualAge or my code?  Thank you.
0
Comment
Question by:ozonshak
2 Comments
 
LVL 10

Accepted Solution

by:
Yury_Delendik earned 150 total points
ID: 6252340
Setup the classpath of your main class (that contains main methoed): select class, Selected->Run->Check Class Path and choose required projects. (IBM's xml parser is your case)
0
 

Author Comment

by:ozonshak
ID: 6256476
Thanks Yury.  That did the trick.
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Excel VBA and XML - traversing the nodes 2 80
Removing information on Duplicate XML Nodes 24 81
XML filtering Windows Event Viewer 10 61
XML to Excel using XSL - formatting 3 37
The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question