title: JavaApns log4j.apache error iPhone push notification
body: <p>I have been trying to set up a program that sends a push notification for my app. First I used 
  this tutorial
  <a href="http://mobiforge.com/developing/story/programming-apple-push-notification-services" rel="nofollow">http://mobiforge.com/developing/story/programming-apple-push-notification-services</a></p>
  
  <p>From this I learned how to get my device's token. 
  I tried following the rest of to tutorial, but got stuck near the end, which told me to download a class named PushMeBaby, and change some lines of code and run it. However I can't even compile this application. It gives me the error:</p>
  
  <p>The run destination My Mac 64-bit is not valid for Running the scheme 'PushMeBaby'.</p>
  
  <p>after many hours of trying to figure this out, I decided to switch to a new tutorial, because i couldn't find a way to fix this one. </p>
  
  <p>This lead me to java and a certain java class named JavaApns
  <a href="http://code.google.com/p/javapns/" rel="nofollow">http://code.google.com/p/javapns/</a></p>
  
  <p>Inorder to install this library and to get it to work, you need to meet a few requirements
  Here is where I think the problem arises. The 3rd requirement tells me to also download and install two other libraries :</p>
  
  <p>bcprov-jdk15-146.jar
  log4j-1.2.15.jar</p>
  
  <p>The first library works fine, since there is no errors. However log4 comes in a zipped file, and whenever I try to unzip it, it gives me the error "An unexpected error occurred (28)" So I just go into the zip file and only unzip the library instead of the whole file (no errors). Then I put both libraries+JavaAPNS into my project and run it with</p>
  
  <p>[my code]</p>
  
  <pre><code>import javapns.Push;
  import javapns.communication.exceptions.CommunicationException;
  import javapns.communication.exceptions.KeystoreException;
  
  
  public class test {
      public static void main(String[] args) {
  
      try {
          Push.alert("Hello World!", "MyCertificate.p12", "MyPassword",false, "MyDevicetoken");
      } catch (CommunicationException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      } catch (KeystoreException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  
  
         }
  }
  </code></pre>
  
  <p>Finally the error that this gives me is:
  /////////////////////////////////////////////////////////////////////////////////</p>
  
  <pre><code>log4j:WARN No appenders could be found for logger (javapns.notification.Payload).
  log4j:WARN Please initialize the log4j system properly.
  log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
  </code></pre>
  
  <p>/////////////////////////////////////////////////////////////////////////////////</p>
  
  <p>I went to the link <code>logging.apache.org/log4j/1.2/faq.html#noconfig</code>, however it doesn't really explain how to solve the problem. So if you have any ideas or suggestions ( Or you want to suggest a better library/tutorial) I would greatly appreciate it!</p>