Org/jdom/JDOMException

When a deploy a application on localhost development mode, it works fine!!!
When a try to deploy the same application on other machine with production mode, the follow message is displayed:
java.lang.NoClassDefFoundError: org/jdom/JDOMException
Any idea?

In development mode has the weblogic test client.
The weblogic test client is inside of admin console and appers when you need test a webservice.
The weblogic test client has a jdom.jar file in your war (web archive).
Look the file:
<DOMAIN_HOME>\servers\AdminServer\tmp\_WL_internal\wlstestclient\<XPTO>\war\WEB-INF\lib\jdom.jar
To solve your problem, you need add a jdom.jar to dependencies of your application.
If you use maven, edit your pom file and add this dependencie.

Similar Messages

  • Error: java.lang.NoClassDefFoundError: org/jdom/JDOMException

    Dear Sir/Madam,
    I have installed Library software “NewGenLib” which support Java. The software is running well in the server as well as some other client pc.
    When I am trying to install in some other client following error is coming and unable to run the software.
    I need your support urgently…Kindly help me out..
    Error
    “Java Web Start 1.4.2_17 Console, started Fri Jul 31 11:28:18 IST 2009
    Java 2 Runtime Environment: Version 1.4.2_17 by Sun Microsystems Inc.
    Logging to file: C:\Documents and Settings\nihar\Desktop\log.txt
    java.lang.NoClassDefFoundError: org/jdom/JDOMException
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    at java.lang.Class.getConstructor0(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at com.sun.javaws.Launcher.executeApplet(Unknown Source)
    at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
    at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
    at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
    at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
    at com.sun.javaws.Launcher.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    With regards
    Nihar
    NSHM Knowledge Campus
    Head-Librarian, Kolkata
    India

    To the point, a NoClassDefFoundError simply means that the in the message mentioned class (or at least, the JAR file with the class) is missing in the runtime classpath.
    So either it is actually missing, or your code is not using the paths you think it would be used for the classpath, or there are collisions of duplicate different versioned classes in the classpath.

  • Problem in using org.jdom.Parent in my EJB

    Hi All,
    I am using a code below to read a EBM and replace some of the node values in it. For that , initiallly, i want to check whether the XPATH class is working ..
    While i run this code in my SOAP-UI i get teh No class definition found exception for the class org.jdom.Parent. But i hav imported that jar inside my project. and i am able to use the line import org.jdom.parent. in my class file.
    package EBMhandling;
    import java.io.StringReader;
    import javax.jws.WebService;
    import java.io.StringReader;
    import javax.jws.WebService;
    import org.jdom.Document;
    import org.jdom.input.SAXBuilder;
    import org.jdom.output.XMLOutputter;
    import org.jdom.xpath.XPath;
    import org.xml.sax.InputSource;
    import org.jdom.Parent;
    @WebService
    public class UsingJDOMclass {
    public String ReplaceEBM(String input,String nodeXpath) {
    String modifiedEBM=null;
    try
    SAXBuilder builder = new SAXBuilder();
    Document doc = builder.build( new InputSource(new StringReader(input)) );
    modifiedEBM=(new XMLOutputter()).outputString(doc);
    // String innerXml = (new XMLOutputter()).outputString(XPath.selectSingleNode(doc,nodexpath));
    try
    XPath myxpath=XPath.newInstance(nodeXpath);
    modifiedEBM=myxpath.toString();
    catch(Exception e) {
    modifiedEBM="ERROR: inside :" + e.toString();
    catch(Exception e) {
    modifiedEBM="ERROR :" + e.toString();
    return modifiedEBM;
    This is the error i get:
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
    <ns2:ReplaceEBMResponse xmlns:ns2="http://EBMhandling/">
    <return>ERROR: inside :org.jdom.JDOMException: java.lang.NoClassDefFoundError: org/jdom/Parent: org/jdom/Parent</return>
    </ns2:ReplaceEBMResponse>
    </S:Body>
    </S:Envelope>
    Kindly help me in this regard.
    Thanks,
    Sabarisri. N

    Hi Sameera,
    I found the conflict is because that, i hav added two different jars to my project folder. Both the jars contiained the definition of the class org.jdom.parent.
    So why the error have occured. I came to know a solution defined in https://issues.apache.org/jira/browse/GERONIMO-3894
    Not sure.. hw well it would work..
    So i think i can go for some alternative classes.
    Can u pls help me in the below requirement.
    I need to get a method which take input as (XMLasString,xpathOfElement,NewValueForThatElement)
    I shd replace the old value of that element by the NewValueForThatElement and again return back the XMLasString only..
    Thanks,
    Sabarisri. N

  • In Reply to : How to validate org.jdom.Document object using xsd: dvohra09

    Hi All
    I am creating org.jdom.Document object using constructor Document() and adding children using setRootElement(), setChildren() and addContent() methods. The children are objects of org.jdom.Element. If i want to validate the org.jdom.Document using xsd what i have to do. Thanks in anticipation.

    I tried the below code and it is always giving the
    Parsing fatal error : The markup in the document preceding the root element must be well-formed.
    But it is possible to validate the same Document object as right document after writing it onto xml file using XMLOutputter and parsing it using DOMParser
    Thanks in anticipation
    org.jdom.Document document;
    String documentString=document.toString();
    StringReader stringReader=new
    StringReader(documentString);
    SAXBuilder saxBuilder =new
    SAXBuilder("org.apache.xerces.parsers.SAXParser",true);
    saxBuilder.setFeature("http://xml.org/sax/features/vali
    ation",  true);
    saxBuilder.setFeature("http://apache.org/xml/features/v
    lidation/schema",  true);
    saxBuilder.setFeature("http://apache.org/xml/features/v
    lidation/schema-full-checking", true);
    //Set a error handler with
    setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
    saxBuilder.build(stringReader);

  • How to use org.jdom.NameSpace in setAttribute() method of org.jdom.Element?

    Hi to all,
    Iam building xml file.In that iam trying to create org.jdom.NameSpace in setAttribute() method of org.jdom.Element object. Iam getting runtime errors like illegal name.
    What exactly i want is i want to set "xmlns" as attribute name and "http://www.loc.gov/MARC21/slim" as attribute value. When iam directly creating that it is throwing exception that no attribute name should be xmlns in org.jdom.Element. That is why i approched to org.jdom.NameSpace. But iam not getting the way, how to set org.jdom.NameSpace in setAttribute method of org.jdom.Element object. I tried several ways but it is not comming.
    can any budy help me please.
    thanks to one and all.

    Hi Marc
    I solved the problem
    Actually the oRootElement.toString was returning me only the string and not the
    XML formatted String eg:
    <?xml version="1.0" encoding="UTF-8"?>
    <response id="2"><apartment id="1"/><clips><clip><id>1</id><timeStamp>2000000</timeStamp><size>100</size></clip><clip><id>2</id><timeStamp>4000000</timeStamp><size>200</size></clip></clips></response>
    So the very first tag was missing <?xml version="1.0" encoding="UTF-8"?> when i used element.toString();
    But now i used StreamResult and Transformer
    which gives me the same XMl format as i want and it works fine with both
    JRE1.4 and JRE1.5
    Thank you
    Geetanjalee

  • Java.lang.LinkageError: Class org/jdom/Document

    I run my program in developemnt its working... but its working in production it throws these below mention error.... Any one help me to olve this problem.....
    Exception : java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.RemoteException: ; nested exception is:
         java.lang.LinkageError: Class org/jdom/Document violates loader constraints: parent and child already loaded different classes

    What program is this? Something you wrote in Java? If so, you're posting to a forum that can't help you. We deal with Messagng Server here, not Java programming. . .

  • Org.jdom.input.JDOMParseException: Error on line 0: File not found

    Hi Everybody!
    I´ve changed the version of Weblogic from 8.6 to 9.2 and I had several problems. One of them was that several web services made in Axis2 didn´t work because when I tried to access to wsdl the program resolve an error. I solved this problem including in weblogic.xml the following lines:
    <container-descriptor>
    <prefer-web-inf-classes>true</prefer-web-inf-classes>
    </container-descriptor>
    This solutins works fine with the services but now I have another problem. I have to open a xml file and to do that I use the following senetences:
    SAXBuilder builder=new SAXBuilder(false);
    org.jdom.Document doc=builder.build(myXML);
    In the second line the program fails and show me the following:
    org.jdom.input.JDOMParseException: Error on line 0: File "c:/temp/1219308978141\
    docucad.xml" not found.
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:468)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:891)
    at jsp_servlet._engineeringcentral._custom.__bzupdatexml.AssignXMLAttrib
    utes(__bzupdatexml.java:292)
    at jsp_servlet._engineeringcentral._custom.__bzupdatexml.ModifyXML(__bzu
    pdatexml.java:263)
    at jsp_servlet._engineeringcentral._custom.__bzupdatexml._jspService(__b
    zupdatexml.java:697)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
    (StubSecurityHelper.java:225)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
    tyHelper.java:127)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:283)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(Servlet
    StubImpl.java:391)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:309)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:42)
    at com.matrixone.servlet.CustomFilter.handleDefault(CustomFilter.java:99
    at com.matrixone.servlet.CustomFilter.doFilter(CustomFilter.java:86)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:3212)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
    ervletContext.java:1983)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
    ontext.java:1890)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
    ava:1344)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    Caused by: org.xml.sax.SAXParseException: File "c:/temp/1219308978141\docucad.xm
    l" not found.
    at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1022
    at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocume
    nt(DefaultEntityHandler.java:499)
    at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:3
    04)
    at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:907)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
    ... 23 more
    Caused by: org.xml.sax.SAXParseException: File "c:/temp/1219308978141\docucad.xm
    l" not found.
    at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1022
    at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocume
    nt(DefaultEntityHandler.java:499)
    at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:3
    04)
    at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:907)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:891)
    at jsp_servlet._engineeringcentral._custom.__bzupdatexml.AssignXMLAttrib
    utes(__bzupdatexml.java:292)
    at jsp_servlet._engineeringcentral._custom.__bzupdatexml.ModifyXML(__bzu
    pdatexml.java:263)
    at jsp_servlet._engineeringcentral._custom.__bzupdatexml._jspService(__b
    zupdatexml.java:697)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
    (StubSecurityHelper.java:225)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
    tyHelper.java:127)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:283)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(Servlet
    StubImpl.java:391)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:309)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:42)
    at com.matrixone.servlet.CustomFilter.handleDefault(CustomFilter.java:99
    at com.matrixone.servlet.CustomFilter.doFilter(CustomFilter.java:86)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:3212)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
    ervletContext.java:1983)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
    ontext.java:1890)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
    ava:1344)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    Caused by: org.xml.sax.SAXParseException: File "c:/temp/1219308978141\docucad.xm
    l" not found.
    at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1022
    at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocume
    nt(DefaultEntityHandler.java:499)
    at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:3
    04)
    at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:907)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:891)
    at jsp_servlet._engineeringcentral._custom.__bzupdatexml.AssignXMLAttrib
    utes(__bzupdatexml.java:292)
    at jsp_servlet._engineeringcentral._custom.__bzupdatexml.ModifyXML(__bzu
    pdatexml.java:263)
    at jsp_servlet._engineeringcentral._custom.__bzupdatexml._jspService(__b
    zupdatexml.java:697)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
    (StubSecurityHelper.java:225)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
    tyHelper.java:127)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:283)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(Servlet
    StubImpl.java:391)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:309)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:42)
    at com.matrixone.servlet.CustomFilter.handleDefault(CustomFilter.java:99
    at com.matrixone.servlet.CustomFilter.doFilter(CustomFilter.java:86)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:3212)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
    ervletContext.java:1983)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
    ontext.java:1890)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
    ava:1344)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    If I change the value <prefer-web-inf-classes>true</prefer-web-inf-classes> from true to false the previous senences works fine but the web services don´t work.
    Any idea?
    Thanks in advance.
    Pope

    Yes, I entirely agree with James's comment : filtering class loader mechanism is THE way to play with classloaders.
    The child-delegation model (with the option "prefer-web-inf-classes") comes from WebLogic 6.1 : it's the old-fashion way to do so. Moreover it can bring some linkage errors or unexepected behaviors.
    In addition to the official documentation, I would suggest to read the article on my blog.
    I tried to explain it in a easy way.
    http://m-button.blogspot.com/2008/08/how-to-use-weblogic-filteringclassloade.html
    Hope this helps.

  • JAVA IOException when adding "org.jdom.*" in the list of the imports for Attributes.jsp

    Hi all,
    I am trying to use JDOM and was playing with the xml examples code(Attributes.jsp)
    for WLS6.1SP2.
    When I add the " org.jdom.* " to the list of the imports on the Attributes.jsp page
    I get a java.io.exception.
    Please HELP !!

    You didn't post the exception.
    It is probably caused by the JDOM JAR or classes not being available or an
    IO error reading them (e.g. permissions issue on Unix).
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Gary Fields" <[email protected]> wrote in message
    news:3cd01550$[email protected]..
    >
    I believe that someone on this newsgroup has the answer....
    Come on guys/gals !!!
    "Gary Fields" <[email protected]> wrote:
    Hi all,
    I am trying to use JDOM and was playing with the xml examples
    code(Attributes.jsp)
    for WLS6.1SP2.
    When I add the " org.jdom.* " to the list of the imports on theAttributes.jsp
    page
    I get a java.io.exception.
    Please HELP !!

  • Covert org.jdom.Document to org.w3c.dom.Document

    Hello,
    How would I convert org.jdom.Document to org.w3c.dom.Document??
    I'm creating org.jdom.Document from the servlet that reads from the database, which gets output like following.
    // doc is org.jdom.Document
    Document doc = new Document( root );
    reportName = new Element( "REPORT_NAME" );
    root.addContent( reportName );
    reportName.setText( "Current Account Balance" );
    // skip...
    XMLOutputter outputter = new XMLOutputter(" ", true, "UTF-8");
    outputter.output(doc, out);
    And in my caller servlet, I read from the previous servlet using URL and parse it, trying to get Document, but it
    InputSource xmlSource = new InputSource( url.openStream());
    //Use a DOM Parser (org.apache.xerces.parsers.DOMParser)
    DOMParser parser = new DOMParser();
    parser.parse( xmlSource );
    Document doc = parser.getDocument();
    // and I do transformation.
    DOMSource inXML = new DOMSource( doc );
    StreamResult outXML = new StreamResult( out );
    transformer.transform( inXML, outXML )
    I'd like to skip passing around XML and share the same Document object so that I don't have parse it again...
    Help!

    Convert jdom document to dom document with class DOMOutputter.
    org.jdom.output.DOMOutputter domOut=new DOMOutputter();
    org.w3c.dom.Document domDocument=domOut.output(org.jdom.Document jdomDocument);

  • Org.jdom.XPath set up issues (jaxen)

    I'm trying to use org.jdom.XPath but am having trouble creating the jaxen jar.
    When I try to create the jar, the following occurs:
    maven jar
    Error retrieving artifact from [http://ibiblio.org/maven/xom/jars/xom-1.0.jar]: java.io.IOException: Unknown error downloading; status code was: 301I have tried updating the repository list in project.properties but am still getting the same error. Is there something that I am missing? Or is there a jar file that already exists that I can use? If not, is there something other than jaxen that I can use with org.jdom.XPath?

    HTTP status code 301 means "Moved Permanently". So that jar file has been moved to a new URL. When I pasted that URL into my browser I could see the result of the redirect:
    http://mirrors.ibiblio.org/pub/mirrors/maven2/xom/xom/1.0/xom-1.0.jar
    So if you can change whatever uses the original URL to that URL instead, it should work. Otherwise, changing whatever HTTP client tries to access the URL so that it automatically follows redirects would work as well, but I have no idea how you would do that.

  • Org.jdom.input.JDOMParseException: Content is not allowed in Prolog.

    I got the above error. I am trying to save my query xml file in my tempdir (under local settings)..done that by using file.createTempFile() method in java. To my surprise, when my xml file is stored in my current dir, it is reading it well and processing the queries in it and generating the output xml file..all is well then. But, when I am saving my query xml file in the tempdir, it is throwing that error. But, if i cut and paste the same file to my current dir, it is working fine!!! Can anyone just help me out regarding this..I am literally going bonkers. Thanks a lot.

    I am trying to get the absolute path of the file and passing it to read for my business logic class. is it something to do with the path i m passing ? cuz, other than that, i dont see any difference when the file's there in current dir and worked perfect and now when its there in the tempdir ( by createtempdir).

  • Trying to use ord.jdom package with a jar - it's not working...

    Guys, I'm trying to build a Swing app that uses jdom classes and interfaces. I built the app in NetBeans, and to get the jdom packages to work, I had to mount the jdom.jar. Then suddenly, I had no errors using the jdom classes Document, Element, SAXBuilder etc. I have the program running perfectly inside the netbeans interface.
    Now, how do I get everything working together in a JAR?
    Here's the starts of the respective files:
    * CTATool.java
    * Created on January 3, 2004, 1:23 PM
    package CTATool;
    * @author  jason_michael_trk
    public class CTATool extends javax.swing.JFrame
        /** Creates new form CTATool */
        public CTATool()
            initComponents();...
    * FileWriterXML.java
    * Created on March 5, 2004, 10:06 AM
    package CTATool;
    import org.jdom.*;
    import org.jdom.output.*;
    import java.io.*;
    * @author  Jason L Michael
    public class FileWriterXML
        private Document doc;
        private FileWriter fw;
        private File f;
    I need to include in the JAR the org.jdom package. How do I do this?
    Here's the manifest I am using cirrently:
    Manifest-Version: 1.0
    Created-By: NetBeans IDE
    Specified-By: CTATool.V2.jarContent
    Main-Class: CTATool.CTAToolThe jar includes the CTATool.class file, the FileWriterXML.class file and the jdom.jar.
    I'm getting the following errors, when I attempt to execute the CTATool.V2.jar:
    java.lang.NoClassDefFoundError: org/jdom/JDOMException
            at CTATool.CTATool.saveStatsAndExit(CTATool.java:1457)
            at CTATool.CTATool.quitMenuItemActionPerformed(CTATool.java:1450)
            at CTATool.CTATool.access$400(CTATool.java:13)
            at CTATool.CTATool$5.actionPerformed(CTATool.java:157)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
            at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
            at javax.swing.AbstractButton.doClick(AbstractButton.java:289)
            at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1113)
            at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(BasicMenuItemUI.java:943)
            at java.awt.Component.processMouseEvent(Component.java:5134)
            at java.awt.Component.processEvent(Component.java:4931)
            at java.awt.Container.processEvent(Container.java:1566)
            at java.awt.Component.dispatchEventImpl(Component.java:3639)
            at java.awt.Container.dispatchEventImpl(Container.java:1623)
            at java.awt.Component.dispatchEvent(Component.java:3480)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
            at java.awt.Container.dispatchEventImpl(Container.java:1609)
            at java.awt.Window.dispatchEventImpl(Window.java:1590)
            at java.awt.Component.dispatchEvent(Component.java:3480)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)this is right when the FileWriterXML class is created and ran.
    Help??!??Thanks in advance!
    chewy

    I think I figured this out, if it helps anyone...
    You have to wrap up all of YOUR classes into a jar, and have a manifest entry that specifies:
    Class-Path: jdom.jar
    Next, you have to put the two together (I used a self-extracting zip file. It contained MyApp.jar and jdom.jar).
    when the client extracts it onto their desktop and double clicks on MyApp.jar, it works perfectly.
    I don't think there's an easy way to package the jdom.jar in my jar and make this work.
    Hope this helps some other wary traveler!
    chewy

  • REMOVING BLANK SPACE IN XML USING JDOM

    <?xml version="1.0" encoding="UTF-8"?>
    <Person >
    <Employee1>
    </Employee1>
    <Employee2>
    </Employee2>
    <Employee3>
    </Employee3>
    </Person>
    I want to remove <Employee2>
              </Employee2>
    and my output should look like this
    <Person >
    <Employee1>
    </Employee1>
    <Employee3>
    </Employee3>
    </Person>
    so i have written code
    import org.jdom.Document;
    import org.jdom.Element;
    import org.jdom.JDOMException;
    import org.jdom.input.SAXBuilder;
    String str = "C://Employee.xml"
    SAXBuilder builder = new SAXBuilder();
    document = builder.build(str);
    Element root = document.getRootElement();
    Element employeeChild1 = root.getChild("Employee1");
    Element employeeChild2 = root.getChild("Employee2");
    employeeChild1.getParent().removeContent(employeeChild1);
    employeeChild2.getParent().removeContent(employeeChild2);
    File file = new File( fileName );
    fos = new FileOutputStream( file );
    Format format = Format.getRawFormat();
    format.setOmitDeclaration(false);
    format.setTextMode(Format.TextMode.PRESERVE);
    outp = new XMLOutputter( format );
    outp.escapeElementEntities(" ");
    outp.output( document, fos );
    fos.flush();
    when i run this code my output comes like this in editplus
    <Person >
    <Employee1>
    </Employee1>
    <Employee3>
    </Employee3>
    </Person>
    and in internet explorer it shows correct
    <Person >
    <Employee1>
    </Employee1>
    <Employee3>
    </Employee3>
    </Person>
    i want to know how can i delete that blank line also because internet explorer adjust the settings and delete blank line but i want to view in editplus
    Element is getting deleted but the index is not getting deleted
    Please let me know Thanks in advance

    Is this an InDesign question? You are talking about PDFs. Are they exported from InDesign, and you are asking how to fix them some way in InDesign before exporting again to PDF? Or are you placing PDFs into InDesign. If neither of these is your question, you may want to ask over in the Acrobat forum.

  • Xerces or JDOM which is better?

    hi all
    i would like to ask for some opinions.
    Xerces and JDOM which is better?
    thanks!

    This dude is right. JDOM6 is the bomb.
    here is a little present:
    import java.io.*;
    import java.io.File;
    import java.util.List;
    import java.util.Iterator;
    import java.io.FileInputStream;
    import java.io.InputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import org.jdom.Document;
    import org.jdom.Element;
    import org.jdom.JDOMException;
    import org.jdom.adapters.*;
    import org.jdom.adapters.CrimsonDOMAdapter;
    import org.jdom.input.DOMBuilder;
    import org.jdom.output.XMLOutputter;
    public class xmltest
    // Global value so it can be ref'd by the tree-adapter
    public static Document document;
    public static DOMBuilder builder;
    public static String product_name, description, price;
    public static Double checkPrice;
    public static void readDoc()throws IOException, JDOMException
    builder = new DOMBuilder();
    try {
    FileInputStream in = new FileInputStream(new File("settings.xml"));
    document = builder.build(in);
    in.close();
    } catch (IOException ioe) {
    ioe.printStackTrace();
    public static void listProducts()throws IOException, JDOMException
    readDoc();
    Element root = document.getRootElement();
    List products = root.getChildren();
    Iterator productsIterator = products.iterator();
    System.out.println("Currently " + products.size() + " products.");
    while(productsIterator.hasNext()){
    Element productElement = (Element)productsIterator.next();
    List product = productElement.getChildren();
    System.out.println(productElement.getTextTrim());
    Iterator productIterator = product.iterator();
    while(productIterator.hasNext()){
    Element attElement = (Element)productIterator.next();
    System.out.println(attElement.getName() + " : " + attElement.getText());
    public static void removeProduct(String productName)throws IOException, JDOMException
    readDoc();
    Element root = document.getRootElement();
    List products = root.getChildren();
    Iterator productsIterator = products.iterator();
    root.removeChildren();
    while(productsIterator.hasNext()){
    Element tempElement = (Element)productsIterator.next();
    if(!tempElement.getTextTrim().equals(productName)){
    root.addContent(tempElement);
    document.setRootElement(root);
    saveChanges();
    public static void addProduct(String product_name, String description, String price)throws IOException, JDOMException
    readDoc();
    Element product = new Element("product");
    Element root = document.getRootElement();
    product.addContent(product_name);
    product.addContent(new Element("description").addContent(description));
    product.addContent(new Element("price").addContent(price).addAttribute("currency", "US"));
    root.addContent(product);
    saveChanges();
    public static void saveChanges(){
    try {
    XMLOutputter outputter = new XMLOutputter();
    FileWriter writer = new FileWriter("settings.xml");
    outputter.output(document, writer);
    writer.close();
    } catch (java.io.IOException e) {
    e.printStackTrace();
    public static void main(String argv[])throws IOException, JDOMException
    int selection;
    for(;;){
    System.out.println("1. Add a product\n2. Remove a product\n3. View products\n4. exit program");
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    try{
    selection = Integer.parseInt(in.readLine());
    switch(selection){
    case 1:
    System.out.println("Enter product name.");
    product_name = in.readLine();
    System.out.println("Enter product description.");
    description = in.readLine();
    System.out.println("Enter product price.");
    price = in.readLine();
    try{
    checkPrice = new Double(price);
    addProduct(product_name, description, price);
    }catch(Exception e){
    System.out.println("The product's price must be a numeric value.");
    break;
    case 2:
    System.out.println("Enter product name to remove.");
    product_name = in.readLine();
    removeProduct(product_name);
    break;
    case 3:
    listProducts();
    break;
    case 4:
    System.exit(1);
    break;
    default:
    System.out.println("The number you have typed is incompatible with the menu.");
    break;
    }catch(Exception e){
    System.out.println("Please type in a number that maches the menu.");
    enjoy....

  • JDOMException thrown validating XML against a schema with Xerces2

    I'm trying to validate a document with JDOM and Xerces 2.
    I can validate it with XMLSpy (it works, my document is valid).
    But with JDOM and xerces, this error occurs when parsing and validating my document:
    org.jdom.JDOMException: Error on line 6 of document file:///E:/developpement/SitePerso/xml/xml/listeEntreprises.xml: cvc-complex-type.2.4.a: Invalid content starting with element 'item'. The content must match '(("":nom){0-1},("":item){0-UNBOUNDED})'.
    My XML document:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by de Boussineau (none) -->
    <!--Sample XML file generated by XML Spy v4.3 U (http://www.xmlspy.com)-->
    <liste xmlns="E:/developpement/SitePerso/xml/domain~1/schemaListe" ... E:\developpement\SitePerso\xml\schemas\schemaListe.xsd">
    <item xsi:type="xsel:typeEntreprise">
    <xsel:nom>PHOENIX I.S.I.</xsel:nom>
    <xsel:groupe>Taffioles</xsel:groupe>
    <xsel:adresse>2 rue du centre</xsel:adresse>
    The element <nom> before <item> is not required. So what's the problem ?

    ...

Maybe you are looking for

  • One itunes account two phones with mixed up apps

    I have an iphone 3Gs (Hers)and my boyf 4 (His), and i used my itunes on my computer to put music on his phone before- no problems. I had upgraded my phone to iOS 5.1 and a few days later did his. iTunes recognised the phone id as "His" and proceeded

  • Can't open a dng or raw file in cs5, just stops working. So many problems in cs5!

    I totally feel for you. Just upgraded from cs4 to cs5 and it was the  biggest mistake i ever made. It will probably end my livelihood as a  photographer since EVERY time i open a raw file it crashes photoshop,  makes it freeze up after i have adjuted

  • SSRS Expression Advise for the Reporting display!!!!!!`

    Hi Friends, I am trying to use below expression but i am not getting =IIF(Contact.First(Fields!Code.Value)=(Parameters!ConsultantCode.Value),  ConsultantReference.First(Fields!Name_Status.Value,"NONE")  My requirement is if my select contact paramete

  • Getting problem in File to IDOC scenario

    Hi, In SXMB_MONI, I am getting an error "Message has error status on outbound side". file is being picked by XI and it is not appearing in the R/3 system as IDOC. I am getting black & white chequered flag at left side and red flag at right side in th

  • Ethernet Port only working half the time

    I recently moved into a dorm/hotel for the summer, and my internet worked for the first four days I was there. Then one day, it just didn't. It doesn't recognize that the cable is plugged into the wall. The AirPort is fine, and I've been using the wi