correct package to run json with connect? - json

I try to follow the simple connect sample but I got this error class org.glassfish.json.JsonProviderImpl cannot be cast to class javax.json.spi.JsonProvider
Probably problem of version but which one to use
gluon version 4.0.11
<dependency>
<groupId>com.gluonhq</groupId>
<artifactId>connect</artifactId>
<version>1.0.2-b15 </version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<version>2.0.0</version>
<classifier>module</classifier>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.1.4</version>
</dependency>
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>2.0.0</version>
<scope>runtime</scope>
</dependency>

Related

Missing artifact com.epam.reportportal:agent-java-cucumber5:pom:0.0.1

I am getting missing artifact while trying to build the project, please suggest a solution
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>com.epam.reportportal</groupId>
<artifactId>agent-java-cucumber5</artifactId>
<version>0.0.1</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>5.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-spring</artifactId>
<version>5.0.0</version>
</dependency>
That's weird, because it is here, you can download it by a direct link:
http://dl.bintray.com/epam/reportportal/com/epam/reportportal/agent-java-cucumber5/0.0.1/
Anyway I'm going to delete it in a few days. Version 0.0.1 does not work due to a bug, please use the latest one:
https://bintray.com/epam/reportportal/agent-java-cucumber5/5.0.0-RC-1

Integrating Powermock with Mockito - java.lang.NoSuchMethodError

Am truing to integrate Mockito, JUnit and Powermock using following dependencies:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>1.6.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>1.6.4</version>
<scope>test</scope>
</dependency>
While running IT test following error appears:
java.lang.NoSuchMethodError: org.mockito.MockingDetails.getMockCreationSettings()Lorg/mockito/mock/MockCreationSettings;
I have spent long time to figure out proper artifacts versions but after changin it and fixing one error next one appears :(
Your dependencies versions are way too old.
I would suggest to go for the newest 2.x releases:
<properties>
...
<version.mockito>2.23.4</version.mockito>
<version.powermock>2.0.2</version.powermock>
</properties>
<dependencies>
...
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${version.mockito}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>${version.powermock}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito2</artifactId>
<version>${version.powermock}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-core</artifactId>
<version>${version.powermock}</version>
<scope>test</scope>
</dependency>
</dependencies>
This comes from a working project, if you keep getting errors please expand the question including the Java code.

Liquibase 3.6.2 logLevel=debug not honored?

It seems that liquibase 3.6.2 does not honor the debug flag (--logLevel=debug).
I have all the required dependencies and everything works OK but it is in "super-silent" mode.
I can not see on the console which changesets have been executed/applied (which I could in liquibase 3.5.3).
Am I doing something wrong?
Or is it just that liquibase does not work well with slf4j yet?
https://liquibase.jira.com/browse/CORE-2389 - will be fixed in version 4.0.
To the liquibase team: Does that mean that there will be no debug logging on the console untill then?
My classpath/dependencies:
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>3.6.2</version>
</dependency>
<dependency>
<groupId>com.oracle.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>${oracle.ojdbc.version}</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.23</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.2.3</version>
</dependency>

jodd exmple error: Please provide ConnectionProvider implementation

i see the Jodd in 30 minutes and download the example.
but when i run the project, tomcat console
806 [ERROR] j.j.c.DefaultAppCore.start:278 - java.lang.UnsupportedOperationException: Please provide ConnectionProvider implementation.
java.lang.UnsupportedOperationException: Please provide ConnectionProvider implementation.
at jodd.joy.core.DefaultAppCore.createConnectionProvider(DefaultAppCore.java:612)
at jodd.joy.core.DefaultAppCore.startDb(DefaultAppCore.java:562)
at jodd.joy.core.DefaultAppCore.start(DefaultAppCore.java:272)
at jodd.joy.core.DefaultWebApplication.initWebApplication(DefaultWebApplication.java:57)
at jodd.madvoc.Madvoc.start(Madvoc.java:205)
at jodd.madvoc.Madvoc.startNewWebApplication(Madvoc.java:180)
at jodd.madvoc.MadvocContextListener.contextInitialized(MadvocContextListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4738)
i use eclipse maven mysql
i import mysql jdbc and jodd db.
i dont know what is missing or where my mistake?
my pom.xml :
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jodd/jodd-joy -->
<dependency>
<groupId>org.jodd</groupId>
<artifactId>jodd-joy</artifactId>
<version>3.7.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jodd/jodd-bean -->
<dependency>
<groupId>org.jodd</groupId>
<artifactId>jodd-bean</artifactId>
<version>3.7.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jodd/jodd-http -->
<dependency>
<groupId>org.jodd</groupId>
<artifactId>jodd-http</artifactId>
<version>3.7.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.39</version>
</dependency>
</dependencies>
Please try to use Jodd 3.7.0.
For some reason, our implementation was of provider was not bundled with 3.7.1. It will be returned in next version.
Or just take the code from here

static import compile time error in spring-test-mvc

I am writing one test case for testing Spring MVC controllers.
I have defined below entry in pom.xml:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.version>4.1.5.RELEASE</spring.version>
</properties>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
</dependency>
But Eclipse IDE not able to understand below static imports:
import static org.springframework.test.web.server.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.server.result.MockMvcResultMatchers.*;
Can anyone suggest what I missing here
As far as I can see, you are missing the dependency for 'spring-test-mvc'.
You need to add the springsource repository and the following dependency:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test-mvc</artifactId>
<version>1.0.0.M2</version>
<scope>test</scope>
</dependency>