Uploaded image for project: 'PUBLIC - Liferay Maven'
  1. PUBLIC - Liferay Maven
  2. MAVEN-142

build-service goal fails with NoClassDefFoundError with latest 7.0.0-SNAPSHOT

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: Master
    • Fix Version/s: None
    • Component/s: Plugins
    • Labels:
      None

      Description

      If you try to invoke build-service goal with latest Liferay 7.0.0-SNAPSHOT configured as target, it will fail with this error:

      [ERROR] Failed to execute goal com.liferay.maven.plugins:liferay-maven-plugin:7.0.0-SNAPSHOT:build-service (default-cli) on project sbtest-portlet: null: MojoExecutionException: InvocationTargetException: com/liferay/registry/Registry: com.liferay.registry.Registry -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.liferay.maven.plugins:liferay-maven-plugin:7.0.0-SNAPSHOT:build-service (default-cli) on project sbtest-portlet: null
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	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: org.apache.maven.plugin.MojoExecutionException
      	at com.liferay.maven.plugins.AbstractToolsLiferayMojo.execute(AbstractToolsLiferayMojo.java:86)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      	... 19 more
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at com.liferay.maven.plugins.AbstractToolsLiferayMojo.executeTool(AbstractToolsLiferayMojo.java:222)
      	at com.liferay.maven.plugins.ServiceBuilderMojo.doExecute(ServiceBuilderMojo.java:159)
      	at com.liferay.maven.plugins.AbstractToolsLiferayMojo.execute(AbstractToolsLiferayMojo.java:79)
      	... 21 more
      Caused by: java.lang.NoClassDefFoundError: com/liferay/registry/Registry
      	at com.liferay.portal.tools.servicebuilder.ServiceBuilder.main(ServiceBuilder.java:226)
      	... 28 more
      Caused by: java.lang.ClassNotFoundException: com.liferay.registry.Registry
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      	... 29 more
      

        Attachments

          Activity

            People

            • Assignee:
              gregory.amerson Gregory Amerson
              Reporter:
              gregory.amerson Gregory Amerson
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 8 weeks, 1 day ago

                Packages

                Version Package