Hey,
Thank you for your fast answer!
This is my code:
public final static Object fromXML(String xml, BeanReader beanReader)
throws IntrospectionException, IOException, SAXException {
InputStream blockXML = new ByteArrayInputStream(xml.getBytes());
//Object bean = beanReader.parse(blockXML);
return blockXML;
}
@SuppressWarnings("unchecked")
public final static Object fromXML(String xml, Class clazz) throws
IntrospectionException, IOException, SAXException {
InputStream blockXML = new ByteArrayInputStream(xml.getBytes());
BeanReader beanReader = new BeanReader();
beanReader.registerBeanClass(clazz);
Object bean = beanReader.parse(blockXML);
return bean;
}
this code ("Object bean = beanReader.parse(blockXML);") uses the
Apache Commons Digester.
I don't have any experience how i can modify Digester.
Any other method how i can fix this?
On Jul 17, 6:09 pm, Mark Murphy <[email protected]> wrote:
> Wouter wrote:
> > I am developping an API for my web application and get a problem when
> > i try to run my android application.
>
> > Log file:
> > 07-17 18:01:07.114: ERROR/dalvikvm(6691): Could not find method
> > javax.xml.parsers.SAXParserFactory.setSchema, referenced from method
> > org.apache.commons.digester.Digester.getFactory
> > 07-17 18:01:07.123: WARN/dalvikvm(6691): VFY: unable to resolve
> > virtual method 3297: Ljavax/xml/parsers/SAXParserFactory;.setSchema
> > (Ljavax/xml/validation/Schema;)V
>
> Apache Commons Digester is looking for a setSchema() method, which is
> not available in Android's edition of SAXParserFactory.
>
> > How can i fix this?
>
> Probably the answer will be to not use Apache Commons Digester. You have
> no way of adding setSchema() to SAXParserFactory (short of patching it
> in the firmware), and Android's build tools will complain if you attempt
> to include your own implementation of SAXParserFactory.
>
> Perhaps you can modify Digester to not need this method.
>
> --
> Mark Murphy (a Commons
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android App Developer Books:http://commonsware.com/books.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---