Error in creating secret: com.oracle.bmc.model.BmcException: (400, InvalidParameter, false) stage must be one of CURRENT - oracle-cloud-infrastructure

I am trying to create secret using oci java sdk using this: https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/2.8.0/vault/CreateSecretExample.java.html
But getting this error:
Exception in thread "main" com.oracle.bmc.model.BmcException: (400, InvalidParameter, false) stage must be one of CURRENT. (opc-request-id: C4EB9DB09DDA436C8726E9B94C07B503/C6F1D676C4B532C7A5F1CDB1B8FEC023/7AA6550199EE36E59BA85377FF136466)
at com.oracle.bmc.http.internal.ResponseHelper.throwIfNotSuccessful(ResponseHelper.java:140)
at com.oracle.bmc.http.internal.ResponseConversionFunctionFactory$ValidatingParseResponseFunction.apply(ResponseConversionFunctionFactory.java:88)
at com.oracle.bmc.http.internal.ResponseConversionFunctionFactory$ValidatingParseResponseFunction.apply(ResponseConversionFunctionFactory.java:84)
at com.oracle.bmc.vault.internal.http.CreateSecretConverter$1.apply(CreateSecretConverter.java:78)
at com.oracle.bmc.vault.internal.http.CreateSecretConverter$1.apply(CreateSecretConverter.java:62)
at com.oracle.bmc.vault.VaultsClient.lambda$null$6(VaultsClient.java:576)
at com.oracle.bmc.retrier.BmcGenericRetrier.doFunctionCall(BmcGenericRetrier.java:89)
at com.oracle.bmc.retrier.BmcGenericRetrier.lambda$execute$0(BmcGenericRetrier.java:60)
at com.oracle.bmc.waiter.GenericWaiter.execute(GenericWaiter.java:55)
at com.oracle.bmc.retrier.BmcGenericRetrier.execute(BmcGenericRetrier.java:51)
at com.oracle.bmc.vault.VaultsClient.lambda$createSecret$7(VaultsClient.java:568)
at com.oracle.bmc.retrier.BmcGenericRetrier.doFunctionCall(BmcGenericRetrier.java:89)
at com.oracle.bmc.retrier.BmcGenericRetrier.lambda$execute$0(BmcGenericRetrier.java:60)
at com.oracle.bmc.waiter.GenericWaiter.execute(GenericWaiter.java:55)
at com.oracle.bmc.retrier.BmcGenericRetrier.execute(BmcGenericRetrier.java:51)
at com.oracle.bmc.vault.VaultsClient.createSecret(VaultsClient.java:562)
I tried with both stages: SecretContentDetails.Stage.Pending, SecretContentDetails.Stage.Current
But getting same error as above? any idea how to resolve it?

this question is a little old. Have you tried this with a more recent version of the OCI Java SDK? We released version 2.33.0 today. If you are still running into this problem with an updated version,

Related

Error instantiating NS on OSM: "Deploying KDU ... : 'list' object has no attribute 'items'"

When I try to instanciate a magma NS with OSM, I get this error: "Operation: INSTANTIATING.7335d5f9-da8e-4602-ac7f-......., Stage 2/5: deployment of KDUs, VMs and execution environments. Detail: Deploying KDU magma-orc-kdu: 'list' object has no attribute 'items'.
I donĀ“t find the error because I just follow the steps of the video https://www.youtube.com/watch?v=JYEr6tO5bH4 that consists of downloading the packages ("git clone --recurse-submodules -j8 https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git") and uploading the descriptors ("osm nfpkg-create magma_orc_cnf" and "osm nspkg-create magma_orc_ns") but when I try to instantiate the NS the error appears. Also, I have the vim-account created. Maybe the error appears because my k8s-cluster runs 1.21 versions instead of 1.24? Or because my k8s-cluster is running on a external VM on VBox? That would be strange for me because I deployed others scenarios using this configuration with that external k8s-cluster.
Can anyone help me, please?

java.lang.IllegalStateException: The content of this Observable is already released

