question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

While moving to java 11 (Open JDK 11) I’m getting the following error Caused by: java.lang.ClassNotFoundException: com.sun.tools.xjc.model.Aspect Complete StackTrace

-----------------------------------------------------

    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:169)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    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:566)
    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)
Caused by: java.lang.NoClassDefFoundError: com/sun/tools/xjc/model/Aspect
    at org.jvnet.jaxb2_commons.plugin.simpleequals.SimpleEqualsPlugin.generate (SimpleEqualsPlugin.java:111)
    at org.jvnet.jaxb2_commons.plugin.codegenerator.AbstractCodeGeneratorPlugin.processClassOutline (AbstractCodeGeneratorPlugin.java:82)
    at org.jvnet.jaxb2_commons.plugin.codegenerator.AbstractCodeGeneratorPlugin.run (AbstractCodeGeneratorPlugin.java:74)
    at com.sun.tools.xjc.model.Model.generateCode (Model.java:292)
    at org.jvnet.mjiip.v_2_3.XJC23Mojo.generateCode (XJC23Mojo.java:66)
    at org.jvnet.mjiip.v_2_3.XJC23Mojo.doExecute (XJC23Mojo.java:41)
    at org.jvnet.mjiip.v_2_3.XJC23Mojo.doExecute (XJC23Mojo.java:28)
    at org.jvnet.jaxb2.maven2.RawXJC2Mojo.doExecute (RawXJC2Mojo.java:478)
    at org.jvnet.jaxb2.maven2.RawXJC2Mojo.execute (RawXJC2Mojo.java:320)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    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:566)
    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)
Caused by: java.lang.ClassNotFoundException: com.sun.tools.xjc.model.Aspect
    at java.net.URLClassLoader.findClass (URLClassLoader.java:471)
    at org.jvnet.jaxb2.maven2.ParentFirstClassLoader.loadClass (ParentFirstClassLoader.java:65)
    at org.jvnet.jaxb2.maven2.ParentFirstClassLoader.loadClass (ParentFirstClassLoader.java:35)
    at org.jvnet.jaxb2_commons.plugin.simpleequals.SimpleEqualsPlugin.generate (SimpleEqualsPlugin.java:111)
    at org.jvnet.jaxb2_commons.plugin.codegenerator.AbstractCodeGeneratorPlugin.processClassOutline (AbstractCodeGeneratorPlugin.java:82)
    at org.jvnet.jaxb2_commons.plugin.codegenerator.AbstractCodeGeneratorPlugin.run (AbstractCodeGeneratorPlugin.java:74)
    at com.sun.tools.xjc.model.Model.generateCode (Model.java:292)
    at org.jvnet.mjiip.v_2_3.XJC23Mojo.generateCode (XJC23Mojo.java:66)
    at org.jvnet.mjiip.v_2_3.XJC23Mojo.doExecute (XJC23Mojo.java:41)
    at org.jvnet.mjiip.v_2_3.XJC23Mojo.doExecute (XJC23Mojo.java:28)
    at org.jvnet.jaxb2.maven2.RawXJC2Mojo.doExecute (RawXJC2Mojo.java:478)
    at org.jvnet.jaxb2.maven2.RawXJC2Mojo.execute (RawXJC2Mojo.java:320)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    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:566)
    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)

Plugin configuration

                <plugin>
                    <groupId>org.jvnet.jaxb2.maven2</groupId>
                    <artifactId>maven-jaxb2-plugin</artifactId>
                    <version>0.14.0</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.adobe.ans</groupId>
                            <artifactId>ans-util</artifactId>
                            <version>${project.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>com.fasterxml.jackson.core</groupId>
                            <artifactId>jackson-annotations</artifactId>
                            <version>${jackson.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>com.fasterxml.jackson.core</groupId>
                            <artifactId>jackson-databind</artifactId>
                            <version>${jackson.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>commons-logging</groupId>
                            <artifactId>commons-logging</artifactId>
                            <version>${commons.logging.version}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <args>
                            <arg>-enableIntrospection</arg>
                            <arg>-Xannotate</arg>
                            <arg>-Xsetters</arg>
                            <arg>-XtoString</arg>
                            <arg>-XsimpleEquals</arg>
                            <arg>-XsimpleHashCode</arg>
                            <arg>-Xfluent-api</arg>
                            <arg>-Xsetters-mode=direct</arg>
                            <arg>-no-header</arg>
                            <arg>-Xinheritance</arg>
                        </args>
                        <extension>true</extension>
                        <markGenerated>true</markGenerated>
                        <plugins>
                            <plugin>
                                <groupId>org.jvnet.jaxb2_commons</groupId>
                                <artifactId>jaxb2-basics</artifactId>
                                <version>${jaxb2.basics.version}</version>
                            </plugin>
                            <plugin>
                                <groupId>org.jvnet.jaxb2_commons</groupId>
                                <artifactId>jaxb2-basics-annotate</artifactId>
                                <version>${jaxb2.basics.annotate.version}</version>
                            </plugin>
                            <plugin>
                                <groupId>org.jvnet.jaxb2_commons</groupId>
                                <artifactId>jaxb2-fluent-api</artifactId>
                                <version>${jaxb2.fluent.api.version}</version>
                            </plugin>
                            <plugin>
                                <groupId>com.github.jaxb-xew-plugin</groupId>
                                <artifactId>jaxb-xew-plugin</artifactId>
                                <version>${jaxb.xew.plugin.version}</version>
                            </plugin>
                        </plugins>
                    </configuration>
                </plugin>
        <jaxb2.basics.version>1.11.1</jaxb2.basics.version>
        <jaxb2.basics.annotate.version>1.0.2</jaxb2.basics.annotate.version>
        <jaxb2.fluent.api.version>3.0</jaxb2.fluent.api.version>
        <jaxb.xew.plugin.version>1.7</jaxb.xew.plugin.version>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
mattrpavcommented, Apr 4, 2022

@jkzu I’m picking up the maintenance of this plugin. I’ll be releasing updated versions over the next few weeks that include full Java 11 support.

FYI-- 0.14.0 is available via maven central:

https://mvnrepository.com/artifact/org.jvnet.jaxb2.maven2/maven-jaxb2-plugin/0.14.0

0reactions
mattrpavcommented, Oct 26, 2022

@yvanzo what error are you getting?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Oracle Java SE Support Roadmap
Oracle provides this Oracle Java SE Support Roadmap, to help you understand maintenance and support options and related timelines.
Read more >
Java/OpenJDK - endoflife.date
Release Released Active Support 19 2 months and 3 weeks ago. (20 Sep 2022) Ends in 3 months. (21 Mar 2023) 18 8 months and...
Read more >
OpenJDK Life Cycle and Support Policy - Red Hat Customer ...
According to the table above, JDK 11 will go out of support in October 2024, but JDK 8 will not go out of...
Read more >
Java version history - Wikipedia
Java 7 is no longer publicly supported. For Java 11, long-term support will not be provided by Oracle for the public; instead, the...
Read more >
Java 11 Features - DigitalOcean
They've changed the licensing and support model which means if you download the Java 11 Oracle JDK, it will be paid for commercial...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found