mjson refrence error in peer to peer nework code

11 views
Skip to first unread message

Shivam Poddar

unread,
Sep 9, 2019, 6:48:40 AM9/9/19
to HyperGraphDB
I have the following code from the tutorial present on HyperGraphDB webpage for  Peer-to-Peer Network. 

import java.io.File;
import java.util.concurrent.Future;
import org.hypergraphdb.peer.HyperGraphPeer;
import org.hypergraphdb.*;

public class SimpleP2P {

public static void main(String[] args)
{
    File configFile = new File("hgp2p.json"); 
    HyperGraphPeer peer = new HyperGraphPeer(configFile);   //Error: The type mjson.Json cannot be resolved. It is indirectly referenced from required .class files
    Future<Boolean> startupResult = peer.start();        
    try
    {
        if (startupResult.get())
    {
        System.out.println("Peer started successfully.");
    }
    else
    {
        System.out.println("Peer failed to start.");
        peer.getStartupFailedException().printStackTrace(System.err);
    }
    } 
    catch (Exception e)
    {
        e.printStackTrace(System.err);
    }
}
}

I have included following jar files:
 1. hgdbje-1.3.jar
 2. hgdb-1.3.jar
 3. hgdbp2p-1.3.jar
 4. je-5.0.34.jar
 5. smack-3.1.0.jar
 5. smackx-3.1.0.jar

I also included the mjson jar file but I still got the same error. Please help 

Reply all
Reply to author
Forward
0 new messages