IntelliJ: cannot resolve smybol in "org.apache.commons.lang3.tuple.ImmutablePair" - intellij-idea

I am working on a web visualisation for a given project (db with genes, proteins, task is to do some nice visualisation with springboot and thymeleaf). The project was provided with all files, yet I am missing some libraries (also leading to some errors in the code ofc).
When trying to import:
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
lang3 gives me a "cannot resolve symbol" error and automatically searching jars on web results in "no jars found".I found the lang3-jar manually and successfully added it to the project library. When importing:
import org.apache.commons.lang3.*;
All errors for tuple.Pair-usage are gone. Yet, usage of ImmutablePair still results in a "cannot resolve symbol" error.
Firstly, I am confused and now unsure, if my knowledge of imports is correct. I learned, if for example you import something.anything.x and something.anything.y, you could also just import something.anything.*; and x and y would be covered.
Secondly, if needed, where do I find the jars I need (I could not find them yet).
Thanks :)

So, I do not know, where this error results in, yet I do know a solution. When adding the library, select "From Maven" and search for Apache lang3 and add it. Resolves the problems.

Related

I get errors serving lit-element with the nollup development server

When serving lit-element components with nollup then I keep getting the following error in the browser console that I am not able to track down:
toast-messages.js:56 Uncaught TypeError: modules[number] is not a function
at create_bindings (toast-messages.js:56)
at toast-messages.js:57
at Object.48 (toast-messages.js:365)
at create_bindings (toast-messages.js:56)
at _require (toast-messages.js:141)
at toast-messages.js:249
at toast-messages.js:251
Can anyone point me in the right direction? (I can share my rollup.config.js if required)
This error means that a module has been requested, but there's no module with the specified id (number) included in the bundle. This can happen for a variety of reasons:
There's a call using require passing an invalid id.
Passing a string or something other than a number into require.
Using a library that was compiled to CommonJS but was not transformed to ESM.
It's likely that you're missing the CommonJS plugin, or if you are, then the CommonJS isn't able to catch the require call and convert it. The latter can happen because of obfuscation in the library code. CommonJS plugins work by using static analysis. It would be very difficult for the plugin to transform the following:
var r = require;
r('my-library-code');
Without executing the code, it would be difficult for static analysis to track this. A best effort attempt can be made, but there will be always a situation where it could fail.
So here's the following steps you should take:
* Confirm that the CommonJS plugin is being used.
* If it is, check the file in node_modules for unusual patterns.
* If there is, file an issue with the CommonJS plugin maintainer and see if it's possible to solve, and if not, you might need to contact the maintainer for the toast-message library.
I do realise I'm posting this very late, but better to answer later than never! To avoid this vague error in the future, in 0.10.2 of Nollup I've added a user friendly error that list some things to check for.
Hope this helps!

404 When Trying to implement Utils in Power BI Custom Visual

I've run into this problem several times when trying to import external libraries to run with a Power BI custom visual, and I'm not really sure what I'm doing wrong. This current attempt is recreating the Card Visual in the latest API, and it's been a painstaking effort that hopefully someone else can help me out with. I can't point at any one reason why this is happening though it appears to be caused by using statements like:
import valueFormatter = powerbi.extensibility.utils.formatting.valueFormatter;
and I get error, in the browser:
Unable to get property 'valueFormatter' of undefined or null reference
visualSandboxMinimal.html (626,17)
when I tried removing these things I instead run into the error:
HTTP404: NOT FOUND - The server has not found anything matching the requested URI (Uniform Resource Identifier).
(XHR)GET - https://app.powerbi.com/13.0.3328.205/visual.js.map;
I can't really resolve either of these errors, to make the project work. The project will build fine and display in the application, but not show any information. Something isn't setup with the API or the project where it just doesn't put the pieces together properly or something. I really don't know and there's so little information out there about this thing, that it's kind of like shouting in the dark at this point.
I am including the whole source project, hopefully so that anyone who can help will be able to, and if anyone wants to take my effort and build their own "Card" like Power BI visual: https://www.dropbox.com/s/9ks8u0v56eph8ul/cardWithConditionalFormatting.zip?dl=0 . This is based on the source available at https://github.com/Microsoft/PowerBI-visuals-core, specifically related to the Card visual.
If anyone figures this out, it would be a huge help to me, though I will continue to do my own research and if I find anything about it I will update the information here.
I figured out what was happening here, I had included the index.d.ts files in the tsconfig.json file, but forgot to include the index.js files in the pbiviz.json file and in some cases forgot to include the css files in the .less file.

IntelliJ IDEA doesn't give hint about package to be imported

Coming from Eclipse world, I really miss this important feature where Eclipse suggests if particular package needs to be imported for compilation error
e.g.
new ArrayList , this simply says Can't resolve symbol
'ArrayList' but doesn't suggest which package to import like eclipse
does.
Is this bug with IDEA or some setting needs to be done in it ?
[Solution]
The problem turns out be bad UX from IDEA
If user does mouse over, it show error message as per above screen shot
If user puts mouse somewhere else; it suggests package to import sometimes. It's not as friendly as Eclipse though
I've posted answer in bottom part of question. IDEA has got confusing & not so user friendly UX which gives hints about package to import.
I find it more useful in Eclipse, hope IDEA team will fix this
https://www.jetbrains.com/help/idea/auto-import.html

"Error Loading USE or USELSX" when trying to import Script Library

I get this error when trying to import a script library from my project.
The Script Library does not use Java and I'm not Turkish. Also, recompiling did not help and it is not LSX.
I even removed the whole code from it and still get the problem. What could be wrong?
Try restarting the Domino Designer.
We have this problem here sometimes and it usually does the trick. It is easy to forget the obvious things sometimes.

K32EnumProcessModules causing "A procedure imported by {dll} could not be loaded"

I have an application which relies on several libraries built by other people in my organization, one of which has stopped working. I get this error in the command-line:
Unhandled Exception: System.IO.FileLoadException: A procedure imported by 'XXX.dll' could not be loaded.
I opened up Dependency Walker to try and track down the source of the problem, although I should say that I am brand-new to Dependency Walker and I don't really know what I'm doing. Here's what I see in the log window:
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Which seems straightforward, except:
Due to my unfamiliarity with DW, I can't seem to find what module this error is actually referring to
The same DLL that ships with old version of the application, which still works, shows the same thing in Dependency Walker
The only difference I can find between the old and new DLL is that KERNEL32.DLL shows up as red in the newer one, and the function K32EnumProcessModules appears as red (not exported). This same function does not appear at all (green or otherwise) for the old DLL.
To summarize so far: one DLL works and the other doesn't; both show up as 'bad' in Dependency Walker, but in only one does the function K32EnumProcessModules appear as no good. I do not know if this function is what is causing the "unresolved import" error and would like to find out.
The only change in the application I have made that I think could've caused this is upgrading the runtime from .NET 2.5 to .NET 4. This upgrade was made for reasons unrelated to this DLL, and should not affect it: the DLL does not make any calls to .NET components higher than 2.5, and other people in my organization using the same library have reported that it works fine with .NET 4.
I realize I'm providing sparse information, mostly because I'm not sure what information will help troubleshoot this problem. Please let me know if there are tests you'd like me to perform to find out more.
Probably releated to this https://blogs.msdn.microsoft.com/vcblog/2009/08/27/windows-sdk-v7-0v7-0a-incompatibility-workaround/
Defining PSAPI_VERSION=1 might help.