I am using Spring web flux + Reactive Couchbase 6.0.
After deploying my code, I am getting below two errors off and on.
First Error:
[QueryEndpoint]: Got error while consuming KeepAliveResponse. java.util.concurrent.TimeoutException: null at rx.internal.operators.OnSubscribeTimeoutTimedWithFallback$TimeoutMainSubscriber.onTimeout(OnSubscribeTimeoutTimedWithFallback.java:166)
Second Error:
java.lang.IllegalStateException: The content of this Observable (queryRow.59645c34-2faf-496f-b0b1-5b63b7f88f6b) is already released. Subscribe earlier or tune the CouchbaseEnvironment#autoreleaseAfter() setting.\n\tat com.couchbase.client.core.utils.UnicastAutoReleaseSubject$OnSubscribeAction.call
I have gone through many similar topics but got confused a bit.
I have below questions:
1: Do the above errors indicate the same issue?
2: If I set autoreleaseAfter and query timeout at CouchbaseEnvironment level, would it solve these errors? If yes does it have any performance implications?
3 : I have gone through this https://forums.couchbase.com/t/n1ql-query-with-adhoc-false-query-runs-into-illegalstateexception-the-content-of-this-observable-is-already-released/11004
here # subhashni indicating that it is a bug and have been resolved.
But I am facing these errors in Couchbase 6.0.
Kindly help me out

WindowsError: exception: access violation reading 0x00007FFC00000000

I am running a program that uses Trace32 and when I run the program I error at the tapAccessShiftRaw method in trace32.py (this comes in the trace32 install) and get the error above. I have been looking around at some different posts related to this issues and tried things that are mentioned in posts such as this: Python: WindowsError: exception: access violation reading 0x00000000
or
"WindowsError: exception: access violation..." - ctypes question
But unfortunately none of these solutions seem to help. I'm running this on Windows 10. Any advice on how I can debug this issue would be really appreciated.

Failed to resolve Android.App.Fragment with Link SDK Only enabled

I'm getting compile time error when linker option = "SDK Only" with "Failed to resolve Android.App.Fragment" message. It's all started when I added Google Maps support with FragmentActivity to my MonoDroid application.
With Linker option = "None" everything works just fine except of the fact that .apk became huge (~30mb instead of 7mb when link SDK Only enabled)
Error details:
The "LinkAssemblies" task failed unexpectedly.
Mono.Cecil.ResolutionException: Failed to resolve Android.App.Fragment
at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type)
at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
at Mono.Linker.Steps.MarkStep.Initialize()
at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
I found a lot of similar problems (1, 2, 3) and the only proposed solution was to disable linker which is not the case for my app.
How can I diagnose and fix the issue?
TIA!
Are you referencing Mono.Android.Support.v4 classes everywhere?
I've been struggling with the same issue on and off for a while now. Currently, I have had success in switching to the Alpha channel of Xamarin Updates and using the alpha builds of Xamarin.Android and Xamarin Studio. Running those alphas, I have been able to make release builds with Linking enabled with no issues. Hope that helps!
Eventually GooglePlayServices Xamarin Component has been updated to 12.0.1 and not it could used without any errors even with "SDK Only" linker flag. You can use it right from component store without any bindings pre-compilation.

Strange errors when linking to libmariadb

I'm currently develop an Objective-C library that links to the MariaDB C connector. I believe there is a problem with the library, though.
Every time I execute my code I get very strange errors on the console. The -(id)init method of my library calls mysql_init(NULL) to initialise the library but as soon as I return from -(id)init I get the following errors in the console:
Object 0x10643df70 of class XXX autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
Thing is, there is no multithreaded code being executed and if I run the same - (id)init without the call to mysql_init(NULL) the errors disappear. I believe the libmariadb library is causing these errors to appear. I don't get why though.
Do I need to build it with any special command line switches? Am I calling the right methods? I obviously used the MySQL online documentation as a guide.
Make sure you add this anytime you have a new thread:
#autoreleasepool {
//enter code here
}
Have you tried latest revision from launchpad?
Also try to build libmariadb with -DUNDEF_THREADS_HACK and
CMAKE_USE_PTHREADS:BOOL=OFF)
I was busy with other stuff for a while. I've since updated MariaDB to the latest version and, as far as I can tell, it works fine.