Spring/SpringMVC/EclipseLink Integration

This sample demonstrates Spring, Spring MVC, and EclipseLink integration through a simple database Web application deployed to Liberty.

This sample can be installed onto runtime versions and later.

Installation Instructions

Online installation (requires or later):

  1. Install the sample by running the command below from the bin directory of your server installation:
    installUtility install SpringEclipseLinkSample

Any missing features required by the server will be installed for you.

Offline installation:

  1. Download the SpringEclipseLinkSample.jar using the download button at the top of the page and place it in the root of your server installation.
  2. Extract the sample into the Liberty installation by running the command below from the root of your server installation:
    java -jar SpringEclipseLinkSample.jar

Any missing features required by the server will need to be installed separately.

Running The Application

  1. Start the SpringEclipseLinkSample server by running the command 'bin/server run SpringEclipseLinkSample' from the root of the Liberty profile installation, and confirm the application started by looking in the console output:
    CWWKZ0001I: Application EclipseLinkWithSpringMVC started in XX.XX seconds.
  2. In your browser, enter the URL for the application: http://localhost:9144/EclipseLinkWithSpringMVC/ (where port 9144 assumes the httpEndpoint provided in the sample server.xml has not been modified).
  3. In your browser, you should see the phone book displayed.


This sample does not include the open source dependencies. The installer will provide a list of the open source pre-requisite libraries and where they can be downloaded from. To help obtaining these libraries, the installer provides the option to download them on your behalf.

Sample Structure

  • wlp
    • usr
      • servers
        • SpringEclipseLinkSample
          • Copyright.txt
          • apps
            • EclipseLinkWithSpringMVC-1.0.0.war
          • lafiles
            • LA_en
            • LI_en
          • readme.html
          • server.xml
      • shared
        • config
          • SpringEclipseLinkSampleLibs.xml
        • resources
          • SpringEclipseLinkSampleLibs
            • aopalliance-1.0.jar
            • aspectjrt-1.7.2.jar
            • aspectjweaver-1.7.2.jar
            • commonj.sdo-2.1.1.jar
            • derby-
            • eclipselink-2.6.0-M3.jar
            • javax.inject-1.jar
            • javax.persistence-2.0.0.jar
            • javax.transaction-api-1.2.jar
            • jcl-over-slf4j-1.7.2.jar
            • jstl-1.2.jar
            • log4j-1.2.8.jar
            • slf4j-api-1.7.2.jar
            • slf4j-log4j12-1.7.2.jar
            • spring-aop-3.2.3.RELEASE.jar
            • spring-aspects-3.2.3.RELEASE.jar
            • spring-beans-3.2.3.RELEASE.jar
            • spring-context-3.2.3.RELEASE.jar
            • spring-context-support-3.2.3.RELEASE.jar
            • spring-core-3.2.3.RELEASE.jar
            • spring-expression-3.2.3.RELEASE.jar
            • spring-instrument-3.2.3.RELEASE.jar
            • spring-jdbc-3.2.3.RELEASE.jar
            • spring-orm-3.2.3.RELEASE.jar
            • spring-security-config-3.1.4.RELEASE.jar
            • spring-security-core-3.1.4.RELEASE.jar
            • spring-security-web-3.1.4.RELEASE.jar
            • spring-tx-3.2.3.RELEASE.jar
            • spring-web-3.2.3.RELEASE.jar
            • spring-webmvc-3.2.3.RELEASE.jar