Re: [Simple-support] java.lang.VerifyError on Android
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2011-04-21 20:54:32
|
What was the problem with 2.5.2? The VerifyError in the StructureBuilder was fixed in 2.5.2.
--- On Thu, 21/4/11, James Oltmans <Jam...@ip...> wrote:
> From: James Oltmans <Jam...@ip...>
> Subject: RE: [Simple-support] java.lang.VerifyError on Android
> To: "Niall Gallagher" <gal...@ya...>, "sim...@li..." <sim...@li...>
> Received: Thursday, 21 April, 2011, 10:21 AM
> No, I could not get 2.5.2 to work.
> Meanwhile 2.3.2 is working for me.
>
> From: Niall Gallagher [mailto:gal...@ya...]
>
> Sent: Thursday, April 21, 2011 12:15 AM
> To: sim...@li...;
> James Oltmans
> Subject: Re: [Simple-support] java.lang.VerifyError on
> Android
>
> You need to download 2.5.2 to fix this.
>
> --- On Tue, 19/4/11, James Oltmans <Jam...@ip...>
> wrote:
>
> From: James Oltmans <Jam...@ip...>
> Subject: [Simple-support] java.lang.VerifyError on Android
> To: "sim...@li..."
> <sim...@li...>
> Received: Tuesday, 19 April, 2011, 11:36 AM
> I’m trying to use Simple XML on Android and although I
> have seen many say that it works on Android I have not been
> able to get the basic example from the tutorial working.
>
> Here’s the code (the error occurs on
> “serializer.write(example, result);” according to the
> stack trace):
> import java.io.File;
>
> import android.os.Environment;
> import android.test.AndroidTestCase;
> import android.test.AssertionFailedError;
>
> import org.simpleframework.xml.Serializer;
> import org.simpleframework.xml.core.Persister;
>
> public class SimpleXmlTest extends AndroidTestCase
> {
>
> public static final String TEST_DIR =
> "ConcertTestDir";
> public void testSerialize() {
> Serializer serializer = new Persister();
> Example example = new Example("Example
> message", 123);
> final File baseDir = new File(
> Environment.getExternalStorageDirectory() + File.separator +
> TEST_DIR + File.separator );
> File result = new
> File(baseDir.getAbsolutePath()+"example.xml");
> try {
> serializer.write(example, result);
> } catch ( Exception e ) {
> System.out.println("Exception thrown
> of type: "+e.getClass().getName());
> e.printStackTrace();
> throw new
> AssertionFailedError("Serializer failed with: "+e);
> }
> result.delete();
> }
> }
>
> Here’s the error I get:
>
> 04-19 12:30:19.544: DEBUG/concert.concertApp(5184):
> Starting up
> 04-19 12:30:19.544: INFO/System.out(5184): Sending WAIT
> chunk
> 04-19 12:30:19.554: INFO/dalvikvm(5184): Debugger is
> active
> 04-19 12:30:19.745: INFO/System.out(5184): Debugger has
> connected
> 04-19 12:30:19.745: INFO/System.out(5184): waiting for
> debugger to settle...
> 04-19 12:30:19.954: INFO/System.out(5184): waiting for
> debugger to settle...
> 04-19 12:30:20.154: INFO/System.out(5184): waiting for
> debugger to settle...
> 04-19 12:30:20.355: INFO/System.out(5184): waiting for
> debugger to settle...
> 04-19 12:30:20.556: INFO/System.out(5184): waiting for
> debugger to settle...
> 04-19 12:30:20.757: INFO/System.out(5184): waiting for
> debugger to settle...
> 04-19 12:30:20.954: INFO/System.out(5184): waiting for
> debugger to settle...
> 04-19 12:30:21.158: INFO/System.out(5184): debugger has
> settled (1341)
> 04-19 12:30:21.174: INFO/TestRunner(5184): started:
> testSerialize(com.iphase3.android.concert.test.SimpleXmlTest)
> 04-19 12:30:21.254: INFO/dalvikvm(5184): Could not find
> method javax.xml.stream.XMLInputFactory.newInstance,
> referenced from method
> org.simpleframework.xml.stream.StreamProvider.<init>
> 04-19 12:30:21.264: WARN/dalvikvm(5184): VFY: unable to
> resolve static method 323:
> Ljavax/xml/stream/XMLInputFactory;.newInstance
> ()Ljavax/xml/stream/XMLInputFactory;
> 04-19 12:30:21.264: DEBUG/dalvikvm(5184): VFY: replacing
> opcode 0x71 at 0x0003
> 04-19 12:30:21.264: DEBUG/dalvikvm(5184): VFY: dead code
> 0x0006-0009 in
> Lorg/simpleframework/xml/stream/StreamProvider;.<init>
> ()V
> 04-19 12:30:21.264: WARN/dalvikvm(5184): VFY: unable to
> find class referenced in signature
> (Ljavax/xml/stream/XMLEventReader;)
> 04-19 12:30:21.264: WARN/dalvikvm(5184): VFY: unable to
> find class referenced in signature
> (Ljavax/xml/stream/XMLEventReader;)
> 04-19 12:30:21.274: INFO/dalvikvm(5184): Could not find
> method
> javax.xml.stream.XMLInputFactory.createXMLEventReader,
> referenced from method
> org.simpleframework.xml.stream.StreamProvider.provide
> 04-19 12:30:21.274: WARN/dalvikvm(5184): VFY: unable to
> resolve virtual method 321:
> Ljavax/xml/stream/XMLInputFactory;.createXMLEventReader
> (Ljava/io/InputStream;)Ljavax/xml/stream/XMLEventReader;
> 04-19 12:30:21.274: DEBUG/dalvikvm(5184): VFY: replacing
> opcode 0x6e at 0x0002
> 04-19 12:30:21.274: DEBUG/dalvikvm(5184): VFY: dead code
> 0x0005-000a in
> Lorg/simpleframework/xml/stream/StreamProvider;.provide
> (Ljava/io/InputStream;)Lorg/simpleframework/xml/stream/EventReader;
> 04-19 12:30:21.274: INFO/dalvikvm(5184): Could not find
> method
> javax.xml.stream.XMLInputFactory.createXMLEventReader,
> referenced from method
> org.simpleframework.xml.stream.StreamProvider.provide
> 04-19 12:30:21.274: WARN/dalvikvm(5184): VFY: unable to
> resolve virtual method 322:
> Ljavax/xml/stream/XMLInputFactory;.createXMLEventReader
> (Ljava/io/Reader;)Ljavax/xml/stream/XMLEventReader;
> 04-19 12:30:21.274: DEBUG/dalvikvm(5184): VFY: replacing
> opcode 0x6e at 0x0002
> 04-19 12:30:21.274: DEBUG/dalvikvm(5184): VFY: dead code
> 0x0005-000a in
> Lorg/simpleframework/xml/stream/StreamProvider;.provide
> (Ljava/io/Reader;)Lorg/simpleframework/xml/stream/EventReader;
> 04-19 12:30:21.304: INFO/global(5184): Default buffer size
> used in BufferedWriter constructor. It would be better to be
> explicit if an 8k-char buffer is required.
> 04-19 12:30:21.374: WARN/dalvikvm(5184): VFY: returning
> [Ljava/lang/Object; (cl=0x0), declared
> [Ljava/lang/annotation/Annotation; (cl=0x0)
> 04-19 12:30:21.374: WARN/dalvikvm(5184): VFY: rejecting
> opcode 0x11 at 0x0010
> 04-19 12:30:21.374: WARN/dalvikvm(5184): VFY: rejected
> Lorg/simpleframework/xml/core/StructureBuilder;.extract
> (Ljava/lang/annotation/Annotation;)[Ljava/lang/annotation/Annotation;
> 04-19 12:30:21.374: WARN/dalvikvm(5184): Verifier rejected
> class Lorg/simpleframework/xml/core/StructureBuilder;
> 04-19 12:30:21.454: INFO/TestRunner(5184): failed:
> testSerialize(com.iphase3.android.concert.test.SimpleXmlTest)
> 04-19 12:30:21.454: INFO/TestRunner(5184): ----- begin
> exception -----
> 04-19 12:30:21.534: INFO/TestRunner(5184):
> java.lang.VerifyError:
> org.simpleframework.xml.core.StructureBuilder
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> org.simpleframework.xml.core.Scanner.<init>(Scanner.java:89)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> org.simpleframework.xml.core.ScannerFactory.getInstance(ScannerFactory.java:66)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> org.simpleframework.xml.core.Support.getScanner(Support.java:170)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> org.simpleframework.xml.core.Support.getName(Support.java:232)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> org.simpleframework.xml.core.Source.getName(Source.java:250)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> org.simpleframework.xml.core.Traverser.getName(Traverser.java:284)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> org.simpleframework.xml.core.Traverser.write(Traverser.java:203)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> org.simpleframework.xml.core.Traverser.write(Traverser.java:186)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> org.simpleframework.xml.core.Persister.write(Persister.java:1187)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> org.simpleframework.xml.core.Persister.write(Persister.java:1169)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> org.simpleframework.xml.core.Persister.write(Persister.java:1147)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> org.simpleframework.xml.core.Persister.write(Persister.java:1266)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> org.simpleframework.xml.core.Persister.write(Persister.java:1248)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> org.simpleframework.xml.core.Persister.write(Persister.java:1229)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> org.simpleframework.xml.core.Persister.write(Persister.java:1208)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> com.iphase3.android.concert.test.SimpleXmlTest.testSerialize(SimpleXmlTest.java:32)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> java.lang.reflect.Method.invokeNative(Native Method)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> java.lang.reflect.Method.invoke(Method.java:521)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> junit.framework.TestCase.runTest(TestCase.java:154)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> junit.framework.TestCase.runBare(TestCase.java:127)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> junit.framework.TestResult$1.protect(TestResult.java:106)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> junit.framework.TestResult.runProtected(TestResult.java:124)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> junit.framework.TestResult.run(TestResult.java:109)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> junit.framework.TestCase.run(TestCase.java:118)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:520)
> 04-19 12:30:21.534: INFO/TestRunner(5184): at
> android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1606)
> 04-19 12:30:21.534: INFO/TestRunner(5184): ----- end
> exception -----
> 04-19 12:30:21.654: DEBUG/dalvikvm(5184): GC_FOR_MALLOC
> freed 4473 objects / 422056 bytes in 31ms
> 04-19 12:30:21.654: INFO/TestRunner(5184): finished:
> testSerialize(com.iphase3.android.concert.test.SimpleXmlTest)
> 04-19 12:30:21.664: INFO/TestRunner(5184): started:
> testAndroidTestCaseSetupProperly(com.iphase3.android.concert.test.SimpleXmlTest)
> 04-19 12:30:21.684: INFO/TestRunner(5184): finished:
> testAndroidTestCaseSetupProperly(com.iphase3.android.concert.test.SimpleXmlTest)
> 04-19 12:30:21.684: INFO/TestRunner(5184): passed:
> testAndroidTestCaseSetupProperly(com.iphase3.android.concert.test.SimpleXmlTest)
>
> I’m using Eclipse on Windows to develop.
>
> Thank you!
>
> -----Inline Attachment Follows-----
> ------------------------------------------------------------------------------
> Benefiting from Server Virtualization: Beyond Initial
> Workload
> Consolidation -- Increasing the use of server
> virtualization is a top
> priority.Virtualization can reduce costs, simplify
> management, and improve
> application availability and disaster protection. Learn
> more about boosting
> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
>
> -----Inline Attachment Follows-----
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
>
|