Class cannot be cast to java.lang.reflect.ParameterizedType

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Class cannot be cast to java.lang.reflect.ParameterizedType

mankiko
So I'm preparing my app for release, and I get the following error ONLY when I use proguard to obfuscate some of my class files.  Note that I have marked the cling libs as exempt from obfuscation to meet the license requirements.  I even marked my app classes that invoke the cling code as exempt in hopes fixing this error... but I get this error every time with multiple UPNP servers.

Any ideas as to what other classes I should exempt from obfuscation?  I looked at the cling source code, but I just see basic java classes which obviously aren't getting obfuscated.  Here is the full stack trace and some additional logging with FINEST enabled

06-12 01:43:26.654: D/SOAPActionProcessor(30814): Writing body of (OutgoingActionRequestMessage) POST http://192.168.1.125:2869/upnphost/udhisapi.dll?control=uuid:74ab4d3a-789a-4822-bf07-5cda128c0c31+urn:upnp-org:serviceId:ContentDirectory for: (ActionInvocation) (Action, Arguments: 10) Browse
06-12 01:43:26.654: D/SOAPActionProcessor(30814): Writing action request element: Browse
06-12 01:43:26.654: D/SOAPActionProcessor(30814): Writing action input argument: ObjectID
06-12 01:43:26.654: D/SendingAction(30814): Error writing SOAP body: org.teleal.cling.transport.spi.UnsupportedDataException: Can't transform message payload: java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
06-12 01:43:26.654: D/SendingAction(30814): Exception root cause:
06-12 01:43:26.654: D/SendingAction(30814): java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
06-12 01:43:26.654: D/SendingAction(30814): at org.teleal.cling.model.types.AbstractDatatype.getValueType(AbstractDatatype:30)
06-12 01:43:26.654: D/SendingAction(30814): at org.teleal.cling.model.types.AbstractDatatype.isValid(AbstractDatatype:60)
06-12 01:43:26.654: D/SendingAction(30814): at org.teleal.cling.model.types.AbstractDatatype.getString(AbstractDatatype:53)
06-12 01:43:26.654: D/SendingAction(30814): at org.teleal.cling.model.VariableValue.toString(VariableValue:108)
06-12 01:43:26.654: D/SendingAction(30814): at org.teleal.cling.transport.impl.SOAPActionProcessorImpl.writeActionInputArguments(SOAPActionProcessorImpl:364)
06-12 01:43:26.654: D/SendingAction(30814): at org.teleal.cling.transport.impl.SOAPActionProcessorImpl.writeBodyRequest(SOAPActionProcessorImpl:205)
06-12 01:43:26.654: D/SendingAction(30814): at org.teleal.cling.transport.impl.SOAPActionProcessorImpl.writeBody(SOAPActionProcessorImpl:68)
06-12 01:43:26.654: D/SendingAction(30814): at org.teleal.cling.protocol.sync.SendingAction.sendRemoteRequest(SendingAction:111)
06-12 01:43:26.654: D/SendingAction(30814): at org.teleal.cling.protocol.sync.SendingAction.invokeRemote(SendingAction:73)
06-12 01:43:26.654: D/SendingAction(30814): at org.teleal.cling.protocol.sync.SendingAction.executeSync(SendingAction:63)
06-12 01:43:26.654: D/SendingAction(30814): at org.teleal.cling.protocol.sync.SendingAction.executeSync(SendingAction:51)
06-12 01:43:26.654: D/SendingAction(30814): at org.teleal.cling.protocol.SendingSync.execute(SourceFile:55)
06-12 01:43:26.654: D/SendingAction(30814): at org.teleal.cling.protocol.SendingAsync.run(SourceFile:44)
06-12 01:43:26.654: D/SendingAction(30814): at org.teleal.cling.controlpoint.ActionCallback.run(SourceFile:147)
06-12 01:43:26.654: D/SendingAction(30814): at org.teleal.cling.support.contentdirectory.callback.Browse.run(SourceFile:91)
Reply | Threaded
Open this post in threaded view
|

Re: Class cannot be cast to java.lang.reflect.ParameterizedType

mankiko
Fixed by adding -keepattributes Signature to my proguard.cfg file