How to connect to Mongo using Extent 3.0.0 - extentreports

How to connect to Mongo using extent 3.0.0. I cannot find extent.x there.
My POM is using this:
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>3.0.0</version>
</dependency>
Please note I have tried everything mentioned here: http://extentreports.com/docs/extentx/

Related

Unable to start server when I use Eureka and actuator

I am using Spring boot version 2.2.0.M4. When I am adding dependencies
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
<version>2.1.2.RELEASE</version>
</dependency>
while starting server it fails to start with below mentioned error
APPLICATION FAILED TO START
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.cloud.client.discovery.health.DiscoveryCompositeHealthIndicator.<init>(DiscoveryCompositeHealthIndicator.java:42)
The correct way of working with Spring Cloud projects versioning is using the dependencyManagement plugin and release trains versions rather than passing versions of separate artifacts manually.
You can get a correct pom generated automatically (with all the correct versions) at start.spring.io.
On the date that question was posted, a version of Spring Cloud supporting Spring Boot 2.2.x has not been released yet. The latest Spring Cloud release version available is Greenwich.SR2, that supports Spring Boot 2.1.6.RELEASE.
UPDATE: Spring Cloud Hoxton.M1 that supports Spring Boot 2.2.0.M4 was released on 3rd July 2019. You can now use it and also generate correct build files with this version from start.spring.io.
For the following dependency:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
The Following spring cloud version worked for me.
<properties>
<java.version>11</java.version>
<spring-cloud.version>Hoxton.SR4</spring-cloud.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

WARNING: you seem to not be using the Xerial SQLite driver

I used libs
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>com.j256.ormlite</groupId>
<artifactId>ormlite-core</artifactId>
<version>4.48</version>
</dependency>
<dependency>
<groupId>com.j256.ormlite</groupId>
<artifactId>ormlite-jdbc</artifactId>
<version>4.48</version>
</dependency>
Run a main class shows too many errors:
WARNING: you seem to not be using the Xerial SQLite driver
How to disable it
help me
You can use an older version of sqlite-jdbc to avoid this incompatibility:
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.7.2</version>
</dependency>
Or just add the dependency which got removed in 3.8 versions, therefore causing error:
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.8.10.1</version>
</dependency>
<dependency>
<groupId>org.xerial.thirdparty</groupId>
<artifactId>nestedvm</artifactId>
<version>1.0</version>
</dependency>
OrmLite checks for existence of org.ibex.nestedvm.Interpreter class, which is not present in newer versions of Xerial driver. But you can simply create that class in your project, just empty class with no members to suppress the warning.
UPD: Check was removed though not released yet.

Magnolia could not be started java.lang.NoClassDefFoundError

I am running an magnolia Application using magnolia-blossom.
I have added this dependency jar below :
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-standard-templating-kit</artifactId>
<version>2.7</version>
<type>jar</type>
</dependency>
I am getting the error :
Oops, Magnolia could not be started java.lang.NoClassDefFoundError:info/magnolia/dam/provider/AssetProviderNotFoundException
for which Tomcat server is unable to start.
Can anyone suggest me that how can i resolve this Error.
You're missing Magnolia DAM, use this dependency snippet:
<dependency>
<groupId>info.magnolia.dam</groupId>
<artifactId>magnolia-dam</artifactId>
<version>1.2</version>
</dependency>
I found the version used by STK 2.7 by looking at its POM here https://nexus.magnolia-cms.com/content/repositories/magnolia.public.releases/info/magnolia/standard-templating-kit-parent/2.7/standard-templating-kit-parent-2.7.pom

Issue with downloading Pentaho Kettle jar files from repository

