cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
75
Views
0
Helpful
0
Replies
parth.thakker
Beginner

com.tailf.cdb.CdbException: Unknown CDB operation

I am writing a program in Java that subscribes to changes in CDB. I want to subscribe to all the changes but for starter any particular path will also work.

Following is the code snippet I have written following the practices defined for tailf CDB API in NSO documents:

Socket socket;
        Cdb cdb;
        try {
            socket = new Socket("localhost", 4570);
            cdb = new Cdb("MyCdbSock", socket);
            CdbSession session = cdb.startSession();
            CdbSubscription subscription = cdb.newSubscription();
            int subid = subscription.subscribe(CdbSubscriptionType.SUB_RUNNING, 1, new Ncs(), "/");
            subscription.subscribeDone();

This code throws an error on the subscription.subscribe line, with following execption:

com.tailf.cdb.CdbException: Unknown CDB operation
	at com.tailf.cdb.CdbException.mk(CdbException.java:64)
	at com.tailf.cdb.CdbException.mk(CdbException.java:59)
	at com.tailf.cdb.CdbSubscription.subscribe(CdbSubscription.java:553)
	at com.tailf.cdb.CdbSubscription.subscribe(CdbSubscription.java:501)
	at com.tailf.cdb.CdbSubscription.subscribe(CdbSubscription.java:668)

Anyone knows what is wrong here? The error does not give much details. The java program is not running inside the NSO java vm. It is a standalone application.

0 REPLIES 0