Quarkus class auto-generatation mechanism from Avro schemas is not working - apache-kafka

I created a new Kafka Stream project based on Quarkus 2.1.2 following these two guides:
https://quarkus.io/guides/kafka-streams
https://quarkus.io/guides/kafka-schema-registry-avro
I put some Avro schemas in the src/main/avro/ folder and built the project with Maven.
The build is successful but there aren't any Java classes in the target/generated-sources/avsc directory.
As said by the guide with the new version of Quarkus
there’s no need to use a specific Maven plugin to process the Avro schema, this is all done for you!
I also double-checked that the generate-code goal was enabled for the quarkus-maven-plugin.
Am I missing something or is the guide incomplete in some way? Because it doesn't seems that the class generation is automatically managed by Quarkus.
p.s. I'm using Java 11.0.2 and Maven 3.8.1
Thank you,
Mauro

As suggested by #Ladicek I tried to add the quarkus-avro dependency and now I can find the auto-generated classes.
I think that the guide https://quarkus.io/guides/kafka-schema-registry-avro should be modified because the "default" dependency quarkus-apicurio-registry-avro has quarkus-avro in its dependency while Confluent's kafka-avro-serializer doesn't (obviously).
I opened a issue to improve the guide.
Thank you very much

Related

What's the sbt command for creating new lagom microservicem in an existing project?

What's the sbt command for creating new lagom microservice in an existing project?
I tried to search this question on google as well as separately in lagom documentation, but didn't find any luck. Right now I am using a very long path of creating new folder and manually copying files, and then manually changing the configuration.
There's a GitHub issue lagom/lagom#81 that discussed it.
In there Fabrice Sznajderman mentions that he's created a scaffolding plugin for Lagom called Fabszn/scaffolding-plugin-lagom. It's been a while, so I am not sure how compatible it is with the current Lagom releases.

Walkthrough the spring source code

I wanted to walkthrough the spring code. For that I cloned the code and built it using ./import-into-eclipse.sh command. There are some instructions given in README.md file for checking out source in eclipse.
After following above instructions I was able to see the spring code in my eclipse workspace. To refer the spring source from my project I added all of spring projects (like spring-beans, spring-aop etc) in my project's Java build path. I was able to use spring code in my project.
Now the issue is that whenever I run the test cases in my project, I get initialization error. I removed spring projects from my java build path and junit test started working.
I tried to dig into the issue. For that I tried to run some of the test cases of spring projects itself like BeanUtilsTests.
but I got:
Class not found org.springframework.beans.BeanUtilsTests
java.lang.ClassNotFoundException: org.springframework.beans.BeanUtilsTests
I verified that classpath is set:
Don't know what is the issue. Can someone please tell me that what I did wrong.
Is there any better way to view/edit spring code?
Usually the below error,
Class not found org.springframework.beans.BeanUtilsTests
java.lang.ClassNotFoundException: org.springframework.beans.BeanUtilsTests
occurs when the corresponding jar is missing in the classpath. Since you have already added the spring-beans jar manually, I suspect you are using an incompatible version of the spring-beans jar with your spring-boot.
You can check the Maven repo Spring Beans to check the compatible version. But I would suggest using a dependency management tool like Gradle or Maven to include the required dependency jars. Spring-Boot Gradle file

EclipseLink Annotations cannot be resolved

I'm trying to create a simple EclipseLink POC. Unfortunately, it doesn't seem to include important, basic classes within the JAR.
For example, the following fails within eclipse (and eclipselink is definitely on the build path): import javax.persistence.Id. Should I have a basic-JPA-functionality jar as well? Are annotations stored somewhere else within eclipselink (I've looked, can't find anything)? What am I missing?
Thanks
API part is missing. Name of jar is javax.persistence_1.0.0.jar. In EclipseLink 2.4.1 (http://www.eclipse.org/eclipselink/downloads/index.php#2.4 Installer zip) download it is located to eclipselink/jlib/jpa/javax.persistence_1.0.0.jar.

ZookKeeper Recipes Dependencies

I am new to zookeeper and trying to use some of the zookeeper recipes that are implemented here: https://github.com/apache/zookeeper/tree/trunk/src/recipes. so that i dont have to build them myself.
Seems like they are not distributed as part of the zookeeper libraries in maven central etc. What is the convention in the zookeeper community? Should i just pull the source and build them myself? Or am i missing something and they are readily available to consume from a central repo.
Thanks
Not directly answering your question, but...
Perhaps you'd find Curator (https://github.com/Netflix/curator/wiki) useful? We sure have so far. It has many of the base ZooKeeper recipes implemented and is bundled as separate maven dependencies.

Eclipse plugin for spring

IDEA allow to find bean definition, declared in xml, right from Java code. For example if I've got interface SomeIntrfaceImpl IDEA allow me to find out instances of SomeIntrfaceImpl in .xml contextes files, pointing me to .xml file to line of code where bean is created
Is there any Eclipse plugin, that allow me to do the same ?
Yes there is different Eclipse provided by SpringFramework makers itself. They have extended the eclipse to provide easy development for Spring web application and other products like Spring ROO also.
Its is called SpringSourceToolSuit. You can download its latest version from here after providing some basic information about you asked in a form there.
Its the best IDE to develop Spring applications. I am currently using it.
Hope this helps you. Cheers.