I am trying to download kettle jars from the following repository in Maven:
<repository>
<id>pentaho-rep</id>
<url>http://maven-repository.com/artifact/pentaho-kettle/</url>
</repository>
but get following file format error during maven build:
.m2\repository\pentaho\kettle\kettle-core\5.3.0.0-200\kettle-core-5.3.0.0-200.jar; error in opening zip file
I tried deleting .m2, also tried other kettle versions, etc. but same problem. It is not clear to me if the repository is corrupted, or some other issue. Any suggestions or alternate repo location I can use (that contains kettle 5.2 version and above)? There is not much useful help available on Pentaho site or forum on this. Thanks.
I don't believe we publish our JARs to maven-repository.com. Try our official repository: http://nexus.pentaho.org/content/groups/omni
I have used the below repo. for getting the files.
<repository>
<id>pentaho-releases</id>
<url>http://repository.pentaho.org/artifactory/repo/</url>
</repository>
It may not be the official pentaho repository. But it worked for me. You may check this ref. blog.
Hope it might help you too :)
Thanks, the following worked for me:
<repositories>
<repository>
<id>pentaho-releases</id>
<url>http://repository.pentaho.org/artifactory/repo/</url>
</repository>
</repositories>
<properties>
<pentaho.kettle.version>5.3.0.0-200</pentaho.kettle.version>
</properties>
<dependencies>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-core</artifactId>
<version>${pentaho.kettle.version}</version>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-engine</artifactId>
<version>${pentaho.kettle.version}</version>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-ui-swt</artifactId>
<version>${pentaho.kettle.version}</version>
</dependency>
</dependencies>

HttpServletRequest getPart(") not found

I don't know why it is not working.
I am trying to accept multipart-formdata in my servlet but request.getPart("") is not showing. I am using glassfish 3.1.2 server. Tha framework used is vaadin for developing application. Can any one help me to fix this problem?
Assuming that your concrete problem is indeed that your IDE didn't show the getPart() method on autocomplete, then that can only mean that the project is not configured as a Servlet 3.0 compatible project. That method was namely introduced in Servlet 3.0.
You didn't tell anything about which IDE exactly you're using and your question history doesn't give any clues as well, so let's assume that it's Eclipse which is rather widely used. In that case, you need to configure it at 2 places, provided that you've correctly associated the Dynamic Web Project with a Servlet 3.0 compatible container as Targeted Runtimes in project's properties (otherwise HttpServletRequest and consorts wouldn't have compiled at all):
In the Project Facets section of project's properties, the Dynamic Web Module version must be set to 3.0.
If your IDE has generated a /WEB-INF/web.xml file, then you need to make sure that its <web-app> root declaration also matches Servlet 3.0, otherwise it would still fail during runtime.
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
</web-app>
I had the same problem. Here's what eventually turned out to be the problem for me. I had a dependency on:
<dependency>
<groupId>com.googlecode.jsontoken</groupId>
<artifactId>jsontoken</artifactId>
<version>1.1</version>
</dependency>
And it turned out jsontoken has a dependency on servlet-api 2.5. So what fixed the problem was simply this:
<dependency>
<groupId>com.googlecode.jsontoken</groupId>
<artifactId>jsontoken</artifactId>
<version>1.1</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
This worked for me
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
</dependency>
To those that stumble on this later, if the resolution suggested by BalusC does not resolve the problem for you please check your build path for provided libraries whose runtime does not match the runtime of your server.
For example if your maven pom.xml contains entries that provide java EE libraries like so...
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>javaee-api</artifactId>
<version>5.0-1</version>
<scope>provided</scope>
</dependency>
... they can interfere with what your IDE perceives as the runtime environment, which will be used to provide code completion suggestions.
The easiest way to track the problem is to figure out where the HttpServletRequest class is sourced from.
maven.. pom.xml.. modify this dependency
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>
servlet api 2.5 is not work
I had the same problem, I want to share it with you in case anyone else bumps in the same problem:
In my case I had a j2ee.jar which was automatically downloaded and its version was probably old. It was located under Libraries --> j2ee Runtime Library (stackoverflow doesn't let me add an image so in eclipse - in Project Explorer - expand the project --> Java Resources --> libraries --> J2ee Runtime Library --> j2ee.jar)
I went to the file system where this file was located (you have the location next to the file in eclipse) and replaced it with a newer jar. You can take the jar from here.
Then clean and rebuild the project.
One possible reason, as pointed out in Bjørn's answer, is a conflicting artifact servlet-api (Servlet 2.5 spec).
In my case it was this dependency
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client-appengine</artifactId>
<version>1.30.10</version>
To find out which dependency compiles the conflicting library just build and print the dependency tree with:
mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:tree -Dverbose=true
Part of the output:
Finally exclude the artifact from the dependency
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client-appengine</artifactId>
<version>1.30.10</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
Hi friends I too faced simillar problem and I will tell you what I did.
I'm using eclipse juno and Tomcat 7 server. Make sure you use latest servlet API jar. Tomcat 7 will only support dynamic module version 2.5 not more than that. So use higher Tomcat version or lower dynamic module version then it will work.
One more thing: open your servlet api jar and see whether it contains "Part" you can easily check it.

Resources