1

Apparently, the XMLElement annotation class can't be found. The project builds and deploys successfully on another computer, which makes me think this is an installation issue. However, I can't find any way of fixing this.

I've already switched by installation to run on oracle JDK:

@:~/$ java --version
    java 11.0.4 2019-07-16 LTS
    Java(TM) SE Runtime Environment 18.9 (build 11.0.4+10-LTS)
    Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.4+10-LTS, mixed mode)
@:~/$ javac --version
    javac 11.0.4

The error:

Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlElement
    at java.net.URLClassLoader.findClass (URLClassLoader.java:436)
    at java.lang.ClassLoader.loadClass (ClassLoader.java:588)
    at java.lang.ClassLoader.loadClass (ClassLoader.java:521)
    at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.<init> (JaxbAnnotationIntrospector.java:139)
    at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.<init> (JaxbAnnotationIntrospector.java:126)
    at com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule.setupModule (JaxbAnnotationModule.java:90)
    at com.fasterxml.jackson.databind.ObjectMapper.registerModule (ObjectMapper.java:751)
    at com.fasterxml.jackson.databind.ObjectMapper.registerModules (ObjectMapper.java:951)
    at org.apache.beam.sdk.options.PipelineOptionsFactory.<clinit> (PipelineOptionsFactory.java:468)
    at com.spilgames.dataflow.portal.flows.PortalEvents.main (PortalEvents.java:73)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:567)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:282)
    at java.lang.Thread.run (Thread.java:830)

It seems that one of the dependencies (codehaus.mojo) is referencing to it, but it doesn't exist:

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project dwh-dataflow-portal: An exception occured while executing the Java class. javax/xml/bind/annotation/XmlElement: javax.xml.bind.annotation.XmlElement -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project dwh-dataflow-portal: An exception occured while executing the Java class. javax/xml/bind/annotation/XmlElement
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
        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:305)
        at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
        at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
        at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
        at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke (Method.java:567)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)

1 Answer 1

0

from java 11 jaxb annoations has been removed and jaxb dependency to your project

1

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.