maven

NoSuchMethodError using spring framework [duplicate]

不问归期 提交于 2021-02-05 12:17:23
问题 This question already has answers here : How do I fix a NoSuchMethodError? (30 answers) Closed 3 years ago . i'm using spring like application container and I'm getting the following error at runtime: Caused by: java.lang.NoSuchMethodError: org.springframework.http.MediaType.compareTo(Lorg/springframework/http/MediaType;)I at org.springframework.web.servlet.mvc.condition.ProducesRequestCondition.compareMatchingMediaTypes(ProducesRequestCondition.java:273) at org.springframework.web.servlet

NoSuchMethodError using spring framework [duplicate]

故事扮演 提交于 2021-02-05 12:16:21
问题 This question already has answers here : How do I fix a NoSuchMethodError? (30 answers) Closed 3 years ago . i'm using spring like application container and I'm getting the following error at runtime: Caused by: java.lang.NoSuchMethodError: org.springframework.http.MediaType.compareTo(Lorg/springframework/http/MediaType;)I at org.springframework.web.servlet.mvc.condition.ProducesRequestCondition.compareMatchingMediaTypes(ProducesRequestCondition.java:273) at org.springframework.web.servlet

Best way to integrate Spring boot with the Elastic search

随声附和 提交于 2021-02-05 11:33:25
问题 I'm new to Elastic search. We are building a Spring boot application with Elastic search. Currently, we are bound to use Spring Boot 2.1.3.RELEASE but we can use the latest stable Elastic search version. Done some R&D and found below two dependencies to integrate with Elastic search. 1. elasticsearch-rest-high-level-client 2. spring-boot-starter-data-elasticsearch There might be other ways of integrating the Spring boot with Elastic search. Could anyone help with identifying the best way to

Error only with maven: NoClassDefFoundError: feign/codec/Encoder

白昼怎懂夜的黑 提交于 2021-02-05 11:26:27
问题 I created a project in Eclipse with the Maven wizard and edited the pom.xml file to include my dependencies. My project, which uses Open Feign, builds and runs in Eclipse, but I get the following runtime error when I build it at the command line with Maven: Error: Unable to initialize main class edu.mills.cs180a.BookRepositoryImplFeign Caused by: java.lang.NoClassDefFoundError: feign/codec/Encoder Here is my pom.xml file: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http:/

Error only with maven: NoClassDefFoundError: feign/codec/Encoder

别说谁变了你拦得住时间么 提交于 2021-02-05 11:26:10
问题 I created a project in Eclipse with the Maven wizard and edited the pom.xml file to include my dependencies. My project, which uses Open Feign, builds and runs in Eclipse, but I get the following runtime error when I build it at the command line with Maven: Error: Unable to initialize main class edu.mills.cs180a.BookRepositoryImplFeign Caused by: java.lang.NoClassDefFoundError: feign/codec/Encoder Here is my pom.xml file: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http:/

Maven dependency for LDAP library could not be resolved in OSGi

天大地大妈咪最大 提交于 2021-02-05 09:31:09
问题 I am trying to import import org.apache.commons.pool2.impl.GenericObjectPool; import org.apache.commons.pool2.impl.GenericObjectPoolConfig; import org.apache.directory.ldap.client.api.DefaultLdapConnectionFactory; import org.apache.directory.ldap.client.api.LdapConnection; import org.apache.directory.ldap.client.api.LdapConnectionConfig; import org.apache.directory.ldap.client.api.LdapConnectionPool; import org.apache.directory.ldap.client.api.ValidatingPoolableLdapConnectionFactory; import

How to run a maven Project?

扶醉桌前 提交于 2021-02-05 08:29:10
问题 I have created java project called OneReports . How can i shift the entire project to Maven. Once i shifted to maven how can run in command prompt. Currently i have the problem of dependency. So i plan to move the project. Could anyone help me to step by step process. C:\Jars>javac -cp "C:\Program Files\Java\selenium\*.jar";"OneReports.jar";"testng.jar" test\TestngTestSuiteUsingXML.java C:\Jars>java -cp "C:\Program Files\Java\selenium\*.jar";"OneReports.jar";"testng.jar" test

How to run a maven Project?

让人想犯罪 __ 提交于 2021-02-05 08:29:07
问题 I have created java project called OneReports . How can i shift the entire project to Maven. Once i shifted to maven how can run in command prompt. Currently i have the problem of dependency. So i plan to move the project. Could anyone help me to step by step process. C:\Jars>javac -cp "C:\Program Files\Java\selenium\*.jar";"OneReports.jar";"testng.jar" test\TestngTestSuiteUsingXML.java C:\Jars>java -cp "C:\Program Files\Java\selenium\*.jar";"OneReports.jar";"testng.jar" test

Spring mvc @RequestMapping on class level and method level 404 Status

两盒软妹~` 提交于 2021-02-05 08:21:06
问题 I know that there are lot of posts here with the same problem, but none of them seem to help me, so this will probably be a duplicate. Im creating a spring mvc application using Maven, i have only one controller with one method. When i put the request mapping annotation only on the class level the application works fine but when i put it on the class level and the method level and i send a request like this: localhost:8080/myapplication/planification/projet i get 404 error: HTTP Status 404 -

Java - Load a class outside of classpath. What are the options

不打扰是莪最后的温柔 提交于 2021-02-05 07:49:23
问题 I got a Java product which is used by many clients. The product gets added as a jar into the client's (say for example XYZ company who wants to use his product for their needs) code base and works independently. Its a stand alone product and all the client projects depends (maven dependency) on this one product (which again is a couple of java projects bundled as a jar rolled out with a license) Now i am in a situation to make the engine use a class outside of it's class path. It's a client