cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Jenkins build failure while build dbdriver 5.0.0.0-SNAPSHOT

Former Member
0 Kudos
1,681

We build hybris 6.2.0.2. system with Jenkins hosted on centOS7. When we execute:

 bash -c '. ./setantenv.sh' 

and

 ant server 

we get this error:

 enter code here[ydev6.2] $ /bin/sh -xe /tmp/hudson62997483444311339.sh
 + cd bin/platform
 + bash -c '. ./setantenv.sh'
 + ant server
 Buildfile: /home/jenkins/workspace/ydev6.2/bin/platform/build.xml
      [echo] /home/jenkins/workspace/ydev6.2/bin/platform/tomcat/bin
      [echo] cleabrary folder /home/jenkins/workspace/ydev6.2/bin/platform/lib/dbdriver/
 [artifact:mvn] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects...
 [artifact:mvn] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger -                                                                         
 [artifact:mvn] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
 [artifact:mvn] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Building dbdriver 5.0.0.0-SNAPSHOT
 [artifact:mvn] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
 [artifact:mvn] [main] WARN org.apache.maven.DefaultMaven - The POM for com.microsoft:sqljdbc:jar:4.0.2206.100 is missing, no dependency information available
 [artifact:mvn] [main] WARN org.apache.maven.DefaultMaven - The POM for com.sap.db:ngdbc:jar:0.95.0 is missing, no dependency information available
 [artifact:mvn] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
 [artifact:mvn] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD FAILURE
 [artifact:mvn] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
 [artifact:mvn] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 0.960 s
 [artifact:mvn] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2017-01-25T14:11:03+00:00
 [artifact:mvn] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Final Memory: 10M/102M
 [artifact:mvn] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
 [artifact:mvn] [main] ERROR org.apache.maven.cli.MavenCli - Failed to execute goal on project dbdriver: Could not resolve dependencies for project de.hybris.platform.dbdriver:dbdriver:jar:5.0.0.0-SNAPSHOT: The following artifacts could not be resolved: com.microsoft:sqljdbc:jar:4.0.2206.100, com.sap.db:ngdbc:jar:0.95.0: Failure to find com.microsoft:sqljdbc:jar:4.0.2206.100 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
 [artifact:mvn] [main] ERROR org.apache.maven.cli.MavenCli - 
 [artifact:mvn] [main] ERROR org.apache.maven.cli.MavenCli - To see the full stack trace of the errors, re-run Maven with the -e switch.
 [artifact:mvn] [main] ERROR org.apache.maven.cli.MavenCli - Re-run Maven using the -X switch to enable full debug logging.
 [artifact:mvn] [main] ERROR org.apache.maven.cli.MavenCli - 
 [artifact:mvn] [main] ERROR org.apache.maven.cli.MavenCli - For more information about the errors and possible solutions, please read the following articles:
 [artifact:mvn] [main] ERROR org.apache.maven.cli.MavenCli - [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
 
 BUILD FAILED
 /home/jenkins/workspace/ydev6.2/bin/platform/build.xml:18: The following error occurred while executing this line:
 /home/jenkins/workspace/ydev6.2/bin/platform/resources/ant/antmacros.xml:88: The following error occurred while executing this line:
 /home/jenkins/workspace/ydev6.2/bin/platform/resources/ant/mavenTasks.xml:390: Java returned: 1
 
 Total time: 10 seconds
 Build step 'Execute shell' marked build as failure
 Finished: FAILURE

It would be a great assistance if you could point me in the right direction.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Here is how to solve this.

1) Make sure you have the required db drivers at the following location,

  {HYBRIS_HOME}/bin/platform/lib/dbdriver

Hybris comes bundled with the mssql, sap hana, hsqldb and postgressql drivers.

2) Now to stop hybris from trying to download from maven, all you have to make sure is the timestamp on .lastupdate file is greater than that of the external-dependencies.xml file under the above mentioned folder. You can do this by,

 touch  {HYBRIS_HOME}/bin/platform/lib/dbdriver/.lastupdate
Former Member
0 Kudos

Yes, we did this last week 🙂 But, as it is not posted here, you deserve all the glory for this answer! :)

Former Member
0 Kudos

thanks! Yay

Answers (4)

Answers (4)

Former Member
0 Kudos

If one do not want to get the DB Driver using maven, he can simply set the -Dupdate.maven.dependencies=false to ANT_OPTS environment variable during build - that will make hybris to ignore maven dependency definitions

Former Member
0 Kudos

i would appreciate if someone would answer this question.

Former Member
0 Kudos

Does anyone have a solution to this particular issue?

Former Member
0 Kudos

Your error messages say that certain Maven dependencies are missing from the upstream maven repo.

Either you need to try changing the dependencies to a reasonable (available) alternative (like a newer version?) or get (make?) a better Maven repository which has all of the resources required to fulfill dependencies.

It's common to design Maven dependencies around a locally controlled Maven repo. Hybris development uses Artifactory, for example. This insulates your development and build processes from errors due to changes in upstream repositories that you do not control.

Former Member
0 Kudos

Why does hybris use maven dependencies which it can not resolve? We use the OOTB Hybris features and we have an issue which SAP Hybris is not planning to resolve?

"Either you need to try changing the dependencies to a reasonable (available) alternative (like a newer version?) or get (make?) a better Maven repository which has all of the resources required to fulfill dependencies." - We don't want to use local Maven repository.

I believe that this is a bug on the side of the platform. Am I missing something?