azure-eventhub jar upgrade required inside storm-eventhub jar - upgrade

I use storm-eventhub jar for my project using maven artifact as follows
<groupId>org.apache.storm</groupId>
<artifactId>storm-eventhubs</artifactId>
<version>2.0.0</version>
storm-eventhub internally uses azure-eventhub version 0.13.1 which is old one.
Hence we are forced to use the same version of azure-eventhub jar in our project as well.
Now the requirement is that we have to upgrade to azure-eventhub version 2.3.2 but storm-eventhub classes fail with NoClassDef errors since many classes refer to 0.13.1 version of azure-eventhub.
Should I customize the classes myself OR can I raise a request to apache community to upgrade the azure-eventhub version inside storm-eventhub library. If so, what would be the ETA approximately.

There is a PR open to upgrade the client version for storm-eventhubs at https://github.com/apache/storm/pull/3004. Unfortunately it looks like the author didn't have time to finish it. You are welcome to pick it up.

Related

Dependency upgrade along with transitive dependencies

I have quite a big Play/Akka project on Scala 2.11 with literally dozens of dependencies, for which we need to migrate to all new stack: newest Play, Akka, Scala etc.
But along the upgrade way, our team constantly facing unexpected issues after certain lib update that another lib has transitive dependency on it, which was evicted and suddenly starting to crash in runtime somewhere in internals. E.g. play-pac4j has transitive dependency on Play, which we forgot to upgrade properly after Play upgrade from 2.5 to 2.7.
Question: is there any sbt plugin, which can say in advance which dependencies I need to change to which version version, if I want to update dependency group % name from version-x to version-y?
I'm aware of sbt-dependency-graph plugin and we are using, but I want some automation. Meaning: sbt-dependency-graph has whatDependsOn command, but I don't want to manually verify which version is compatible with transitive dependency i want to go to.
Thank you.

pom.xml error - Missing artifact com.lowagie:itext:jar:4.2.2, how dowload itext 4.2.2 jar file?

How I can download itext 4.2.2 jar as using in old project and getting error in pom.xml, I dont want to use and change itextpdf 5.x.x version
error - Missing artifact com.lowagie:itext:jar:4.2.2
iText 4.2.2 does not exist, and has never existed as a jar. If you look at Maven Central for 4.2.2 (https://search.maven.org/artifact/com.lowagie/itext/4.2.2/pom), you will see that it only exists as a redirect to 5.5.6. I know, because I am the person who wrote that version of the POM and uploaded it to Maven Central. This blog post describes in full detail why it was done: https://itextpdf.com/en/blog/technical-notes/my-maven-build-broken-what-should-i-do
To fix your build, you either need to use com.lowagie:itext:jar:2.1.7 (last official release of the 2.x.x version by iText Software) or you can use com.itextpdf:itextpdf:jar:5.5.13.1, but then you also have to update all your import statements from com.lowagie.* to com.itextpdf.*, but apart from that your code should work just fine.
Related issues:
com.lowagie.itext version 4.2.2 missing jar file in MVNrepository
Dependency error in jasper-reports from itext
iText version 4.2.1 redirected in maven central repository
What is the difference between lowagie and iText?
How to migrate com.lowagie itext form 2.1.7 to 4.2.0
What is the Difference between ITEXT and ITEXTPDF?

Understanding eclipse maven dependency hierarchy

I want to understand the dependencies for a multi-module maven project and for that referred to eclipse dependency hierarchy.
I did understand fairly, however some of the things I am not able to understand at all.
Below is the screen shot.
The things which I didn't understand are:
--> managed from 1.0.2 [Compile}
--> managed from 1.0.2 (omitted for conflict with 1.0.0) [Compile]
I did search online but I got information in traces. Can anyone help me understand what they mean in easy to understand?
Thanks.
Maven builds a flat classpath from the dependency tree each for compiling ([compile]), for testing, and for running.
In a flat classpath, unlike OSGi, a dependency can only exist in one version. In your cropped screenshot, there is on the second level among other things:
kafka-streams 1.0.2 and
kafka-clients 1.0.0.
kafka-streams 1.0.2 requires kafka-clients 1.0.2 which conflicts to kafka-clients 1.0.0. Therefore kafka-streams 1.0.2 is omitted for conflicts with 1.0.0 even if the version 1.0.2 is required here ("managed from 1.0.2").
More detailed:The classpath which is used to compile or run a plain Java application is flat: all required libraries are globally specified as an ordered list. It is not possible to use a library of a specific version for one package and for another package the same library in a different version.In Maven dependencies builds a tree: each dependency might have its own dependencies. Maven maps the tree of dependencies to the classpath, an ordered list of libraries. If in the Maven dependencies tree the same library exists in different versions, it is not possible to create a flat classpath. This is a conflict.This conflict is resolved by picking one version and omitting all other versions. At the place where the picked version is used instead of the required version, (managed from <required but not picked version>) and (omitted for conflict with <picked version to use instead>) is displayed.In addition, Maven can create different classpaths to compile, to test or to run a Java application via so-called scopes. The [compile] scope is the default scope for using a library in all tasks: compiling, testing and running.
Make sure that the versions specified in the pom.xml file are compatible with each other (which is not yet the case in your screenshot): you have to upgrade kafka-clients from 1.0.0 to 1.0.2 (or downgrade the other libraries).

com.lowagie.itext version 4.2.2 missing jar file in MVNrepository

We have an old project that uses Jasper Reports 1.3.4 (the last 1.x version produced) http://mvnrepository.com/artifact/jasperreports/jasperreports/1.3.4
It depends on com.lowagie.itext version [1.02b,)
It appears that yesterday a version 4.2.2 was pushed with a POM only and missing the jar file which causes builds to fail. Dependency error in jasper-reports from itext
Can that POM be removed and revert to 4.2.1? Who pushed that and can they correct the push?

Thrift: the import javax.annotation cannot be resolved

I use Eclipse Mars (M1) as my IDE. Today, I generated my service's Java code using Apache Thrift 0.9.2 (latest stable version) for an Android project. This version (unlke version 0.9.1) uses the "Generated" annotation from javax.annotation package, for adding some extractable documentation. It adds a line like the following line before each generated class:
#Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2014-11-30")
But surprisingly, Eclipse complains about the package javax.annotation. It throws the error "the import javax.annotation cannot be resolved". My project's Java compiler compliance level is 1.6, and its minimum Android API version is API 8 (Android 2.2). How can I fix this error?
Unfortunately most of packages under javax.* are not included in Android's JDK, therefore you need to add those that you need, manually. Here the reason for not including these packages is explained.
Unluckily, there are several versions of javax.annotation package available for download, some of which don't contain the "Generated" annotation class (javax.annotation.generated). Fortunately this jar file does include that specific annotation class. So if you don't use any build system like Gradle, Ant, or Maven, all you have to do is to include the .jar file in a directory in your project (e.g. lib/) and then add this jar library to your buildpath. If you use Ant, then follow the first link.
I had the same problem and I fixed it by adding this dependency to my build.gradle file
compile group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'