@manishg
You should only be copying over component nars and not of the core or framework nars. You still want your NiFi running with the newer 1.22. core and framework. None of the component nars should be dependent on a specific core or framework nar version.
So start by only including the nars for the components (processors, controller services and reporting tasks) you use and don't copy any other lib.
of course the best approach is to test your flows in new version and make adjustments where needed so that it works in 1.22. Copying over older component nars will simply provide multiple version of the same components in the list of available components in NiFi. You lose out on component enhancement, bug fixes, and security improvements. Additionally, you are likely to run in to more issue down the road as you upgrade to an even newer version. Is your plan to keep adding more nars with each upgrade (1.10, 1.22, 1.23, etc.)? On startup NiFi loads the flow.json.gz and looks for the component class defined in the flow.json.gz with version defined in flow.json.gz. If it does not find that version AND only finds one other version fo the same component class, NiFi will auto switch to using that available version of the component. As soon as you have multiple versions avialable and noe match what is in flow.json.gz at startup, NiFi will NOT pick a new one and instead instantiate a "ghost" processor on the canvas. So you run more risks by not fixing/updating your dataflows to work in the newer version.
If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.
Thank you,
Matt