JSONSerializer.toJSON ClassNotFoundException in BaseDexClassLoader

I have problems with the JSONSerializer. I have this method:

public List<BusinessObject> transferToDomain(String pJSON) {
        List<BusinessObject> lAllBusinessObject = new ArrayList<BusinessObject>();
        if (null == pJSON || pJSON.equals("")) {
            return lAllBusinessObject;
        }
        JSON lJSON = JSONSerializer.toJSON(pJSON);
        if (lJSON.isEmpty()) {
            return lAllBusinessObject;
        } else {
            if (lJSON.isArray()) {
                JSONArray lJSONArray = (JSONArray) lJSON;
                for (Object lObject : lJSONArray) {
                    JSONObject lJSONObject = (JSONObject) lObject;
                    lAllBusinessObject.add(doTransfer(lJSONObject));
                }
            } else {
                JSONObject json = (JSONObject) lJSON;
                BusinessObject lBusinessObject = doTransfer(json);
                if (null != lBusinessObject) {
                    lAllBusinessObject.add(lBusinessObject);
                }
            }
        }
        return lAllBusinessObject;
    }

It converts a JSON-String into the regarding Business object. the line JSONSerializer.toJSON(pJSon); runs pretty fine for example with that Json-Code:

[{"user":{"uid":51,"ustempel":0,"uname":"Stefan47"
    ,"model":"USER"},"points":882,"level":27,"scomment":"Wuhuuuu"
    ,"sid":51,"rank":1,"sstempel":0,"model":"SCORE"},
{"user":{"uid":65,"ustempel":0,"uname":"Stefan61"
    ,"model":"USER"},"points":882,"level":27,"scomment":"Wuhuuuu"
    ,"sid":65,"rank":2,"sstempel":0,"model":"SCORE"},
{"user":{"uid":66,"ustempel":0,"uname":"Stefan62"
    ,"model":"USER"},"points":882,"level":27,"scomment":"Wuhuuuu"
    ,"sid":66,"rank":3,"sstempel":0,"model":"SCORE"},
{"user":{"uid":67,"ustempel":0,"uname":"Stefan63"
    ,"model":"USER"},"points":882,"level":27,"scomment":"Wuhuuuu"
    ,"sid":67,"rank":4,"sstempel":0,"model":"SCORE"},
{"user":{"uid":68,"ustempel":0,"uname":"Stefan64"
    ,"model":"USER"},"points":882,"level":27,"scomment":"Wuhuuuu"
    ,"sid":68,"rank":5,"sstempel":0,"model":"SCORE"},
{"user":{"uid":69,"ustempel":0,"uname":"Stefan65"
    ,"model":"USER"},"points":882,"level":27,"scomment":"Wuhuuuu"
    ,"sid":69,"rank":6,"sstempel":0,"model":"SCORE"},
{"user":{"uid":70,"ustempel":0,"uname":"Stefan66"
    ,"model":"USER"},"points":882,"level":27,"scomment":"Wuhuuuu"
    ,"sid":70,"rank":7,"sstempel":0,"model":"SCORE"},
{"user":{"uid":71,"ustempel":0,"uname":"Stefan67"
    ,"model":"USER"},"points":882,"level":27,"scomment":"Wuhuuuu"
    ,"sid":71,"rank":8,"sstempel":0,"model":"SCORE"},
{"user":{"uid":72,"ustempel":0,"uname":"Stefan68"
    ,"model":"USER"},"points":882,"level":27,"scomment":"Wuhuuuu"
    ,"sid":72,"rank":9,"sstempel":0,"model":"SCORE"},
{"user":{"uid":73,"ustempel":0,"uname":"Stefan69"
    ,"model":"USER"},"points":882,"level":27,"scomment":"Wuhuuuu"
    ,"sid":73,"rank":10,"sstempel":0,"model":"SCORE"}]

but with that JSON-Code:

