4thline / cling

UPnP/DLNA library for Java and Android
1.71k stars 598 forks source link

Wrong SAX parser factory configuration on Android #247

Open kletzander opened 5 years ago

kletzander commented 5 years ago

When setting up SAX parser for service description in org.seamless.xml.SAXParser:73 it configures http://apache.org/xml/features/disallow-doctype-decl feature for the factory, but this feature is not supported in org.apache.harmony.xml.parsers.SAXParserFactory, thus it throws org.xml.sax.SAXNotRecognizedException: http://apache.org/xml/features/disallow-doctype-decl. Consequently it's not possible to use this library on Android. Or I'm missing some undocumented settings.

jekapps commented 5 years ago

Try using the previous release "2.1.2-SNAPSHOT".

Seems to be based on this fix: https://github.com/4thline/seamless/commit/74e66789d11862789f1a9ee570d27d5d18162c11

shmy commented 5 years ago

+1

Maaajaaa commented 4 years ago

Workaround: switch to the UDA10ServiceDescriptorBinderImpl as like it's described here in the manual:

override fun getServiceDescriptorBinderUDA10(): ServiceDescriptorBinder? {
                return UDA10ServiceDescriptorBinderImpl()
}

this is Kotlin code, in Java just use the function like you usually would (check the manual link if you need to know which class) and use the same return, but of course don't forget the ;