Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7580329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:53:27+00:00 2026-05-30T17:53:27+00:00

I am trying to parse apple’s plist file with help of Apache Commons Configuration

  • 0

I am trying to parse apple’s plist file with help of Apache Commons Configuration libraries. When I tried example below as Java Application everything works fine, but the same code on Android is throwing exception.

Ok, for more details see codes below:

This is entry point in my android app:

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    try { 
        Log.i("AC", "Hello");

        XMLPropertyListConfiguration plist = new XMLPropertyListConfiguration();
        plist.setFileName("assets/data.plist");
        plist.load();

        Object prop = plist.getProperty("Resorts");

        if(prop instanceof List) {
            List<XMLPropertyListConfiguration> resorts = (List<XMLPropertyListConfiguration>) prop;
            Log.i("AC",resorts.get(0).getClass().toString());
            Log.i("AC",resorts.get(1).getClass().toString());

            for(int i=0; i<resorts.size(); i++) {
                String folder = (String) resorts.get(i).getProperty("Folder");
                List<XMLPropertyListConfiguration> courses = (List<XMLPropertyListConfiguration>) resorts.get(i).getProperty("Courses");

                Log.i("AC","Resort "+i+" in folder "+folder);
                for(int j=0; j<courses.size(); j++) {
                    BigInteger course_index = (BigInteger) courses.get(j).getProperty("Index");
                    String course_name = (String) courses.get(j).getProperty("Name");

                    Log.i("AC","- Course "+course_index+": "+course_name);
                }
            }
        }

    } catch (ConfigurationException e) {
        Log.e("AC","ConfigurationException");
        e.printStackTrace();
    }
}

and this is plist I want to parse:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Resorts</key>
    <array>
        <dict>
            <key>Courses</key>
            <array>
                <dict>
                    <key>Index</key>
                    <integer>1</integer>
                    <key>Name</key>
                    <string>Black Stork International</string>
                </dict>
                <dict>
                    <key>Index</key>
                    <integer>2</integer>
                    <key>Name</key>
                    <string>Black Stork Panorama</string>
                </dict>
                <dict>
                    <key>Index</key>
                    <integer>3</integer>
                    <key>Name</key>
                    <string>Black Stork Village</string>
                </dict>
            </array>
            <key>Folder</key>
            <string>01</string>
        </dict>
    </array>
</dict>
</plist>

In build path I added external jars:

  • commons-configuration-1.8.jar
  • commons-lang-2.6.jar

Resulting exception:

02-28 18:23:52.531: W/System.err(795): org.apache.commons.configuration.ConfigurationException: Unable to parse the configuration file
02-28 18:23:52.531: W/System.err(795):  at org.apache.commons.configuration.plist.XMLPropertyListConfiguration.load(XMLPropertyListConfiguration.java:263)
02-28 18:23:52.541: W/System.err(795):  at org.apache.commons.configuration.AbstractHierarchicalFileConfiguration$FileConfigurationDelegate.load(AbstractHierarchicalFileConfiguration.java:565)
02-28 18:23:52.541: W/System.err(795):  at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:395)
02-28 18:23:52.541: W/System.err(795):  at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:361)
02-28 18:23:52.551: W/System.err(795):  at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:324)
02-28 18:23:52.551: W/System.err(795):  at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:261)
02-28 18:23:52.560: W/System.err(795):  at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:238)
02-28 18:23:52.560: W/System.err(795):  at org.apache.commons.configuration.AbstractHierarchicalFileConfiguration.load(AbstractHierarchicalFileConfiguration.java:184)
02-28 18:23:52.560: W/System.err(795):  at sk.datacrea.common.skuska2.CommonSkuska2Activity.onCreate(CommonSkuska2Activity.java:58)
02-28 18:23:52.571: W/System.err(795):  at android.app.Activity.performCreate(Activity.java:4465)
02-28 18:23:52.571: W/System.err(795):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
02-28 18:23:52.571: W/System.err(795):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
02-28 18:23:52.582: W/System.err(795):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
02-28 18:23:52.582: W/System.err(795):  at android.app.ActivityThread.access$600(ActivityThread.java:123)
02-28 18:23:52.582: W/System.err(795):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
02-28 18:23:52.592: W/System.err(795):  at android.os.Handler.dispatchMessage(Handler.java:99)
02-28 18:23:52.592: W/System.err(795):  at android.os.Looper.loop(Looper.java:137)
02-28 18:23:52.592: W/System.err(795):  at android.app.ActivityThread.main(ActivityThread.java:4424)
02-28 18:23:52.601: W/System.err(795):  at java.lang.reflect.Method.invokeNative(Native Method)
02-28 18:23:52.601: W/System.err(795):  at java.lang.reflect.Method.invoke(Method.java:511)
02-28 18:23:52.601: W/System.err(795):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
02-28 18:23:52.601: W/System.err(795):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
02-28 18:23:52.601: W/System.err(795):  at dalvik.system.NativeStart.main(Native Method)
02-28 18:23:52.601: W/System.err(795): Caused by: javax.xml.parsers.ParserConfigurationException: No validating SAXParser implementation available
02-28 18:23:52.625: W/System.err(795):  at org.apache.harmony.xml.parsers.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImpl.java:75)
02-28 18:23:52.625: W/System.err(795):  at org.apache.commons.configuration.plist.XMLPropertyListConfiguration.load(XMLPropertyListConfiguration.java:256)
02-28 18:23:52.625: W/System.err(795):  ... 22 more

Hope that there is some guru with answers for me 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T17:53:28+00:00Added an answer on May 30, 2026 at 5:53 pm

    Exception “No validating Saxparser implementation available” was indeed because of setting validating of Saxparser factory to true in file XMLPropertyListConfiguration.

    Eventualy I used this solution:
    I created new class XMLPropertyListConfiguration2 in source folder of my project, which was identical to XMLPropertyListConfiguration class from external JAR, except the validating was changed to false.

    Then in onCreate method of my Activity I used this class instead of XMLPropertyListConfiguration.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to parse an Apple plist file and I need to get an
I'm trying to parse a binary file format in Haskell (Apple's binary property list
I am trying to parse this XML file for a school project: http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/topsongs/limit=10/genre=20/xml .
I'm trying to parse an INI file using C++. Any tips on what is
I have been trying to parse Java exceptions that appear in a log for
i'm having some troubles trying to parse an XML file and display the results
I am using NSXMLParser to parse this XML: http://itunes.apple.com/gb/rss/topsongs/limit=50/explicit=true/xml . I am trying to
I'm trying to parse HTML content using HTMLParser and with the help of it
I'm trying to parse H.264 frames from a .mov file. I think I've come
I've learned that iTunes XML file is actually a plist, and instead of trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.