Looking into what's wrong with the Quarkus 1.2.Final and Kogito 0.7.1 project - quarkus

I am forced not to use Kogito parent bom for reasons I can't explain.
So I got a Maven project which is based on Quarkus 1.2.Final and Kogito 0.7.1, and was able to resolve all the version mismatch issues. The code compiles but fails to run tests. It throws the following error and I do have kogito-ruleunits in my dependencies.
9:18:53,268 ERROR [io.qua.dev.DevModeMain] Failed to start Quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.kogito.deployment.KogitoAssetsProcessor#generateModel threw an exception: java.lang.NoClassDefFoundError: org/kie/kogito/rules/impl/AbstractRuleUnits
I have publish the project on github : https://github.com/mravi786/junk/tree/master/dingo-dmn

You have this issue because you use a version incompatible with Quarkus 1.2.1.
I don't know exactly why you can't use the Kogito BOM but there's definitely some artifact that is not the right version.
Update: Quarkus 1.2.x supports Kogito 0.6.x. Due to the tight integration between the two, you cannot upgrade Kogito like this. If you absolutely need Kogito 0.7.1, you can start playing with Quarkus 1.3.0.Alpha2. We will release CR1 soon and the Final a week after that.

Related

Gradle Plugin Test Project Build Failing

I downloaded the gradle plugin test project from their github here:
https://github.com/gradle/gradle/tree/master/subprojects/docs/src/samples/customPlugin
I also updated gradle to latest (4.7).
When I gradle build the consumer project, I get the following build error:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'consumer'.
Could not resolve all artifacts for configuration ':classpath'.
Could not find org.gradle:customPlugin:1.0-SNAPSHOT.
Searched in the following locations:
file:/C:/Code/gradle/subprojects/docs/src/samples/customPlugin/repo/org/gradle/customPlugin/1.0-SNAPSHOT/maven-
metadata.xml
file:/C:/Code/gradle/subprojects/docs/src/samples/customPlugin/repo/org/gradle/customPlugin/1.0-SNAPSHOT/custom
Plugin-1.0-SNAPSHOT.pom
file:/C:/Code/gradle/subprojects/docs/src/samples/customPlugin/repo/org/gradle/customPlugin/1.0-SNAPSHOT/custom
Plugin-1.0-SNAPSHOT.jar
Required by:
project :
What's the issue here? I guess I don't understand gradle plugins enough. Does the plugin need to be built somehow? I have no 1.0-SNAPSHOT pat or anything of the sort, which seems to be where its looking.
Does the plugin need to be built somehow ?
Yes, at first, otherwise the consumer project won't find it.
Inside the plugin project, just run gradle uploadArchive
And then retry a gradle build inside the consumer project

How to run spring web app (jdk 8) with embedded Tomcat 8

We have a Spring web app (JDK 1.8) and (for development purposes) we're running it on embedded tomcat container, i.e. - we're using tomcat7-maven-plugin. The app is being started with
mvn tomcat7:run ...
For what I found out on I-net, there is no tomcat8-maven-plugin yet.
I found a few posts that claim that this also works with Tomcat 8, but it's not clear how to configure maven plugin to run Tomcat version 8, instead of version 7.
I tried this:
https://tomcat.apache.org/maven-plugin-2.2/tomcat7-maven-plugin/adjust-embedded-tomcat-version.html
and the build was successful, but the run failed with:
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:
run (default-cli) on project spotbuy: Execution default-cli of goal org.apache.t
omcat.maven:tomcat7-maven-plugin:2.2:run failed: An API incompatibility was encountered while executing org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run: java.lang.NoSuchMethodError: org.apache.catalina.startup.Tomcat.setDefaultRealm(Lorg/apache/catalina/Realm;)
I researched again and I found out, this is known unresolved problem.
Provided it's even possible, can anybody, please, give more details what and where should be configured?
It's not possible ... for now ...

Junit failures related to cobertura with multi-module maven project in jenkins

I am getting below test failures when building the multi-module maven project in jenkins.
JDK version - 1.8.51
junit - 4.12
org.codehaus.mojo/cobertura-maven-plugin - 2.7
powermock-easymock-release-full - 1.6.2
net.sourceforge.cobertura / cobertura - 2.1.1
All the above are latest plugins.
Test failures
Error 1
Error Message
net.sourceforge.cobertura.coveragedata.TouchCollector.registerClass(Ljava/lang/String;)V
Stacktrace
java.lang.NoSuchMethodError: net.sourceforge.cobertura.coveragedata.TouchCollector.registerClass(Ljava/lang/String;)V
Error 2
Error Message
Could not initialize class com.test.it.logging.EventLogHandler
Stacktrace
java.lang.NoClassDefFoundError: Could not initialize class com.test.it.logging.EventLogHandler
Error 3
Error Message
Failed to transform class with name com.test.it.ra.ReportArchiveConfProvider. Reason: cannot find net.sourceforge.cobertura.coveragedata.LightClassmapListener
Stacktrace
java.lang.IllegalStateException: Failed to transform class with name com.test.it.ra.ReportArchiveConfProvider. Reason: cannot find net.sourceforge.cobertura.coveragedata.LightClassmapListener
at
org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:266)
JFYI that it was working fine with JDK 7 and old version plugins. Have anyone faced this issue ? Please help.
I'm not on the same configurations as you, but ran into the same error around LightClassmapListener. I got past the issue by clearing my workspace.
In the jenkins job; click the workspace and select 'Wipe out Current Workspace'

Camel Compatibility issues

I am using the following camel packages in my Maven project:
camel-core
camel-jms
camel-jaxb
camel-quartz
camel-bindy
camel-ftp
And when all these are using version 2.8.0 my server starts up fine and the app works ok. But if I update the camel version to anything higher like 2.10.0 then I get the following exception on startup and not sure which of these is causing this issue:
Caused by: org.apache.camel.TypeConverterLoaderException: Failed to load type converters because of: Cannot find any type converter classes from the following packages: [org.apache.camel.component.file.remote]
Any help would be much appreciated?
Maybe another library of your project is using a different version of camel.
You can check the camel dependency tree of your project with this maven command:
mvn dependency:tree -Dverbose -Dincludes=camel-core
In verbose mode, the dependency tree shows dependencies that were omitted for being a duplicate of another, conflicting with another's version and/or scope, and introducing a cycle into the dependency tree.
Here are some reference links:
https://maven.apache.org/plugins/maven-dependency-plugin/examples/filtering-the-dependency-tree.html
https://maven.apache.org/plugins/maven-dependency-plugin/examples/resolving-conflicts-using-the-dependency-tree.html

Tomcat Jersey SPI Error

I have a Jersey (1.4) app deployed on Tomcat 5.5, when Tomcat starts up I can see its loading all the resources and providers. But as soon as I access any of the web services I get this strange error
java.lang.NoClassDefFoundError: com/sun/jersey/spi/inject/Errors$Closure
I spent good long time finding out what's going on but had no luck.
I converted maven project into eclipse project using mvn eclipse:eclipse -Dwtpversion=1.5.
Any ideas?
I got this error when I also had a nuxeo related dependancy in my maven pom.xml, which itself has a dependency on jersey libraries, but at an earlier version (1.1.5 to be specific).
I changed the pom to depend on the latest version of jersey-core, jersey-server and jersey-client dependencies and ran mvn eclipse:eclipse and the problem went away!
There must have been a class clash involved.

Resources