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

Samebug tips8

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.

If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add to your dependencies. To add it, the groupId is com.fasterxml and artifactId is Classmate.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web798

  • 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
  • via GitHub by dutoitns
    , 6 months ago
    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
  • via Google Groups by Unknown author, 4 months ago
    SonarQube is unable to analyze file : 'C:\Tools\BuildAgent\work\ecbacee14a836f65\adf\src\main\java\dk\vejman\adf\VejmanApplicationModuleImpl.java'
  • Stack trace

    • 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 at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:249) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:331) at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362) at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112) at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360) at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52) at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137) at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172) at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1) at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112) at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99) at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86) at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:205) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:245) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:300) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:359) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:382) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: org.apache.felix.scrplugin.SCRDescriptorException: Unable to load compiled class: org.myorg.example.it.tests.HelloWorldModelServerSideTest at org.apache.felix.scrplugin.helper.ClassScanner.scanSources(ClassScanner.java:148) at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:146) at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:237) ... 32 more Caused by: java.lang.ClassNotFoundException: org.myorg.example.it.tests.HelloWorldModelServerSideTest at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at org.apache.felix.scrplugin.helper.ClassScanner.scanSources(ClassScanner.java:144) ... 34 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 5 months ago
    2420 more bugmates