Restcomm ClassCastException during creating SBB child relation - parent-child

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

Related

Container 'x' was not found

Does anybody work with Tosca (module) and has the same error in testcase: Container 'x' was not found?
The attr is already adapted: XPath-> correct; Visible=true; ClassName -> correct.
What should be done, that the tosca can find this container?
thank you
it could be a maintenance error, i.e. certain container does not exist anymore or
you should re-scan new one. I'm using e.g. selector data-tosca instead of xpath

Compiled Jar keeps throwing: Uncaught exception in the SynchronizationContext

I have been trying to make a small application which first scans a HTML for data and then uploads it to my Firestore. I'm now essentially done with it and when starting it from within IntelliJ IDEA it works just fine. However as soon as I export it in to an artifact it starts throwing the following exception when trying to download/upload from/to Firestore!
I should mention that I'm coding in Koltin/JVM as it is way easier. Since there is no Kotlin Firebase-Admin version I'm just using the Java one which shouldn't be a problem since Kotlin compiles down to Java. If I'm wrong about that please correct me!
Nov 27, 2019 6:59:17 PM io.grpc.internal.ManagedChannelImpl$1 uncaughtException
SEVERE: [Channel<1>: (firestore.googleapis.com:443)] Uncaught exception in the SynchronizationContext. Panic!
java.lang.IllegalStateException: Could not find policy 'pick_first'. Make sure its implementation is either registered to LoadBalancerRegistry or included in META-INF/services/io.grpc.LoadBalancerProvider from your jar files.
at io.grpc.internal.AutoConfiguredLoadBalancerFactory$AutoConfiguredLoadBalancer.<init>(AutoConfiguredLoadBalancerFactory.java:97)
at io.grpc.internal.AutoConfiguredLoadBalancerFactory.newLoadBalancer(AutoConfiguredLoadBalancerFactory.java:67)
at io.grpc.internal.ManagedChannelImpl.exitIdleMode(ManagedChannelImpl.java:379)
at io.grpc.internal.ManagedChannelImpl$ChannelTransportProvider$1ExitIdleModeForTransport.run(ManagedChannelImpl.java:473)
at io.grpc.SynchronizationContext.drain(SynchronizationContext.java:95)
at io.grpc.SynchronizationContext.execute(SynchronizationContext.java:127)
at io.grpc.internal.ManagedChannelImpl$ChannelTransportProvider.get(ManagedChannelImpl.java:477)
at io.grpc.internal.ClientCallImpl.startInternal(ClientCallImpl.java:257)
at io.grpc.internal.ClientCallImpl.start(ClientCallImpl.java:190)
at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1.start(CensusTracingModule.java:394)
at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1.start(CensusStatsModule.java:695)
at io.grpc.ForwardingClientCall.start(ForwardingClientCall.java:32)
at com.google.api.gax.grpc.GrpcHeaderInterceptor$1.start(GrpcHeaderInterceptor.java:94)
at com.google.api.gax.grpc.GrpcDirectStreamController.startCommon(GrpcDirectStreamController.java:115)
at com.google.api.gax.grpc.GrpcDirectStreamController.start(GrpcDirectStreamController.java:101)
at com.google.api.gax.grpc.GrpcDirectServerStreamingCallable.call(GrpcDirectServerStreamingCallable.java:68)
at com.google.api.gax.grpc.GrpcServerStreamingRequestParamCallable.call(GrpcServerStreamingRequestParamCallable.java:61)
at com.google.api.gax.grpc.GrpcExceptionServerStreamingCallable.call(GrpcExceptionServerStreamingCallable.java:59)
at com.google.api.gax.rpc.WatchdogServerStreamingCallable.call(WatchdogServerStreamingCallable.java:69)
at com.google.api.gax.rpc.ServerStreamingCallable$1.call(ServerStreamingCallable.java:237)
at com.google.api.gax.rpc.ServerStreamingAttemptCallable.call(ServerStreamingAttemptCallable.java:230)
at com.google.api.gax.rpc.ServerStreamingAttemptCallable.start(ServerStreamingAttemptCallable.java:193)
at com.google.api.gax.rpc.RetryingServerStreamingCallable.call(RetryingServerStreamingCallable.java:87)
at com.google.api.gax.tracing.TracedServerStreamingCallable.call(TracedServerStreamingCallable.java:76)
at com.google.api.gax.rpc.ServerStreamingCallable$1.call(ServerStreamingCallable.java:237)
at com.google.api.gax.rpc.ServerStreamingCallable.serverStreamingCall(ServerStreamingCallable.java:166)
at com.google.api.gax.rpc.ServerStreamingCallable.serverStreamingCall(ServerStreamingCallable.java:178)
at com.google.cloud.firestore.FirestoreImpl.streamRequest(FirestoreImpl.java:474)
at com.google.cloud.firestore.FirestoreImpl.getAll(FirestoreImpl.java:243)
at com.google.cloud.firestore.FirestoreImpl.getAll(FirestoreImpl.java:253)
at com.google.cloud.firestore.FirestoreImpl.getAll(FirestoreImpl.java:143)
at com.google.cloud.firestore.DocumentReference.get(DocumentReference.java:354)
at FirebaseHandler.getLehrer(FirebaseHandler.kt:95)
at HtmReader.readFile(HtmReader.kt:12)
at MainView.theStuff(MainView.kt:61)
at MainView.onDock(MainView.kt:44)
at tornadofx.UIComponent.callOnDock$tornadofx(Component.kt:700)
at tornadofx.UIComponent$rootSceneWindowShowingPropertyChangeListener$1.changed(Component.kt:556)
at tornadofx.UIComponent$rootSceneWindowShowingPropertyChangeListener$1.changed(Component.kt:327)
at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:182)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
at javafx.beans.property.ReadOnlyBooleanPropertyBase.fireValueChangedEvent(ReadOnlyBooleanPropertyBase.java:72)
at javafx.beans.property.ReadOnlyBooleanWrapper.fireValueChangedEvent(ReadOnlyBooleanWrapper.java:103)
at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:144)
at javafx.stage.Window.setShowing(Window.java:922)
at javafx.stage.Window.show(Window.java:937)
at javafx.stage.Stage.show(Stage.java:259)
at tornadofx.App.start(App.kt:101)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
at java.lang.Thread.run(Thread.java:748)
My code which (in this case) downloads stuff is as following:
fun getLehrer(): HashMap<String, Any> {
[...]
val out = HashMap<String, Any>()
try {
val future = firestore.collection("stuff").document("lehrer").get()
future.await()
if (future.isDone) {
[...]
}
} catch (ex: Exception) {
println(" ++ cant get lehrer liste")
}
[...]
}
The error occurs at this line:
val future = firestore.collection("stuff").document("lehrer").get()
I have been trying to fix this for days now and literally spend hours googeling and trying different things but nothing has worked for me so far!
I tried:
randomly adding a LoadBalancer since I wasn't able to find any viable docs
adding the loadbalancer to my META-INF/services
I also found something that seemed similar here (https://github.com/grpc/grpc-java/issues/5493) but it talks about a load of stuff I don't use and frankly don't understand
FYI: Weirdly my icon from my resource folder turns into a completely different one in the Jar. Don't ask me why. I couldn't find an answer to that as well, but it isn't such a big issue since I can just replace that in the jar.
Oh and also this is my first question so if I made any mistakes I'm sorry! I probably made some spelling errors as well which I apologize for.
Any help would be greatly appreciated!
Hey so after googling some more I found some an article listing code snipets from LoadBalancerRegistry (https://www.codota.com/code/java/classes/io.grpc.LoadBalancerRegistry) and I scrolled around in it and found this: PickFirstBalancerFactory.init()
So i decided to look for this Factory but couldn't find it, instead I found PickFirstLoadBalancerProvider(). Remembering from randomly going through the autocomplete that in order to register something to LoadBalancerRegistry one would need a Provider.
Long story short I set them both together and added the following to the init section of my class and it works fine now!
LoadBalancerRegistry.getDefaultRegistry().register(PickFirstLoadBalancerProvider())
Thought I should answer if anyone has the same issue!
FYI: The icon still changes to that weird one. I don't know why or how thats even possible but it works if I replace it in the .jar so I don't really care xD

Copy value from child case to Parent case,there was an error

Actually i want to copy values from child case to Parent Case, i have add smart shape called "Update Case",But there was an error during the sub case process,
"com.pega.pegarules.pub.generator.UnresolvedAssemblyError: Failed to find instance CTC-FW-CeylonTrFW-Work-VehiclePolicy.UpdateParentCase",
parent case is : CTC-FW-CeylonTrFW-Work-VehiclePolicy
Child Case is : CTC-FW-CeylonTrFW-Work-AssessVehicle
Here Attached with screen shoots
Could you please help me to solve this issueenter image description here
The error is very clear.
Your UpdateParentCase should be present in parent class CTC-FW-CeylonTrFW-Work-VehiclePolicy.

ARM Templates: depends on -- do you refer to the linked "Microsoft.Resources/deployments" or the resources created within it?

I have a parent ARM Template (eg: myapp.assembly.json) that invokes linked child ARM Templates (web.serverFarm.json, web.site.json, etc.)
Currently I have defined the relationship between linked child templates by putting dependsOn
in the parent ARM template
referencing the name of the linked Microsoft.Resources/deployments (and not the names of resources created within the linked resource template).
I was expecting:
any Microsoft.Resources/deployments that had a dependsOn defined for another Microsoft.Resources/deployments would wait till all those resources are created.
What I think I am observing is:
the first time the ARM template is run, it reports that the deployment fails ...looking for dependencies...
but continues working...so can't redeploy immediately...
the second time, the resources are built, and the deployment completes.
It's entirely possible I'm missing a dependsOn -- although I've really looked and don't think so -- or the dependsOn is not being honored in the way I would have expected.
Any advice would be appreciated.
Thanks.
Agh!
Thank you # 4c74356b41 and #bmoore-msft ... you were absolutely correct (it was right in front of my nose for an embarrassing amount of days :-( )
I must have copy/pasted from the child resource template to the parent assembly template.
"webSiteConfigAppSettingsApplicationInsightsInstrumentationKey": {
// FIX: Rely on the template instead of direct:"value": "[reference(resourceId('Microsoft.Insights/components', variables('insights').components.resourceName), '2015-05-01').InstrumentationKey]"
"value": "[reference(variables('insights').components.armTemplateId).outputs.instrumentationKey.value]"
}
ie:
I needed to reference the template and it's output.
Not the resource created within the template...which the parent template could not see.
All works smooth as butter now.

Exception thrown on formSingleSelect macro freemarker.

I have this spring macro
[#spring.formSingleSelect path="discoveryProjectDetailsBean.discoveryProjectBean.dataSource" options="dataSources" /]
it throws exception
freemarker.template.TemplateException: Expected collection or sequence. options evaluated instead to freemarker.template.SimpleScalar on line 227, column 20 in spring.ftl.
at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:135)
this happens because it cannot interpret the dataSource list as sequence.
any help
now I never found harder question that this, this exception above happened as the dataSource list I was trying to set as options list wasn't pure string list. all the options list to be passed to the #spring.formSingleSelect I also found another reference here
with a case just like mine code snippet of the working tag I am using now is below.
[#spring.bind "dataSources"/]
[#spring.formSingleSelect "discoveryProjectDetailsBean.discoveryProjectBean.dataSource" dataSources "disabled='disabled' multiple='multiple' class='singleList' onchange='checkValidations()'" /]
I hope this would help somebody

Resources