title: Could not find class 'org.codehaus.jackson.map.ObjectMapper', referenced from method
body: <p>I am trying to make an chat application with atmosphere framework.For this adding dependency I am using maven dependency.
  The problem is whenever I try to compile project with maven dependency library included,It is giving error as "conversion to dalvik format failed with error 1" if remove the library project runs but it gives above mentioned exception.</p>
  
  <p>Here is my code.</p>
  
  <pre><code>  public class ListenerService extends Service
     {
      private String serverIpAddress ="someIp";
  
      private AtmosphereClient client;
  
      private final Handler uiHandler = new Handler();
  
      private final static ObjectMapper mapper = new ObjectMapper();//Exception comes here
  
      public static final String BROADCAST_ACTION = "Message";
  
      RequestBuilder request;
  
      public ListenerService()
      {
  
      }
  
      @Override
      public IBinder onBind(Intent intent)
      {
          // TODO Auto-generated method stub
          return null;
      }
  
      @Override
      public void onDestroy()
      {
          // TODO Auto-generated method stub
          super.onDestroy();
          Log.d("Service", "Destroyed");
      }
  
      @Override
      public void onCreate()
      {
          super.onCreate();
          PrefernceHelper prefernceHelper = new PrefernceHelper(this);
          String id = prefernceHelper.getPrefernce("OWNERID");
          Log.d("Service", "Id to be listened is " + id);
          startListening(id);
  
      }
  
      public void startListening(String channel)
      {
          Log.d("Service", "Inside Strat listening");
          StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
          StrictMode.setThreadPolicy(policy);
          client = ClientFactory.getDefault().newClient(AtmosphereClient.class);
          Log.d("Service", "Listening on " + channel);
          request = client.newRequestBuilder().method(Request.METHOD.GET).uri(serverIpAddress + "/pubsub/" + channel)
                  .trackMessageLength(true)
  
                  .encoder(new Encoder&lt;Message, String&gt;()
                  {
  
                      @Override
                      public String encode(Message data)
                      {
                          Log.d("Service", "Inside encode" + data.toString());
                          try
                          {
                              return mapper.writeValueAsString(data);
                          }
                          catch (IOException e)
                          {
                              throw new RuntimeException(e);
                          }
                      }
                  }).decoder(new Decoder&lt;String, Message&gt;()
                  {
  
                      @Override
                      public Message decode(Event type, String data)
                      {
                          Log.d("Service", "Inside decode" + data.toString());
                          data = data.trim();
  
                          // Padding if (data.length() == 0) { return null; }
  
                          if (type.equals(Event.MESSAGE))
                          {
                              try
                              {
                                  return mapper.readValue(data, Message.class);
                              }
                              catch (IOException e)
                              {
                                  e.printStackTrace();
                                  return null;
                              }
                          }
                          else
                          {
                              return null;
                          }
                      }
                  })
  
                  .transport(Request.TRANSPORT.WEBSOCKET);
  
          final org.atmosphere.wasync.Socket socket = client.create();
          socket.on("message", new Function&lt;String&gt;()
          {
  
              @Override
              public void on(final String message)
              {
                  uiHandler.post(new Runnable()
                  {
                      @Override
                      public void run()
                      {
  
                          String id = "";
                          String receviedMessage = "";
                          if (message != "")
                          {
                              try
                              {
                                  JSONObject json = new JSONObject(message);
                                  id = json.getString("from_id");
                                  receviedMessage = json.getString("message");
                              }
                              catch (JSONException e)
                              {
                                  e.printStackTrace();
                              }
  
                              Log.d("Service", message);
                              Intent intent = new Intent(BROADCAST_ACTION);
                              intent.putExtra("id", id);
                              intent.putExtra("message", receviedMessage);
                              sendBroadcast(intent);
                          }
                      }
                  });
              }
          });
          try
          {
              socket.on(new Function&lt;Throwable&gt;()
              {
  
                  @Override
                  public void on(Throwable t)
                  {
  
                  }
  
              }).open(request.build());
          }
          catch (IOException e)
          {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
      }
  </code></pre>
  
  <p>My Pom.xml</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;parent&gt;
          &lt;groupId&gt;org.sonatype.oss&lt;/groupId&gt;
          &lt;artifactId&gt;oss-parent&lt;/artifactId&gt;
          &lt;version&gt;5&lt;/version&gt;
      &lt;/parent&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.inscripts.chatproject&lt;/groupId&gt;
      &lt;artifactId&gt;chatproject&lt;/artifactId&gt;
      &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;apk&lt;/packaging&gt;
      &lt;name&gt;chatproject&lt;/name&gt;
      &lt;url&gt;http://github.com/Atmosphere/wasync&lt;/url&gt;
      &lt;scm&gt;
          &lt;connection&gt;scm:git:git@github.com:Atmosphere/wasync.git&lt;/connection&gt;
          &lt;developerConnection&gt;scm:git:git@github.com:Atmosphere/wasync.git&lt;/developerConnection&gt;
          &lt;url&gt;http://github.com/Atmosphere/wasync&lt;/url&gt;
      &lt;/scm&gt;
      &lt;prerequisites&gt;
          &lt;maven&gt;2.2.0&lt;/maven&gt;
      &lt;/prerequisites&gt;
      &lt;licenses&gt;
          &lt;license&gt;
              &lt;name&gt;Apache License 2.0&lt;/name&gt;
              &lt;url&gt;http://www.apache.org/licenses/LICENSE-2.0.html&lt;/url&gt;
              &lt;distribution&gt;repo&lt;/distribution&gt;
          &lt;/license&gt;
      &lt;/licenses&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.android&lt;/groupId&gt;
              &lt;artifactId&gt;android&lt;/artifactId&gt;
              &lt;version&gt;4.1.1.4&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.atmosphere&lt;/groupId&gt;
              &lt;artifactId&gt;wasync&lt;/artifactId&gt;
              &lt;version&gt;${project.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.ning&lt;/groupId&gt;
              &lt;artifactId&gt;async-http-client&lt;/artifactId&gt;
              &lt;version&gt;${ahc.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.atmosphere&lt;/groupId&gt;
              &lt;artifactId&gt;nettosphere&lt;/artifactId&gt;
              &lt;version&gt;${nettosphere.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.atmosphere&lt;/groupId&gt;
              &lt;artifactId&gt;atmosphere-runtime&lt;/artifactId&gt;
              &lt;version&gt;${atmosphere.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.testng&lt;/groupId&gt;
              &lt;artifactId&gt;testng&lt;/artifactId&gt;
              &lt;version&gt;5.8&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
              &lt;classifier&gt;jdk15&lt;/classifier&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
              &lt;version&gt;1.9.3&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;finalName&gt;${project.artifactId}&lt;/finalName&gt;
          &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt;
          &lt;pluginManagement&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;com.jayway.maven.plugins.android.generation2&lt;/groupId&gt;
                      &lt;artifactId&gt;android-maven-plugin&lt;/artifactId&gt;
                      &lt;version&gt;3.5.2&lt;/version&gt;
                      &lt;extensions&gt;true&lt;/extensions&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.jayway.maven.plugins.android.generation2&lt;/groupId&gt;
                  &lt;artifactId&gt;android-maven-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;sdk&gt;
                          &lt;!-- platform or api level (api level 4 = platform 1.6) --&gt;
                          &lt;platform&gt;8&lt;/platform&gt;
                      &lt;/sdk&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3.2&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;${source.property}&lt;/source&gt;
                      &lt;target&gt;${target.property}&lt;/target&gt;
                      &lt;maxmem&gt;1024m&lt;/maxmem&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.8.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;redirectTestOutputToFile&gt;${surefire.redirectTestOutputToFile}&lt;/redirectTestOutputToFile&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4.3&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;encoding&gt;UTF-8&lt;/encoding&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-release-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.1&lt;/version&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-clean-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;filesets&gt;
                          &lt;fileset&gt;
                              &lt;directory&gt;${project.basedir}/META-INF&lt;/directory&gt;
                          &lt;/fileset&gt;
                          &lt;fileset&gt;
                              &lt;directory&gt;${project.basedir}/works&lt;/directory&gt;
                          &lt;/fileset&gt;
                          &lt;fileset&gt;
                              &lt;directory&gt;${project.basedir}/overlays&lt;/directory&gt;
                          &lt;/fileset&gt;
                          &lt;fileset&gt;
                              &lt;directory&gt;${project.basedir}&lt;/directory&gt;
                              &lt;includes&gt;
                                  &lt;include&gt;*.log&lt;/include&gt;
                              &lt;/includes&gt;
                          &lt;/fileset&gt;
                      &lt;/filesets&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-source-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.1.2&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;attach-sources&lt;/id&gt;
                          &lt;phase&gt;verify&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;jar-no-fork&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.7&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;aggregate&gt;true&lt;/aggregate&gt;
                      &lt;source&gt;1.6&lt;/source&gt;
                      &lt;encoding&gt;UTF-8&lt;/encoding&gt;
                      &lt;maxmemory&gt;1g&lt;/maxmemory&gt;
                      &lt;links&gt;
                          &lt;link&gt;http://java.sun.com/javase/6/docs/api/&lt;/link&gt;
                      &lt;/links&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;attach-javadocs&lt;/id&gt;
                          &lt;phase&gt;verify&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;jar&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-jxr-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;aggregate&gt;true&lt;/aggregate&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
      &lt;reporting&gt;
          &lt;outputDirectory&gt;target/site&lt;/outputDirectory&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;aggregate&gt;true&lt;/aggregate&gt;
                      &lt;debug&gt;true&lt;/debug&gt;
                      &lt;links&gt;
                          &lt;link&gt;http://docs.oracle.com/javaee/6/docs/api/&lt;/link&gt;
                          &lt;link&gt;http://docs.oracle.com/javase/6/docs/api/&lt;/link&gt;
                      &lt;/links&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-jxr-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;aggregate&gt;true&lt;/aggregate&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-project-info-reports-plugin&lt;/artifactId&gt;
                  &lt;reportSets&gt;
                      &lt;reportSet&gt;
                          &lt;reports&gt;
                              &lt;report&gt;project-team&lt;/report&gt;
                          &lt;/reports&gt;
                      &lt;/reportSet&gt;
                  &lt;/reportSets&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/reporting&gt;
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;oss.sonatype.org&lt;/id&gt;
              &lt;url&gt;http://oss.sonatype.org/content/repositories/releases&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;oss.sonatype.org-snapshot&lt;/id&gt;
              &lt;url&gt;http://oss.sonatype.org/content/repositories/snapshots&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
      &lt;distributionManagement&gt;
          &lt;repository&gt;
              &lt;id&gt;sonatype-nexus-staging&lt;/id&gt;
              &lt;name&gt;Sonatype Release&lt;/name&gt;
              &lt;url&gt;http://oss.sonatype.org/service/local/staging/deploy/maven2&lt;/url&gt;
          &lt;/repository&gt;
          &lt;snapshotRepository&gt;
              &lt;id&gt;sonatype-nexus-snapshots&lt;/id&gt;
              &lt;name&gt;sonatype-nexus-snapshots&lt;/name&gt;
              &lt;url&gt;${distMgmtSnapshotsUrl}&lt;/url&gt;
          &lt;/snapshotRepository&gt;
      &lt;/distributionManagement&gt;
      &lt;properties&gt;
          &lt;distMgmtSnapshotsUrl&gt;http://oss.sonatype.org/content/repositories/snapshots&lt;/distMgmtSnapshotsUrl&gt;
          &lt;surefire.redirectTestOutputToFile&gt;false&lt;/surefire.redirectTestOutputToFile&gt;
          &lt;source.property&gt;1.6&lt;/source.property&gt;
          &lt;target.property&gt;1.6&lt;/target.property&gt;
          &lt;atmosphere.version&gt;2.0.0.RC3&lt;/atmosphere.version&gt;
          &lt;nettosphere.version&gt;2.0.0.RC4&lt;/nettosphere.version&gt;
          &lt;ahc.version&gt;1.7.19&lt;/ahc.version&gt;
      &lt;/properties&gt;
  &lt;/project&gt;
  </code></pre>