Restcomm ClassCastException during creating SBB child relation

73 views Asked by At

I'm trying to create SBB child on Restcomm, most of the times I encounter this exception:

java.lang.ClassCastException:  
com.edafa.slee.http.sbb.api.HttpSbbLocalObjectImpl cannot be cast to  
com.edafa.slee.http.sbb.api.HttpSbbLocalObject  

Where HttpSbbLocalObject is the sbb-local-object of the child SBB

Kindly find some useful information which may help you to answer me:

  • HttpSbbLocalObject in a separate library named http-sbb-api-lib
  • this is the library-ref in the child sbb-jar.xml:
    <library-ref> <library-name>http-sbb-api-lib</library-name> <library-vendor>Edafa</library-vendor> <library-version>1.0.3-SNAPSHOT</library-version> </library-ref>
  • this is the sbb-local-interface declaration in the child sbb-jar.xml:
    <sbb-local-interface> <sbb-local-interface-name> com.edafa.slee.http.sbb.api.HttpSbbLocalObject </sbb-local-interface-name> </sbb-local-interface>
  • this is the library-ref in the parent sbb-jar.xml:
    <library-ref> <library-name>http-sbb-api-lib</library-name> <library-vendor>Edafa</library-vendor> <library-version>1.0.3-SNAPSHOT</library-version> </library-ref>
  • this is the sbb-ref in the parent sbb-jar.xml:
    <sbb-ref> <sbb-name>http-sbb</sbb-name> <sbb-vendor>Edafa</sbb-vendor> <sbb-version>2.0.0-SNAPSHOT</sbb-version> <sbb-alias>http-sbb-child</sbb-alias> </sbb-ref>
  • this is the child-relation-method in the parent sbb-jar.xml:
    <get-child-relation-method> <sbb-alias-ref>http-sbb-child</sbb-alias-ref> <get-child-relation-method-name> getHttpActorLocalObject </get-child-relation-method-name> <default-priority>0</default-priority> </get-child-relation-method>
  • this is the child-relation-method-declaration in the parent SBB:
    public abstract ChildRelation getHttpActorLocalObject();
  • this is the child creation in parent:
    httpSbbLocalObject=(HttpSbbLocalObject) getHttpActorLocalObject().create();
  • on the above point the exception happened
    "java.lang.ClassCastException: com.edafa.slee.http.sbb.api.HttpSbbLocalObjectImpl cannot be cast to com.edafa.slee.http.sbb.api.HttpSbbLocalObject"

I tried many trials to solve this problem but unfortunately there's no useful result.

Kindly find some useful notes which you must consider:

  • HttpSbbLocalObject is the sbb-local-object of the child SBB
  • this problem happen on runtime not on deployment
  • sometimes the SBB child created successfully by redeploying all the DUs
  • I tried the same DUs successfully on Opencloud-Rhino without any issue
  • I use restcomm-slee-7.2.0-158.76-wildfly-10.1.0.Final

Please I need any useful piece of advice which help me to solve this exception

0

There are 0 answers