Exception

496 views
Skip to first unread message

Test User

unread,
Feb 11, 2012, 9:21:06 AM2/11/12
to java-apn...@googlegroups.com
Hi,

I created a standalone java class and added the apns-0.2.0-SNAPSHOT.jar file in the build path then i tried to call the service. At that time i'm getting the below exception.

Can anyone pls help me?

java.lang.NoClassDefFoundError: Could not initialize class com.notnoop.apns.internal.Utilities

Here i've included my code for reference.

public static void main(String[] args) {
        ApnsServiceBuilder serviceBuilder = APNS.newService();
        serviceBuilder = serviceBuilder.withCert("D:/Manickam/Java/Pranav/Pranav.p12", "pranav123");
        ApnsService apnsService = serviceBuilder.withSandboxDestination().build();
        //ApnsService service =    APNS.newService().withCert("D:/Manickam/Java/Pranav/Pranav.p12", "pranav123").withSandboxDestination().build();

        String payload = APNS.newPayload().alertBody("Can't be simpler than this!").build();
        String token = "fedfbcfb....";
        ApnsNotification apns = apnsService.push(token, payload);
        System.out.println("Result :" + apns.toString());

    }


Thanks,
Java
Reply all
Reply to author
Forward
0 new messages