Cannot Build kafka-connect-jdbc Source Code - java

The mvn install command fails and I am unable to build the kafka-connect-jdbc source code. My intention is to modify the kafka-connect-jdbc source code.
I followed the instructions
https://github.com/confluentinc/kafka-connect-jdbc/issues/456
and
https://github.com/confluentinc/kafka-connect-jdbc/wiki/FAQ
All of which do not solve the problem. Can someone please assist?
Error Message (Snippet)
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project kafka-connect-jdbc: Compilation failure: Compilation failure:
[ERROR] /java/projects/kafka-connect-jdbc/src/main/java/io/confluent/connect/jdbc/dialect/SqlServerDatabaseDialect.java:[19,38] package org.apache.kafka.common.config does not exist
[ERROR] java/projects/kafka-connect-jdbc/src/main/java/io/confluent/connect/jdbc/dialect/SqlServerDatabaseDialect.java:[20,37] package org.apache.kafka.connect.data does not exist
[ERROR] /java/projects/kafka-connect-jdbc/src/main/java/io/confluent/connect/jdbc/dialect/SqlServerDatabaseDialect.java:[21,37] package org.apache.kafka.connect.data does not exist
[ERROR] /java/projects/kafka-connect-jdbc/src/main/java/io/confluent/connect/jdbc/dialect/SqlServerDatabaseDialect.java:[22,37] package org.apache.kafka.connect.data does not exist
[ERROR] /java/projects/kafka-connect-jdbc/src/main/java/io/confluent/connect/jdbc/dialect/SqlServerDatabaseDialect.java:[23,37] package org.apache.kafka.connect.data does not exist
[ERROR] /java/projects/kafka-connect-jdbc/src/main/java/io/confluent/connect/jdbc/dialect/DatabaseDialectProvider.java:[19,38] package org.apache.kafka.common.config does not exist
[ERROR] /java/projects/kafka-connect-jdbc/src/main/java/io/confluent/connect/jdbc/dialect/GenericDatabaseDialect.java:[19,38] package org.apache.kafka.common.config does not exist
[ERROR] /java/projects/kafka-connect-jdbc/src/main/java/io/confluent/connect/jdbc/dialect/GenericDatabaseDialect.java:[20,44] package org.apache.kafka.common.config.types does not exist

Download kafka source libraries into your maven local repo and retry it should work.

The master version of kafka-connect-jdbc depends on snapshot libraries not available on the central maven repository.
Make sure to clone locally:
https://github.com/confluentinc/common.git : use mvn clean install
https://github.com/apache/kafka.git : use ./gradlew installAll
After successfully performing these steps proceed to build/modify locally kafka-connect-jdbc

Go to FAQ and than you will have information that you must :
Kafka - clone https://github.com/confluentinc/kafka.git and build with ./gradlew installAll
Common - clone https://github.com/confluentinc/common and build with mvn install

Related

Getting ERROR Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project

This is the error i get when i do mvn test on github project.
PROJECT: apache_dubbo
REPO: https://github.com/apache/dubbo
HASH: 5d9638dd5ec6357d9d1fd55f5bb085eacb063d2d
[ERROR] Please refer to C:\Users\pontr\Desktop\apache-dubbo\dubbo-common\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
Please help me
Thank you in advance
error i get on mvn test
The strange thing is that when my friend to the maven test it works. He has the same jdk and maven version of me.
In the image you are linking, you have failing tests.
One of the failing test is here: https://github.com/apache/dubbo/blob/4af8606b1d659d9b386a044ad886ddeba3299567/dubbo-common/src/test/java/org/apache/dubbo/common/io/UnsafeByteArrayOutputStreamTest.java
testToStringWithCharset

Getting package org.assertj.core.api does not exist even though I am specifying in my pom, version 3.6.2 while using JDK 1.8

