Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
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
Former Community Member

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
Former Community Member

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;

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----