Spring Boot project - sometime data disappears from PostgreSQL Database - spring

I have been working with a Startup project from Scratch for around 2 year and this is my first project. The project is quite complex with many business logiсs and have thousands of lines of code.
One of the function of the project is that people can place their items on the map to show them to other people who can collect these items. The owners of these items can edit them by editing the name, description and also change the item location in map. Everything works fine when I test in the development server and in the production server.
But, sometimes, when our client is editing the location of the items in the map, server couldn't save the location at Database and the location list of this item becomes empty (I, myself, can't reproduce this error). I am trying hard to figure out the cause for this issue, unfortunately I could not find the bug.
I have tried these function to save the location of the item,
locationRepository.save()
locationRepository.saveAndFlush()
but all are in vain. From time to time, the error is being shown up and the item's location list becomes empty. Probably it worth noting that there are many lines of code in the location edition function to check item number and their costs and some other necessary checking.
There is not any high load in the server so that server could break down.
Could it be that there is some relation between the Spring Boot version or PostgreSQL version? Or it's a bug in my code which I failed to find.
PostgreSQL version: 10.15 (Ubuntu 10.15-0ubuntu0.18.04.1)
Spring Framework version : 2.1.1.
Java version: openjdk 11.0.10
If you would have any thoughts, ideas, or insights regarding to this issue, please share them.
I would really appreciate your help.

Related

IBM BAW 22 - process portal - display all tasks

I have a very big problem after migrating BPM from version 8.5.5 to BAW 22. I have a saved search on the process portal, which shows me the tasks of all users broken down by process. After migration, this search has stopped working and it only shows me my tasks and the team tasks I belong to. It stopped showing other users tasks. I tried to fix this error in different ways but nothing works. Can anyone help?
Can you provide more specifics on what you have tried so far?
Two things I would suggest:
If search optimization is enabled, check out this link here if you haven't already. You will need to drop the LSW_BPD_INSTANCE_VAR_NAMES and LSW_BPD_INSTANCE_VARS_PIVOT tables and recreate them using the steps mentioned here:
https://www.ibm.com/docs/en/baw/22.x?topic=portal-tuning-process-searches
2)Depending on your Saved Search criteria, it's possible you will need to re-create it. See the red alert section about existing saved searches and migration here:
https://www.ibm.com/docs/en/baw/22.x?topic=windows-restarting-verifying-migration.
It mentions 'earlier versions of Business Automation Workflow' but the same would apply to earlier versions of BPM

CRM update via solution import does not update Quick Find view

We are a Housing Association. We use CRM 2016 SP1. Our Dev and QA environments are single server configuration and staging and production are multiple server config with load balancers. Our custom solutions in QA, staging and production are managed.
We needed to update a "Quick Find Active" view for two of our entities Person and Property with some extra search columns in our staging and production environments.
I added the new columns to those entities' views in Dev environment by going to Settings->Solutions->[custom solution]->Entities->[custom entity]->Views->Quick Find Active [entity]->Add Find Columns. I did the same for both entities.
To deploy the update to other environments as a patch, I exported a standalone solution file that only contained the Person and Property entities with the updated views. I then imported the solution file into the QA environment to test.
Having published the changes in QA after import, I checked the entities' Quick Find Active views in the default solution (Settings->Customization->Customize the system->[custom solution]->Entities->[custom entity]->Views). I noticed that the Property entity was updated with the changes but the Person entity was not. It made no sense.
Having spent some time to search the Internet for an answer to no avail, we decided to try out the patch solution in staging. So we exported the solution file but before publishing the changes we decided to check the update. To our surprise, both entities had been updated. So we did not publish the changes.
Happy with the result and blaming the problem on our QA environment, we decided to go ahead with the deployment to production. We imported the file and check the changes and noticed that this time around the opposite happened to our entities, i.e. The Person entity had been updated but the Property entity had not!
We tried publishing the changes but it made no difference. So at the end we gave up and had to complete the deployment by manually updating the views in production.
I am wondering if anyone else has experienced this oddity. Any help/suggestion is greatly appreciated.
You mention that you are deploying managed solutions, and that your changes are not taking effect. The entities contained in the solution have previously been deployed to the target environments.
If you have previously made any modifications directly to the target environment (which would not seem improbable given that you did so this time), these changes will be in the unmanaged layer, which by default overrides changes in managed solutions:
MSDN says:
Because unmanaged customizations are considered ”above” any managed
solution in terms of conflict resolution, organizations installing an
update to a managed solution may not see their changes applied because
of unmanaged modifications. An option exists to make sure that changes
applied by an update to a managed solution are available.
When you
release an update to a managed solution, the organization installing
the update can select:
To preserve any customizations it has applied on top of your managed solution.
To overwrite any customizations it
has applied on top of your managed solution.
In conclusion: Never make any modifications directly to your target environments if you are using managed solutions. It will cause you issues later.
Thanks to Henrik who replied to my question and put me in the right direction. We managed to resolve this issue. Refer to this page to read the solution.

