I am trying to setup CoAP Server using Java library from http://mvnrepository.com/artifact/org.eclipse.californium/californium-core/1.0.1
public class HelloWorldServer extends CoapServer {
private static final int COAP_PORT = 5683;
/*
* Application entry point.
*/
public static void main(String[] args) {
try {
// create server
HelloWorldServer server = new HelloWorldServer();
// add endpoints on all IP addresses
server.addEndpoint(new CoAPEndpoint(new InetSocketAddress("127.0.0.1", COAP_PORT)));
server.start();
} catch (SocketException e) {
System.err.println("Failed to initialize server: " + e.getMessage());
}
}
adding endpoints to server causing below Exception:
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/californium/elements/RawDataChannel at com.landisgyr.chardonnay.HelloWorldServer.main(HelloWorldServer.java:35) Caused by: java.lang.ClassNotFoundException: org.eclipse.californium.elements.RawDataChannel at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 1 more
Is there anyone who go CoAP server working with Californium Java library ?