Unique Constraint Violation in Camunda - unique-constraint

we are using Camunda, currently version 7.0.0, but right now in the process of upgrading to version 7.3.
We recently had the first real multi-using test with camunda and it was cut short within minutes by a unique constraint violation with a clash being detected on the primary key of act_hi_comment.
Is this a bug of camunda or did we do something wrong?

The com.fasterxml.uuid.impl.TimeBasedGenerator in Version 3.1.0 has a severe multi-threading issue. It uses a global, non-synchronized byte-array for construction of the uuid, so multiple simultaneous calls from different threads will always generate the same id. This problem is easily reproducable.
This issue has been fixed in 3.1.1 and beyond (so camunda 7.3 will most probably not be affected). For our legacy-installations with camunda 7.0.0 we are now using a wrapper around the StringUuidGenerator, which synchronizes the getNextId method.

Related

Can I force WebView2 to load a specific version (older) with CreateCoreWebView2EnvironmentWithOptions?

It seams that in the current WebView2 that is online published by Microsoft is a bug.
Symptoms: We get a crash when the WebView2 window is closed. In fact when ICoreWebView2Controller::Close is called.
We rolled out the program in February. We don't ship any additional runtime, we just include the WebView2Loader.dll into our setup. The implementation calls CreateCoreWebView2EnvironmentWithOptions.
No changes up today. But starting from today a reproducible crash is reported from many customers. Crash dumps show that the Close function of the ICoreWebView2Controller is called.
In detail: We just use CreateCoreWebView2EnvironmentWithOptions and pass a nullptr to the options and to browserexecutable folder. So I let WebView2 to download itself. I only define a user data folder path.
Questions:
Without changing the code! Is it possible to change the runtime that is used? Or to force that an older runtime is used?
If I need to change the code! How can I influence the runtime version that is used?
Edit:
The WebView 2 version used by this customers is:
EmbeddedBrowserWebView.dll 91.00.864.59
If you're using evergreen distribution of the WebView2 Runtime you cannot pick specific versions - you always get the latest.
If you're using fixed version distribution of the WebView2 Runtime you can read more in the previous link of how to obtain copies of the webview2 runtime that don't auto update, how to extract them, and how to update your code to use them. Or if you want to try different fixed version webview2 runtimes without changing your code, you can use the WEBVIEW2_BROWSER_EXECUTABLE_FOLDER environment variable described in the docs for CreateCoreWebView2EnvironmentWithOptions.

Websphere Liberty seems to override System Property TransformerFactory set via jvm.options

I am trying to migrate a legacy app that is using camel/cxf (offers some web services that include transformations) to Websphere Liberty 16.0.0.03 (IBM JRE 1.8). Tests are failing because the app uses extensions functions. I tried to disable secure processing as described here.
This change has no effect. That's why I try to switch to Saxon Implementation globally by setting System Property "javax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl" in jvm.options config file. Again - this does not work.
While debugging I can see, that com.ibm.ws.webcontainer.osgi.mbeans.PluginGenerator$2 is overriding the Property with com.ibm.xtq.xslt.jaxp.compiler.TransformerFactoryImpl during Server start. I can see a method "PluginGenerator.revertTransformerFactoryIfNeccessary" in the stack that seems to trigger the change. Afterwards all FactoryFinder.find() will return the non-Saxon implementation.
Can anyone suggest how to either disable secure-processing successfully
or
a way to successfully set a custom TransformerFactory?
BTW: It seems to me like these 2 are bugs - do I report these as regular PMR?
EDIT: possible workaround
As result of the helpful suggestions I added an '#WebListener' that will sets the System Property within the constructor (setting it in contextInitialized is too late as stylesheets seem to be compiled during application start and thus processing fails tests). I bundle this a "patch-jar" with the legacy app.
The Liberty web container plugin generator will only override the xml transformer factory if the IBM JDK is being used.
While the web container performs plugin generation using the IBM JDK, it will swap to an alternate transformer factory, and then reset to the IBM JDK default of which is com.ibm.xtq.xslt.jaxp.compiler.TransformerFactoryImpl.
I think it is worth opening a PMR here. The PluginGenerator should not assume that it started with the default xml transformer factory, and should instead save off the value of javax.xml.transform.TransformerFactory and then restore it after plugin generation has completed.
Temp workaround:
Since the PluginGenerator only swaps the XML transformer factory if you're running on the IBM JDK, you could change to an alternate JDK until your PMR gets resolved.
I agree that this is a bug. The official route for reporting problems is a PMR, but there is enough here for us to understand the problem and fix it through our beta program. If you want to get an iFix on a released version of the product (rather than waiting for it to come out via the beta program) then you will need to raise a PMR.

