org.apache.maven.plugin.MojoExecutionException: C:\Users\Owner\aem\example\it.tests\src\main\java\org\myorg\example\it\tests\HelloWorldModelServerSideTest.java : Unable to load compiled class: org.myorg.example.it.tests.HelloWorldModelServerSideTest

GitHub | re-jim | 7 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to Rafael Fischer Viola and rafael . Or join the community to write better ones.
  1. 0

    New projects are created in a broken state

    GitHub | 7 months ago | re-jim
    org.apache.maven.plugin.MojoExecutionException: C:\Users\Owner\aem\example\it.tests\src\main\java\org\myorg\example\it\tests\HelloWorldModelServerSideTest.java : Unable to load compiled class: org.myorg.example.it.tests.HelloWorldModelServerSideTest
  2. 0

    GitHub comment 72#268176362

    GitHub | 4 months ago | dutoitns
    org.apache.maven.plugin.MojoExecutionException: C:\workspace-shoprite\mywebsite\it.tests\src\main\java\org\myorg\mywebsite\it\tests\HelloWorldModelServerSideTest.java : Unable to load compiled class: org.myorg.mywebsite.it.tests.HelloWorldModelServerSideTest
  3. 0
    samebug tip
    A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add with the following: <groupId>com.fasterxml</groupId> <artifactId>classmate</artifactId> <version>1.0</version>
  6. 0
    samebug tip
    Check if you didn't forget to instantiate your topic in the kafka broker.
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    org.myorg.example.it.tests.HelloWorldModelServerSideTest

    at java.net.URLClassLoader.findClass()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader.findClass(Unknown Source)
    2. java.lang.ClassLoader.loadClass(Unknown Source)
    3. java.lang.ClassLoader.loadClass(Unknown Source)
    3 frames
  3. Descriptor Generator Implementation
    SCRDescriptorGenerator.execute
    1. org.apache.felix.scrplugin.helper.ClassScanner.scanSources(ClassScanner.java:144)
    2. org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:146)
    2 frames
  4. Maven SCR Plugin
    SCRDescriptorMojo.execute
    1. org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:237)
    1 frame
  5. Maven Plugin
    DefaultBuildPluginManager.executeMojo
    1. org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    1 frame
  6. org.eclipse.m2e.core
    MavenBuilder.build
    1. org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:331)
    2. org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362)
    3. org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1)
    4. org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
    5. org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
    6. org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360)
    7. org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52)
    8. org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137)
    9. org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172)
    10. org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
    11. org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115)
    12. org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
    13. org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
    14. org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105)
    15. org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
    16. org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
    17. org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
    18. org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
    19. org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
    19 frames
  7. Core Resource Management
    BuildManager$2.run
    1. org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
    1 frame
  8. Eclipse Core
    SafeRunner.run
    1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    1 frame
  9. Core Resource Management
    BuildManager$1.run
    1. org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:205)
    2. org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:245)
    3. org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:300)
    3 frames
  10. Eclipse Core
    SafeRunner.run
    1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    1 frame
  11. Core Resource Management
    AutoBuildJob.run
    1. org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303)
    2. org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:359)
    3. org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:382)
    4. org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
    5. org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
    5 frames
  12. Eclipse Jobs
    Worker.run
    1. org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    1 frame