oracle-samples/oracle-db-examples

How to use the java/HRWebApp app?

Closed this issue · 7 comments

At the risk of sounding annoying, I am no expert at Java. I am a DevOps guy and I am planning to use this simple app to demonstrate CI/CD pipelines to a bunch of people. I would be dockerizing this application and then create a release pipeline as a demo, can you please share how exactly would you go about installing it on an Ubuntu server? Also if there are any non-standard prerequisites?

I am simply trying to use mvn to compile and install the app but running into following error -

[ERROR] Failed to execute goal on project JdbcWebSamples: Could not resolve dependencies for project com.oracle.jdbc:JdbcWebSamples:war:1.0-SNAPSHOT: Failed to collect dependencies for [javax.servlet:javax.servlet-api:jar:3.1.0 (compile), com.google.code.gson:gson:jar:2.5 (compile), junit:junit:jar:3.8.1 (test), com.oracle.jdbc:ojdbc8:jar:12.2.0.1 (compile)]: Failed to read artifact descriptor for com.oracle.jdbc:ojdbc8:jar:12.2.0.1: Could not transfer artifact com.oracle.jdbc:ojdbc8:pom:12.2.0.1 from/to maven.oracle.com (https://maven.oracle.com): Not authorized , ReasonPhrase:Authorization Required. -> [Help 1]

Which app is this - ‘java/HRWebApp‘ ?

Yes. I am just trying to install it for the demo purpose of CI/CD Pipelines and release management hands on demo.

It looks like it tries to download the ojdbc JAR from Oracle’s Maven repository.

If you first run ‘mvn install’ in the ojdbc folder you should be able to work around this.

To the maintainers - normally this would work using a parent POM structure. Would a patch be accepted for this?

Assigned to the maintainers of that app.

I've got one solution -

  1. Download jar from Here.

Your workdir should be **HRWebApp**

  1. Place the jar inside HRWebApp dir, and run command -

mvn install:install-file -DgroupId=com.oracle.jdbc -DartifactId=ojdbc8 -Dversion=12.2.0.1 -Dpackaging=jar -Dfile=ojdbc8.jar -DgeneratePom=true

  1. Now run mvn install -DskipTests

Make sure you've Oracle DB already installed with username - hr and password - hr. (Also it needs required tables/ which I've completed yet).