2

I am trying to use the Jets3t library within an Android application, and I keep getting errors with the Rest service when I use the library.

04-27 16:47:39.491: ERROR/S3Service(225): Couldn't initialize a sax driver for the XMLReader

I have tried to include the Xerces library and the Crimson library, and it dont play well. I get this error:

Attempt to include a core class (java.* or javax.*) in something other
than a core library. It is likely that you have attempted to include
in an application the core library (or a part thereof) from a desktop
virtual machine. This will most assuredly not work. At a minimum, it
jeopardizes the compatibility of your app with future versions of the
platform. It is also often of questionable legality.

If you really intend to build a core library -- which is only
appropriate as part of creating a full virtual machine distribution,
as opposed to compiling an application -- then use the
"--core-library" option to suppress this error message.

Is there something I can do to get it working ?

Andrew Cetinic
  • 2,805
  • 29
  • 44
  • You should consider also asking JetS3t-specific questions on the JetS3t Users group (Google Groups) where they are more likely to be seen and answered. Then include the answers in Stackoverflow as well. – James Murty Jul 05 '10 at 22:24

1 Answers1

4

Apparently you can work around the SAX driver issue by setting the following system property:

System.setProperty("org.xml.sax.driver", "org.xmlpull.v1.sax2.Driver");

Credit for this answer goes to Bruno Hautzenberger on the JetS3t User's forum: http://groups.google.com/group/jets3t-users/browse_thread/thread/d39f32168fd0c217?hl=en

James Murty
  • 1,818
  • 1
  • 16
  • 16
  • This Android-specific work around is now implemented in JetS3t directly: http://bitbucket.org/jmurty/jets3t/issue/35/detect-and-use-sax-parser-on-android – James Murty Jul 05 '10 at 22:57