Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

server to server "bad-instance" error while registerHook

Avatar

Level 2

Hi LCCS Team,

I have tried server to server integration last day and got successful in setting up amf server and required endpoints for lccs.

while i was trying to register hook i got this error

com.adobe.rtc.util.RTCError: bad-instance      at com.adobe.rtc.account.AccountManager.checkStatus(AccountManager.java:907)      at com.adobe.rtc.account.AccountManager.subscribeCollection(AccountManager.java:470)      at com.adobe.rtc.account.AccountManager.subscribeCollection(AccountManager.java:453)    

i really have no idea where i went wrong.

this is the code i invoced

AccountManager am = new AccountManager("https://connectnow.acrobat.com/xxxxxxx/");

        am.login("xxxx@xxx.com", "xxxxxx");

        am.unregisterHook();

        am.registerHook("<a real URL>", "12345"); //getting error at this point   

        am.subscribeCollection("myAtulMeeting","JaiHOCollection");

i have dig in to lccs.jar source in  com.adobe.rtc.account.AccountManager.checkStatus(AccountManager.java:907)

but i am unable to find the cause, please suggest some pointers.

Thanks

Atul

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi ,

Is your string myAtulMeeting the roomName or any app name ? The first

parameter should be roomName and the second one should be name of the

collection. Secondly , does your collection JaiHOCollection exists ? If

not, you need to create and subscribe.

Thanks

Hironmay Basu

View solution in original post

6 Replies

Avatar

Employee

Bad instance makes me think you are using the wrong account URL. Are you by any chance using a full room URL or terminating the account URL with "/" ?

You can also set the debug flag in the java API and find exactly were is failing.

Sent from my iPhone

Avatar

Level 2

Hi Raff,

Thanks for the reply.

i have checked with the room URL, and yes i terminated it with / , i corrected it.

In debug mode i got to know that registerHook is working fine, but the subscribeCollection is having  issues.

am.subscribeCollection("myAtulMeeting","JaiHOCollection");

while in debug mode i found that error happens when checkstatus call is made in subscribeCollection method,

in AccountManager class

inside checkStatus method

Element status = (Element) result.getElementsByTagName("status").item(0);

String code = status.getAttribute("code"); //code gets the "error" as string

Any  thing else i am missing ?

Thank You

Atul

Avatar

Correct answer by
Level 10

Hi ,

Is your string myAtulMeeting the roomName or any app name ? The first

parameter should be roomName and the second one should be name of the

collection. Secondly , does your collection JaiHOCollection exists ? If

not, you need to create and subscribe.

Thanks

Hironmay Basu

Avatar

Level 2

Hi Hironmay,

OH NO!!

I was doing a dumb thing, have never created that room and collectionnode where i was subscribing.

created room and collection node from server apis and subscribed to it.

Now its working smooth.

Thanks hironmay, i highly appreciate your reply, inspite of being a dam trivial nature problem you entertained it.

Thank You , It saved my day!!

Atul

Avatar

Level 1

How do you set the debug flag in the java api?

Avatar

Employee

com.adobe.rtc.utils.Util.setDebug(true);

or

com.adobe.rtc.utils.Util.DEBUG = true;