Jaeger traces to spring-boot application are not able to capture traces for the DB calls made using spring-data. All other calls like RESTTemplate are able to have the traces captured.
Using springboot version 2.2.2.RELEASE and added below jaeger dependencies,
<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-spring-jaeger-web-starter</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-jdbc</artifactId>
<version>0.2.11</version>
</dependency>
Any additional dependencies are missing here?
Remove your dependencies and use the following one that will include also the instrumentation you need
<dependency>
<groupid>io.opentracing.contrib</groupid>
<artifactid>opentracing-spring-jaeger-cloud-starter</artifactid>
<version>3.2.0</version>
</dependency>
Related
I am working to setup wiremock for springboot rest api and using rest assured and spring-cloud-starter-contract-stub-runner from spring cloud. when i run the sample integration test i encounter module conflict error
check your dependency tree of pom file. The reason for the error is there were two groovy libs in your class path with different versions and this is causing the conflict
One from rest-assured dependency and other from spring-cloud-starter-contract-stub-runner dependency
Solution is to remove rest assured and replace it with restdocs-api-spec-restassured dependency. This way you can use rest assured with out additional groovy dependency
. your class path will only have 1 groovy from spring-cloud-starter-contract-stub-runner dependency
Found this workaround on Rest Assured's GitHub page. You replace Rest Assured's dependency with this one
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>5.1.1</version>
<scope>test</scope>
<exclusions><!-- https://www.baeldung.com/maven-version-collision -->
<exclusion>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-xml</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>json-schema-validator</artifactId>
<version>5.1.1</version>
<scope>test</scope>
</dependency>
Rest Assured's Github Page
1 just manually remove rest-assured dependency from POM file.
2 add to the pom file
<dependency>
<groupId>com.epages</groupId>
<artifactId>restdocs-api-spec-restassured</artifactId>
<version>0.10.4</version>
</dependency>
3 Maven clean
4 Maven Compile
5 Maven - Reload(refresh)
I'd like to use #Join annotation in a joinFaces project.
If it's possible, what the steps to configure and use it?
I'm using joinFaces 3.2.4 with rewrite-spring-boot-starter.
Actually i found very very beautiful solution on this link By JSF itself
page-redirect
hopefully be useful
https://www.codenotfound.com/jsf-welcome-page-redirect-example-spring-boot.html
I sent alot of time on it with no hope with Spring boot, But if you want
you need to add this dependencies
<dependency>
<groupId>org.ocpsoft.rewrite</groupId>
<artifactId>rewrite-servlet</artifactId>
<version>3.4.2.Final</version>
</dependency>
<dependency>
<groupId>org.ocpsoft.rewrite</groupId>
<artifactId>rewrite-integration-faces</artifactId>
<version>3.4.2.Final</version>
</dependency>
<dependency>
<groupId>org.ocpsoft.rewrite</groupId>
<artifactId>rewrite-config-prettyfaces</artifactId>
<version>3.4.2.Final</version>
</dependency>
I built an application using spring cron jobs using boot and is working fine.
But I want to create a jar that will be executed via command line to execute my cron jobs.
I don't want to use spring boot and xml.
I searched ,but found nothing
How can I do this? I am not getting from where I should start
You can have fun and add all hierarchy dependencies from parent and all children depencies:
https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-batch/1.4.0.RELEASE
<!-- Spring Batch -->
<dependency>
<groupId>org.springframework.batch</groupId>
<artifactId>spring-batch-core</artifactId>
<version>3.0.7.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.3.2.RELEASE</version>
</dependency>
...
It was long and not funny job to get juste the necessary dependencies.
When using embedded jetty and started via
mvn jetty:run
The following exception is thrown:
Exception in thread "main" java.util.ServiceConfigurationError:
org.apache.juli.logging.Log: Provider org.eclipse.jetty.apache.jsp.JuliLog not a subtype
Here is the pom.xml snippets:
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.orbit</groupId>
<artifactId>javax.servlet</artifactId>
<version>3.0.0.v201112011016</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.3.7.v20160115</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-websocket</artifactId>
<version>8.1.19.v20160209</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<version>8.1.19.v20160209</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.6</version>
</dependency>
Any pointers to a correctly configured embedded jetty (preferably also using websockets) appreciated.
Don't try to enable everything all at once.
Jetty is a highly modular system, you can pick and choose what you want to run. Nothing is mandatory by default, even the Server!
If you want examples of embedded jetty with websockets, consider reviewing the example projects that the Jetty project has put together at ...
https://github.com/jetty-project/embedded-websocket-echo-examples
Some advice:
Build up your requirements layer by layer
Start with basic websocket endpoint functionality (get this working first!)
then add slf4j + logback. (be sure you use an appropriate version, see the <scope>optional</scope> dependencies present in your previous layer before you choose a version of slf4j or logback). Test this like there is no tommorrow.
then add jsp support (as your error seems to indicate your desire for jsp support)
I want to use both the dependencies in pom.xml as below;
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
<version>1.0.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId>
<version>1.0.1.RELEASE</version>
</dependency>
Elastisearch is working fine, but mongo is not working.
Which versions are compatible?
Thanks.
I just followed the below link for version compatibility;
http://search.maven.org/#artifactdetails%7Corg.springframework.data%7Cspring-data-releasetrain%7CDijkstra-RELEASE%7Cpom
It is working fine