title: Using MessagePack with Android
body: <p>Has someone tried to use <code>MessagePack</code> with an  Android app?<br>
  Is it possible? I have tried to use the Jar from <a href="https://github.com/msgpack/msgpack-java"><code>msgpack-java</code></a> and received the following Exception:</p>
  
  <pre><code>Caused by: java.lang.ExceptionInInitializerError
    at org.msgpack.Packer.pack(Packer.java:532)
    at org.msgpack.MessagePack.pack(MessagePack.java:31)
    ... 15 more
    Caused by: java.lang.ExceptionInInitializerError
    at org.msgpack.template.TemplateRegistry.&lt;clinit&gt;(TemplateRegistry.java:38)
    ... 17 more
    Caused by: java.lang.VerifyError: org.msgpack.template.BeansFieldEntryReader
    at org.msgpack.template.builder.BeansTemplateBuilder.&lt;init (BeansTemplateBuilder.java:42)
    at org.msgpack.template.builder.BuilderSelectorRegistry.initForJava(BuilderSelectorRegistry.java:73)
    at org.msgpack.template.builder.BuilderSelectorRegistry.&lt;clinit&gt;(BuilderSelectorRegistry.java:38)
    ... 18 more
  </code></pre>
  
  <p>The code that I use is very simple</p>
  
  <pre><code>PrintWriter out = new PrintWriter(socket.getOutputStream());
  Message msg = new Message();
  msg.body = "asdasdasd";
  msg.from = "qwe";
  msg.to = "ttt";
  byte[] bytes = MessagePack.pack(msg);
  out.print(bytes);
  out.flush();
  </code></pre>
  
  <p>I have <code>javassist.jar</code>, <code>msgpack-0.5.2.jar</code>, <code>slf4j-api-1.6.2.jar</code> and <code>slf4j-jdk14-1.6.2.jar</code> in my <code>lib</code> directory.  </p>
  
  <p>In my server application this code works fine with the same libraries.</p>