[{"question":"Wer bist Du?"
    ,"answer1":"Jens"
    ,"answer2":"Anja"
    ,"answer3":"Stefan"
    ,"answer4":"Willi"
    ,"correctAnswer":3,"difficulty":1,"active":true,"deleted":false,"language":"DE"
    ,"key":"DE_QZ"
    ,"cat":"Die Bundesliga"
    ,"qid":1303,"qstempel":1390138057765,"model":"QUESTION"},
{"question":"Wer bist Du?"
    ,"answer1":"Jens"
    ,"answer2":"Anja"
    ,"answer3":"Stefan"
    ,"answer4":"Willi"
    ,"correctAnswer":3,"difficulty":1,"active":true,"deleted":false,"language":"DE"
    ,"key":"DE_QZ"
    ,"cat":"Premiure League"
    ,"qid":1636,"qstempel":1390138059690,"model":"QUESTION"},
{"question":"Wer bist Du?"
    ,"answer1":"Jens"
    ,"answer2":"Anja"
    ,"answer3":"Stefan"
    ,"answer4":"Willi"
    ,"correctAnswer":3,"difficulty":3,"active":true,"deleted":false,"language":"DE"
    ,"key":"DE_QZ"
    ,"cat":"WM"
    ,"qid":1582,"qstempel":1390138059395,"model":"QUESTION"},
{"question":"Wer bist Du?"
    ,"answer1":"Jens"
    ,"answer2":"Anja"
    ,"answer3":"Stefan"
    ,"answer4":"Willi"
    ,"correctAnswer":3,"difficulty":3,"active":true,"deleted":false,"language":"DE"
    ,"key":"DE_QZ"
    ,"cat":"Die Bundesliga"
    ,"qid":1421,"qstempel":1390138058497,"model":"QUESTION"},
{"question":"Wer bist Du?"
    ,"answer1":"Jens"
    ,"answer2":"Anja"
    ,"answer3":"Stefan"
    ,"answer4":"Willi"
    ,"correctAnswer":3,"difficulty":3,"active":true,"deleted":false,"language":"DE"
    ,"key":"DE_QZ"
    ,"cat":"Premiure League"
    ,"qid":1708,"qstempel":1390138060083,"model":"QUESTION"},
{"question":"Wer bist Du?"
    ,"answer1":"Jens"
    ,"answer2":"Anja"
    ,"answer3":"Stefan"
    ,"answer4":"Willi"
    ,"correctAnswer":3,"difficulty":1,"active":true,"deleted":false,"language":"DE"
    ,"key":"DE_QZ"
    ,"cat":"WM"
    ,"qid":1470,"qstempel":1390138058774,"model":"QUESTION"},
{"question":"Wer bist Du?"
    ,"answer1":"Jens"
    ,"answer2":"Anja"
    ,"answer3":"Stefan"
    ,"answer4":"Willi"
    ,"correctAnswer":3,"difficulty":2,"active":true,"deleted":false,"language":"DE"
    ,"key":"DE_QZ"
    ,"cat":"Premiure League"
    ,"qid":1667,"qstempel":1390138059857,"model":"QUESTION"},
{"question":"Wer bist Du?"
    ,"answer1":"Jens"
    ,"answer2":"Anja"
    ,"answer3":"Stefan"
    ,"answer4":"Willi"
    ,"correctAnswer":3,"difficulty":2,"active":true,"deleted":false,"language":"DE"
    ,"key":"DE_QZ"
    ,"cat":"WM"
    ,"qid":1539,"qstempel":1390138059158,"model":"QUESTION"},
{"question":"Wer bist Du?"
    ,"answer1":"Jens"
    ,"answer2":"Anja"
    ,"answer3":"Stefan"
    ,"answer4":"Willi"
    ,"correctAnswer":3,"difficulty":2,"active":true,"deleted":false,"language":"DE"
    ,"key":"DE_QZ"
    ,"cat":"Die Bundesliga"
    ,"qid":1381,"qstempel":1390138058267,"model":"QUESTION"}]

this exception is thrown and I have absolutly no idear why???

java.lang.ClassNotFoundException: Didn't find class "java.beans.PropertyDescriptor" on path: DexPathList[[zip file "/data/app/bc.qz.client.android-2.apk"],nativeLibraryDirectories=[/data/app-lib/bc.qz.client.android-2, /system/lib]]

Could anyone give me some advice why that happens?

Thanks in advance

Stefan

Answers


java.lang.ClassNotFoundException: Didn't find class "java.beans.PropertyDescriptor" on path: DexPathList[[zip file "/data/app/bc.qz.client.android-2.apk"],nativeLibraryDirectories=[/data/app-lib/bc.qz.client.android-2, /system/lib]]

Something has a dependency that is not loaded in one code path but is on another. The Android API only provides a subset of the Java 6 API:

PropertyDescriptor is not provided. If your own code does not use this type then it is likely one of your libraries requires it.


Need Your Help

storing huge amount of records into classic asp cache object is SLOW

caching asp-classic object

we have some nasty legacy asp that is performing like a dog and i narrowed it down to because we are trying to store 15K+ records into the application cache object. but that's not the killer. bef...

Move DependencyObject between threads

c# wpf thread-safety

I perform a lengthy operation (connection test, validation of remote DB tables, etc.) in a separate thread in a WPF app. During the testing, I collect information for the user about which tests were