Docker, Java EE 7, and Maven with WebLogic 12.1.3

UPDATE March 2015 - We now officially certify and support WebLogic 12.1.3 on Docker Containers! For more information see this blog post and this whitepaper on OTN. The Docker configuration files are also now maintained on the official Oracle GitHub Docker repository.

WebLogic 12.1.3 was released and with it the support for perhaps the most important Java EE 7 APIs for database-backed Web Applications development. These are the specifications supported in this release:
As you can see above, WebLogic is bundled with the same implementations used by GlassFish 4.0, which gives you a compatible application server if you have already started developing Java EE 7 applications (well, of course limited to these APIs) and now seek for a commercially supported environment.

There are also some improvements in the Apache Maven Plugin, which makes developers' life much easier, allows for much better automated testing (Arquillian!), Continuous Integration and Delivery. IDEs that support Maven-based projects also benefit from this.

Does this makes WebLogic the best Java EE application server to run modern web HTML5/Javascript applications with RESTful and WebSockets services? Sure yes! So to give you a great way to test WebLogic, I created a Dockerfile for you to in order to create a WebLogic domain on your development environment to test it as you wish. Go to the weblogic-docker for the Developer ZIP Distro Dockerfile on the WebLogic Community GitHub repository.

Getting started with WebLogic 12.1.3, Java EE 7, Maven, and Docker

Now let's get it started. First go to and download WebLogic 12.1.3 ZIP Distro for Developers. Save that file for later use.

Installing WebLogic 12.1.3 without Docker (easy)
WebLogic ZIP is very easy to install:
  1. Extract the content in a folder where you want to hold the wls12130 directory that comes inside the ZIP file. On my Linux machine, I use /home/bruno/Work/tools/.
  2. Go to the wls12130 folder and run the configure.cmd (Windows) or (Unix).
    • Creating the domain may take too long and may be seen as the installer is freezed. Make sure to configure this if you are on Linux:
      $ export
  3. When the installer asks you if you want to create a domain, type [Y]
  4. Installer will ask you for username/password. On dev environments, I usually use weblogic/welcome1
  5. Installer will start WebLogic right away and you can check it running at http://localhost:7001/console

Installing WebLogic 12.1.3 with Docker (easier)

If you work on a Linux-based machine as your development environment and you aren't familiar with Docker yet, check the What is Docker, then give it a try. Long story short: Docker is a Linux container; it is like a virtual machine, but it is not (there are people running Docker on top of Vagrant virtual machines, for example). The most important thing for us here is that it will create a virtual network interface with a virtual IP address.

My laptop runs Ubuntu 14.04, so I used this Docker Installation Instruction to set it up. I will assume you will have Docker installed on your computer somehow, following instructions for your own operational system.
  1. Download the ZIP or checkout the weblogic-docker Git repository and extract somewhere on your computer. I will use $DOCKER_HOME as a reference to that location.
  2. Copy the you download previously into $DOCKER_HOME/weblogic-docker/weblogic12c-zip/
  3. Call the script (as sudo) and wait for Docker to do its magic
  4. Call and see WebLogic going up and running on a Docker container. 
    • It will attach port 7001 to your host interfaces
  5. Open http://localhost:7001/console. Username/password are weblogic/welcome1
** Please be aware: we don't provide support for WebLogic on Docker in any environment so use this at your own risk. The developer distribution (ZIP) is only for development environments and also unsupported, as it is not patchable. If you still really want to run WebLogic 12c Full Distribution on top of Docker, here's a way to set it up.

Configuring your local Maven repository

It is now possible to use Maven without a local installation of WebLogic, which is perfect for CI environments (Hudson/Jenkins). You will still require a installation though to set up the Maven Plugin initially, but as soon you install this to your remote Maven repository for example, other developers and CI envs won't need to have WebLogic installed locally, if deploying to a remote server. For local development, you can also point to WebLogic as a "remote" server, of course. 

The steps to configure Maven are well documented and it is done by the Maven Synchronization Plug-in. After installing it to your local repository, you can call the sync goal to populate a local or remote repository. Here are the steps for a local environment:
  1. Go to the WebLogic home installation directory. For example:
    $ cd /home/bruno/Work/wls12130/
  2. Go to the subdir
    $ cd oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/12.1.3/
  3. Execute the following command:
    $ mvn install:install-file -DpomFile=oracle-maven-sync-12.1.3.pom -Dfile=oracle-maven-sync-12.1.3.jar
  4. Finally you call the push command to upload all Maven artifacts (plugins, archetypes, etc) to your repository (local in this case)
    $ mvn -DoracleHome=/home/bruno/Work/wls12130/
If you want to setup a remote repository, check the documentation.

Create Java EE applications with WebLogic Maven Archetypes

