Did you use ant to compile the librarie?

Also, you have to put the log4j jar file.

El domingo 16 de enero de 2011, Yosiakn <[email protected]> escribió:
> Hi, i'm new in using SMSLib, and i want to use it as my final project
> in my university.
>
> I have problem, when i run the program (i use example from the smslib
> for sending sms), i found the error
>
> Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
> log4j/Priority
>         at org.smslib.Service.listSystemInformation(Service.java:113)
>         at org.smslib.Service.initializeService(Service.java:103)
>         at org.smslib.Service.<init>(Service.java:95)
>         at org.smslib.Service.<clinit>(Service.java:90)
>         at SendMessage.doIt(SendMessage.java:38)
>         at SendMessage.main(SendMessage.java:81)
> Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Priority
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
> 301)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>         ... 6 more
> Java Result: 1
>
> The source :
> OutboundNotification outboundNotification = new
> OutboundNotification();
>         System.out.println("Example: Send message from a serial gsm
> modem.");
>         System.out.println(Library.getLibraryDescription());
>         System.out.println("Version: " + Library.getLibraryVersion());
>         SerialModemGateway gateway = new
> SerialModemGateway("modem.com9", "COM9", 115200, "Sony Ericson",
> "K700i");
>         System.out.println("huaa");
>         gateway.setInbound(true);
>         gateway.setOutbound(true);
>         gateway.setSimPin("0000");
>         // Explicit SMSC address set is required for some modems.
>         // Below is for VODAFONE GREECE - be sure to set your own!
>         gateway.setSmscNumber("+6285643745999");
>
> Service.getInstance().setOutboundMessageNotification( outboundNotification);
>         Service.getInstance().addGateway(gateway);
>         Service.getInstance().startService();
>         System.out.println();
>         System.out.println("Modem Information:");
>         System.out.println("  Manufacturer: " +
> gateway.getManufacturer());
>         System.out.println("  Model: " + gateway.getModel());
>         System.out.println("  Serial No: " + gateway.getSerialNo());
>         System.out.println("  SIM IMSI: " + gateway.getImsi());
>         System.out.println("  Signal Level: " +
> gateway.getSignalLevel() + " dBm");
>         System.out.println("  Battery Level: " +
> gateway.getBatteryLevel() + "%");
>         System.out.println();
>         // Send a message synchronously.
>         OutboundMessage msg = new OutboundMessage("+62856437478750",
> "Hello from SMSLib!");
>         Service.getInstance().sendMessage(msg);
>
>         Service.getInstance().stopService();
>
> I use netbeans as my IDE
> and i have include library
>
> Any one can help me?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups 
> "SMSLib Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/smslib?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"SMSLib Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/smslib?hl=en.

Reply via email to