Intellij interpreter is not finding entries in pom-declared jar although its browser successfully resolves - maven

The following is an entry from the spark-2.0.0-SNAPSHOT/core pom.xml :
<dependency>
<groupId>net.razorvine</groupId>
<artifactId>pyrolite</artifactId>
<version>4.12</version>
<exclusions>
<exclusion>
<groupId>net.razorvine</groupId>
<artifactId>serpent</artifactId>
</exclusion>
</exclusions>
</dependency>
Note that ( a) this builds fine on the command line and (b) I made an update to the lastest version (4.9 -> 4.12)
The issue is the interpreter for some reason is not finding these entries : as shown in red below right. The browser is having no issue to find them (below left):
So .. any ideas what might be happening?

Related

Why does adding hibernate-validator-annotation-processor dependency result in "AssertionError: Couldn't find ... java.time.chrono.HijrahDate"?

So after applying various Java Hibernate Validator dependencies via Maven in IntelliJ, I get the following error whenever I attempt to run the program:
I have the following dependencies related to Hibernate:
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.2.3.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator-cdi</artifactId>
<version>6.2.3.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator-annotation-processor</artifactId>
<version>6.2.3.Final</version>
</dependency>
I discovered that by removing the last one (hibernate-validator-annotation-processor), the problem goes away; I can run the program (but I lose any functionality that the annotation-processor package provides). Adding it back reproduces the error perfectly every time. I've never even heard or seen of 'HijrahDate' before and Googling this error yields surprisingly few clues, if any, on how to solve this error. Any ideas on how to fix this? Any help is appreciated!
I had this error and I fixed it by using another person's suggestion, that being adding this dependency.
<dependency>
<groupId>com.github.seratch</groupId>
<artifactId>java-time-backport</artifactId>
<version>1.0.0</version>
</dependency>

How does spring boot check for classes that don't exist on the classpath using conditionalonclass annotation?

Somewhere it is mentioned that asm is used behind the scenes. If anyone can point me where it is done in the framework or an example would be greatly appreciated.
Imagine the following case
dependencyA contains dependencyB
and your POM looks like the following
<dependency>
<groupId>com.company.name</groupId>
<artifactId>dependencyA</artifactId>
<version>1.1.1</version>
<exclusions>
<exclusion>
<groupId>com.company.name</groupId>
<artifactId>dependencyB</artifactId>
</exclusion>
</exclusions>
</dependency>
so you added dependencyA excluding dependencyB to your project in the other word the dependencyB is not in your classPath --> so if you used #ConditionOnClass(com.company.name.dependencyB.myService.class) it wont execute the code

Perfomance Test and API test are not working together in same framework

#ptrthomas - I am able to perform API test and performance test separate in karate. But when I try to merge both in same framework, either of them stopped working.
Reason that I can see here - karate-core is sub dependency of both karate-junit4 and karate-apache. But both of them install different version of karate-core. Hence either have to exclude one of them. But wherever you exclude it, it will stop working. If you exclude it from karate-junit4 then API test will not work, if you exclude it from karate-apache or gatling, performance will not work.
Is there any common version for dependencies for both performance and API test (which run through junit) or any github location where someone might have integrated both in one project?
Below are the version that I am using -
UTF-8 1.8 3.6.0 0.9.0.RC3 2.2.4
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-junit4</artifactId>
<version>0.2.7</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-core</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-apache</artifactId>
<version>${karate.version}</version>
</dependency>
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-gatling</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
</dependency>
Can someone please help here?
Just use this sample project: https://github.com/ptrthomas/karate-gatling-demo
This has the right dependencies set as a simple, stand-alone project and many teams have used and validated it.
If you are still facing issues, please follow the instructions here: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue

Ratpack 1.5.4 hystrix dependency cannot be resolved

I cannot compile my project that uses Ratpack 1.5.4 because there is a missing dependency to Hystrix 1.5.13 which cannot be resolved.
http://search.maven.org/#search%7Cga%7C1%7Cg%3A"com.netflix.hystrix"%20AND%20v%3A"1.5.13"
What is wrong here?
You can try excluding com.netflix:hystrix-core:1.5.13 from io.ratpack:ratpack-hystrix:1.5.4 and then you can add com.netflix:hystrix-core:1.5.12 directly to your pom.xml file, something like that:
<dependencies>
<dependency>
<groupId>io.ratpack</groupId>
<artifactId>ratpack-core</artifactId>
<version>1.5.4</version>
</dependency>
<dependency>
<groupId>io.ratpack</groupId>
<artifactId>ratpack-hystrix</artifactId>
<version>1.5.4</version>
<exclusions>
<exclusion>
<groupId>com.netflix.hystrix</groupId>
<artifactId>hystrix-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.netflix.hystrix</groupId>
<artifactId>hystrix-core</artifactId>
<version>1.5.12</version>
</dependency>
</dependencies>
I've tested this simple Maven Ratpack "Hello, World!" app https://github.com/wololock/ratpack-maven-example
It compiles in Travis without any issue - https://travis-ci.org/wololock/ratpack-maven-example (I have com.netflix:hystrix-core:1.5.13 in my local .m2 repository, so I wanted to use something with a clean local Maven repository like Travis CI)
I don't know if version 1.5.13 got rolled back or something like that. It can be found in MvnRepository.com https://mvnrepository.com/artifact/com.netflix.hystrix/hystrix-core/1.5.13 however it says that 1.5.12 is newer, even though it got released 2 months earlier.

OpenJDK gives error: package org.jboss.weld.context.bound does not exist

I have a web app that compiles fine under Oracle's JDK 7, but gives the following error under OpenJDK 7:
error: package org.jboss.weld.context.bound does not exist
The error refers to a import in my code:
import org.jboss.weld.context.bound.BoundRequestContext;
In my pom.xml, I have the following weld-related dependencies:
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
<version>1.1.8.Final</version>
<exclusions>
<exclusion>
<artifactId>jsr250-api</artifactId>
<groupId>javax.annotation</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-core</artifactId>
<version>1.1.8.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-core</artifactId>
<version>1.1.8.Final</version>
</dependency>
Is there any way to make it compile using OpenJDK?
The problem is not OpenJDK's fault. You would most likely get the same problem with an Oracle badged JDK or a third-party Java compiler ... if you did an equivalent build with the respective compilers.
The problem is most likely caused by an incorrect Maven dependency.
According to GrepCode, that class (org.jboss.weld.context.bound.BoundRequestContext) is defined in "weld-api", "weld-servlet", "weld-se" and "weld-osgi-bundle". Try adding one of those as a dependency.
UPDATE
Judging from this page, "weld-api" is probably the way to go. You might want to read it thoroughly to figure out the recommended set of dependencies.

Resources