2

Referencing to this thread Using webdav on Android It is possible to use the Sardine lib ( http://code.google.com/p/sardine/) in combination with the httpclientandroidlib ( http://code.google.com/p/httpclientandroidlib/).

But I keep getting a java.lang.VerifyError Exception.

I tried to reference the Sardine lib as a jar file and as Eclipse-project but its always the same.

If i read the Messages from dalvikVM, before the exeption is thrown, there are problems with javax.xml.bind.JAXBContext.newInstance(). But i cant add the JAXB library or source to to the project because I get several Dx Errors:

    [2011-10-28 16:48:40 - FireTablet] Dx 1 error; aborting
    [2011-10-28 16:48:40 - FireTablet] Conversion to Dalvik format failed with error 1
    [2011-10-28 16:49:00 - FireTablet] Dx 
    trouble processing "javax/xml/bind/PrintConversionEvent.class":

So this cant be the solution. Does anyone know how to run the sardine library on android?

I am very grateful for help!

Exceptions:

10-28 16:21:33.602: I/Process(22992): Sending signal. PID: 22992 SIG: 9
10-28 16:30:59.005: I/dalvikvm(23056): Could not find method javax.xml.bind.JAXBContext.newInstance, referenced from method com.googlecode.sardine.util.SardineUtil.<clinit>
10-28 16:30:59.005: W/dalvikvm(23056): VFY: unable to resolve static method 20578: Ljavax/xml/bind/JAXBContext;.newInstance ([Ljava/lang/Class;)Ljavax/xml/bind/JAXBContext;
10-28 16:30:59.005: D/dalvikvm(23056): VFY: replacing opcode 0x71 at 0x000a
10-28 16:30:59.005: W/dalvikvm(23056): VFY: unable to resolve exception class 2678 (Ljavax/xml/bind/JAXBException;)
10-28 16:30:59.005: W/dalvikvm(23056): VFY: unable to find exception handler at addr 0x50
10-28 16:30:59.005: W/dalvikvm(23056): VFY:  rejected Lcom/googlecode/sardine/util/SardineUtil;.<clinit> ()V
10-28 16:30:59.005: W/dalvikvm(23056): VFY:  rejecting opcode 0x0d at 0x0050
10-28 16:30:59.005: W/dalvikvm(23056): VFY:  rejected Lcom/googlecode/sardine/util/SardineUtil;.<clinit> ()V
10-28 16:30:59.005: W/dalvikvm(23056): Verifier rejected class Lcom/googlecode/sardine/util/SardineUtil;
10-28 16:30:59.005: D/AndroidRuntime(23056): Shutting down VM
10-28 16:30:59.005: W/dalvikvm(23056): threadid=1: thread exiting with uncaught exception (group=0x40015578)
10-28 16:30:59.009: E/AndroidRuntime(23056): FATAL EXCEPTION: main
10-28 16:30:59.009: E/AndroidRuntime(23056): java.lang.VerifyError: com.googlecode.sardine.util.SardineUtil
10-28 16:30:59.009: E/AndroidRuntime(23056):    at com.googlecode.sardine.impl.SardineImpl.list(SardineImpl.java:339)
10-28 16:30:59.009: E/AndroidRuntime(23056):    at hsr.ifs.firetablet.network.WebDavConnector.getFacilityNames(WebDavConnector.java:36)

I use Android API-Level 10 & Java 1.6.

Community
  • 1
  • 1
Sam Hueppi
  • 49
  • 7

2 Answers2

0

Not sure what's going on, but did you try https://github.com/yeonsh/Sardine-Android ?

Pascal
  • 15,257
  • 2
  • 52
  • 65
0

I also had the same issue and modified the Sardine project to use SimpleXml instead of JAXB. Here is my version of the library: https://github.com/thegrizzlylabs/sardine-android

guillaume-tgl
  • 2,749
  • 3
  • 23
  • 30