WebLogic provides a set of archetypes that come with the Maven Plug-in pre-configured. Let's create a simple Web project by using the Basic WebApp Maven Archetype
mvn archetype:generate
Now of course you can open this Maven project on your NetBeans, IntelliJ IDEA, Eclipse, and then setup WebLogic in your IDE. Or you can just issue the command below to build, package, and deploy this WAR artifact to the WebLogic server you have running on your computer (either using Docker or the normal installation):
mvn package pre-integration-test 
Here we make sure to use -Dupload=true since I'm not sure if you are using Docker or not. If you are, then upload is required since the container has no access to your local file system (although possible!)

Description of wls_02.jpg follows

Now open http://localhost:7001/basicWebapp and see this sample application up and running!


By the way if you are an IntelliJ IDEA user you may want to watch this recent Webinar I did with JetBrains team: Developing Java EE Applications for WebLogic 12c with IntelliJ IDEA. The slides are available as well:

Check Bruno Borges slideshare repository


I am getting two errors when I run
1. Error: Could not find or load main class
2. setup mount namespace copy optional dev nodes mknod /dev/fuse operation not permitted

However, completes, and when I run ./ -attach -- container is not fired up.

# docker version
Client version: 0.11.1-dev
Client API version: 1.12
Go version (client): go1.2.1
Git commit (client): 02d20af/0.11.1
Server version: 0.11.1-dev
Server API version: 1.12
Go version (server): go1.2.1
Git commit (server): 02d20af/0.11.1

OS: Oracle Linux 7
Linux 3.8.13-35.3.1.el7uek.x86_64 #2 SMP Wed Jun 25 15:27:43 PDT 2014 x86_64 x86_64 x86_64 GNU/Linux

Posted by kris on September 16, 2014 at 09:35 AM PDT #

Could you please fill in a ticket in the GitHub project with this?

Posted by Bruno Borges on September 19, 2014 at 08:09 AM PDT #

Nice article.
Does Oracle Web Logic Maven Archetypes can be access via an Remote Catalog (i.e. instead of using Maven Synchronization Plug-in ?

I want to enable Eclipse Luna JavaEE SR1 to create JavaEE projects using m2eclipse but I couldn't found a Repository URL for WebLogic Archetypes.

Posted by guest on November 11, 2014 at 12:30 PM PST #

Hi Cesar,

No, artifacts are published along the WLS distribution only, at the moment.

Posted by Bruno Borges on November 11, 2014 at 01:48 PM PST #


When I execute the build script found in the bin folder (renamed to at the time of my git checkout), I get the following error message:

Step 12 : ADD container-scripts/* /u01/
2015/01/20 15:44:37 container-scripts/*: no such file or directory

WebLogic Docker Container was NOT successfully created. Check the output and correct any reported problems with the docker build operation.

When I list the contents of the corresponding directory, I get this:

peter@ubuntuboldizs:~/git/weblogic-docker/weblogic12c-developer$ ll
total 332956
drwxrwxr-x 3 peter peter 4096 Jan 20 15:45 ./
drwxrwxr-x 6 peter peter 4096 Jan 20 14:10 ../
drwxrwxr-x 2 peter peter 4096 Jan 20 14:10 container-scripts/
-rw-rw-r-- 1 peter peter 4434 Jan 20 15:44 Dockerfile
-rw-rw-r-- 1 peter peter 43 Jan 20 14:10 .gitignore
-rwx------ 1 peter peter 142191827 Jan 20 14:55 jdk-8u25-linux-x64.rpm*
-rw-rw-r-- 1 peter peter 4335 Jan 20 14:10
-rwx------ 1 peter peter 198719034 Jan 20 14:17*

So the container-scripts folder seems to be present but the step in the Dockerfile ignores it. Could you please help?

Posted by Peter Boldizs on January 20, 2015 at 06:51 AM PST #

There is another problem with the build script:

I have downloaded the jdk-8u25-linux-x64.rpm from the proper location ( and manually run the MD5 checksum and it seemed identical to the one found on the page

However, the script has still failed when executed the corresponding lines:
if ! check_md5 $JAVA_PKG $JAVA_PKG_MD5
echo "MD5 for $JAVA_PKG does not match! Download again!"

To eliminate this problem, I have commented out the above aand it went through.
This is not an ideal solution - could you please help?

Posted by Peter Boldizs on January 20, 2015 at 06:58 AM PST #

Peter, can you please file these issues on the GitHub project? It is much better to manage and to discuss them over there.

Posted by Bruno Borges on January 20, 2015 at 07:03 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed

Bruno has been having fun working with Java since 2000 and now helps Oracle on sharing the technology accross all Latin America. Also plays videogames, does trekking and loves beer.

Follow me on Twitter! @brunoborges


« October 2015