I am having problem with Eclipse using Maven. I am getting
package org.assertj.core.api does not exist
even though I am specifying it in my pom.xml, as version 3.6.2 while using JDK 1.8.
How to overcome it ?
mvn clean install is failing.
Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
(default-compile) on project
com.transunion.qa.datahub.ui.java.bdd.serenity: Compilation failure:
Compilation failure:
[ERROR]
/Users/pnutala/eclipse-photon-workspace/com.transunion.datahub.ui.qc.java.bdd.serenity/src/main/java/com/transunion/qc/steplibrary/datahub/DeCoherentUser.java:[7,35]
package org.assertj.core.api does not exist
[ERROR]
/Users/pnutala/eclipse-photon-workspace/com.transunion.datahub.ui.qc.java.bdd.serenity/src/main/java/com/transunion/qc/steplibrary/datahub/DeCoherentUser.java:[7,1]
static import only from classes and interfaces [ERROR] -> [Help 1]
Tried Mvn clean install, and verify unsuccessfully.
import static org.assertj.core.api.Assertions.assertThat;
#Step
public void landedOnListPage(String expectedTotle) {
assertThat(currentListPage.getTitle()).containsIgnoringCase(expectedTotle);
It got solved very trivially, by removing the 'test' scope in the pom file for the dependency(this is what I remember after few days!!)

Maven fails to find io.reactivex.subjects in terminal, succeeds in Eclipse

In attempting to prepare a personal project for Gitlab CI, I've stumbled across an issue where maven cannot find the io.reactivex.subjects package in the terminal, and as a result, compilation fails like so:
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) # spell-idle ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 24 source files to /home/aschaefer/dev/spell-idle/target/classes
...
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project spell-idle: Compilation failure: Compilation failure:
[ERROR] /home/aschaefer/dev/spell-idle/src/com/aps/spells/rx/GuiSubjects.java:[5,29] package io.reactivex.subjects does not exist
[ERROR] /home/aschaefer/dev/spell-idle/src/com/aps/spells/rx/GuiSubjects.java:[6,29] package io.reactivex.subjects does not exist
[ERROR] /home/aschaefer/dev/spell-idle/src/com/aps/spells/rx/GuiSubjects.java:[14,29] cannot find symbol
[ERROR] symbol: class Subject
[ERROR] location: class com.aps.spells.rx.GuiSubjects
[ERROR] /home/aschaefer/dev/spell-idle/src/com/aps/spells/rx
Here's the arguably relevant part of the pom. If anything else is needed, let me know and I'll edit it in:
<dependencies>
<dependency>
<groupId>io.reactivex.rxjava2</groupId>
<artifactId>rxjavafx</artifactId>
<version>2.2.2</version>
</dependency>
... (other dependencies here)
</dependencies>
I've been running various combinations of commands like mvn clean install or mvn compile test but it doesn't seem to help.
Eclipse version of maven is 3.5.3, system version is 3.5.2.
I don't have a settings.xml in the ~/.m2 directory.
Thanks in advance for any help offered!
As you say that in eclipse is working, go to Preferences>Maven>user settings there you will see the eclipse mvn configuration and compare it with the one on your system normally in ~/.m2/settings.xml or by the environment variable $M2_HOME/conf/settings.xml

Problem when compiling the latest version of l2switch

I would like to work with the newer version of l2switch plugin, but when I try to compile the project i get the following errors:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project loopremover-impl: Compilation failure: Compilation failure:
[ERROR] /C:/Users/kevin/git/l2switch/loopremover/implementation/src/main/java/org/opendaylight/l2switch/loopremover/topology/TopologyLinkDataChangeHandler.java:[283,41] cannot find symbol
[ERROR] symbol: method getAugmentation(java.lang.Class<org.opendaylight.yang.gen.v1.urn.opendaylight.l2switch.loopremover.rev140714.StpStatusAwareNodeConnector>)
[ERROR] location: variable nc of type org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector
[ERROR] /C:/Users/kevin/git/l2switch/loopremover/implementation/src/main/java/org/opendaylight/l2switch/loopremover/flow/InitialFlowWriter.java:[248,21] cannot find symbol
[ERROR] symbol: method setKey(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionKey)
[ERROR] location: class org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :loopremover-impl
I think the problem isn't in my .m2 folder, since i was able to properly compile the Openflowplugin project. Also i'm using the java 8.0 and my OS is windows 10 (i'm using a plugin of maven to compile via prompt)
The command that i'm using to compile is mvn clean install -U -DskipTests
ps: i've not edited any code of the l2switch project, i just imported the master branch from the github repository and tried to compile
l2switch is currently not being maintained by anyone and thus did not participate in the Fluorine release cycle. It needs version bumps and code changes to conform with upstream changes in yangtools, mdsal etc. For the compile errors above, getAugmentation is now augmentation and setKey is now key. These upstream changes were made in Fluorine along with others. This was all documented on the ODL mailing lists and TSC JIRA items during the Fluorine release cycle. Any contributions to reboot the project and get it building again and maintain it going forward would be welcomed by the ODL community.

Error with JaCoCo test report generation

We have a JaCoco plugin in a pom.xml file for a Java project. When we build locally using mvn -U clean install, the local build failed due to the below error:
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.7.4.201502262128
:report (jacoco-site) on project: An error has occurred in JaCoCo Test report generation. Error while creating report: Error while analyzing class C:\eclipse-workspace\project\target\classes\dist\tools\lib\xml-apis.jar#org/w3c/dom/DOMException.class.
Can't add different class with same name: org/w3c/dom/DOMException -> [Help 1]
[ERROR]
Could anyone please help us with this error. Thank you.

Categories