1 Reply Latest reply on Sep 27, 2016 6:27 PM by Robert.Patrick-Oracle

    Jenkins + Maven + OSB 12c error

    Norberto Hideaki Enomoto

      I have created an OSB 12c application and I'm trying to "package" it with Jenkins + Maven.

      I'm facing the following issue:

       

      Started by user Norberto Hideaki Enomoto

      Building in workspace /var/lib/jenkins/workspace/SeguroAuto01

      > git rev-parse --is-inside-work-tree # timeout=10

      Fetching changes from the remote Git repository

      > git config remote.origin.url https://github.com/norberto-enomoto/SeguroAuto # timeout=10

      Fetching upstream changes from https://github.com/norberto-enomoto/SeguroAuto

      > git --version # timeout=10

      Setting http proxy: web-proxy.houston.hpecorp.net:8080

      > git fetch --tags --progress https://github.com/norberto-enomoto/SeguroAuto +refs/heads/*:refs/remotes/origin/*

      > git rev-parse refs/remotes/origin/master^{commit} # timeout=10

      > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10

      Checking out Revision c68ebbc18970b8f408be0b39d4e210b86803289a (refs/remotes/origin/master)

      > git config core.sparsecheckout # timeout=10

      > git checkout -f c68ebbc18970b8f408be0b39d4e210b86803289a

      > git rev-list c68ebbc18970b8f408be0b39d4e210b86803289a # timeout=10

      Parsing POMs

      Established TCP socket on 39402

      [SeguroAuto01] $ java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.7.jar:/opt/mount1/bin/apache-maven-3.3.9/boot/plexus-classworlds-2.5.2.jar:/opt/mount1/bin/apache-maven-3.3.9/conf/logging jenkins.maven3.agent.Maven32Main /opt/mount1/bin/apache-maven-3.3.9 /var/cache/jenkins/war/WEB-INF/lib/remoting-2.60.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven32-interceptor-1.7.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.7.jar 39402

      <===[JENKINS REMOTING CAPACITY]===>channel started

      Executing Maven: -B -f /var/lib/jenkins/workspace/SeguroAuto01/pom.xml -X package -DoracleHome=/opt/mount1/oracle/soa

      Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T16:41:47+00:00)

      Maven home: /opt/mount1/bin/apache-maven-3.3.9

      Java version: 1.7.0_76, vendor: Oracle Corporation

      Java home: /usr/java/jdk1.7.0_76/jre

      Default locale: en_US, platform encoding: UTF-8

      OS name: "linux", version: "2.6.32-573.1.1.el6.x86_64", arch: "amd64", family: "unix"

      [INFO] Error stacktraces are turned on.

      [DEBUG] Reading global settings from /opt/mount1/bin/apache-maven-3.3.9/conf/settings.xml

      [DEBUG] Reading user settings from /var/lib/jenkins/.m2/settings.xml

      [INFO] Scanning for projects...

      [WARNING]
      [WARNING] Some problems were encountered while building the effective model for br.com.hpe.osb:System:sbar:1.0-SNAPSHOT
      [WARNING] 'parent.relativePath' of POM br.com.hpe.osb:System:1.0-SNAPSHOT (/var/lib/jenkins/workspace/SeguroAuto01/System/pom.xml) points at br.com.hpe.osb:seguroauto instead of com.oracle.servicebus:sbar-system-common, please verify your project structure @ line 6, column 13
      [WARNING]
      [WARNING] Some problems were encountered while building the effective model for br.com.hpe.osb:SeguroAuto:sbar:1.0-SNAPSHOT
      [WARNING] 'parent.relativePath' of POM br.com.hpe.osb:SeguroAuto:1.0-SNAPSHOT (/var/lib/jenkins/workspace/SeguroAuto01/SeguroAuto/pom.xml) points at br.com.hpe.osb:seguroauto instead of com.oracle.servicebus:sbar-project-common, please verify your project structure @ line 6, column 13
      [WARNING]
      [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
      [WARNING]
      [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
      [WARNING]
      [INFO] ------------------------------------------------------------------------

      [INFO] Reactor Build Order:

      [INFO]

      [INFO] System

      [INFO] SeguroAuto

      [INFO] seguroauto

      [INFO] 

      [INFO] ------------------------------------------------------------------------

      [INFO] Building System 1.0-SNAPSHOT

      [INFO] ------------------------------------------------------------------------

      [INFO]

      [INFO] --- oracle-servicebus-plugin:12.1.3-0-0:package (default-package) @ System ---
      configjar: line 3: /opt/mount1/oracle/soa/osb/tools/configjar/setenv.sh: Permission denied

      configjar: line 7: /opt/mount1/oracle/soa/osb/tools/configjar/configjar.sh: Permission denied

      [INFO] ------------------------------------------------------------------------

      [INFO] Reactor Summary:

      [INFO]

      [INFO] System ............................................. FAILURE [ 2.634 s]

      [INFO] SeguroAuto ......................................... SKIPPED

      [INFO] seguroauto ......................................... SKIPPED

      [INFO] ------------------------------------------------------------------------

      [INFO] BUILD FAILURE

      [INFO] ------------------------------------------------------------------------

      [INFO] Total time: 8.551 s

      [INFO] Finished at: 2016-09-27T15:00:03+00:00

      [INFO] Final Memory: 14M/216M

      [INFO] ------------------------------------------------------------------------

      [ERROR] Failed to execute goal com.oracle.servicebus.plugin:oracle-servicebus-plugin:12.1.3-0-0:package (default-package) on project System: Creation of the Service Bus Configuration Archive failed. See the log in the build directory for more information. -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.oracle.servicebus.plugin:oracle-servicebus-plugin:12.1.3-0-0:package (default-package) on project System: Creation of the Service Bus Configuration Archive failed. See the log in the build directory for more information.

      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: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:128)

      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)

      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)

      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)

      at org.jvnet.hudson.maven3.launcher.Maven32Launcher.main(Maven32Launcher.java:132)

      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.launchStandard(Launcher.java:330)

      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)

      at jenkins.maven3.agent.Maven32Main.launch(Maven32Main.java:186)

      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 hudson.maven.Maven3Builder.call(Maven3Builder.java:136)

      at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)

      at hudson.remoting.UserRequest.perform(UserRequest.java:153)

      at hudson.remoting.UserRequest.perform(UserRequest.java:50)

      at hudson.remoting.Request$2.run(Request.java:332)

      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)

      at java.util.concurrent.FutureTask.run(FutureTask.java:262)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

      at java.lang.Thread.run(Thread.java:745)

      Caused by: org.apache.maven.plugin.MojoFailureException: Creation of the Service Bus Configuration Archive failed. See the log in the build directory for more information.

      at oracle.sb.maven.plugin.PackageMojo.execute(PackageMojo.java:97)

      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)

      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)

      ... 31 more

      [ERROR]
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [JENKINS] Archiving /var/lib/jenkins/workspace/SeguroAuto01/SeguroAuto/pom.xml to br.com.hpe.osb/SeguroAuto/1.0-SNAPSHOT/SeguroAuto-1.0-SNAPSHOT.pom

      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
      [JENKINS] Archiving /var/lib/jenkins/workspace/SeguroAuto01/System/pom.xml to br.com.hpe.osb/System/1.0-SNAPSHOT/System-1.0-SNAPSHOT.pom

      [JENKINS] Archiving /var/lib/jenkins/workspace/SeguroAuto01/pom.xml to br.com.hpe.osb/seguroauto/1.0-SNAPSHOT/seguroauto-1.0-SNAPSHOT.pom

      channel stopped

      Finished: FAILURE

       

      I have set the permissions to setenv.sh and configjar.sh:

       

      [root@c4t18673 configjar]# ls -l

      total 160

      -rwxrwxrwx 1 oracle oinstall   1222 Nov 16  2013 configjar-ant.xml

      -rwxrwxrwx 1 oracle oinstall     88 Nov 16  2013 configjar.bat

      -rwxrwxrwx 1 oracle oinstall 126970 May 29  2014 configjar.jar

      -rwxrwxrwx 1 oracle oinstall     86 Nov 16  2013 configjar.sh

      -rwxrwxrwx 1 oracle oinstall    745 Nov 16  2013 logging.xml

      -rwxrwxrwx 1 oracle oinstall   3900 Nov 16  2013 README.TXT

      -rwxrwxrwx 1 oracle oinstall   1408 Feb  6  2014 setenv.bat

      -rwxrwxrwx 1 oracle oinstall   1441 Feb  6  2014 setenv.sh

      -rwxrwxrwx 1 oracle oinstall     94 Nov 16  2013 wlst.bat

      -rwxrwxrwx 1 oracle oinstall    111 Nov 16  2013 wlst.sh

       

      If I run through the terminal the build is success:

       

      [root@c4t18673 SeguroAuto01]# /opt/mount1/bin/apache-maven-3.3.9/bin/mvn package -DoracleHome=/opt/mount1/oracle/soa

      [INFO] Scanning for projects...

      [WARNING]

      [WARNING] Some problems were encountered while building the effective model for br.com.hpe.osb:System:sbar:1.0-SNAPSHOT

      [WARNING] 'parent.relativePath' of POM br.com.hpe.osb:System:1.0-SNAPSHOT (/var/lib/jenkins/workspace/SeguroAuto01/System/pom.xml) points at br.com.hpe.osb:seguroauto instead of com.oracle.servicebus:sbar-system-common, please verify your project structure @ line 6, column 13

      [WARNING]

      [WARNING] Some problems were encountered while building the effective model for br.com.hpe.osb:SeguroAuto:sbar:1.0-SNAPSHOT

      [WARNING] 'parent.relativePath' of POM br.com.hpe.osb:SeguroAuto:1.0-SNAPSHOT (/var/lib/jenkins/workspace/SeguroAuto01/SeguroAuto/pom.xml) points at br.com.hpe.osb:seguroauto instead of com.oracle.servicebus:sbar-project-common, please verify your project structure @ line 6, column 13

      [WARNING]

      [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.

      [WARNING]

      [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

      [WARNING]

      [INFO] ------------------------------------------------------------------------

      [INFO] Reactor Build Order:

      [INFO]

      [INFO] System

      [INFO] SeguroAuto

      [INFO] seguroauto

      [INFO]

      [INFO] ------------------------------------------------------------------------

      [INFO] Building System 1.0-SNAPSHOT

      [INFO] ------------------------------------------------------------------------

      [INFO]

      [INFO] --- oracle-servicebus-plugin:12.1.3-0-0:package (default-package) @ System ---

      [INFO]

      [INFO] ------------------------------------------------------------------------

      [INFO] Building SeguroAuto 1.0-SNAPSHOT

      [INFO] ------------------------------------------------------------------------

      [INFO]

      [INFO] --- oracle-servicebus-plugin:12.1.3-0-0:package (default-package) @ SeguroAuto ---

      [INFO]

      [INFO] ------------------------------------------------------------------------

      [INFO] Building seguroauto 1.0-SNAPSHOT

      [INFO] ------------------------------------------------------------------------

      [INFO] ------------------------------------------------------------------------

      [INFO] Reactor Summary:

      [INFO]

      [INFO] System ............................................. SUCCESS [01:43 min]

      [INFO] SeguroAuto ......................................... SUCCESS [02:01 min]

      [INFO] seguroauto ......................................... SUCCESS [  0.002 s]

      [INFO] ------------------------------------------------------------------------

      [INFO] BUILD SUCCESS

      [INFO] ------------------------------------------------------------------------

      [INFO] Total time: 03:50 min

      [INFO] Finished at: 2016-09-27T18:12:03+00:00

      [INFO] Final Memory: 15M/211M

      [INFO] ------------------------------------------------------------------------

       

       

      The Maven in Jenkins is configured to use: /opt/mount1/bin/apache-maven-3.3.9

       

      The OSB12c Maven plug-in is installed:

       

      [root@c4t18673 workspace]# /opt/mount1/bin/apache-maven-3.3.9/bin/mvn help:describe -DgroupId=com.oracle.servicebus.plugin -DartifactId=oracle-servicebus-plugin -Dversion=12.1.3-0-0

       

      [INFO] Scanning for projects...

      [INFO]

      [INFO] ------------------------------------------------------------------------

      [INFO] Building Maven Stub Project (No POM) 1

      [INFO] ------------------------------------------------------------------------

      [INFO]

      [INFO] --- maven-help-plugin:2.2:describe (default-cli) @ standalone-pom ---

      [INFO] com.oracle.servicebus.plugin:oracle-servicebus-plugin:12.1.3-0-0

       

       

      Name: Oracle Service Bus - Plugin

      Description: (no description available)

      Group Id: com.oracle.servicebus.plugin

      Artifact Id: oracle-servicebus-plugin

      Version: 12.1.3-0-0

      Goal Prefix: servicebus

       

       

      This plugin has 2 goals:

       

       

      servicebus:deploy

        Description: (no description available)

       

       

      servicebus:package

        Description: (no description available)

       

       

      For more information, run 'mvn help:describe [...] -Ddetail'

       

       

      [INFO] ------------------------------------------------------------------------

      [INFO] BUILD SUCCESS

      [INFO] ------------------------------------------------------------------------

      [INFO] Total time: 2.721 s

      [INFO] Finished at: 2016-09-27T18:15:45+00:00

      [INFO] Final Memory: 9M/211M

      [INFO] ------------------------------------------------------------------------

        • 1. Re: Jenkins + Maven + OSB 12c error
          Robert.Patrick-Oracle

          I am not exactly sure how to interpret these errors:

           

          configjar: line 3: /opt/mount1/oracle/soa/osb/tools/configjar/setenv.sh: Permission denied

          configjar: line 7: /opt/mount1/oracle/soa/osb/tools/configjar/configjar.sh: Permission denied

           

          I don't have a 12.1.3 install handy.  Can you look inside these files to see what command is at:

           

          1.) Line 3 of /opt/mount1/oracle/soa/osb/tools/configjar/setenv.sh

          2.) Line 7 of /opt/mount1/oracle/soa/osb/tools/configjar/configjar.sh

           

          It might be that the commands are trying to access another location and that is causing the permission denied...