VS Code java gradle import failing - visual-studio

I have java gradle project which running in IDEA but vs code cant import it. Vs code still write that he cannot resolve dependencies even if i run build through vs code gradle extension and this build passed sucessfully, so vs code really should see dependecies. I have java plugin of course. This is definitely vs code problem, cause like i said project works perfectly in idea.
I tried clean cashes and reimporting several times. i have all plugins i need, where is difference between vs code and idea, why idea can import it?
there is little of my logs in vs code:
!ENTRY org.eclipse.jdt.ls.core 4 0 2023-01-26 20:36:40.800
!MESSAGE Error occured while building workspace. Details:
message: Unresolved dependency: org.springframework.boot spring-boot-starter-data-jpa; code: 0; resource: C:/Users/lepicm/Desktop/SDP_Grappa!/support-demand-processing/build.gradle;
message: Unresolved dependency: org.springframework.boot spring-boot-starter-web; code: 0; resource: C:/Users/lepicm/Desktop/SDP_Grappa!/support-demand-processing/build.gradle;
message: Unresolved dependency: org.springframework.boot spring-boot-starter-amqp; code: 0; resource: C:/Users/lepicm/Desktop/SDP_Grappa!/support-demand-processing/build.gradle;
Please help, i am really confused from this problem... :(

Related

mlUnittest is throwing error in MarkLogic

Mlunittest is throwing error while running as a gradle comment and I am getting below error
Local message: failed to read resource at resources/marklogic-unit-test: Internal Server Error. Server Message: RESTAPI-INVALIDREQ: (err:FOER0000) Invalid request: reason: Extension marklogic-unit-test or a dependency does not exist: XDMP-MODNOTFOUND: (err:XQST0059) Module /marklogic.rest.resource/marklogic-unit-test/assets/resource.xqy not found
I am using:
MarkLogic 9.0-12 version
Gradle 4.3.1
DHF 4.3.2
This error message suggests that the marklogic-unit-test libraries are not being loaded into the modules database correctly. If you're using ml-gradle to manage your modules you may want to double check your build.gradle file, specifically that marklogic-unit-test is configured as a dependency:
dependencies {
mlBundle "com.marklogic:marklogic-unit-test-modules:1.0.0"
}
You can check out a similar issue that was filed with the marklogic-unit-test and how it was resolved here: https://github.com/marklogic-community/marklogic-unit-test/issues/86
For a more complete example of a build.gradle file that imports marklogic-unit-test into a project check out the marklogic-unit-test project at https://github.com/marklogic-community/marklogic-unit-test#start-using-marklogic-unit-test.

How do you resolve a 'java.lang.NoClassDefFoundError' when importing libraries in Kscript?

I'm new to Kotlin scripting, and I'm trying to use Kscript to import libraries. I've been following the tutorials, and trying a very simple script (below) that imports a couple libraries. When I go to run the script, I get the below error (this error happens with any import I try to do). The script runs fine when I remove the imports. Any ideas on how I can fix the imports in my code?
Error message:
[kscript] Resolving dependencies...
[kscript] Resolving org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2...Exception in thread "main" java.lang.NoClassDefFoundError: org/ietf/jgss/GSSException
My code:
#!/usr/bin/env kscript
#file:MavenRepository("central", "https://repo.maven.apache.org/maven2/")
#file:DependsOn("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2")
#file:DependsOn("org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.2")
import kotlinx.coroutines.*
println("Script is running with ${args.size} args passed")
for(arg in args) {
println("arg: $arg")
}
This script fails when you use jdk 9+ and causes the NoClassDefFoundError for org/ietf/jgss/GSSException on Kotlin 1.3.x.
As a workaround use jdk 1.8.
Future fix refer this Dependencies are working only with jdk8

Maven Project Library Not Found

I have maven project where i am adding the dependencies which are not resolvable as below.
My servlet is as follows:
LocaleUtil is getting resolve but its sub packages are throwing error when including.
I have tried invalidate cache and restart. But this didn't work for me.
Thanks,
The packages you are trying to import are internal, non-exported packages of the bundle com.adobe.granite.i18n. In fact, that bundle only exports the following packages:
Export-Package
com.adobe.granite.i18n {version=1.0, imported-as=[1.0.0,1.1)}
com.day.cq.i18n {version=5.4.0}
You should not attempt to use private packages of a library. Limit yourself to using only the exported API.

Hyperlegder Shim-client-1.0 Jar missing on complilation

Am trying to work with the Hyperlegder Java SDK but am unable to locate the Shim-client jar. See error below.
Information:java: Errors occurred while compiling module 'maven'
Information:javac 1.8.0_74 was used to compile java sources
Information:Module "maven" was fully rebuilt due to project configuration/dependencies changes
Information:16/07/2017, 3:08 PM - Compilation completed with 34 errors and 0 warnings in 14s 362ms
/Java/src/main/java/ZoneSDKInterface.java
Error:(11, 35) java: package org.hyperledger.fabric.shim does not exist
Error:(12, 35) java: package org.hyperledger.fabric.shim does not exist
All the sources i see online require me to download the source from a missing Git repo -≥ https://github.com/hyperledger/fabric/core/chaincode/shim/java
Edit: The source URL is https://github.com/hyperledger/fabric/tree/release/core/chaincode/shim/java
Was able to download the repo and gradle build to get the JAR file.
use bellow dependency
<dependency>
<groupId>me.reactiv.fabric-java-sdk</groupId>
<artifactId>fabric-java-sdk</artifactId>
<version>0.6.6</version>
</dependency>

Package org.springframework.aop.framework does not exist

I have installed grails and am trying to compile with the default version of cache:1.1.6 and I'm getting these errors within the plugin code.
Can any one help me with which dependency is broken in the repository - I havent even used the cache yet - just defined it in BuildConfig.groovy
I understand "By default, Grails will not only get the JARs and plugins that you declare, but it will also get their transitive dependencies" so why would I have to declare the dependencies?
Compilation error: startup failed:
Compile error during compilation with javac.
D:\Users\ve\.grails\2.4.0\projects\demo\plugins\cache-1.1.6\src\java\grails\plugin\cache\CustomCacheKeyGenerator.java:18: error: package org.springframework.aop.framework does not exist
import org.springframework.aop.framework.AopProxyUtils;
^
D:\Users\ve\.grails\2.4.0\projects\demo\plugins\cache-1.1.6\src\java\grails\plugin\cache\web\PageInfo.java:43: error: package org.springframework.aop does not exist
import org.springframework.aop.PointcutAdvisor;
^
D:\Users\ve\.grails\2.4.0\projects\demo\plugins\cache-1.1.6\src\java\grails\plugin\cache\web\PageInfo.java:44: error: package org.springframework.aop does not exist
import org.springframework.aop.TargetSource;
Odd this is with a new Grails application? It sounds like it could be a corrupt Maven cache issue. Try doing:
$ rm -rf ~/.m2/repository
Otherwise, to declare the dependency explicitly edit BuildConfig and add:
compile 'org.springframework:spring-aop:4.0.5.RELEASE'
To your dependencies block.

Resources