Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-51023

package javax.persistence does not exist

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hi I am getting following compilation error again and again upon building the build.

      Can somebody tell me what the problem.

      Jenkins version : 2.111

      Maven : Maven Integration plugin version 3.1.2

       

      Got following on running in -X mode:

       

      [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project ntp-domain: Compilation failure at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) 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:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152) at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238) at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:185) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at hudson.maven.Maven3Builder.call(Maven3Builder.java:139) at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) at hudson.remoting.UserRequest.perform(UserRequest.java:210) at hudson.remoting.UserRequest.perform(UserRequest.java:53) at hudson.remoting.Request$2.run(Request.java:364) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1029) at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:137) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 30 more

        Attachments

        1. error.png
          error.png
          87 kB
        2. error1.png
          error1.png
          71 kB

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          It seems that your JDK does not include javax.persistence by default. Does not seem to be a Jenkins issue. If you suspect so, please provide Java version used by Maven, POM.xml and full build log

          Show
          oleg_nenashev Oleg Nenashev added a comment - It seems that your JDK does not include javax.persistence by default. Does not seem to be a Jenkins issue. If you suspect so, please provide Java version used by Maven, POM.xml and full build log
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          I reviewed javax.persistence documentation, and I confirm that NO classes of "javax.persistence" are included into standard JDK 8 packages. Whatever you do in your Maven project, you need to add proper Maven dependencies in order to build it with Java 8.

          Several examples of packages offering javax.persistence API: https://mvnrepository.com/artifact/javax.persistence

          I am closing it as "Not a defect" according to the in investigation results

          Show
          oleg_nenashev Oleg Nenashev added a comment - I reviewed javax.persistence documentation, and I confirm that NO classes of "javax.persistence" are included into standard JDK 8 packages. Whatever you do in your Maven project, you need to add proper Maven dependencies in order to build it with Java 8. Several examples of packages offering javax.persistence API: https://mvnrepository.com/artifact/javax.persistence I am closing it as "Not a defect" according to the in investigation results

            People

            • Assignee:
              praveentcs91 Praveen Kumar
              Reporter:
              praveentcs91 Praveen Kumar
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: