1
votes

I tried to Java pns Package to send notification to Apple Push Notification Service, but it doesn't work

Push.alert("Hello World!", "D:/Development/project/keys/PushChatKey.p12", "password", false, "59188a107d705f8c51585d719769e0642ce98b79d86fdace30dbc58efba301cc");

noting happnes only it display

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.

any clue is appericated.

regards,

1
Are you sure you are using the correct token for the device? note the difference between device token and udid. Are you behind a proxy?Thomas Johan Eggum
It'S OK. I used the wrong Certificate file. Now it's OK!!user836026
Could you explain your solution? I'm having the same issue (following the same tutorial). Which certificate file should I be using?steve

1 Answers

8
votes

You should configure the log4j first with the following code.

BasicConfigurator.configure();