0

I am trying develop a Mule 4.x custom connector using JAVA Mule SDk.

The connector for which I am trying is build is only supporting JAVA 11 at the moment .Thus when I am trying to build the it via maven it is failing. PFB the local configuration I have setup and the error message iam getting.

OS: MAC OS
Installed JAVA version: JAVA 11

openjdk version "11.0.19" 2023-04-18
OpenJDK Runtime Environment Temurin-11.0.19+7 (build 11.0.19+7)
OpenJDK 64-Bit Server VM Temurin-11.0.19+7 (build 11.0.19+7, mixed mode)

MAVEN version:

Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39)
Maven home: /Users/yadevkrishna.tr/Maven
Java version: 11.0.19, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/jdk-11/Contents/Home
Default locale: en_IN, platform encoding: UTF-8
OS name: "mac os x", version: "14.7", arch: "aarch64", family: "mac"

Mule module parent:

    <parent>
        <groupId>org.mule.extensions</groupId>
        <artifactId>mule-modules-parent</artifactId>
        <version>1.6.3</version>
    </parent>

Error message during the build

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.mule.runtime.module.extension.internal.util.IntrospectionUtils (file:/Users/dev/.m2/repository/org/mule/runtime/mule-module-extensions-support/4.6.3/mule-module-extensions-support-4.6.3.jar) to field java.lang.reflect.Field.modifiers
WARNING: Please consider reporting this to the maintainers of org.mule.runtime.module.extension.internal.util.IntrospectionUtils
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[WARNING] diagnostic: warning: Supported source version 'RELEASE_8' from annotation processor 'org.mule.runtime.ast.extension.api.loader.ASTExtensionResourcesGeneratorAnnotationProcessor' less than -source '11'
[INFO] diagnostic: Note: Starting Resources generator for Extensions
[ERROR] error on execute: use -X to have details 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.991 s
[INFO] Finished at: 2024-09-20T12:13:02+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.bsc.maven:maven-processor-plugin:3.3.3:process (process) on project mule-basic-connector: Error executing: java.lang.NoClassDefFoundError: org/reflections/ReflectionUtils: org.reflections.ReflectionUtils -> [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/MojoExecutionException

Full POM file:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>com.mule.yadev.extension</groupId>
    <artifactId>mule-debezium-connector</artifactId>
    <version>1.0.7</version>
    <packaging>mule-extension</packaging>
    <name>Mule-debezium - Extension</name>

    <parent>
        <groupId>org.mule.extensions</groupId>
        <artifactId>mule-modules-parent</artifactId>
        <version>1.6.3</version>
    </parent>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <version.debezium>2.7.2.Final</version.debezium>
        <muleJavaEeBomVersion>4.6.0</muleJavaEeBomVersion>
        <mule.sdk.api.version>0.7.0</mule.sdk.api.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>io.debezium</groupId>
            <artifactId>debezium-embedded</artifactId>
            <version>${version.debezium}</version>
        </dependency>
        <dependency>
            <groupId>io.debezium</groupId>
            <artifactId>debezium-api</artifactId>
            <version>${version.debezium}</version>
        </dependency>
        <dependency>
            <groupId>io.debezium</groupId>
            <artifactId>debezium-connector-mysql</artifactId>
            <version>${version.debezium}</version>
        </dependency>
    </dependencies>
</project>

Any help will be appreciated. Thanks in advance

I tried different version of JAVA and Mule-module-parent. Still the same error.

maven -X


[ERROR] Failed to execute goal org.bsc.maven:maven-processor-plugin:3.3.3:process (process) on project mule-debezium-connector: Error executing: java.lang.NoClassDefFoundError: org/reflections/ReflectionUtils: org.reflections.ReflectionUtils -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.bsc.maven:maven-processor-plugin:3.3.3:process (process) on project mule-debezium-connector: Error executing
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:299)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:193)

5
  • NoClassDefFoundError org.reflections.ReflectionUtils that seems to be the error. Nobody can help you more because you didn't provide enough information. edit the question to add the full pom.xml. Commented Sep 20, 2024 at 11:39
  • Added POM file for reference Commented Sep 20, 2024 at 12:01
  • I'm not seeing anything strange there. Try maven with "-X" to see if there is more information about the error. Commented Sep 20, 2024 at 12:34
  • maven -X response is also attached Commented Sep 20, 2024 at 13:53
  • The debezium java sdk version I am using is only Compatible with JAVA 11 Commented Sep 20, 2024 at 14:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.