1

I'm stuck with this strange error and I have no idea whats causing it... Complete LogCat:

06-24 13:15:07.878: W/dalvikvm(20470): VFY: unable to find class referenced in signature (Ljavax/xml/bind/JAXBElement;)
06-24 13:15:07.880: W/dalvikvm(20470): VFY: unable to find class referenced in signature (Ljavax/xml/bind/JAXBElement;)
06-24 13:15:07.880: W/dalvikvm(20470): VFY: unable to resolve exception class 1628 (Ljavax/xml/bind/JAXBException;)
06-24 13:15:07.880: W/dalvikvm(20470): VFY: unable to find exception handler at addr 0x7c
06-24 13:15:07.880: W/dalvikvm(20470): VFY:  rejected Lde/not/important/services/SenderReceiverThread;.run ()V
06-24 13:15:07.880: W/dalvikvm(20470): VFY:  rejecting opcode 0x0d at 0x007c
06-24 13:15:07.880: W/dalvikvm(20470): VFY:  rejected Lde/not/important/services/SenderReceiverThread;.run ()V
06-24 13:15:07.880: W/dalvikvm(20470): Verifier rejected class Lde/not/important/services/SenderReceiverThread;
06-24 13:15:07.881: W/dalvikvm(20470): threadid=11: thread exiting with uncaught exception (group=0x416b2d40)
06-24 13:15:07.882: E/AndroidRuntime(20470): FATAL EXCEPTION: AsyncTask #1
06-24 13:15:07.882: E/AndroidRuntime(20470): Process: de.not.important, PID: 20470
06-24 13:15:07.882: E/AndroidRuntime(20470): java.lang.RuntimeException: An error occured while executing doInBackground()
06-24 13:15:07.882: E/AndroidRuntime(20470):    at android.os.AsyncTask$3.done(AsyncTask.java:300)
06-24 13:15:07.882: E/AndroidRuntime(20470):    at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
06-24 13:15:07.882: E/AndroidRuntime(20470):    at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
06-24 13:15:07.882: E/AndroidRuntime(20470):    at java.util.concurrent.FutureTask.run(FutureTask.java:242)
06-24 13:15:07.882: E/AndroidRuntime(20470):    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
06-24 13:15:07.882: E/AndroidRuntime(20470):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
06-24 13:15:07.882: E/AndroidRuntime(20470):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
06-24 13:15:07.882: E/AndroidRuntime(20470):    at java.lang.Thread.run(Thread.java:841)
06-24 13:15:07.882: E/AndroidRuntime(20470): Caused by: java.lang.VerifyError: de/not/important/services/SenderReceiverThread
06-24 13:15:07.882: E/AndroidRuntime(20470):    at de.not.important.services.ServerConnection.connect(ServerConnection.java:79)
06-24 13:15:07.882: E/AndroidRuntime(20470):    at de.not.important.iv.services.ServerConnection$ServerConnectionTask.doInBackground(ServerConnection.java:97)
06-24 13:15:07.882: E/AndroidRuntime(20470):    at de.not.important.iv.services.ServerConnection$ServerConnectionTask.doInBackground(ServerConnection.java:1)
06-24 13:15:07.882: E/AndroidRuntime(20470):    at android.os.AsyncTask$2.call(AsyncTask.java:288)
06-24 13:15:07.882: E/AndroidRuntime(20470):    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-24 13:15:07.882: E/AndroidRuntime(20470):    ... 4 more

If I remove the following imports, the project works just fine:

import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;

The Error occurs as soon as I call the constructor of the class which imports the JAXB stuff.

Googling the error told me, that there might be something wrong with my import order or that I have not checked all the JARs I'm using. That's strange, because afaik JAXB is integrated in the SDK and doesn't need any libraries. Anyway, I played with the import order and I checked all the JARs I could find - with no result.

I cannot post a screenshot of my BuildPath Libraries and Order and Export due to Reputation, but here is a link to it: http://postimg.org/image/5bhohcs6b/

Any suggestions what could be wrong? I'm torturing my head about several hours right now... :(

1 Answers1

1

JAXB is not part of the Android VM (remember Dalvik is not a standard Java SE or Java ME VM). AFAIK by default you can't just add classes in a javax package, but I believe there are steps you can do to accomplish this.

bdoughan
  • 147,609
  • 23
  • 300
  • 400
  • 1
    thanks a lot. i wasn't aware that jaxb isn't part of android. if anybody needs more information please visit http://stackoverflow.com/questions/5461127/using-jaxb-with-google-android – user3699897 Jun 24 '14 at 14:13