Liquibase 3.6.2 logLevel=debug not honored? - logback

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>

Related

correct package to run json with connect?

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>

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.

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

getting error "ClassNotFoundException" in wicket

i am making an application in Wicket that includes some database queries. This works fine when i try to run it from Tomcat on my local computer. However when try to upload it to the server or i do a mvn package on it, and then i try to run it on the server i get an error "ClassNotFoundException: com.mysql.jdbc.Driver"
I do have a call out to the com.mysql.jdbc.Driver in my code:
Class.forName("com.mysql.jdbc.Driver");
String url1 = "jdbc:mysql://localhost/smart_one";
However that works fine before deploying the project and running from Eclipse.
I have tried using glassFish on the server along with tomcat. I also tried doing a mvn package and deploying it on my localhost and it still give me the same error.
This is my pom.xml file:
<properties>
<wicket.version>6.16.0</wicket.version>
<jetty.version>7.6.13.v20130916</jetty.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- allowed values: R7, 1.0, 1.5, 2.0 or none -->
<wtp.version>none</wtp.version>
</properties>
<dependencies>
<!-- WICKET DEPENDENCIES -->
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-core</artifactId>
<version>${wicket.version}</version>
</dependency>
<!-- OPTIONAL DEPENDENCY
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-extensions</artifactId>
<version>${wicket.version}</version>
</dependency>
-->
<!-- LOGGING DEPENDENCIES - LOG4J -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<!-- JUNIT DEPENDENCY FOR TESTING -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<!-- JETTY DEPENDENCIES FOR TESTING -->
<dependency>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-all-server</artifactId>
<version>${jetty.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-auth-roles</artifactId>
<version>6.16.0</version>
</dependency>
</dependencies>
So i realized that when i deployed the project that i needed to add the jdbc driver in to my dependencies.
here is what i had to add to my pom.xml file under the dependencies:
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>