VS2013 is suddenly not working

I have a MVC5 app using Entity Framework code-first. It has been fine, working for months while I develop it. This morning it worked fine too. Then suddenly I run it for the 10th time of the day, and it won't run. I'm getting a crazy set of errors that aren't consistent.
First off it said it couldn't find mscorlib.pdb. I researched that and downloaded the latest symbols (first place didn't have it, second place did), and now I have the pdb. But I continue to get errors whenever I try to access the DB.
I have seen entityframework.dll and mscorlib.dll mentioned, but very little info is given because it usually just says:
An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll
{Cannot evaluate expression because the current thread is in a stack overflow state.}
I did try to turn on stepping and then I get this file box that is asking me to find files, that I have no idea where they are. The first time, it asked me for enumerable.cs, the second was RType.cs, and the third was IPipelineRuntime.cs. It tries to look in a very obscure folder structure (f:\dd\ndp\clr\src\BCL\System\RtType.cs) but I don't have these files on my machine.
Suddenly none of my projects are working that need EF. I even created a brand new project, with a simple code-first model to try it out and got the same issue.
Please help!
Answer found.
I kept reading on other issues where a lot of people were saying that it was due to someone's own code and not a system issue.
I used the datemodified stamp of the files to determine all the files I had worked on in the few days leading up to the issue.
I went back through and began removing them one by one, and discovered the issue. It was my own recursive code.

Finding the correct SharePoint solution to deploy to eliminate missing features

So this is a bit of a vague question and I apologize but here goes nothing.
I am in the process of creating a SP2013 test farm that is an exact copy of our SP2010 production farm. When I mount the main content db for our main site collection I get a missing feature ID error. Here is the problem I need help with...
The solution that should have this feature is deployed to the farm already, however, as I was not working here when these solutions were made I don't know if I'm deploying the correct .wsp file. There are about 8 revisions so I naturally deployed the latest one.
So...
1. Would feature ID's change from version to version?
2. Is there a way to see which .wsp is deployed to my production farm.
Thanks for any help!
Featuer ID will not change from version to version. you can see installed features from template/feature folder under SharePoint Hive (either 15 or 14 hive based on your sharepoint version).
Hope this helps.

Entity Framework writing to unknown database

I'm fairly new with EF and got myself rather confused about what's going on with my solution.
I'm in the situation where my code appears to be working however the changes aren't being written to the database that I would expect.
I'm using Web Developer 2010 and SQL 2008, code first approach but choosing to make my own changes in the database and manually ensure my classes match correctly.
Things seemed ok until I came across an error where the db hash wasn't what entity framework was expecting, so I looked at modelBuilder.Conventions.Remove(); which wasn't available - it seems that's not around in the later versions. So, I figured if the later versions doesn't do this check, I'll go ahead and remove my reference to EF 4 and put the 4.3 dll in it's place. I think I also ended up deleting and renaming my database. That didn't work, so I followed up on something I found on Scott Gu's blog about naming your dbContext the same as the database, which seemed to help.
However I'm now getting the most bizarre scenario. My code is running, the data is saving, but it's not saving to my database. In fact I'm running a profile trace on the db and it doesn't even seem to be trying to connect. I can change my connection string to something invalid too, but my code will happily run, storing the data #somewhere#
Any ideas what's going on? Might it be using a local database or cache that I'm unaware of? Should I just start my small project again and pretend this never happened? That'd be the professional approach, right?
I would suggest to use Database first approach, if you have your Database set, or want to have maximum control over database.

Resources