Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7169397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:58:53+00:00 2026-05-28T14:58:53+00:00

I have been trying to set up a program that sends a push notification

  • 0

I have been trying to set up a program that sends a push notification for my app. First I used
this tutorial
http://mobiforge.com/developing/story/programming-apple-push-notification-services

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:

The run destination My Mac 64-bit is not valid for Running the scheme ‘PushMeBaby’.

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.

This lead me to java and a certain java class named JavaApns
http://code.google.com/p/javapns/

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 :

bcprov-jdk15-146.jar
log4j-1.2.15.jar

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

[my 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();
    }


       }
}

Finally the error that this gives me is:
/////////////////////////////////////////////////////////////////////////////////

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.

/////////////////////////////////////////////////////////////////////////////////

I went to the link logging.apache.org/log4j/1.2/faq.html#noconfig, 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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:58:54+00:00Added an answer on May 28, 2026 at 2:58 pm

    From the same link you went to:

    Why do I see a warning about “No appenders found for logger” and “Please configure log4j properly”?

    This occurs when the default configuration files log4j.properties and
    log4j.xml can not be found and the application performs no explicit
    configuration. log4j uses Thread.getContextClassLoader().getResource()
    to locate the default configuration files and does not directly check
    the file system. Knowing the appropriate location to place
    log4j.properties or log4j.xml requires understanding the search
    strategy of the class loader in use. log4j does not provide a default
    configuration since output to the console or to the file system may be
    prohibited in some environments.

    Also:

    Why can’t log4j find my properties file in a J2EE or WAR application?

    The short answer: the log4j classes and the properties file are not
    within the scope of the same classloader.

    The long answer (and what to do about it): J2EE or Servlet containers
    utilize Java’s class loading system. Sun changed the way classloading
    works with the release of Java 2. In Java 2, classloaders are arranged
    in a hierarchial parent-child relationship. When a child classloader
    needs to find a class or a resource, it first delegates the request to
    the parent.

    Log4j only uses the default Class.forName() mechanism for loading
    classes. Resources are handled similarly. See the documentation for
    java.lang.ClassLoader for more details.

    So, if you’re having problems, try loading the class or resource
    yourself. If you can’t find it, neither will log4j. 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to teach myself MEF, starting with this tutorial: http://blogs.msdn.com/b/brada/archive/2008/09/29/simple-introduction-to-composite-applications-with-the-managed-extensions-framework.aspx There
I have been hitting a dead end with this program. I am trying to
I have been trying to find a good CoreData tutorial that focuses on more
I have been trying to make a clock that the user can set. I
I have been trying to set the value of a hidden input by using
For while I have been trying to set the Page Scaling of Excel page
I have been trying to implement Win32's MessageBox using GTK. The app uses SDL/OpenGL,
I have been trying to get around this error for a day now and
I have been trying to set up OpenCV for the past few days with
I have been trying out Splint with a C program I recently wrote and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.