Error: Could not find or load main class org.grails.cli.GrailsCli - grails

I'm trying to start a Grails 4 application in Intellij, the project is configured with Java 8 and Gradle seems to be loaded correctly, but it gives me the following error:
error: Could not find or load main class org.grails.cli.GrailsCli
Is there any know method in which I can get around this problem?

First, check if the language level and SDK are correct (File > Project Structure > (Project/Modules) > Language Level)
From 360learntocode' blog post:
This might be due to the removal of some dependencies or libraries
from the application. Sometimes, while loading multiple applications
from IDE while downloading the library for a particular project other
libraries for another project might remove so this kind of error might
occurs for that project.
Let's first delete the build folder under the application.
Now, let's refresh the Gradle project. Here we are using IntelliJ
Idea, we can refresh the project as below
Image description:
Click Gradle on the right tab;
Select the project;
Click refresh.
After refreshing the project it will download the missing
dependencies. Then run the application which will resolve the problem.
We can also try cleaning the application.
If we are using the command line then type the following command to
clean the application.
grails clean
If we are using the IntelliJ idea then Ctr+Alt+G opens the command
window and use the following command.
clean
Now, re-run the app.

Related

compileKotlinIos FAILED - Could not find stdlib

I am trying to compile kotlin multiplatform, which contains iOS target.
I tried different examples over github, but most of them are outdated and don't work, probably because of incompatibility with current tools. Thing, that seems most reasonable is creating Mobile Android/iOS | Gradle or Mobile Shared Library | Gradle project using IntelliJ Idea.
When I create brand new project, I am still getting same error:
> Task :app:compileKotlinIos FAILED
e: Could not find "stdlib" in [~/git/iosandroidtest, ~/.konan/klib, ~/.konan/kotlin-native-macos-1.3.61/klib/common, ~/.konan/kotlin-native-macos-1.3.61/klib/platform/ios_x64].
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileKotlinIos'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
I am using kotlin 1.3.61, xcode 11.3. Any ideas?
Edit:
I pushed empty project (without any changes from me) to github:
https://github.com/hovi/iostest
I think you just ran into a bug with partial archive download.
Per the author there, "I got a snapshot of the .konan directory. It's interesting as it looks like part of the runtime download is there, but some parts are missing. Specifically in this case the common folder in klib, but also the licenses folder.
I was able to repro this locally by killing the build process while the archive is being extracted. For reference, see NativeCompilerDownloader. It looks to see if the folder is there. If not, it'll download and extract. If yes, the build process assumes everything is OK. ... Their local build will certainly be broken from then on until they clean and rebuild ~.konan." I suggest you report your issue there as well. (btw - tried your project in IJ and AS (as well as creating new lib project in IJ), didn't have any issues. Somehow your bad luck with an interrupted download (:))
Link to GitHub issue

Fortify unable to load build session with ID when scanning iOS project

When scanning iOS project using Fortify, we are facing "unable to load build session with ID" issue.
What I did was, I opened the project by pointing to the folder of the source code. Then this error happened.
I am facing the same error while building a project written in C++. I am using VS 2017 and Fortify is throwing this error while running Analyze solution on .sln file.
Maybe this is occurring because of trying to translate and run -show-build-warnings in one command.
-show-build-warnings is a separate step, and will only work after translation, so try your command without that switch.
If it completes successfully, then you can run from VS dev cmdprompt sourceanalyzer -b -show-build-warnings to check for warnings.
You can check 'not show warning as errors' and reduce warning level to W3 and then build the solution in debug mode.
I resolved this by first doing the equivalent of a "make clean". If there are already executables there, sourceanalyzer make -s will no op and Fortify will not be able to work with them.

Realm doesn't load libwrappers.so

I try to use Realm database(version 0.74.1) in Xamarin.Android project. When I do build all is ok, but when I try to run project i get error
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task BuildApk: /{SolutionPath} /packages/Realm.0.74.1/lib/MonoAndroid44/arm64-v8a/libwrappers.so.
what I can do in this situation?
The APK is not built during the default build phase so you only get verification that libraries are in the right place when you run the debugger, or explicitly build an APK.
Can you check if the libwrappers.so file is actually in that location in the packages directory? It should have been put there by NuGet.
Also, is there just one Android target in the solution or have you created a PCL and Android target. The NuGet needs installing into both.

Unable to compile / run run book-examples in eclipse

I am trying to run sample code "MyHierarchicalUI" from section 4.2 from "book of vaadin" and this code refers to TreeExample and TableExample classes which can be found at
http://dev.vaadin.com/svn/doc/book-examples/
I downloaded the book example code from mentioned svn link and imported it as existing eclipse project,however when I try to compile / run this project in eclipse I get the following error.
Errors occurred during the build.
Errors running builder 'Integrated External Tool Builder' on project 'book-examples'.
The file does not exist for the external tool named Copy sources.
The file does not exist for the external tool named Copy sources.
book-examples project is not valid vaadin project so can not be imported directly, we can not build it directly as vaadin project due to missing artifacts like ivy.xml and ivysettings.xml.
To use any code from book-examples project you will have to bring the code to your project manually (copy/paste), however a support ticker to make book-example project import-able / build-able and run-able has been created and can be tracked using this link Ticket # 13078.

Ubuntu:NetBeans:OpenCV:Shared library not found

I am using OpenCV 2.3.1 with C++ on NetBeans 7.1 on Ubuntu 11.04 (Gnome). When I add the call
cvCreateSubdivDelaunay2D
and try to run the program in Debug mode I get the error message
/home/peter/NetBeansProjects/ArtifactImgFromCellFile/dist/Debug/GNU-Linux-x86/artifactimgfromcellfile: error while loading shared libraries: libopencv_calib3d.so.2.3: cannot open shared object file: No such file or directory
This despite the fact that I have libopencv_calib3d.so.2.3 in
/home/peter/OpenCV-2.3.1/lib
On NetBeans I went to
Properties:Linker:Run Time Search Directories
and added
/home/peter/OpenCV-2.3.1/lib
but that did not fix the problem.
Any assistance would be greatly appreciated,
Peter
In Netbeans you explicitly also need to link the library as follows.
Right click the project and open properties.
Go to Build -> Linker
Go to Libraries -> Add library file.
Browse to where your library is, i.e. the .so file. In your case it should be at /home/peter/OpenCV-2.3.1/lib/libopencv_calib3d.so

Resources