Upgraded java library to 1.19.0 and User model return types are all different

I'm using the Java client library for the Directory API from here:
https://developers.google.com/api-client-library/java/apis/admin/directory_v1
The com.google.api.services.admin.directory.model.User model has changed from 1.16 to 1.19.
In the old version I used to be able to do this:
List<UserAddress> userAddressList = user.getAddresses();
for(UserAddress userAddress : userAddressList) {
///
}
But now user.getAddresses is returning an Object. Same deal for getOrganizations, phones, etc... These all return an Object which upon further inspection looks like:
List<ArrayMap<String, String>>
ArrayMap extends GenericJson.
What do I have to do to get at the UserAddress, other then going back to the previous version?
It's a bug (from my point of view) in the latest versions. Use an older one like 1.16, 1.17 or the first 1.18 (latest 1.18 also have the bug).
The same thing happened in the C# client and back in May 2015 a Google developer named Eric Koleda replied:
A change to the backend had the unintended consequence of changing the discovery document for the service, making the addresses field (and others) being marked as type=any. This causes problems for strongly types languages like .NET, as you've found. The team is aware of the issue but it's unclear when a fix will be available.
However the C# client still has this problem, so I would assume the Java client does as well.
Here are a couple of issues I found in Google's issue tracker specifically for this problem in the Java client, but neither has seen any progress yet:
Issue 3645: Broken code generator for Directory API in Java client: User class lacking explicit types
Issue 3730: Latest version of the Directory API client returns Object instead of correct class

wxWidgets 3.0 wxLog:: OnLog and DoLog missing?

From wxWidget 3.0 documentation for wxLog http://docs.wxwidgets.org/3.0/classwx_log.html, it seems that the wxLog class no longer has a OnLog() member, which was in wxWidgets 2.8 (http://docs.wxwidgets.org/2.8/wx_wxlog.html#wxlogonlog). The 3.0 documentation mentions OnLog() once, but there is really no entry for it.
There is a similar issue for wxLog::DoLog()
I was wondering what happened to these functions. I have third party legacy code that still use these two functions. How should I migrate the legacy code with wxLog::OnLog()/DoLog()?
Thanks,
wxLog::OnLog() still exists and probably should be documented, its documentation seems to have been lost during the migration to Doxygen, thanks for noticing this. In any case, you can continue calling it.
DoLog() also still exists but is deprecated and this is actually documented in the change log:
Custom log targets should be updated to override wxLog::DoLogRecord() method  instead of DoLog() or DoLogString() and must be updated if they call the base  class versions of these functions as this won't work any more; please see the  documentation of wxLog for more information.
So while you can still continue using it as well, it will give deprecation warnings and will stop being supported by default in wxWidgets 3.2 and at all in 3.4.

Invalid lock sequence error in an OpenSceneGraph application

I have an application that is built against OpenSceneGraph (2.6.1) and therefore indirectly OpenGL. The application initializes and begins to run, but then I get the following exception "attempt was made to execute an invalid lock sequence" in OpenGL32.dll. When I re-run it, I sometimes get this exception, and sometimes an exception about a "privileged instruction". The call stack looks like it is corrupted, so I can't really tell exactly where the exception is being thrown from. I ran the app quite a bit a couple of days ago and never saw this behavior. Since then I have added an else clause to a couple of ifs, and that is all. My app is a console application, is built with Visual Studio 2008, and it sets OpenScenGraph to SingleThreaded mode. Anybody seen this before? Any debugging tips?
Can you reproduce it with one of the standard examples?
Can you create a minimal app that causes this?
Do you have a machine with a different brand video card you can test it on (eg Nvidia vs. ATI) there are some issues with openscenegraph and bad OpenGL drivers.
Have you tried posting to osg-users#lists.openscenegraph.org
The problem turned out to be our app was picking up an incorrect version of the OpenGL DLL , instead of the one installed in System32.