Importing Preferences - parser problem

Hi,
I try to import some Preferences from an XML file.
At the following statement,
systemPrefs.importPreferences(xmlInputStream);
the following exception is thrown:
java.lang.ClassCastException: org.apache.crimson.tree.Doctype
My first idea was some conflict whith other packages from my huge classpath. So I emptied it, but still the same exception was thrown.
I have installed j2sdk1.4.0 and j2sdkee.1.3.1.
I found that the Apache Crimson packages are within j2ee.jar. My suggestion is a conflict between the parser that ship with Enterprise Edition and Standard Edition.
Any suggestions?
Cheers,
Robbert Dam

If you are having such a problem, the best thing to do is to reference the class directly.
For example:
org.apache.crimson.tree.Doctype doc=(org.apache.crimson.tree.Doctype)o;
A casting exception means that you are trying to convert an object not inheriting from the casting class to it. This result in a ClasCastException at runtime.
Here is a link on how preferences can be imported: http://www.geocities.com/shurel_reynolds/how-to/java/index.htm

Similar Messages

  • WIJ 20002 xml Parser Problem - Rich Client

    Hi,
    I have a problem with the rich client on a new installation:
    Business Objects Enterprise XI 3.1 SP3 on Windows 2008 Standard.
    If I connect with the rich client "import document"is disabled.
    if I try to create a new document from the rich client it returns the error below (I used the rich client on two workstations):
    WIJ 20002
    Version: null
    Analisi dello stack:
    java.lang.RuntimeException: java.lang.RuntimeException: XML parser problem:
    XMLJaxpParser.parse(): Element type "ABOUT_Patentnumbers" must be followed by either attribute specification, ">" or "/>".
    at com.businessobjects.wp.xml.jaxp.XMLJaxpParser.parse (Unknown Source)
    at.com.businessobjects.webi.richclient.XMLviaOccaRC.getServerConfiguration (Unknown Source)
    Have you any solution?

    The fixpack 3.5 client resolves the problem.

  • Import from catalog problems

    Cannot import from catalog, LR quits and I get about 2 or 3 photos imported.
    Adobe was no help, they had no idea why.
    Have tried to "import from Cat" twice. Moving two different catalogs into my main desktop catalog. Both did not work.
    All three catalogs ( two from laptop and my main LR cat) work fine and I can import photos no problem.
    Would like to import all the changes of photos that I have made with these two catalogs that I did on my laptop. (Both cats are on an external hard drive).
    Thoughts anyone?
    I am having some issues with my video card. Screen right now is a bit pink. This would be the fourth video card I will need on this Mac Pro. Would this be the cause?
    Thanks.

    flyboys911 wrote:
    Do I need to export the laptop cats if thy are already on a separate hard drive?
    It might help. Exporting a catalog sometimes cures corruption in the original catalog. Try exporting into a new catalog and then importing the new one on your desktop.
    Never heard of the last thing you mentioned. Can you describe more?
    Lightroom has a preferences file, which sometimes gets corrupt and can cause all kinds of weard behaviour. You can delete (or rename away) the preferences file, and LR will build a fresh one when started. If you rename it, you will still have it if you decide you want it back.
    To rename the preferences file, rename the file
    "[username]/Library/Preferences/com.adobe.Lightroom3.plist"
    to something like
    "[username]/Library/Preferences/com.adobe.Lightroom3.plist.old"
    while LR is closed and restart LR.
    Beat

  • Report query parsing problem

    I didn't find any report of this problem...
    Using APEX 3.0.1.00.07, I have a report of type "SQL Query (PL/SQL function body returning SQL query)" with the "Use Generic Column Names (parse query at runtime only)" radio button selected.
    When the region source contains the string "ORDER BY" in any form that I've tried (even in a comment), attempting to save the region fails with "Your query can't include an "ORDER BY" clause when having column heading sorting enabled."
    I do indeed have column sorting enabled on certain columns, but I don't see how that is relevant under these circumstances since the query produced at runtime does not have an ORDER BY clause.
    Am I overlooking something or is this a parsing problem?
    Rodney

    Rodney,
    It's just checking for order by being included in your query, and if so and you have column heading sorting enabled, it's raising this error because you can't have both (even if it's commented out).
    Regards,
    Marc

  • I have my iTunes music folder stored on an external hard drive.  I recently purchased a new Mac.  After attaching the external hard drive, all the songs imported without any problem except my Playlists.  Any clue about where they are or how to revive them

    I have my iTunes music folder stored on an external hard drive.  I recently purchases a new Mac.  After attaching the external hard drive, all songs imported without a problem except my playlists.  Any clue about where they are or how to revive them for use on my new Mac?
    Thanks!

    Rysz wrote:
    To retain your playlists, artwork, play counts, etc, you need to move the entire iTunes folder, not just the music files..
    Correct.
    After that just select the new folder location in iTunes> Advanced settings.
    Incorrect.
    Hold Option and launch iTunes.
    Select Choose library and select the iTunes folder.
    This will read the iTunes library.itl file in this folder and the library as it was previously will be opened.

  • SAX parser problem in JDK1.5

    I have parse the xml file using SAX in jdk1.5 environment. During the parsing, it missed the some text content.
    for example
    <employeeid>
    <empid>1001</empid>
    <empid>1002</empid>
    </employeeid>
    If i have parse the above xml file using SAX in jdk1.5 environment. The output is
    1001
    100
    during the parsing , SAX parser misses digit of 2.
    if i have parse the above xml file using SAX in jdk1.4 environment , it is working fine.
    what is the problem in jdk1.5
    please help
    bala

    What I expect the problem to be was discussed recently in a topic titled "SAX Parser Problems" that was started on March 14 at 6:59 AM by JackoBS.
    Read that and see if it fixes your problem. If so, it is not a JDK1.5 problem, but a user error.
    Dave Patterson

  • 'Import file parsing exception' while importing BIAR file

    Hi All,
    We use Java WebServices SDK for integrating our product with Business Objects. For installing the reports we use the InstallEntSDKWrapper jar to copy the BIAR file containing the reports on to the BO server. Till now we were using BO XI R2 and everything works fine.
    But now we have decided to upgrade to BO 3.0 and the reports install no longer works. Here is the error that we get -
    [InstallEntSdkWrapper.main] Connecting to CMS rwc-1950-120:6400 as administrator
    [InstallEntSdkWrapper.CmsImportFile] Exception: Import file parsing exception
    curred : 'Type info incomplete'
    [InstallEntSdkWrapper.main] BIAR File could not be imported
    Any idea what might be going wrong here? We are trying to import the same BIAR file that were created with the earlier BO version to the 3.0 version server. Couple of questions that I have is -
    1. Do we need to repackage the BIAR with 3.0 before attempting to install it? Are there any issues with trying to install a BIAR which is of older BO version?
    2. Do we need to add/modify any library (jar) in the runtime to get rid of the exception?
    Thanks for all the help.
    Regards
    Manas
    Edited by: Manas Mandlekar on Dec 23, 2009 1:34 AM

    Lucas,
    I have not seen this issue before. We'll investigate and contact you directly for more info. I'll post the resolution back to this forum once available.
    Doug

  • Exporting at HIGHEST quality - iTunes IMPORTING preferences?

    Does the iTUNES IMPORTING preferences matter? I am exporting UNcompressed so I can give songs to a Master Engineer. What should my itune settings be at?
    or should i share another way?
    Thank you!

    Scott Magri wrote:
    Does the iTUNES IMPORTING preferences matter? I am exporting UNcompressed so I can give songs to a Master Engineer. What should my itune settings be at?
    or should i share another way?
    Yes - If you're delivering a mix to a mastering engineer, do not share to iTunes! Export to Disk instead.
    Generally, when you deliver something to a mastering engineer, you want it to be as unprocessed as possible. iTunes is a fantastic consumer-oriented playback application. But for sending audio in and out of iTunes on its way to a mastering engineer, it’s Hogwarts - full of mysterious nooks and crannies that could inadvertently transform your audio without you realizing it. Plus, it's completely unnecessary and avoidable.
    So to take steps to ensure the highest (and most unadulterated) quality possible, first turn off auto normalize in GB’s advanced preferences, if you haven't already done so.
    Then, if you've chosen any presets for your Master Track, remove them (adding these kind of finalizing effects is exactly what the mastering engineer does; the presets in Garageband are a quick and easy alternative, but you have the real thing).
    Finally, under the Share Menu, choose Export Song to Disk. And, of course, don't compress.

  • I can't import my photos from my digital camera (Sony) this problem is recent. I have imported photos without  problem a problem before.

    I can't import my photos from my digital camera (Sony) to my iPad, this problem is recent. I have imported photos without  problem a problem before. Is this problem due to the IOS 6 update? How can I fix it?

    I have the same problem and apple needs to fix this - but in the mean time you can manually select the vertical photos then "import - import selected" and you can get your verticals. We need a better fix. THIS IS A BUG!

  • Parsing Problems? ImageIcon and BufferedImage

    Hi to everyone
    Could I ask if I will to send ImageIcon with BufferedImage as its arguement. Then what should I receieve from the server? ImageIcon only or ImageIcon with BufferedImage as its arugement?
    Any help will be appreciated. Thank You.

    I am sending ImageIcon over to the server, hence the server will receive as ImageIcon.
    However, when I want to pass the ImageIcon which being parse to Image, this step is ok. Lastly when I want to parse the Image to BufferedImage image, I am encountering parsing problems, hence could u advise me further.
    The error message "Receiving failed: java.lang.ClassCastException"
    Any help will be appreciated. Thank You.
         public void getImage()
              //Object input = null;
            Image images = null;
              try{
                   imgIcon = (ImageIcon)oin.readObject();
                   System.out.println("Icon Width: "+imgIcon.getIconWidth());
                   while((images = imgIcon.getImage()) != null)
                        System.out.println("Images Width: "+Image.getWidth(images));
                        BufferedImage bimage = (BufferedImage)images; // PROBLEM LIES HERE
                        System.out.println("Bimage Width: "+bimage.getWidth());
                        ImageServerConnection.writeImage(bimage, "happy.jpg");
                        //String fname = "joalicia";
                        //create an new folder to store those sent images.
                        //File f = new File ("c:\\Sweet", fname);
                        //create(f);
              }catch(Exception e){
                   System.err.println("Receiving failed: "+ e);
         }

  • On my new iMac, mail has no sound after waking from sleep.  If I select do not wake for network access in general preferences, the problem does not occur.  Anyone have an idea on how to fix this?

    On my new iMac, mail has no sound after waking from sleep.  If I select do not wake for network access in general preferences, the problem does not occur.  Anyone have an idea on how to fix this? Thanks --

    Same here on an older iMac since Lion. Thanks for the uncheck wake for network access tip though, it doesn't do it either in that case, I will leave it that way.

  • Cannot import preferences...WHY?

    I make a project in Adobe Captivate 8.  I export the preferences into an "Adobe Captivate 8 options file"  .cpr
    I make another project in Adobe Captivate 8. I import the preferences (.cpr) file......
    Cannot import preferences.  The preferences file you are trying to import was exported from an earlier version of Adobe Captivate.
    I used the same program to make both files.  TEST:  I took project #1.  duplicated it - Project #2.  Same error.  so the same file, can't import it's own preferences file because it was made with another version?
    Possibly related issue.  No matter what, every time I go to save a project (no matter how many times I've saved it previously) I always get the same dialogue:
    "This project will be converted from Adobe Captivate 7 to Adobe Captivate 8 format.  Once the project is converted, you will not be able to open it in a previous version of Captivate."
    Here's the thing.  I only have ever had Captivate 8.  I've used previous versions at other companies, but this is the only version of Captivate I have ever had installed. 8.  That's it.
    Why am I getting all these errors? How can I correct this?  The projects are all ONLY made with Captivate 8.

    This is a know. Issue and should be fixed in the next update.

  • Exporting to iTunes (importing preferences)

    I am exporting my songs with the intent of having them mastered professionally. does it matter what the iTUNE IMPORTING preferences are set on. i am looking at it now - which ENCODER should I use and which SETTING. The highest?

    The recordings are mostly 30 or 45 minutes. I copy them to Garageband in real time, and then click on Export to iTunes in the File menu. The "creating mixdown" is often very slow. The longer, 45 minute files might take more than an hour to get into iTunes.

  • Audio-CD import preference ignored

    Importing audio-CD's into iTunes 6.0.4 with an "advance - import" preference set to "apple lossless" give my files in MPEG4 format (when examined with "get info"). I think MPEG4 corrseponds to AAC format. Who's in charge here, me or iTunes?
    Help me out guys, where am I going wrong? (I import CD's by stuffing the disk in the slop and hitting the "import" button).
    IMAC-G5   Mac OS X (10.4.5)  

    Both Apple Lossless and AAC are MPEG-4 audio files.
    When you Get Info in the Finder, you won't see the difference.
    Select an imported song in iTunes and Get Info and you will see the difference.
    Or add the 'Kind' column in 'View options' (command-J) to see the difference.
    Hope this helps.
    M

  • Sax parser problem

    hi,
    i am assuming the problem is with sax parser but i cant be sure. I am parsing a xml file (about 1.4MB) with some data in it. the parser i have created reads the xml file correctly for the most part but when at some point the
    "public void characters(char buf[], int offset, int len) throws SAXException"
    function stops working correctly....i.e it doesnt fully read read the data between the "<start>" and "</start>" element. say it reads about 100 id's correctly---for 101 ID it does this. This is just an example. Since, the problem might be with how :
    "public void characters(char buf[], int offset, int len) throws SAXException"
    function is reading the data i was wondering if anybody else had encountered this problem or please let me know if i need to change something in the code: here's a part of the code :
    Bascially i have created three classes to enter data into three mysql tables and as i parse the data i fill up the columns by matching the column header with the tagName.
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.sql.*;
    import java.io.*;
    import java.util.ArrayList;
    import java.lang.Object;
    import org.xml.sax.*;
    import org.xml.sax.helpers.DefaultHandler;
    import java.util.*;
    import javax.xml.parsers.SAXParserFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    public class Echo03 extends DefaultHandler
    StringBuffer textBuffer;
    int issuedValue, prodValue;
    OrdHeader header = new OrdHeader();
    OrdDetail detail = new OrdDetail();
    Member memInfo = new Member();
    //new addition to store the dynamic value of the products
    TestOrdheader prod = new TestOrdheader();
    int counter;
    String tag, newTag;
    SetValue setVal = new SetValue();
    String test;
    public static void main(String argv[])
    if (argv.length != 1) {
    System.err.println("Usage: cmd filename");
    System.exit(1);
    // Use an instance of ourselves as the SAX event handler
    DefaultHandler handler = new Echo03();
    // Use the default (non-validating) parser
    SAXParserFactory factory = SAXParserFactory.newInstance();
    try {
    // Set up output stream
    out = new OutputStreamWriter(System.out, "UTF8");
    // Parse the input
    SAXParser saxParser = factory.newSAXParser();
    saxParser.parse( new File(argv[0]), handler);
    } catch (Throwable t) {
    t.printStackTrace();
    System.exit(0);
    static private Writer out;
    private String indentString = " "; // Amount to indent
    private int indentLevel = 0;
    //===========================================================
    // SAX DocumentHandler methods
    //===========================================================
    public void startDocument()
    throws SAXException
    nl();
    nl();
    emit("START DOCUMENT");
    nl();
    emit("<?xml version='1.0' encoding='UTF-8'?>");
    header.assign();
    public void endDocument()
    throws SAXException
    nl(); emit("END DOCUMENT");
    try {
    nl();
    out.flush();
    } catch (IOException e) {
    throw new SAXException("I/O error", e);
    public void startElement(String namespaceURI,
    String lName, // local name
    String qName, // qualified name
    Attributes attrs)
    throws SAXException
    indentLevel++;
    nl(); //emit("ELEMENT: ");
    String eName = lName; // element name
    if ("".equals(eName)) eName = qName; // namespaceAware = false
    if (qName.equals("Billing")){
    issuedValue = 1;
    }else if (qName.equals("Shipping")){
    issuedValue = 2;
    }else if (qName.equals("ShippingTotal")){
    issuedValue = 3;
    //check to see if "Product" is the name of the element thats coming next
    if (qName.equals("Product")){
    if (issuedValue != 3){
    prodValue = 1;
    prod.addCounter();
    }else{
    prodValue = 0;
    tag = eName;
    if (attrs != null) {
    for (int i = 0; i < attrs.getLength(); i++) {
    String aName = attrs.getLocalName(i); // Attr name
    if ("".equals(aName)) aName = attrs.getQName(i);
    nl();
    emit(" ATTR: ");
    emit(aName);
    emit("\t\"");
    emit(attrs.getValue(i));
    emit("\"");
    if (attrs.getLength() > 0) nl();
    public void endElement(String namespaceURI,
    String sName, // simple name
    String qName // qualified name
    throws SAXException
    nl();
    String eName = sName; // element name
    if ("".equals(eName)){
    eName = qName; // not namespaceAware
    if ("Order".equals(eName)){          
    //enter into database
         databaseEnter();
    textBuffer = null;
    indentLevel--;
    public void characters(char buf[], int offset, int len)
    throws SAXException
    nl();
    try {
    String s = new String(buf, offset, len);
    if (!s.trim().equals("")){
    settag(tag, s);
    s = null;
    }catch (NullPointerException E){
    System.out.println("Null pointer Exception:"+E);
    //===========================================================
    // Utility Methods ...
    //===========================================================
    // Wrap I/O exceptions in SAX exceptions, to
    // suit handler signature requirements
    private void emit(String s)
    throws SAXException
    try {
    out.write(s);
    out.flush();
    } catch (IOException e) {
    throw new SAXException("I/O error", e);
    // Start a new line
    // and indent the next line appropriately
    private void nl()
    throws SAXException
    String lineEnd = System.getProperty("line.separator");
    try {
    out.write(lineEnd);
    for (int i=0; i < indentLevel; i++) out.write(indentString);
    } catch (IOException e) {
    throw new SAXException("I/O error", e);
    ===================================================================
    ///User defined methods
    ===================================================================
    private String strsplit(String splitstr){
    String delimiter = new String("=");
    String[] value = splitstr.split(delimiter);
    value[1] = value[1].replace(':', ' ');
    return value[1];
    public void settag(String tag, String s){         
    String pp_transid = null, pp_respmsg = null,pp_authid = null, pp_avs = null, pp_avszip = null;
    if ((tag.equals("OrderDate")) || (tag.equals("OrderProcessingInfo"))){
    if (tag.equals("OrderDate")){
    StringTokenizer st = new StringTokenizer(s);
    String orddate = st.nextToken();
    String ordtime = st.nextToken();
    header.put("ordDate", orddate);
    header.put("ordTime", ordtime);
    }else if (tag.equals("OrderProcessingInfo")){
    StringTokenizer st1 = new StringTokenizer(s);
    int tokenCount = 1;
    while (tokenCount <= st1.countTokens()){
    switch(tokenCount){
    case 1:
    String extra = st1.nextToken();
    break;
    case 2:
    String Opp_transid = st1.nextToken();
    pp_transid = strsplit(Opp_transid);
    break;
    case 3:
    String Opp_respmsg = st1.nextToken();
    pp_respmsg = strsplit(Opp_respmsg);
    break;
    case 4:
    String Opp_authid = st1.nextToken();
    pp_authid = strsplit(Opp_authid);
    break;
    case 5:
    String Opp_avs = st1.nextToken();
    pp_avs = strsplit(Opp_avs);
    break;
    case 6:
    String Opp_avszip = st1.nextToken();
    pp_avszip = strsplit(Opp_avszip);
    break;
    tokenCount++;
    header.put("pp_transid", pp_transid);
    header.put("pp_respmsg", pp_respmsg);
    header.put("pp_authid", pp_authid);
    header.put("pp_avs", pp_avs);
    header.put("pp_avszip", pp_avszip);
    }else{
    newTag = new String(setVal.set_name(tag, issuedValue));
    header.put(newTag, s);
    //detail.put(newTag, s);
    prod.put(newTag, s);
    memInfo.put(newTag,s);
    //Check to see-- if we should add this product to the database or not
    boolean check = prod.checkValid(newTag, prodValue);
    if (check){
    prod.addValues(s);
    setVal.clearMod();
    ==================================================================
    Here's the error that i get:
    java.util.NoSuchElementException
    at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:691)
    at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
    at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:281)
    at Echo03.main(Echo03.java:47)

    I haven't gone through your code but I also had a similar error....and the exception in my was because of an "&" instead of the entity reference & in one of the element values. I use a non-validating parser but if you use a validating one then this might not be the reason for your exception.

Maybe you are looking for

  • Function to convert string to number

    Hi there, I wrote a function which converted a hor minute component of a date to a number. Now I need to do the same with a string (because the hours could be more then 23:95). Anyway here is my function. How can I rewrite it so it will accept a stri

  • Install Error on Weblogic 10.3.2 - Generic

    Here's the error that we're receiving. Any help would be great. Thanks, Bob Larsen java -d64 -Xmx1024m -jar installer.jar -mode=console -log=log.out Staging directory (where wls1032_generic.zip has been unzipped) is $MW_HOME/weblogic_stage $MW_HOME/w

  • Excise invoice without delivery - Milestone and Progressive billing

    Hi all We have a scenario where we need to create excise invoice wihtout delivery We are using order based billing because we have PS(WBS) integration, milestone and progressive billing scenario. We dont  want to use J1is, we want to use J1iin only,

  • How can I create an accessible tagged PDF in Illustrator CS6?

    I have put alt text on the slices but when I save the file as a PDF it isn't tagged. How can I use these alt tags to make the PDF accessible? How can I tag the text in the Illustrator file so it is tagged in the PDF?

  • Problem to validate XML document if the type of root element is abstract

    I have the following XML document: <?xml version="1.0" encoding="UTF-8"?> <ct013/> It corresponds to the following XSD Schema: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">      <xs:element name="ct013