Migration Guide 5.0.0 - terasolunaorg/terasoluna-gfw GitHub Wiki

Migrating from 1.0.1 to 5.0.0

.. only:: html

 .. contents:: 目次
    :depth: 2
    :local:

Main changes in 5.0.0

Main changes in version 5.0.0 are following.

  • Updated the Spring Framework to 4.1
  • Updated the Spring Security to 3.2
  • Updated the version of libraries managed by the Spring IO Platform 1.1.1
  • Updated the version of libraries managed outside the Spring IO Platform 1.1.1
  • Added the the MyBatis 3.2 as new feature
  • Changed some specifications in common library according to fixing bugs
  • Changed some specifications in common library according to fixing improvements
  • Added new blank projects for the MyBatis3
  • Fixed bugs about blank projects
  • Improved blank projects

Updated the Spring Framework to 4.1

From version 5.0.0, the Spring Framework has been updated to 4.1.4.RELEASE.

Migration considerations from version 1.0.1(Spring Framework 3.2.10) is following.

  • Jackson 1.x has not been supported
  • XML namespace for configuring ViewResolver has been added
  • @RestController has been added as annotations for developing RESTful Web Service

Please refer to "Spring Framework Reference Documentation" about details or other changes.

Updated the Spring Security to 3.2

From version 5.0.0, the Spring Security has been updated to 3.2.5.RELEASE.

Migration considerations from version 1.0.x(Spring Security 3.1.x and embed CSRF countermeasures feature of Spring Security 3.2 release candidate version) is following.

  • CSRF countermeasures feature has been improved
  • Feature for providing an HTTP headers for enhancing web security has been added
  • @AuthenticationPrincipal has been added as annotations for integrating with Spring MVC
  • API specification of CsrfRequestDataValueProcessor has been changed
  • CsrfRequestDataValueProcessor has been improved for integrating with Spring MVC

Note

About CSRF countermeasures feature in version 1.0.x

In version 1.0.1, CSRF countermeasures feature of Spring Security 3.2 release candidate version was embedded.

Please refer to 'Spring Security Reference' about details or other changes.

Updated the version of libraries managed by the Spring IO Platform 1.1.1

From version 5.0.0, the Spring IO Platform 1.1.1.RELEASE has been applied for version control of dependency libraries.

Migration considerations from version 1.0.x is following.

  • Jackson has been updated from 1.9.7 to 2.4.4
  • Apache Tiles has been updated from 2.2.2 to 3.0.5
  • Hibernate Validator has been updated from 4.3.1.Final to 5.1.3.Final (Bean Validation has been updated from 1.0 to 1.1)
  • Joda-Time has been updated from 2.2 to 2.5
  • Apache Commons DBCP has been updated from 1.2.2.patch_DBCP264_DBCP372 to 2.0.1
  • Hibernate ORM has been updated from 4.2.3.Final to 4.3.7.Final (Java Persistence API has been updated from 2.0 to 2.1)

Updated the version of libraries managed outside the Spring IO Platform 1.1.1

From version 5.0.0, some libraries has been updated.

Migration considerations from version 1.0.x is nothing.

Added the the MyBatis 3.2 as new feature

From version 5.0.0, the MyBatis 3.2.8 has been added as new library for database access.

If using the MyBatis3 as the O/R Mapper, please generate a new development project from template projects.

Note

About org.tarasoluna.gfw:tarasoluna-gfw-mybatis3

From version 5.0.0, Maven artifact of MyBatis3(org.tarasoluna.gfw:tarasoluna-gfw-mybatis3) has been added to resolve dependency libraries. In other words, it has not provide class files.

Warning

About the MyBatis2(iBatis)

MyBatis2(iBatis) is not supported from version 5.0.0.

Changed some specifications in common library according to fixing bugs

From version 5.0.0, some specifications in common library have been changed according to fixing the following bugs in 1.0.1.RELEASE.

  • [#16] default message code in @ExistInCodeList is not standard form
  • [#148] QueryEscapeUtils does not work on Oracle 11g Release2(11.2) later
  • [#149] f:u() (EL Function) perform wrong encoding for query parameter
  • [#167] Modify CompositeRequestDataValueProcessor
  • [#256] ValidationMessages.properties should not be included in terasoluna-gfw-common

Changed some specifications in common library according to fixing improvements

From version 5.0.0, some specifications in common library have been changed according to fixing the following improvements from 1.0.1.RELEASE.

  • [#13] When clicked current page link of pagination, pagination request is submitted
  • [#14] When clicked disabled page link of pagination, moved the top in current page
  • [#24] Support the ResultMessages.warning() as new message type (ResultMessages.warn() is deprecated)
  • [#224] Separate Joda-Time

Fixed bugs about blank projects

From version 5.0.0, some setting files in blank projects have been changed to fix the following bugs in 1.0.1.RELEASE.

[Application configuration files]

  • [multi#50] TilesViewResolver and BeanNameViewResolver is same order(priority)
  • [single#39] ResultMessagesLoggingInterceptor does not define in domain.xml
  • [single#45] Remove removeValue settings in UserIdMDCPutFilter

[Project configuration files(POM,etc...)]

Improved blank projects

From version 5.0.0, some setting files in blank projects have been improved.

[Application configuration files]

[Project configuration files(POM,etc...)]

  • [multi#76] Modify scope of artifact dependency
  • [multi#78] Polish parent pom.xml
  • [multi#92] Improve JDBC driver dependency settings
  • [single#6] add dependencies to support unit test!
  • [single#60] Modify scope of artifact dependency

Migration procedures from 1.0.1 to 5.0.0

Migration procedures are as follows.

Note

Legend

Required : This procedure is mandatory.
Required by case : This procedure is mandatory, if conditions match.
Optional : This procedure is recommended. Perform it if you feel the need.
- : This procedure is not required.

[General]

.. tabularcolumns:: |p{0.10\linewidth}|p{0.30\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|
Step Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project
Update dependency libraries Required Required Required

[Spring Framework]

.. tabularcolumns:: |p{0.10\linewidth}|p{0.30\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|
Step Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project
Modify settings to use XML namespace for ViewResolver Optional Optional Optional
Modify application to use @RestController Optional Optional Optional

[Spring Security]

.. tabularcolumns:: |p{0.10\linewidth}|p{0.30\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|
Step Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project
Modify settings of CsrfRequestDataValueProcessor Required by case Required by case Required by case
Modify settings to use XML namespace for CSRF (<sec:csrf>) Required by case Required by case Required by case
Modify to use POST method at the logout request Required by case Required by case Required by case
Modify settings to use XML namespace for Concurrent Session Control (<sec:concurrency-control>) Optional Optional Optional
Replace deprecated API of Spring Security Required by case Required by case Required by case
Modify jsp to use the <form:form> tag when request using http GET method Optional Optional Optional
Modify application to use @AuthenticationPrincipal Optional Optional Optional
Modify jsp to use <sec:csrfInput> tag Optional Optional Optional
Modify jsp to use <sec:csrfMetaTags > tag Optional Optional Optional

[Jackson]

.. tabularcolumns:: |p{0.10\linewidth}|p{0.30\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|
Step Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project
Modify settings to use Jackson 2.4 Required by case Required by case Required by case
Modify application to use Jackson 2.4 Required by case Required by case Required by case

[Tiles]

.. tabularcolumns:: |p{0.10\linewidth}|p{0.30\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|
Step Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project
Modify settings to use ViewResolver for Tiles 3.0 Required by case Required by case Required by case
Modify tiles setting files to use Tiles 3.0 Required by case Required by case Required by case
Modify the taglib prefix for Tiles 3.0 in jsp Required by case Required by case Required by case

[Bean Validation(Hibernate Validator)]

.. tabularcolumns:: |p{0.10\linewidth}|p{0.30\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|
Step Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project
Override default messages in ValidationMessages.properties Required by case Required by case Required by case
Replace deprecated API of Bean Validation Required by case Required by case Required by case

[Joda Time]

.. tabularcolumns:: |p{0.10\linewidth}|p{0.30\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|
Step Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project
Replace deprecated API of Joda Time Required by case Required by case Required by case

[Commons DBCP]

.. tabularcolumns:: |p{0.10\linewidth}|p{0.30\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|
Step Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project
Replace to BasicDataSource of Apache Commons DBCP 2 Required by case Required by case Required by case

[Bug fix of Common Library]

.. tabularcolumns:: |p{0.10\linewidth}|p{0.30\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|
Step Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project
Apply the changes in specification of @ExistInCodeList Required by case Required by case Required by case
Apply the changes in specification of QueryEscapeUtils's methods Required by case Required by case Required by case
Apply the changes in specification of f:u() Required by case Required by case Required by case
Apply the changes in specification of CompositeRequestDataValueProcessor Required by case Required by case Required by case
Add the ValidationMessages.properties into your project Required by case Required by case Required by case

[Improvement of Common Library]

.. tabularcolumns:: |p{0.10\linewidth}|p{0.30\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|
Step Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project
Apply the changes in specification of active page link Required by case Required by case Required by case
Apply the changes in specification of disabled page link Required by case Required by case Required by case
Modify application to use the ResultMessages.warning() instead of the ResultMessages.warn() Optional Optional Optional
Add the terasoluna-gfw-jodatime into dependency definition Required by case Required by case Required by case
Modify application to use the JodaTimeDateFactory instead of the DateFactory Required by case Required by case Required by case

[Fixing bugs of Blank project]

.. tabularcolumns:: |p{0.10\linewidth}|p{0.30\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|
Step Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project
Apply the fixes of ViewResolver setting into spring-mvc.xml Required by case - -
Apply the adding of ResultMessagesLoggingInterceptor setting into xxx-domain.xml - Required by case Required by case
Apply the fixes of UserIdMDCPutFilter setting into spring-security.xml - Required by case Required by case
Apply the fixes of <distributionManagement> setting into pom.xml Optional - -
Apply the fixes of <relativePath> setting into pom.xml Optional Optional -

[Improving Blank project]

.. tabularcolumns:: |p{0.10\linewidth}|p{0.30\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|
Step Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project
Apply the fixes of JdbcCodeList setting into xxx-codelist.xml Optional Optional Optional
Apply the fixes of code list import setting into xxx-domain.xml Optional Optional Optional
Apply the fixes of CodeListInterceptor setting into spring-mvc.xml Optional Optional Optional
Apply the changes of parent pom.xml (multi) Required - -
Apply the fixes of dependency settings of JDBC driver into pom.xml Optional - -
Apply the changes of parent pom.xml (single) - Optional -
Apply the fixes of dependency settings for test into pom.xml - Optional Optional
Apply the fixes of dependency scope settings into pom.xml - Optional -

[Step 1] Update dependency libraries

Please update TERASOLUNA Server Framework for Java (5.x) Common Library and dependency libraries.

Note

If using the MyBatis3 as the O/R Mapper, please generate a new development project from template projects. (In other words, migration procedure for MyBatis3 is not provided)

.. tabularcolumns:: |p{0.35\linewidth}|p{0.25\linewidth}|p{0.25\linewidth}|p{0.15\linewidth}|
Library Name From version To version Remarks
TERASOLUNA Server Framework for Java (5.x) Common Library 1.0.1.RELEASE 5.0.0.RELEASE  
Spring Framework 3.2.10.RELEASE 4.1.4.RELEASE  
Spring Data Commons 1.6.4.RELEASE 1.9.1.RELEASE  
Spring Security 3.1.4.RELEASE 3.2.5.RELEASE  
Hibernate 4.2.3.Final 4.3.7.Final  
Hibernate Commons Annotations 4.0.2.Final 4.0.5.Final  
Java Persistence API 2.0 1.0.1.Final - Changed
Java Persistence API 2.1 - 1.0.0.Final Changed
Javassist 3.15.0-GA 3.18.1-GA  
Java Annotation Indexer - 1.1.0.Final Added
JBoss Logging I18n Annotations - 1.2.0.Final Added
Java Transaction API 1.1 1.0.1.Final - Changed
Java Transaction API 1.2 - 1.0.0.Final Changed
Spring Data JPA 1.4.3.RELEASE 1.7.1.RELEASE  
AspectJ 1.7.4 1.8.4  
Logback 1.0.13 1.1.2  
SLF4J 1.7.5 1.7.8  
Jackson 1.9.7 2.4.4  
Bean Validation API 1.0.0.GA 1.1.0.Final  
Hibernate Validator 4.3.1.Final 5.1.3.Final  
JBoss Logging 3 3.1.0.GA 3.1.3.GA  
Apache Commons BeanUtils 1.8.3 1.9.2  
Dozer 5.4.0 5.5.1  
Apache Commons Lang 3.1 3.3.2  
Joda Time 2.2 2.5  
Jadira Usertype 3.0.0.GA 3.2.0.GA  
Apache Commons DBCP 1.2.2.patch_DBCP264 _DBCP372 2.0.1  
Apache Commons Pool 1.6 2.2  
Commons Digester 2.0 2.1  
Tiles 2.2.2 3.0.5  
Tiles Autotag Core - 1.1.0 Added
Tiles Request - 1.0.6 Added
Guava 13.0.1 17.0  

[Procedure's required cases]

This procedure is required.

[Step 1-1] Using Maven Multiple Projects

This update procedure is for the projects which are generated by using mvn archetype.

Update pom file in your parent project. ($YOUR_MULTIPLE_PROJECT_ROOT/pom.xml)

<!-- omitted -->
<parent>
    <groupId>org.terasoluna.gfw</groupId>
    <artifactId>terasoluna-gfw-parent</artifactId>
    <version>5.0.0.RELEASE</version> <!-- ### Need to edit ### -->
</parent>
<!-- omitted -->

[Step 1-2] Using Maven Single Project

This update procedure is for projects that are generated by using mvn archetype or downloaded from the release site.

Update pom file in your project. ($YOUR_SINGLE_PROJECT/pom.xml)

<!-- omitted -->
<parent>
    <groupId>org.terasoluna.gfw</groupId>
    <artifactId>terasoluna-gfw-parent</artifactId>
    <version>5.0.0.RELEASE</version> <!-- ### Need to edit ### -->
</parent>
<!-- omitted -->

[Step 1-3] Using Eclipse WTP Project

This update procedure is for Eclipse WTP project which is downloaded from the release site.

Please refer to Update libraries for using Eclipse WTP Project about update procedures.

[Step 2] Modify settings to use XML namespace for ViewResolver

From version 5.0.0(From Spring Framework 4.1), the XML namespace of ViewResolver definition has been added. XML namespace for define the ViewResolver is recommended to use.

[Procedure's required cases]

This procedure is optional. Please perform next modification, if feel the need.

[Modification method(Recommended style)]

Please modify as following.

  • Use the <mvc:view-resolvers> tag
  • Use the <mvc:tiles-configurer> tag

Please modify one of the following.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-web/src/main/resources/META-INF/spring/spring-mvc.xml
  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/spring-mvc.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/spring-mvc.xml
<mvc:view-resolvers>
    <mvc:bean-name />
    <mvc:tiles />
    <mvc:jsp prefix="/WEB-INF/views/" />
</mvc:view-resolvers>

<mvc:tiles-configurer>
    <mvc:definitions location="/WEB-INF/tiles/tiles-definitions.xml" />
</mvc:tiles-configurer>

[Another method(For reference)]

This method is legacy style.

<bean class="org.springframework.web.servlet.view.BeanNameViewResolver">
    <property name="order" value="0" />
</bean>

<bean
    class="org.springframework.web.servlet.view.tiles3.TilesViewResolver">
    <property name="order" value="1" />
</bean>

<bean id="viewResolver"
    class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <property name="prefix" value="/WEB-INF/views/" />
    <property name="suffix" value=".jsp" />
    <property name="order" value="2" />
</bean>

<bean class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
    <property name="definitions">
        <list>
            <value>/WEB-INF/tiles/tiles-definitions.xml</value>
        </list>
    </property>
</bean>

[Step 3] Modify application to use @RestController

From version 5.0.0(From Spring Framework 4.0), the @RestController has been added for developing the REST API(RESTful Web Service). If developing the REST API, the @RestController is recommended to use instead of the @Controller.

[Procedure's required cases]

This procedure is optional. Please perform next modification, if feel the need.

[Modification method(Recommended style)]

Please modify to use @RestController instead of @Controller . When using the @RestController, the @ResponseBody can be omitted as method annotation.

@RequestMapping("members")
@RestController // ### Need to specify instead of @Controller ###
public class MemberRestController {

    @RequestMapping(value = "{memberId}", method = RequestMethod.GET)
    @ResponseStatus(HttpStatus.OK)
    public MemberResource getMember( // ### Can omit @ResponseBody ###
              @PathVariable("memberId") String memberId) {
        // ...
    }

}

[For reference]

This method is legacy style.

@RequestMapping("members")
@Controller
public class MemberRestController {

    @RequestMapping(value = "{memberId}", method = RequestMethod.GET)
    @ResponseStatus(HttpStatus.OK)
    @ResponseBody
    public MemberResource getMember(
              @PathVariable("memberId") String memberId) {
        // ...
    }

}

[Step 4] Modify settings of CsrfRequestDataValueProcessor

From version 5.0.0(From Spring Security 3.2) the API specification of CsrfRequestDataValueProcessor has been changed. Specifically, the create method (factory method) has been removed.

[Procedure's required cases]

If the following case is matched, please perform next modification.

  • If using CsrfRequestDataValueProcessor

[Modification method]

Please remove the factory-method attribute from bean definition of CsrfRequestDataValueProcessor.

Please modify one of the following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-web/src/main/resources/META-INF/spring/spring-mvc.xml
  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/spring-mvc.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/spring-mvc.xml
<bean id="requestDataValueProcessor"
    class="org.terasoluna.gfw.web.mvc.support.CompositeRequestDataValueProcessor">
    <constructor-arg>
        <util:list>
            <!-- ### Need to edit(remove factory-method="create") ### -->
            <bean
                class="org.springframework.security.web.servlet.support.csrf.CsrfRequestDataValueProcessor" />
            <!-- ... -->
        </util:list>
    </constructor-arg>
</bean>

[For reference]

This settings is invalid from 5.0.0.

<bean id="requestDataValueProcessor"
    class="org.terasoluna.gfw.web.mvc.support.CompositeRequestDataValueProcessor">
    <constructor-arg>
        <util:list>
            <bean
                class="org.springframework.security.web.servlet.support.csrf.CsrfRequestDataValueProcessor"
                factory-method="create" />
            <!-- ... -->
        </util:list>
    </constructor-arg>
</bean>

[Step 5] Modify settings to use XML namespace for CSRF (<sec:csrf>)

From version 5.0.0(From Spring Security 3.2), the XML namespace for the CSRF countermeasures has been added.

[Procedure's required cases]

If the following case is matched, please perform next modifications.

  • If using CSRF countermeasures of Spring Security

[Modification method]

  • Please modify to use <sec:csrf>. When using the <sec:csrf>, components for CSRF countermeasures is enabled automatically.
  • HttpSessionCsrfTokenRepository
  • CsrfFilter
  • CsrfAuthenticationStrategy
  • If handling the CSRF error, please modify or add settings of AccessDeniedHandler (<sec:access-denied-handler>).

Please modify one of the following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-web/src/main/resources/META-INF/spring/spring-security.xml
  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/spring-security.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/spring-security.xml

(e.g. Settings of blank project for version 5.0.0)

<sec:http auto-config="true" use-expressions="true">
    <!-- ... -->
    <sec:csrf /> <!-- ### Need to modify ### -->
    <sec:access-denied-handler ref="accessDeniedHandler"/> <!-- ### If handling the CSRF error, need to modify or add ### -->
    <!-- ... -->
</sec:http>

<!-- ... -->

<!-- ### If handling the CSRF error, need to modify or add ### -->
<bean id="accessDeniedHandler"
    class="org.springframework.security.web.access.DelegatingAccessDeniedHandler">
    <constructor-arg index="0">
        <map>
            <!-- ### Setting for detecting a invalid CSRF token ### -->
            <entry
                key="org.springframework.security.web.csrf.InvalidCsrfTokenException">
                <bean
                    class="org.springframework.security.web.access.AccessDeniedHandlerImpl">
                    <property name="errorPage"
                        value="/WEB-INF/views/common/error/invalidCsrfTokenError.jsp" />
                </bean>
            </entry>
            <!-- ### Setting for detecting a invalid session(if can not load a CSRF token from HttpSession) ### -->
            <entry
                key="org.springframework.security.web.csrf.MissingCsrfTokenException">
                <bean
                    class="org.springframework.security.web.access.AccessDeniedHandlerImpl">
                    <property name="errorPage"
                        value="/WEB-INF/views/common/error/missingCsrfTokenError.jsp" />
                </bean>
            </entry>
        </map>
    </constructor-arg>
    <!-- ### Setting for detect a invalid access to protected page ### -->
    <constructor-arg index="1">
        <bean
            class="org.springframework.security.web.access.AccessDeniedHandlerImpl">
            <property name="errorPage"
                value="/WEB-INF/views/common/error/accessDeniedError.jsp" />
        </bean>
    </constructor-arg>
</bean>

Note

Above settings is same settings of blank project for 5.0.0.

Details refer to CSRF countermeasures of Development Guideline (English or Japanese).

[For reference]

This method is legacy style.(e.g. Settings of blank project for version 1.0.1)

<sec:http auto-config="true" use-expressions="true">
    <sec:custom-filter ref="csrfFilter" before="LOGOUT_FILTER"/>
    <!-- ... -->
    <sec:session-management session-authentication-strategy-ref="sessionAuthenticationStrategy" />
</sec:http>

<bean id="csrfTokenRepository"
    class="org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository" />

<bean id="csrfFilter" class="org.springframework.security.web.csrf.CsrfFilter">
    <constructor-arg index="0" ref="csrfTokenRepository" />
    <property name="accessDeniedHandler">
        <bean
            class="org.springframework.security.web.access.AccessDeniedHandlerImpl">
            <property name="errorPage" value="/WEB-INF/views/common/error/csrfTokenError.jsp" />
        </bean>
    </property>
</bean>

<bean id="sessionAuthenticationStrategy"
    class="org.springframework.security.web.authentication.session.CompositeSessionAuthenticationStrategy">
    <constructor-arg index="0">
        <list>
            <bean
                class="org.springframework.security.web.authentication.session.SessionFixationProtectionStrategy" />
            <bean
                class="org.springframework.security.web.csrf.CsrfAuthenticationStrategy">
                <constructor-arg index="0"
                    ref="csrfTokenRepository" />
            </bean>
        </list>
    </constructor-arg>
</bean>

[Step 6] Modify to use POST method at the logout request

From version 5.0.0(From Spring Security 3.2), the specification of logout request has been changed. Specifically, need to use the POST method at the logout request.

[Procedure's required cases]

If all of following cases are matched, please perform next modification.

  • If using CSRF countermeasures of Spring Security
  • If using GET method at logout request

[Modification method]

Please modify to use POST method in jsp or html files that send logout request.

[Step 7] Modify settings to use XML namespace for Concurrent Session Control (<sec:concurrency-control>)

From version 5.0.0, the XML namespace for Concurrent Session Control (<sec:concurrency-control>) is recommended to use.

[Procedure's required cases]

This procedure is optional, but recommend to apply. Please perform next modification, if all of following cases are matched and feel the need.

  • If using Concurrent Session Control of Spring Security
  • If defining components for Concurrent Session Control without using <sec:concurrency-control> tag

[Modification method]

Please modify to use <sec:concurrency-control> tag. When using the <sec:concurrency-control>, components for Concurrent Session Control is enabled automatically.

  • ConcurrentSessionFilter
  • SessionRegistryImpl
  • ConcurrentSessionControlAuthenticationStrategy
  • RegisterSessionAuthenticationStrategy
  • (SessionFixationProtectionStrategy or ChangeSessionIdAuthenticationStrategy)

Note

The ConcurrentSessionControlStrategy is deprecated from Spring Security 3.2. The ConcurrentSessionControlStrategy has been separated to the ConcurrentSessionControlAuthenticationStrategy and RegisterSessionAuthenticationStrategy.

<sec:http auto-config="true" >
    <sec:session-management>
        <sec:concurrency-control error-if-maximum-exceeded="true" />
    </sec:session-management>
</sec:http>

[For reference]

This settings is legacy style and deprecated style(e.g. Configuration method that is described into the development guideline for 1.0.1).

Warning

The ConcurrentSessionControlStrategy is deprecated from Spring Security 3.2. If defining components for Concurrent Session Control without using <sec:concurrency-control> tag after migrating, "[Step 8] Replace deprecated API of Spring Security" is required.

<sec:http auto-config="true" >
    <!-- omitted -->
    <sec:custom-filter
        position="CONCURRENT_SESSION_FILTER" ref="concurrencyFilter" />
    <sec:session-management
        session-authentication-strategy-ref="sessionAuthenticationStrategy" />
    <!-- omitted -->
</sec:http>

<bean id="sessionRegistry"
    class="org.springframework.security.core.session.SessionRegistryImpl" />

<bean id="concurrencyFilter"
   class="org.springframework.security.web.session.ConcurrentSessionFilter">
   <constructor-arg index="0" ref="sessionRegistry" />
</bean>

<bean id="sessionAuthenticationStrategy"
    class="org.springframework.security.web.authentication.session.CompositeSessionAuthenticationStrategy">
    <constructor-arg index="0">
        <list>
            <!-- omitted -->
            <bean class="org.springframework.security.web.authentication.session.ConcurrentSessionControlStrategy">
                <constructor-arg index="0" ref="sessionRegistry" />
                <property name="exceptionIfMaximumExceeded" value="true" />
            </bean>
            <!-- omitted -->
        </list>
    </constructor-arg>
</bean>

<!-- omitted -->

[Step 8] Replace deprecated API of Spring Security

From version 5.0.0(Spring Security 3.2), The ConcurrentSessionControlStrategy is deprecated.

Note

The ConcurrentSessionControlStrategy is deprecated from Spring Security 3.2. The ConcurrentSessionControlStrategy has been separated to the ConcurrentSessionControlAuthenticationStrategy and RegisterSessionAuthenticationStrategy.

Note

If applying procedure of "[Step 7] Modify settings to use XML namespace for Concurrent Session Control (<sec:concurrency-control>)", please skip this procedure.

[Procedure's required cases]

If all of following cases are matched, please perform next modification.

  • If using Concurrent Session Control of Spring Security
  • If defining components for Concurrent Session Control without using <sec:concurrency-control> tag after migrating

[Modification method]

Please modify to use the ConcurrentSessionControlAuthenticationStrategy and RegisterSessionAuthenticationStrategy instead of the ConcurrentSessionControlStrategy.

Note

Please define the SessionFixationProtectionStrategy at between ConcurrentSessionControlAuthenticationStrategy and RegisterSessionAuthenticationStrategy.

<!-- omitted -->

<bean id="sessionAuthenticationStrategy"
    class="org.springframework.security.web.authentication.session.CompositeSessionAuthenticationStrategy">
    <constructor-arg index="0">
        <list>
            <!-- omitted -->
            <bean class="org.springframework.security.web.authentication.session.ConcurrentSessionControlAuthenticationStrategy">
                <constructor-arg index="0" ref="sessionRegistry" />
                <property name="exceptionIfMaximumExceeded" value="true" />
            </bean>
            <bean class="org.springframework.security.web.authentication.session.SessionFixationProtectionStrategy" />
            <bean class="org.springframework.security.web.authentication.session.RegisterSessionAuthenticationStrategy">
                <constructor-arg index="0" ref="sessionRegistry" />
            </bean>
            <!-- omitted -->
        </list>
    </constructor-arg>
</bean>

<!-- omitted -->

[For reference]

This settings is deprecated style(e.g. Configuration method that is described into the development guideline for 1.0.1).

<!-- omitted -->

<bean id="sessionAuthenticationStrategy"
    class="org.springframework.security.web.authentication.session.CompositeSessionAuthenticationStrategy">
    <constructor-arg index="0">
        <list>
            <!-- omitted -->
            <bean class="org.springframework.security.web.authentication.session.ConcurrentSessionControlStrategy">
                <constructor-arg index="0" ref="sessionRegistry" />
                <property name="exceptionIfMaximumExceeded" value="true" />
            </bean>
            <!-- omitted -->
        </list>
    </constructor-arg>
</bean>

<!-- omitted -->

[Step 9] Modify jsp to use the <form:form> tag when request using http GET method

From version 5.0.0(From Spring Security 3.2 + Spring Framework 4.0), behavior of CsrfRequestDataValueProcessor has been improved. Specifically, when using the <form:form method="GET">, the CSRF token value is not output as hidden tag. (In other words, the CSRF token value is not included in the query string)

[Procedure's required cases]

This procedure is optional. Please perform next modification, if all of following cases are matched and feel the need.

  • If using the CSRF countermeasures of Spring Security
  • If using on combination with <form> tag of HTML standard and <spring:nestedPath> tag at GET request

[Modification method]

Please modify to use <form:form method="GET"> at GET request.

<!-- ### Need to modify ### -->
<form:form method="GET" modelAttribute="xxxForm" action="...">
    <%-- ... --%>
</form:form>

Note

If omit the method attribute of <form:form> tag, POST method is applied.

[For reference]

This code is legacy style.

<form method="GET" action="...">
    <spring:nestedPath path="xxxForm">
        <%-- ... --%>
    </spring:nestedPath>
</form>

or

<form action="...">
    <spring:nestedPath path="xxxForm">
        <%-- ... --%>
    </spring:nestedPath>
</form>

Note

If omit the method attribute of <form> tag of HTML standard, GET method is applied.

[Step 10] Modify application to use @AuthenticationPrincipal

From version 5.0.0(From Spring Security 3.2), the @AuthenticationPrincipal has been added to hand over the UserDetails to the method of Controller class. the @AuthenticationPrincipal is recommended to use.

[Procedure's required cases]

This procedure is optional. Please perform next modifications, if feel the need.

[Modification method(Recommended Style)]

Please add AuthenticationPrincipalArgumentResolver into <mvc:argument-resolvers> tag.

Please modify one of the following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-web/src/main/resources/META-INF/spring/spring-mvc.xml
  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/spring-mvc.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/spring-mvc.xml
<mvc:annotation-driven>
    <mvc:argument-resolvers>
        <!-- ... -->
        <!-- ### Need to add ### -->
        <bean
            class="org.springframework.security.web.bind.support.AuthenticationPrincipalArgumentResolver" />
    </mvc:argument-resolvers>
</mvc:annotation-driven>

In Controller class, please specify class of assignable to org.springframework.security.core.userdetails.UserDetails as method arguments and add @AuthenticationPrincipal as arguments annotation of UserDetails.

@RequestMapping(method = RequestMethod.GET)
public String view(
        @AuthenticationPrincipal CustomUserDetails userDetails, // ### Need to modify ###
        Model model) {
    // ...
}

[For reference]

This code is legacy style.

@RequestMapping(method = RequestMethod.GET)
public String view(Principal principal, Model model) {
    Authentication authentication = (Authentication) principal;
    CustomUserDetails userDetails = (CustomUserDetails) authentication.getPrincipal();
    // ...
}

[Step 11] Modify jsp to use <sec:csrfInput> tag

From version 5.0.0(From Spring Security 3.2), the <sec:csrfInput> has been added to embed the CSRF token value as hidden tag.

[Procedure's required cases]

This procedure is optional. Please perform next modification, if all of following cases are matched and feel the need.

  • If using the CSRF countermeasures of Spring Security
  • If implementing a logic to embed the CSRF token value as hidden tag in jsp (without using <form:form> tag)

[Modification method(Recommended Style)]

Please modify to use <sec:csrfInput>.

<form method="POST" action="...">
    <%-- ... --%>
    <sec:csrfInput />
</form>

[For reference]

This code is legacy style.

<form method="POST" action="...">
    <%-- ... --%>
    <input type="hidden" name="${f:h(_csrf.parameterName)}" value="${f:h(_csrf.token)}"/>
</form>

[Step 12] Modify jsp to use <sec:csrfMetaTags> tag

From version 5.0.0(From Spring Security 3.2), the <sec:csrfMetaTags> has been added to embed the CSRF token value as <meta> tag.

[Procedure's required cases]

This procedure is optional. Please perform next modification, if all of following cases are matched and feel the need.

  • If using the CSRF countermeasures of Spring Security
  • If implementing a logic to embed the CSRF token value as <meta> tag in jsp

[Modification method(Recommended Style)]

Please modify to use <sec:csrfMetaTags> .

<head>
    <sec:csrfMetaTags />
</head>

Note

About name attribute of meta tags

If use <sec:csrfMetaTags> tag, need to attention to the value of the name attribute of the <meta> tag. (tags that is outputted using <sec:csrfMetaTags> is following)

<meta name="_csrf_parameter" content="_csrf" />
<meta name="_csrf_header" content="X-CSRF-TOKEN" />
<meta name="_csrf" content="102fbad9-7d4f-42d2-a506-6a47120b5f36" />

If access to meta tags by the different name from the Javascript , need to modify the JavaScript.

[For reference]

This code is legacy style.

<head>
    <meta name="_csrf_parameter" content="${f:h(_csrf.parameterName)}" />
    <meta name="_csrf_header" content="${f:h(_csrf.headerName)}"/>
    <meta name="_csrf" content="${f:h(_csrf.token)}"/>
</head>

[Step 13] Update settings to use Jackson 2.4

From version 5.0.0(From Spring Security 4.1), Jackson 1.x has not been supported. So that if use the Jackson, need to modify settings to use classes for Jackson 2.4.

[Procedure's required cases]

If the following case is matched, please perform next modifications.

  • If customizing the MappingJacksonHttpMessageConverter into <mvc:message-converters> tag.

[Modification method]

Please modify as following.

  • Change the class name of HttpMessageConverter (MappingJacksonHttpMessageConverter -> MappingJackson2HttpMessageConverter)
  • Change the package name of Jackson APIs ("org.codehaus -> com.fasterxml)

Please modify one of the following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-web/src/main/resources/META-INF/spring/spring-mvc.xml
  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/spring-mvc.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/spring-mvc.xml
<bean id="jsonMessageConverter"
    class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"> <!-- ### Need to edit ### -->
    <property name="objectMapper">
        <bean id="objectMapper" class="com.fasterxml.jackson.databind.ObjectMapper"> <!-- ### Need to edit ### -->
            <property name="dateFormat">
                <bean class="com.fasterxml.jackson.databind.util.StdDateFormat" /> <!-- ### Need to edit ### -->
            </property>
        </bean>
    </property>
    <!-- ... -->
</bean>

<mvc:annotation-driven>
    <mvc:message-converters register-defaults="false">
        <ref bean="jsonMessageConverter" />
    </mvc:message-converters>
    <!-- ... -->
</mvc:annotation-driven>

Note

If specifying other properties in your application, please modify these if necessary.

[For reference]

This settings is invalid from 5.0.0.

<bean id="jsonMessageConverter"
    class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter">
    <property name="objectMapper">
        <bean id="objectMapper" class="org.codehaus.jackson.map.ObjectMapper">
            <property name="dateFormat">
                <bean class="org.codehaus.jackson.map.util.StdDateFormat" />
            </property>
        </bean>
    </property>
    <!-- ... -->
</bean>

<mvc:annotation-driven>
    <mvc:message-converters register-defaults="false">
        <ref bean="jsonMessageConverter" />
    </mvc:message-converters>
    <!-- ... -->
</mvc:annotation-driven>

[Step 14] Modify application to use Jackson 2.4

From version 5.0.0(From Spring Security 4.1), Jackson 1.x has not been supported. So if using the Jackson 1.x, modifying application is required to use classes of Jackson 2.4.

[Procedure's required cases]

If one of following cases is matched, please perform next modifications.

  • If using annotations of Jackson 1.x to customize the serialization or deserialization
  • If implementing the interface(or extends the class) that provided by Jackson 1.x

[Modification method]

Please modify to use classes of Jackson 2.4.

Note

Root package is following.

  • 1.x : org.codehaus
  • 2.4 : com.fasterxml

Incidentally, constitution of subpackages also has a lot changes.

For examples,

  • org.codehaus.jackson.map.ObjectMapper -> com.fasterxml.jackson.databind.ObjectMapper
  • org.codehaus.jackson.map.util.StdDateFormat -> com.fasterxml.jackson.databind.util.StdDateFormat
  • more ...

Please modify to use @JsonInclude annotation instead of @JsonSerialize.include (@JsonSerialize.include has been deprecated)

@JsonInclude(JsonInclude.Include.NON_NULL) // ### Need to change ###
private String password;

[For reference]

This code is deprecated style from 5.0.0.

@JsonSerialize(include = Inclusion.NON_NULL)
private String password;

[Step 15] Modify settings to use ViewResolver for Tiles 3.0

From version 5.0.0, the Spring IO Platform 1.1.0.RELEASE has been applied for version control of dependency libraries. So that Tiles has been upgraded to 3.0.5.

[Procedure's required cases]

If the following case is matched, please perform next modifications.

  • If using the Tiles to resolve view

[Modification method(Recommended Style)]

Please modify to use classes for Tiles 3.0. The <mvc:tiles> tag and <mvc:tiles-configurer> tag is recommended to use.

Please modify one of the following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-web/src/main/resources/META-INF/spring/spring-mvc.xml
  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/spring-mvc.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/spring-mvc.xml
<mvc:view-resolvers>
    <!-- ... -->
    <mvc:tiles /> <!-- ### Need to replace ### -->
    <!-- ... -->
</mvc:view-resolvers>

<!-- ### Need to replace ### -->
<mvc:tiles-configurer>
    <mvc:definitions location="/WEB-INF/tiles/tiles-definitions.xml" />
</mvc:tiles-configurer>

[Another method(For reference)]

This settings is legacy style.

<bean
    class="org.springframework.web.servlet.view.tiles3.TilesViewResolver">
    <property name="order" value="1" />
</bean>

<bean class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
    <property name="definitions">
        <list>
            <value>/WEB-INF/tiles/tiles-definitions.xml</value>
        </list>
    </property>
</bean>

[For reference]

This settings is invalid from 5.0.0.

<bean
    class="org.springframework.web.servlet.view.tiles2.TilesViewResolver">
    <property name="order" value="1" />
</bean>

<bean class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
    <property name="definitions">
        <list>
            <value>/WEB-INF/tiles/tiles-definitions.xml</value>
        </list>
    </property>
</bean>

[Step 16] Modify tiles setting files to use Tiles 3.0

From version 5.0.0, the Spring IO Platform 1.1.0.RELEASE has been applied for version control of dependency libraries. So that Tiles has been upgraded to 3.0.5. From Tiles 3.0, dtd file has been updated.

[Procedure's required cases]

If the following case is matched, please perform next modification.

  • If using the Tiles to resolve view

[Modification method]

Please modify to use dtd file for Tiles 3.0.

Please modify one of the following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-web/src/main/webapp/META-INF/tiles/tiles-definitions.xml
  • $YOUR_SINGLE_PROJECT/src/main/webapp/META-INF/tiles/tiles-definitions.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/webapp/META-INF/tiles/tiles-definitions.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE tiles-definitions PUBLIC
   "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
   "http://tiles.apache.org/dtds/tiles-config_3_0.dtd"> <!-- ### Need to edit ### -->

<tiles-definitions>
    <!-- ... -->
</tiles-definitions>

[For reference]

This settings is invalid from 5.0.0.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE tiles-definitions PUBLIC
   "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
   "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">

<tiles-definitions>
    <!-- ... -->
</tiles-definitions>

[Step 17] Modify a taglib prefix for Tiles 3.0 in jsp

From version 5.0.0, the Spring IO Platform 1.1.0.RELEASE has been applied for version control of dependency libraries. So that Tiles has been upgraded to 3.0.5. From Tiles 3.0, tags-tiles-extras has been added as jsp tag library.

[Procedure's required cases]

If all of following cases are matched, please perform next modification.

  • If using the Tiles to resolve view
  • If using the <tiles:useAttribute> tag

[Modification method]

Please add taglib definition of tags-tiles-extras .

Please modify one of the following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-web/src/main/webapp/META-INF/views/common/include.jsp
  • $YOUR_SINGLE_PROJECT/src/main/webapp/META-INF/views/common/include.jsp
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/webapp/META-INF/views/common/include.jsp
<%-- ... --%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles-extras" prefix="tilesx"%> <!-- ### Need to add ### -->
<%-- ... --%>

And, need to modify jsp to use new jsp tag library(<tilesx:useAttribute>).

<%-- ... --%>
<tilesx:useAttribute id="cssList" name="cssList" classname="java.util.List" /> <!-- ### Need to edit ### -->
<%-- ... --%>

[For reference]

This code is invalid from 5.0.0.

<%-- ... --%>
<tiles:useAttribute id="cssList" name="cssList" classname="java.util.List" />
<%-- ... --%>

[Step 18] Modify messages in ValidationMessages.properties

From version 5.0.0, the Spring IO Platform 1.1.0.RELEASE has been applied for version control of dependency libraries. So that Hibernate Validator has been upgraded to 5.1.3. From Tiles 5.1.3, following default message has been changed and has been included bug (HV-949).

  • Message definition of @DecimalMax has been changed (has been modified to use Expression Language)
  • Message definition of @DecimalMin has been changed (has been modified to use Expression Language)
  • Message definition of new constraints has been added
  • Message definition of new constraints has been included bug (HV-949)

[Procedure's required cases]

If one of following cases is matched, please perform next modifications.

  • If using the @javax.validation.constraints.DecimalMax
  • If using the @javax.validation.constraints.DecimalMin
  • If will use new constraint after migration

[Modification method]

Please perform follows:

  • Confirm differences with 4.3 and 5.1.
  • Apply differences to the your application messages.
  • If use the @CreditCardNumber or new constraint annotations, please modify message definitions including bug.

Please modify one of the following files.(if not exist file, please add file)

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-web/src/main/resources/ValidationMessages.properties
  • $YOUR_SINGLE_PROJECT/src/main/resources/ValidationMessages.properties
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/ValidationMessages.properties

[Step 19] Replace deprecated API of Bean Validation

From version 5.0.0, the Spring IO Platform 1.1.0.RELEASE has been applied for version control of dependency libraries. So that Bean Validation has been upgraded to 1.1. From Bean Validation 1.1, some APIs has been deprecated.

[Procedure's required cases]

If one of following cases is matched, please perform next modification.

  • If using the javax.validation.ConstraintValidatorContext.ConstraintViolationBuilder.addNode(String)
  • If using the javax.validation.ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderDefinedContext.addNode(String)
  • If using the javax.validation.ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderCustomizableContext.addNode(String)
  • If using the javax.validation.ConstraintValidatorContext.ConstraintViolationBuilder.NodeContextBuilder.addNode(String)

[Modification method]

Please replaced to added APIs(addPropertyNode, addBeanNode, addParameterNode) from Bean Validation 1.1. Details of replaced APIs refer to here .

[Step 20] Replace deprecated API of Joda Time

From version 5.0.0, the Spring IO Platform 1.1.0.RELEASE has been applied for version control of dependency libraries. So that Joda Time has been upgraded to 2.5. From Bean Validation 1.1, some APIs has been deprecated.

[Procedure's required cases]

If the following case is matched, please perform next modification.

  • If using the org.joda.time.DateMidnight

[Modification method]

If does not need the time zone, please use the org.joda.time.LocalDate .

LocalDate currentLocalDate  = new LocalDate();

or

If need the time zone, please use the org.joda.time.DateTime that has been set at the start of a day using org.joda.time.DateTime.withTimeAtStartOfDay() .

DateTime currentDateTimeAtStartOfDay = new DateTime().withTimeAtStartOfDay();

[For reference]

This code is deprecated style from 5.0.0.

DateMidnight currentDateMidnight = new DateMidnight();

[Step 21] Replace to BasicDataSource of Apache Commons DBCP 2

From version 5.0.0, the Spring IO Platform 1.1.0.RELEASE has been applied for version control of dependency libraries. So that Apache Commons DBCP has been upgraded to 2.0.

[Procedure's required cases]

If the following case is matched, please perform next modification.

  • If using the org.apache.commons.dbcp.BasicDataSource

[Modification method]

Please modify as following.

  • Change the package name of BasicDataSource (org.apache.commons.dbcp -> org.apache.commons.dbcp2)
  • Change the property name to set maximum total number of idle and borrows connections that can be active at the same time (maxActive -> maxTotal)
  • Change the property name to set maximum number of milliseconds that the pool will wait for a connection to be returned before throwing an exception (maxWait -> maxWaitMillis)

Please modify one of the following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-env/src/main/resources/META-INF/spring/xxx-env.xml
  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/xxx-env.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/xxx-env.xml
<bean id="realDataSource" class="org.apache.commons.dbcp2.BasicDataSource"
    destroy-method="close"> <!-- ### Need to edit ### -->
    <property name="driverClassName" value="${database.driverClassName}" />
    <property name="url" value="${database.url}" />
    <property name="username" value="${database.username}" />
    <property name="password" value="${database.password}" />
    <property name="defaultAutoCommit" value="false" />
    <property name="maxTotal" value="${cp.maxActive}" /> <!-- ### Need to edit ### -->
    <property name="maxIdle" value="${cp.maxIdle}" />
    <property name="minIdle" value="${cp.minIdle}" />
    <property name="maxWaitMillis" value="${cp.maxWait}" /> <!-- ### Need to edit ### -->
</bean>

Note

If using the following properties, please modify these if necessary.

  • If using the removeAbandoned , please specify removeAbandonedOnBorrow or removeAbandonedOnMaintenance or both.

[For reference]

This settings is invalid from 5.0.0.

<bean id="realDataSource" class="org.apache.commons.dbcp.BasicDataSource"
    destroy-method="close">
    <property name="driverClassName" value="${database.driverClassName}" />
    <property name="url" value="${database.url}" />
    <property name="username" value="${database.username}" />
    <property name="password" value="${database.password}" />
    <property name="defaultAutoCommit" value="false" />
    <property name="maxActive" value="${cp.maxActive}" />
    <property name="maxIdle" value="${cp.maxIdle}" />
    <property name="minIdle" value="${cp.minIdle}" />
    <property name="maxWait" value="${cp.maxWait}" />
</bean>

[Step 22] Apply changes in specification of @ExistInCodeList

From version 5.0.0, the specification of @ExistInCodeList 's message key has been changed for the bug fix. Please see the GitHub issues#16 about bug information.

[Procedure's required cases]

If the following case is matched, please apply next modification.

  • If overriding the @ExistInCodeList 's default message.

[Modification method]

Please append .message into @ExistInCodeList 's message key.

Please modify one of the following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-web/src/main/resources/ValidationMessages.properties
  • $YOUR_SINGLE_PROJECT/src/main/resources/ValidationMessages.properties
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/ValidationMessages.properties
org.terasoluna.gfw.common.codelist.ExistInCodeList.message = Custom message for your application

[For reference]

This settings is invalid from 5.0.0.

org.terasoluna.gfw.common.codelist.ExistInCodeList = Custom message for your application

[Step 23] Apply the changes in the specification of QueryEscapeUtils's methods

From version 5.0.0, the specification of QueryEscapeUtils's methods has been changed for the bug fix. Please see the GitHub issues#148 about bug information. With this specification change, the wrong escaping issue is resolved for wildcard characters of the LIKE phrase in the SQL(or JPQL).

Note

About wildcard characters(escape target characters)

Until version 1.0.1, wildcard characters is as follows:

  • % , _ , , _

Since version 5.0.0, default wildcard characters is as follows:

  • % , _

[Procedure's required cases]

If all of following cases are matched, please apply next modification.

  • If using QueryEscapeUtils's methods to escape the wildcard characters.
  • If using the database supporting '%' and '_' as wildcard characters (full width wildcard characters). e.g. Oracle 11g.

[Modification method]

Please modify to use option usage (compatibility option with 1.0.1).

  • Get a LikeConditionEscape instance for escaping full width wildcard characters using QueryEscapeUtils.withFullWidth() method.
  • Call same signature method with QueryEscapeUtils.

Modified code will be as follows:

String escapedWord = QueryEscapeUtils.withFullWidth().toLikeCondition(query);

[Step 24] Apply changes in specification of f:u()

From version 5.0.0, the specification of f:u() has been changed for the bug fix. Please see the GitHub issues#149 about bug information. With this specification change, the wrong URL encoding issue is resolved in parameter values of query string.

Note

About encode target

  • Until version 1.0.1, f:u() was EL function to encode the URI string(e.g. http://localhost:8080/path?param=value#fragment).
  • Since version 5.0.0(and 1.0.2), f:u() is EL function to encode the request parameter values.

[Procedure's required cases]

If the following case is matched, please apply next modification.

  • If using f:u() to encode the URI string(e.g. http://localhost:8080/path?param=value#fragment).

[Modification method]

Please modify to use JSP tag library following.

  • <c:url>
  • <spring:url>
<a href="<c:url value="${url}" />">Link Name</a>

[Step 25] Apply the changes in specification of CompositeRequestDataValueProcessor

From version 5.0.0, the specification of CompositeRequestDataValueProcessor#getExtraHiddenFields 's method has been changed for the bug fix. Please see the GitHub issues#167 about bug information.

Note

About output order of hidden tags generated by RequestDataValueProcessor

With this specification change, there is a possibility that output order of hidden tags generated by RequestDataValueProcessor (CSRF token, Transaction token, etc...) is changed.

[Procedure's required cases]

If one of following cases is matched, please apply next modification.

  • If accessing hidden tags generated by RequestDataValueProcessor using the JavaScript.
  • If accessing hidden tags generated by RequestDataValueProcessor in automated E2E test cases(at Selenium,etc ...).

[Modification method]

If the problem occurs related to the output order of hidden tag, please change the accessing method to the hidden tag generated by RequestDataValueProcessor.

[Step 26] Add the ValidationMessages.properties into your project

From version 5.0.0, the ValidationMessages.properties has been excluded from terasoluna-gfw-common's jar file for the bug fix. Please see the GitHub issues#256 about bug information.

Related issues are [multi#99], [single#75].

Note

About displayed message

With this change, there is a possibility that @ExistInCodeList's default message is not displayed (instead of, message key is displayed).

[Procedure's required cases]

If all of following cases are matched, please apply next modification.

  • If using @ExistInCodeList annotation as bean validation.
  • If using @ExistInCodeList's default message of ValidationMessages.properties in terasoluna-gfw-common's jar file.

[Modification method]

Please add message definition of @ExistInCodeList in one of the following files. (If not exist the file in your project, please add the file into your project)

  • YOUR_MULTIPLE_PROJECT_ROOT/xxx-web/src/main/resources/ValidationMessages.properties
  • $YOUR_SINGLE_PROJECT/src/main/resources/ValidationMessages.properties
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/ValidationMessages.properties
org.terasoluna.gfw.common.codelist.ExistInCodeList.message = Does not exist in {codeListId}

[Step 27] Apply the changes in specification of active page link

From version 5.0.0, the specification of active page link(current page link) has been changed for the improvement of <pagination> tag. Please see the GitHub issues#13 about improvement information.

Note

About specification of active page link

Until version 1.0.1, specification is as follows:

  • Active link was enabled. This means that the request for reloading current page was submitted when click the active page link.

Since version 5.0.0, specification is as follows:

  • Active link is disabled. This means that the request for reloading current page does not submitted when click the active page link.

[Procedure's required cases]

If the following case is matched, please apply next modification.

  • If reloading the current page is required when the active page link is clicked.

[Modification method]

Please set the enableLinkOfCurrentPage="true" into the <pagination> tag to enable the active page link.

<t:pagination
    page="${page}"
    enableLinkOfCurrentPage="true" /> <!-- ### Need to set the 'enableLinkOfCurrentPage' attribute ### -->

[Step 28] Apply the changes in specification of disabled page link

From version 5.0.0, the specification of disabled page link has been changed for the improvement of <pagination> tag. Please see the GitHub issues#14 about improvement information.

Note

About specification of disabled page link

Until version 1.0.1, specification is as follows:

  • Had set a "#" into disabled link's href. This means that the page position was moved to top of current page when click the disabled page link.

Since version 5.0.0, specification is as follows:

  • Has set a "javascript:void(0)" into disabled link's href. This means that the page position does not moved to top of current page when click the disabled page link.

[Procedure's required cases]

If the following case is matched, please apply next modification.

  • If the measures to resolve this behavior(e.g. using JavaScript) is applied already into your application.

[Modification method]

Please set the disabledHref="#" into the <pagination> tag to apply the same behavior with the version 1.0.1.

<t:pagination
    page="${page}"
    disabledHref="#" /> <!-- ### Need to set the 'disabledHref' attribute ### -->

Note

If the measures of your application is same with 5.0.0(if had set a disabledHref="javascript:void(0)" into the <pagination> tag), the measures of your application is recommended to remove.

[Step 29] Modify application to use the ResultMessages.warning() instead of the ResultMessages.warn()

From version 5.0.0, the ResultMessages.warning() method has been added instead of the ResultMessages.warn() method for support compatible with the alert component of the Bootstrap. With this changes, ResultMessages.warn() is become deprecated method.

[Procedure's required cases]

This procedure is optional. Please perform next modification, if feel the need.

Note

Next modification is recommended if your application has not been released to the production environment.

[Modification method]

Please modify application to use the the ResultMessages.warning() instead of the ResultMessages.warn(). And please modify css files if necessary.

[Step 30] Add the terasoluna-gfw-jodatime into dependency definition

From version 5.0.0, the terasoluna-gfw-jodatime has been added instead for providing components that depend on the Joda Time. (for separating components that depend on the Joda Time from the terasoluna-gfw-common)

[Procedure's required cases]

If the following case is matched, please apply next modification.

  • If using the DateFactory

[Modification method]

Please add terasoluna-gfw-jodatime artifact into dependency definition in following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-domain/pom.xml
  • $YOUR_SINGLE_PROJECT/pom.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/.classpath
  • $YOUR_ECLIPSE_WTP_PROJECT/build.xml

pom.xml (Maven project only)

<!-- ### Need to add ### -->
<dependency>
    <groupId>org.terasoluna.gfw</groupId>
    <artifactId>terasoluna-gfw-jodatime</artifactId>
</dependency>

.classpath (WTP project only)

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/terasoluna-gfw-jodatime-5.0.0.RELEASE.jar"
    sourcepath="libsrc/terasoluna-gfw-jodatime-5.0.0.RELEASE-sources.jar" /> <!-- ### Need to add ### -->

build.xml (WTP project only)

<path id="build.classpath">
    <!-- ... -->
    <pathelement location="${lib.dir}/terasoluna-gfw-jodatime-5.0.0.RELEASE.jar"/> <!-- ### Need to add ### -->
    <!-- ... -->
</path>

[Step 31] Modify application to use the JodaTimeDateFactory instead of the DateFactory

From version 5.0.0, the JodaTimeDateFactory has been added instead of the DateFactory for separating components that depend on the Joda Time from the terasoluna-gfw-common. With this changes, DateFactory is become deprecated.

Note

These changes are prepared to support the Date/Time API(JSR-310) added from Java 8 in the future.

[Procedure's required cases]

If the following case is matched, please apply next modification.

  • If using the DateFactory

Note

Deprecated DataFactory classes will be pruned in the future release.

Note

Next modification is recommended if your application has not been released to the production environment.

[Modification method]

Please modify application to use the the JodaTimeDateFactory has been added instead of the DateFactory.

Java file :

public class XxxServiceImpl implements XxxService {
    @Inject
    JodaTimeDateFactory dateFactory; // ### Need to edit###
    // ...
}

Bean definition file :

  • $YOUR_MULTIPLE_PROJECT_ROOT/src/main/resources/META-INF/spring/xxx-env.xml
  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/xxx-env.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/xxx-env.xml
<bean id="dateFactory"
    class="org.terasoluna.gfw.common.date.jodatime.DefaultJodaTimeDateFactory" /> <!-- ### Need to edit ### -->
.. tabularcolumns:: |p{0.50\linewidth}|p{0.50\linewidth}|
Correspondence table for replace class
1.0.1 (Deprecated APIs) 5.0.0 (Recommended APIs)
org.terasoluna.gfw.common.date.
DefaultDateFactory
org.terasoluna.gfw.common.date.jodatime.
DefaultJodaTimeDateFactory
org.terasoluna.gfw.common.date.
JdbcAdjustedDateFactory
org.terasoluna.gfw.common.date.jodatime.
JdbcAdjustedJodaTimeDateFactory
org.terasoluna.gfw.common.date.
JdbcFixedDateFactory
org.terasoluna.gfw.common.date.jodatime.
JdbcFixedJodaTimeDateFactory

[Step 32] Apply the fixes of ViewResolver setting into spring-mvc.xml

From version 5.0.0, the order of setting of the BeanNameViewResolver has been changed to avoid same with TilesViewResolver and BeanNameViewResolver. Please see the GitHub multi/issues#50 about bug information.

Note

If applying procedure of "[Step 2] Modify settings to use XML namespace for ViewResolver", please skip this procedure.

Definition order is follows:

<mvc:view-resolvers>
    <mvc:bean-name />
    <mvc:tiles />
    <mvc:jsp prefix="/WEB-INF/views/" />
</mvc:view-resolvers>

[Procedure's required cases]

If all of the following cases are matched, please apply next modification.

  • If using the Apache Tiles as layout engine
  • If using the BeanNameViewResolver
  • If setting same order with TilesViewResolver and BeanNameViewResolver (if using the blank project setting as it is)

[Modification method]

Please change the BeanNameViewResolver's order to less than TilesViewResolver's order in the following file.

  • YOUR_MULTIPLE_PROJECT_ROOT/xxx-web/src/main/resources/META-INF/spring/spring-mvc.xml
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver">
    <property name="order" value="0" /> <!-- ### Need to edit value attribute ### -->
</bean>

[Step 33] Apply the adding of ResultMessagesLoggingInterceptor definition into xxx-domain.xml

From version 5.0.0, the ResultMessagesLoggingInterceptor has been added into xxx-domain.xml. Please see the GitHub single/issues#39 about bug information. With this change, exceptions that hold a ResultMessages are logged.

[Procedure's required cases]

If the following case is matched, please apply next modification.

  • If using the project generated from single blank project for JPA

[Modification method]

Please add the ResultMessagesLoggingInterceptor definition in one of the following files.

  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/xxx-domain.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/xxx-domain.xml
<bean id="resultMessagesLoggingInterceptor"
    class="org.terasoluna.gfw.common.exception.ResultMessagesLoggingInterceptor">
    <property name="exceptionLogger" ref="exceptionLogger" />
</bean>
<aop:config>
    <aop:advisor advice-ref="resultMessagesLoggingInterceptor"
        pointcut="@within(org.springframework.stereotype.Service)" />
</aop:config>

[Step 34] Apply the fixes of UserIdMDCPutFilter setting into spring-security.xml

From version 5.0.0, changed the UserIdMDCPutFilter setting of spring-security.xml. Please see the GitHub single/issues#45 about bug information. With this change, it becomes possible to include the login user name into the log of after finishing Spring Security processing.

[Procedure's required cases]

If the following case is matched, please apply next modification.

  • If using Spring Security as authentication and authorization processing

[Modification method]

Please remove the removeValue property of UserIdMDCPutFilter from one of the following files.

  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/spring-security.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/spring-security.xml
<bean id="userIdMDCPutFilter" class="org.terasoluna.gfw.security.web.logging.UserIdMDCPutFilter">
    <!-- ### Need to remove the 'removeValue' property ### -->
</bean>

[Step 35] Apply the fixes of <distributionManagement> setting into pom.xml

From version 1.0.2, the <distributionManagement> setting (terasolunaorg repositories) are removed from the pom.xml. Please see the GitHub multi/issues#8 about bug information.

[Procedure's required cases]

This procedure is optional, but recommend to apply next modification.

[Modification method]

Please remove the <distributionManagement> settings or remove the terasolunaorg repositories(terasoluna-gfw-releases, terasoluna-gfw-snapshots) from <distributionManagement> setting of the following file.

  • $YOUR_MULTIPLE_PROJECT_ROOT/pom.xml
<distributionManagement>
    <!-- ### Need to remove terasolunaorg repositories ### -->
    <!--
    <repository>
        <id>terasoluna-gfw-releases</id>
        <url>http://repo.terasoluna.org/nexus/content/repositories/terasoluna-gfw-releases/</url>
    </repository>
    <snapshotRepository>
        <id>terasoluna-gfw-snapshots</id>
        <url>http://repo.terasoluna.org/nexus/content/repositories/terasoluna-gfw-snapshots/</url>
    </snapshotRepository>
    -->
</distributionManagement>

[Step 36] Apply the fixes of <relativePath> setting into pom.xml

From version 5.0.0, the <relativePath /> setting has been added into pom.xml. Please see the GitHub multi/issues#36 and GitHub single/issues#46 about bug information. With this change, the trouble with STS's initial import could be avoided.

[Procedure's required cases]

This procedure is optional, but recommend to apply next modification.

[Modification method]

Please add the <relativePath /> element as a child element of <parent> into one of the following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/pom.xml
  • $YOUR_SINGLE_PROJECT/pom.xml
<parent>
    <groupId>org.terasoluna.gfw</groupId>
    <artifactId>terasoluna-gfw-parent</artifactId>
    <version>5.0.0.RELEASE</version>
    <relativePath /> <!-- ### Need to add ### -->
</parent>

[Step 37] Apply the fixes of JdbcCodeList setting into xxx-codelist.xml

From version 5.0.0, the bean definition of jdbcTemplate for JdbcCodeList has been added in xxx-codelist.xml. Please see the GitHub multi/issues#39 about bug information. With this change, it becomes possible to specify the fetch size to the select statement.

[Procedure's required cases]

If the following case is matched, recommend to apply next modification.

  • If using a large number of records as JdbcCodeList

[Modification method]

Please added the bean definition of jdbcTemplate & abstract bean of JdbcCodeList in the following file.

  • $YOUR_MULTIPLE_PROJECT_ROOT/src/main/resources/META-INF/spring/xxx-domain.xml
  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/xxx-domain.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/xxx-domain.xml
<bean id="jdbcTemplateForCodeList" class="org.springframework.jdbc.core.JdbcTemplate">
    <property name="dataSource" ref="dataSource" />
    <property name="fetchSize" value="${codelist.jdbc.fetchSize:1000}" />
</bean>

<bean id="AbstractJdbcCodeList"
      class="org.terasoluna.gfw.common.codelist.JdbcCodeList" abstract="true">
    <property name="jdbcTemplate" ref="jdbcTemplateForCodeList" />
</bean>

And please perform procedures to apply the abstract bean to the JdbcCodeList bean definitions.

  • Specify abstract bean id to the parent attribute instead of class attribute
  • Remove the dataSource property.
<bean id="CL_SAMPLE" parent="AbstractJdbcCodeList"> <!-- ### Need to edit ### -->
    <property name="querySql" value="SELECT code, code_name FROM t_sample_codes ORDER BY code" />
    <property name="valueColumn" value="code" />
    <property name="labelColumn" value="code_name" />
    <!-- ### Need to remove the 'dataSource' property ### -->
</bean>

[Step 38] Apply the fixes of code list import settings into xxx-domain.xml

From version 5.0.0, wildcard import has been used to import multiple code list definitions files in xxx-domain.xml. Please see the GitHub multi/issues#66 and GitHub single/issues#71 about bug information. With this change, it becomes possible to import multiple files from nested directories.

[Procedure's required cases]

This procedure is optional. Please perform next modification, if feel the need.

[Modification method]

Please modify to use wildcard import in one of the following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/src/main/resources/META-INF/spring/xxx-domain.xml
  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/xxx-domain.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/xxx-domain.xml
<import resource="classpath*:META-INF/spring/**/*-codelist.xml" /> <!-- ### Need to edit ### -->

[Step 39] Apply the fixes of CodeListInterceptor setting into spring-mvc.xml

From version 1.0.2, CodeListInterceptor has been added into spring-mvc.xml. Please see the GitHub multi/issues#77 and GitHub single/issues#62 about bug information. With this change, CodeList can be accessed from View component(e.g. JSP).

[Procedure's required cases]

This procedure is optional. Please perform next modification, if feel the need.

[Modification method]

Please add the CodeListInterceptor definition in one of the following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/src/main/resources/META-INF/spring/spring-mvc.xml
  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/spring-mvc.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/spring-mvc.xml
<mvc:interceptors>

    <!-- omit -->

    <mvc:interceptor>
        <mvc:mapping path="/**" />
        <mvc:exclude-mapping path="/resources/**" />
        <mvc:exclude-mapping path="/**/*.html" />
        <bean class="org.terasoluna.gfw.web.codelist.CodeListInterceptor">
            <property name="codeListIdPattern" value="CL_.+" />
        </bean>
    </mvc:interceptor>

    <!-- omit -->

</mvc:interceptors>

[Step 40] Apply the changes of parent pom.xml (multi)

From version 5.0.0, the Spring IO Platform 1.1.1.RELEASE has been applied for version control of dependency libraries. With this change, build setting has been changed in the blank project.

[Procedure's required cases]

Part of this procedure is required.

[Modification method]

Please apply changes of blank project.

[Step 40-1] $YOUR_MULTIPLE_PROJECT_ROOT/pom.xml

Note

Detail of changes refer to comparing page with 1.0.1.RELEASE and 5.0.0.RELEASE .

  • Select the "Files changed" tab
  • Click the "32 changed files" link (open file list)
  • Click the "pom.xml" link (Move to the file diff)

Please remove <build>/<extensions>/<extension> settings if unnecessary. (Optional)

  • org.apache.maven.archetype:archetype-packaging
  • org.apache.maven.wagon:wagon-ssh
  • org.apache.maven.archetype:archetype-packaging

Please remove <build>/<pluginManagement> settings if unnecessary. (Optional)

  • org.apache.maven.plugins:maven-compiler-plugin

Please remove <reporting> settings if unnecessary. (Optional)

  • org.apache.maven.plugins:maven-checkstyle-plugin
  • org.apache.maven.plugins:maven-javadoc-plugin
  • org.apache.maven.plugins:maven-project-info-reports-plugin
  • org.apache.maven.plugins:maven-resources-plugin
  • org.apache.maven.plugins:maven-site-plugin
  • org.apache.maven.plugins:maven-surefire-report-plugin
  • org.apache.maven.plugins:maven-jxr-plugin
  • org.codehaus.mojo:emma-maven-plugin
  • org.codehaus.mojo:findbugs-maven-plugin

Please remove dependencies managed by the Spring IO Platform from <dependencyManagement>. (Optional)

  • org.apache.tomcat:tomcat-servlet-api
  • org.apache.tomcat:tomcat-jsp-api
  • etc ...

Please remove unnecessary property from <properties> settings. (Optional)

[Step 40-2] $YOUR_MULTIPLE_PROJECT_ROOT/xxx-domain/pom.xml

Note

Detail of changes refer to comparing page with 1.0.1.RELEASE and 5.0.0.RELEASE .

  • Select the "Files changed" tab
  • Click the "32 changed files" link (open file list)
  • Click the "projectName-domain/pom.xml" link (Move to the file diff)

Please change to use the org.mockito:mockito-core (Required)

  • org.mockito:mockito-all -> org.mockito:mockito-core

Please add new library for unit testing into <dependencies> settings. (Required by case)

  • org.apache.tomcat.embed:tomcat-embed-el:test (If testing the Bean Validation, this library is required)
<dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-el</artifactId>
    <scope>test</scope>
</dependency>

Please specify scope into dependency settings. (Required by case)

  • If using library at unit testing only, the test scope is required.
  • If using library provided by application server, the provided scope is required.
  • If using library at application runtime, the runtime scope is required.

[Step 40-3] $YOUR_MULTIPLE_PROJECT_ROOT/xxx-env/pom.xml

Note

Detail of changes refer to comparing page with 1.0.1.RELEASE and 5.0.0.RELEASE .

  • Select the "Files changed" tab
  • Click the "32 changed files" link (open file list)
  • Click the "projectName-env/pom.xml" link (Move to the file diff)

Please remove <build>/<plugins> settings if unnecessary. (Optional)

  • org.apache.maven.plugins:maven-eclipse-plugin

[Step 40-4] $YOUR_MULTIPLE_PROJECT_ROOT/xxx-web/pom.xml

Note

Detail of changes refer to comparing page with 1.0.1.RELEASE and 5.0.0.RELEASE .

  • Select the "Files changed" tab
  • Click the "32 changed files" link (open file list)
  • Click the "projectName-web/pom.xml" link (Move to the file diff)

Please add new library for unit testing into <dependencies> settings. (Required by case)

  • org.apache.tomcat.embed:tomcat-embed-el:test (If testing the Bean Validation, this library is required)
<dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-el</artifactId>
    <scope>test</scope>
</dependency>

Please specify scope into dependency settings. (Required by case)

  • If using library at unit testing only, the test scope is required.
  • If using library provided by application server, the provided scope is required.
  • If using library at application runtime, the runtime scope is required.

[Step 41] Apply the fixes of dependency settings of JDBC driver into pom.xml

From version 5.0.0, the JDBC driver settings has been improved in pom.xml. Please see the GitHub multi/issues#92 about bug information.

Improvements is follows.

  • Improve to can be use only H2 Database at local profile (In other words, improve to exclude the H2 Database's jar into war file for the production or testing)
  • Improve to remove the JDBC driver from the web project

[Procedure's required cases]

This procedure is optional. Please perform next modification, if feel the need.

[Modification method]

Please apply improvements in all of following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-domain/pom.xml
  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-env/pom.xml
  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-web/pom.xml

At first, please remove the H2 Database dependency definition from xxx-domain/pom.xml.

<!-- ### Need to remove the H2 Database ###
<dependency>
    <groupId>com.h2database</groupId>
    <artifactId>h2</artifactId>
    <scope>runtime</scope>
</dependency>
-->

Please add the H2 Database dependency definition into local profile of xxx-env/pom.xml.

<profile>
    <id>local</id>
    <activation>
        <activeByDefault>true</activeByDefault>
    </activation>
    <properties>
        <resource.directory>src/main/resources</resource.directory>
        <buildFinalName>${project.artifactId}-${project.version}</buildFinalName>
    </properties>
    <!-- ### Need to add H2 Database dependency ### -->
    <dependencies>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>runtime</scope>
        </dependency>
    </dependencies>
</profile>

Please change the default profile settings in xxx-web/pom.xml.

  • Change the profile id from default to local
  • Add the warpack-with-env profile to generate war file including xxx-env.jar (Note: exclude H2 database)
<profiles>
    <profile>
        <id>local</id> <!-- ### Need to edit ### -->
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <dependencies>
            <dependency>
                <groupId>com.example</groupId>
                <artifactId>xxx-env</artifactId>
            </dependency>
        </dependencies>
    </profile>
    <profile>
        <id>warpack</id>
        <dependencies>
        </dependencies>
    </profile>
    <!-- ### Need to add warpack-with-env ### -->
    <profile>
        <id>warpack-with-env</id>
        <dependencies>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>xxx-env</artifactId>
                <exclusions>
                    <exclusion>
                        <groupId>com.h2database</groupId>
                        <artifactId>h2</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
        </dependencies>
    </profile>
</profiles>

Note

About setting value of <groupId> or <artifactId>

Please setting values of <groupId> and <artifactId> replace by your project setting.

At last, please remove the JDBC driver dependency from xxx-web/pom.xml.

[Step 42] Apply the changes of parent pom.xml (single)

From version 5.0.0, the Spring IO Platform 1.1.1.RELEASE has been applied for version control of dependency libraries. With this change, build setting has been changed in the blank project.

[Procedure's required cases]

This procedure is optional. Please perform next modification, if feel the need.

[Modification method]

Please remove the version tag from dependency managed by the Spring IO Platform in following file.

  • $YOUR_SINGLE_PROJECT/pom.xml

e.g.)

<dependency>
    <!-- omit -->

    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-jsp-api</artifactId>
    <!-- ### Remove version tag ### -->
    <scope>provided</scope>

    <!-- omit -->
</dependency>

[Step 43] Apply the fixes of dependency settings for test into pom.xml

From version 5.0.0, dependencies for unit testing has been added in pom.xml. Please see the GitHub single/issues#6 about bug information.

[Procedure's required cases]

This procedure is optional. Please perform next modification, if feel the need.

[Modification method]

Please add dependencies for unit testing in following file.

  • $YOUR_SINGLE_PROJECT/pom.xml
</dependencies>

    <!-- omit -->

    <!-- ### Need to add dependencies for unit testing ### -->
    <!-- Unit Test -->
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.tomcat.embed</groupId>
        <artifactId>tomcat-embed-el</artifactId>
        <scope>test</scope>
    </dependency>

</dependencies>
  • $YOUR_ECLIPSE_WTP_PROJECT/.classpath
<!-- ### Need to add dependencies for unit testing ### -->
<classpathentry kind="lib"
    path="testlib/hamcrest-core-1.3.jar"
    sourcepath="libsrc/hamcrest-core-1.3-sources.jar" />
<classpathentry kind="lib"
    path="testlib/junit-4.11.jar"
    sourcepath="libsrc/junit-4.11-sources.jar" />
<classpathentry kind="lib"
    path="testlib/mockito-core-1.10.8.jar"
    sourcepath="libsrc/mockito-core-1.10.8-sources.jar" />
<classpathentry kind="lib"
    path="testlib/objenesis-2.1.jar"
    sourcepath="libsrc/objenesis-2.1-sources.jar" />
<classpathentry kind="lib"
    path="testlib/spring-test-4.1.4.RELEASE.jar"
    sourcepath="libsrc/spring-test-4.1.4.RELEASE-sources.jar" />
<classpathentry kind="lib"
    path="testlib/tomcat-embed-el-7.0.57.jar"
    sourcepath="libsrc/tomcat-embed-el-7.0.57-sources.jar" />

Note

Jar files has been included into the downloaded zip file from the Eclipse WTP Project of 5.0.0.RELEASE.

  • $YOUR_ECLIPSE_WTP_PROJECT/build.xml
<path id="build.test.classpath">
    <path refid="build.classpath" />
    <pathelement location="${testlib.dir}/hamcrest-core-1.3.jar"/>
    <pathelement location="${testlib.dir}/junit-4.11.jar"/>
    <pathelement location="${testlib.dir}/mockito-core-1.10.8.jar"/>
    <pathelement location="${testlib.dir}/objenesis-2.1.jar"/>
    <pathelement location="${testlib.dir}/spring-test-4.1.4.RELEASE.jar"/>
    <pathelement location="${testlib.dir}/tomcat-embed-el-7.0.57.jar"/>
</path>

[Step 44] Apply the fixes of dependency scope settings into pom.xml

From version 5.0.0, dependency scope of JDBC Driver has been changed in pom.xml. Please see the GitHub single/issues#60 about bug information.

[Procedure's required cases]

This procedure is optional. Please perform next modification, if feel the need.

[Modification method]

Please change dependency scope of JDBC Driver from compile to runtime in following file.

  • $YOUR_SINGLE_PROJECT/pom.xml
</dependencies>

    <!-- omit -->

    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <scope>runtime</scope> <!-- ### Need to edit ### -->
    </dependency>

    <!-- omit -->

</dependencies>

Appendix

Update libraries for using Eclipse WTP Project

This update procedure is for Eclipse WTP project which is downloaded from the release site.

Note

If using the MyBatis3 as the O/R Mapper, please generate a new development project using blank projects for Eclipse WTP. (In other words, migration procedure for MyBatis3 is not provided)

Note

Legend

[Table Header]
Non : Blank project for none O/R Mapper
MB3 : Blank project for MyBatis 3
JPA : Blank project for JPA
[Marks]
* : target for operations

[Step 1]

Download the Eclipse WTP Project of 5.0.0.RELEASE.

[Step 2]

If Eclipse is running, please stop the Eclipse.

[Step 3]

Update(delete and add) jar files in $YOUR_ECLIPSE_WTP_PROJECT/src/main/webapp/WEB-INF/lib.

.. tabularcolumns:: |p{0.25\linewidth}|p{0.30\linewidth}|p{0.30\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|
Library Name Delete File Add File Non MB3 JPA
TERASOLUNA Server Framework for Java (5.x) Common Library terasoluna-gfw-common-1.0.1.RELEASE.jar terasoluna-gfw-common-5.0.0.RELEASE.jar * - *
  terasoluna-gfw-web-1.0.1.RELEASE.jar terasoluna-gfw-web-5.0.0.RELEASE.jar * - *
  terasoluna-gfw-security-core-1.0.1.RELEASE.jar terasoluna-gfw-security-core-5.0.0.RELEASE.jar * - *
  terasoluna-gfw-security-web-1.0.1.RELEASE.jar terasoluna-gfw-security-web-5.0.0.RELEASE.jar * - *
  terasoluna-gfw-jpa-1.0.1.RELEASE.jar terasoluna-gfw-jpa-5.0.0.RELEASE.jar   - *
  - terasoluna-gfw-jodatime-5.0.0.RELEASE.jar * - *
Spring Framework spring-aop-3.2.10.RELEASE.jar spring-aop-4.1.4.RELEASE.jar * - *
  spring-aspects-3.2.10.RELEASE.jar spring-aspects-4.1.4.RELEASE.jar * - *
  spring-beans-3.2.10.RELEASE.jar spring-beans-4.1.4.RELEASE.jar * - *
  spring-context-3.2.10.RELEASE.jar spring-context-4.1.4.RELEASE.jar * - *
  spring-context-support-3.2.10.RELEASE.jar spring-context-support-4.1.4.RELEASE.jar * - *
  spring-core-3.2.10.RELEASE.jar spring-core-4.1.4.RELEASE.jar * - *
  spring-expression-3.2.10.RELEASE.jar spring-expression-4.1.4.RELEASE.jar * - *
  spring-jdbc-3.2.10.RELEASE.jar spring-jdbc-4.1.4.RELEASE.jar * - *
  spring-orm-3.2.10.RELEASE.jar spring-orm-4.1.4.RELEASE.jar * - *
  spring-tx-3.2.10.RELEASE.jar spring-tx-4.1.4.RELEASE.jar * - *
  spring-web-3.2.10.RELEASE.jar spring-web-4.1.4.RELEASE.jar * - *
  spring-webmvc-3.2.10.RELEASE.jar spring-webmvc-4.1.4.RELEASE.jar * - *
Spring Data Commons spring-data-commons-1.6.4.RELEASE.jar spring-data-commons-1.9.1.RELEASE.jar * - *
Spring Security spring-security-acl-3.1.4.RELEASE.jar spring-security-acl-3.2.5.RELEASE.jar * - *
  spring-security-config-3.1.4.RELEASE.jar spring-security-config-3.2.5.RELEASE.jar * - *
  spring-security-core-3.1.4.RELEASE.jar spring-security-core-3.2.5.RELEASE.jar * - *
  spring-security-taglibs-3.1.4.RELEASE.jar spring-security-taglibs-3.2.5.RELEASE.jar * - *
  spring-security-web-3.1.4.RELEASE.jar spring-security-web-3.2.5.RELEASE.jar * - *
Hibernate hibernate-core-4.2.3.Final.jar hibernate-core-4.3.7.Final.jar   - *
  hibernate-entitymanager-4.2.3.Final.jar hibernate-entitymanager-4.3.7.Final.jar   - *
Hibernate Commons Annotations hibernate-commons-annotations-4.0.2.Final.jar hibernate-commons-annotations-4.0.5.Final.jar   - *
Java Persistence API 2.0 hibernate-jpa-2.0-api-1.0.1.Final.jar -   - *
Java Persistence API 2.1 - hibernate-jpa-2.1-api-1.0.0.Final.jar   - *
Javassist javassist-api-3.15.0-GA.jar javassist-api-3.18.1-GA.jar   - *
Java Annotation Indexer - jandex-1.1.0.Final.jar   - *
JBoss Logging I18n Annotations - jboss-logging-annotations-1.2.0.Final.jar   - *
Java Transaction API 1.1 jboss-transaction-api_1.1_spec-1.0.1.Final.jar -   - *
Java Transaction API 1.2 - jboss-transaction-api_1.2_spec-1.0.0.Final.jar   - *
Spring Data JPA spring-data-jpa-1.4.3.RELEASE.jar spring-data-jpa-1.7.1.RELEASE.jar   - *
AspectJ aspectjrt-1.7.4.jar aspectjrt-1.8.4.jar * - *
  aspectjweaver-1.7.4.jar aspectjweaver-1.8.4.jar * - *
Logback logback-classic-1.0.13.jar logback-classic-1.1.2.jar * - *
  logback-core-1.0.13.jar logback-core-1.1.2.jar * - *
SLF4J jcl-over-slf4j-1.7.5.jar jcl-over-slf4j-1.7.8.jar * - *
  slf4j-api-1.7.5.jar slf4j-api-1.7.8.jar * - *
Jackson jackson-core-asl-1.9.7.jar - * - *
  jackson-mapper-asl-1.9.7.jar - * - *
  - jackson-annotations-2.4.4.jar * - *
  - jackson-core-2.4.4.jar * - *
  - jackson-databind-2.4.4.jar * - *
  - jackson-datatype-joda-2.4.4.jar * - *
Bean Validation API validation-api-1.0.0.GA.jar validation-api-1.1.0.Final.jar * - *
Hibernate Validator hibernate-validator-4.3.1.Final.jar hibernate-validator-5.1.3.Final.jar * - *
JBoss Logging 3 jboss-logging-3.1.0.GA.jar jboss-logging-3.1.3.GA.jar * - *
Apache Commons BeanUtils commons-beanutils-1.8.3.jar commons-beanutils-1.9.2.jar * - *
Dozer dozer-5.4.0.jar dozer-5.5.1.jar * - *
  - dozer-spring-5.5.1.jar * - *
Apache Commons Lang commons-lang3-3.1.jar commons-lang3-3.3.2.jar * - *
Joda Time joda-time-2.2.jar joda-time-2.5.jar * - *
Jadira Usertype usertype.core-3.0.0.GA.jar usertype.core-3.2.0.GA.jar   - *
  usertype.spi-3.0.0.GA.jar usertype.spi-3.2.0.GA.jar   - *
Apache Commons DBCP commons-dbcp-1.2.2 .patch_DBCP264_DBCP372.jar commons-dbcp2-2.0.1.jar * - *
Apache Commons Pool commons-pool-1.6.jar commons-pool2-2.2.jar * - *
Commons Digester commons-digester-2.0.jar commons-digester-2.1.jar * - *
Tiles tiles-api-2.2.2.jar tiles-api-3.0.5.jar * - *
  tiles-core-2.2.2.jar tiles-core-3.0.5.jar * - *
  tiles-jsp-2.2.2.jar tiles-jsp-3.0.5.jar * - *
  tiles-servlet-2.2.2.jar tiles-servlet-3.0.5.jar * - *
  tiles-template-2.2.2.jar tiles-template-3.0.5.jar * - *
Tiles Autotag Core - tiles-autotag-core-runtime-1.1.0.jar * - *
Tiles Request - tiles-request-servlet-1.0.6.jar * - *
  - tiles-request-api-1.0.6.jar * - *
  - tiles-request-jsp-1.0.6.jar * - *
Guava guava-13.0.1.jar guava-17.0.jar * - *

[Step 4]

Update(delete and add) source jar files in $YOUR_ECLIPSE_WTP_PROJECT/src/main/webapp/WEB-INF/libsrc.

.. tabularcolumns:: |p{0.25\linewidth}|p{0.30\linewidth}|p{0.30\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|
Library Name Delete File Add File Non MB3 JPA
TERASOLUNA Server Framework for Java (5.x) Common Library terasoluna-gfw-common-1.0.1.RELEASE-sources.jar terasoluna-gfw-common-5.0.0.RELEASE-sources.jar * - *
  terasoluna-gfw-web-1.0.1.RELEASE-sources.jar terasoluna-gfw-web-5.0.0.RELEASE-sources.jar * - *
  terasoluna-gfw-security-core-1.0.1.RELEASE-sources.jar terasoluna-gfw-security-core-5.0.0.RELEASE-sources.jar * - *
  terasoluna-gfw-security-web-1.0.1.RELEASE-sources.jar terasoluna-gfw-security-web-5.0.0.RELEASE-sources.jar * - *
  terasoluna-gfw-jpa-1.0.1.RELEASE-sources.jar terasoluna-gfw-jpa-5.0.0.RELEASE-sources.jar   - *
  - terasoluna-gfw-jodatime-5.0.0.RELEASE-sources.jar * - *
Spring Framework spring-aop-3.2.10.RELEASE-sources.jar spring-aop-4.1.4.RELEASE-sources.jar * - *
  spring-aspects-3.2.10.RELEASE-sources.jar spring-aspects-4.1.4.RELEASE-sources.jar * - *
  spring-beans-3.2.10.RELEASE-sources.jar spring-beans-4.1.4.RELEASE-sources.jar * - *
  spring-context-3.2.10.RELEASE-sources.jar spring-context-4.1.4.RELEASE-sources.jar * - *
  spring-context-support-3.2.10.RELEASE-sources.jar spring-context-support-4.1.4.RELEASE-sources.jar * - *
  spring-core-3.2.10.RELEASE-sources.jar spring-core-4.1.4.RELEASE-sources.jar * - *
  spring-expression-3.2.10.RELEASE-sources.jar spring-expression-4.1.4.RELEASE-sources.jar * - *
  spring-jdbc-3.2.10.RELEASE-sources.jar spring-jdbc-4.1.4.RELEASE-sources.jar * - *
  spring-orm-3.2.10.RELEASE-sources.jar spring-orm-4.1.4.RELEASE-sources.jar * - *
  spring-tx-3.2.10.RELEASE-sources.jar spring-tx-4.1.4.RELEASE-sources.jar * - *
  spring-web-3.2.10.RELEASE-sources.jar spring-web-4.1.4.RELEASE-sources.jar * - *
  spring-webmvc-3.2.10.RELEASE-sources.jar spring-webmvc-4.1.4.RELEASE-sources.jar * - *
Spring Data Commons spring-data-commons-1.6.4.RELEASE-sources.jar spring-data-commons-1.9.1.RELEASE-sources.jar * - *
Spring Security spring-security-acl-3.1.4.RELEASE-sources.jar spring-security-acl-3.2.5.RELEASE-sources.jar * - *
  spring-security-config-3.1.4.RELEASE-sources.jar spring-security-config-3.2.5.RELEASE-sources.jar * - *
  spring-security-core-3.1.4.RELEASE-sources.jar spring-security-core-3.2.5.RELEASE-sources.jar * - *
  spring-security-taglibs-3.1.4.RELEASE-sources.jar spring-security-taglibs-3.2.5.RELEASE-sources.jar * - *
  spring-security-web-3.1.4.RELEASE-sources.jar spring-security-web-3.2.5.RELEASE-sources.jar * - *
Hibernate hibernate-core-4.2.3.Final-sources.jar hibernate-core-4.3.7.Final-sources.jar   - *
  hibernate-entitymanager-4.2.3.Final-sources.jar hibernate-entitymanager-4.3.7.Final-sources.jar   - *
Hibernate Commons Annotations hibernate-commons-annotations-4.0.2.Final-sources.jar hibernate-commons-annotations-4.0.5.Final-sources.jar   - *
Java Persistence API 2.0 hibernate-jpa-2.0-api-1.0.1.Final-sources.jar -   - *
Java Persistence API 2.1 - hibernate-jpa-2.1-api-1.0.0.Final-sources.jar   - *
Javassist javassist-api-3.15.0-GA-sources.jar javassist-api-3.18.1-GA-sources.jar   - *
Java Annotation Indexer - jandex-1.1.0.Final-sources.jar   - *
JBoss Logging I18n Annotations - jboss-logging-annotations-1.2.0.Final-sources.jar   - *
Java Transaction API 1.1 jboss-transaction-api_1.1_spec-1.0.1.Final-sources.jar -   - *
Java Transaction API 1.2 - jboss-transaction-api_1.2_spec-1.0.0.Final-sources.jar   - *
Spring Data JPA spring-data-jpa-1.4.3.RELEASE-sources.jar spring-data-jpa-1.7.1.RELEASE-sources.jar   - *
AspectJ aspectjrt-1.7.4-sources.jar aspectjrt-1.8.4-sources.jar * - *
  aspectjweaver-1.7.4-sources.jar aspectjweaver-1.8.4-sources.jar * - *
Logback logback-classic-1.0.13-sources.jar logback-classic-1.1.2-sources.jar * - *
  logback-core-1.0.13-sources.jar logback-core-1.1.2-sources.jar * - *
SLF4J jcl-over-slf4j-1.7.5-sources.jar jcl-over-slf4j-1.7.8-sources.jar * - *
  slf4j-api-1.7.5-sources.jar slf4j-api-1.7.8-sources.jar * - *
Jackson jackson-core-asl-1.9.7-sources.jar - * - *
  jackson-mapper-asl-1.9.7-sources.jar - * - *
  - jackson-annotations-2.4.4-sources.jar * - *
  - jackson-core-2.4.4-sources.jar * - *
  - jackson-databind-2.4.4-sources.jar * - *
  - jackson-datatype-joda-2.4.4-sources.jar * - *
Bean Validation API validation-api-1.0.0.GA-sources.jar validation-api-1.1.0.Final-sources.jar * - *
Hibernate Validator hibernate-validator-4.3.1.Final-sources.jar hibernate-validator-5.1.3.Final-sources.jar * - *
JBoss Logging 3 jboss-logging-3.1.0.GA-sources.jar jboss-logging-3.1.3.GA-sources.jar * - *
Apache Commons BeanUtils commons-beanutils-1.8.3-sources.jar commons-beanutils-1.9.2-sources.jar * - *
Dozer dozer-5.4.0-sources.jar dozer-5.5.1-sources.jar * - *
  - dozer-spring-5.5.1-sources.jar * - *
Apache Commons Lang commons-lang3-3.1-sources.jar commons-lang3-3.3.2-sources.jar * - *
Joda Time joda-time-2.2-sources.jar joda-time-2.5-sources.jar * - *
Jadira Usertype usertype.core-3.0.0.GA-sources.jar usertype.core-3.2.0.GA-sources.jar   - *
  usertype.spi-3.0.0.GA-sources.jar usertype.spi-3.2.0.GA-sources.jar   - *
Apache Commons DBCP commons-dbcp-1.2.2 .patch_DBCP264_DBCP372-sources.jar commons-dbcp2-2.0.1-sources.jar * - *
Apache Commons Pool commons-pool-1.6-sources.jar commons-pool2-2.2-sources.jar * - *
Commons Digester commons-digester-2.0-sources.jar commons-digester-2.1-sources.jar * - *
Tiles tiles-api-2.2.2-sources.jar tiles-api-3.0.5-sources.jar * - *
  tiles-core-2.2.2-sources.jar tiles-core-3.0.5-sources.jar * - *
  tiles-jsp-2.2.2-sources.jar tiles-jsp-3.0.5-sources.jar * - *
  tiles-servlet-2.2.2-sources.jar tiles-servlet-3.0.5-sources.jar * - *
  tiles-template-2.2.2-sources.jar tiles-template-3.0.5-sources.jar * - *
Tiles Autotag Core - tiles-autotag-core-runtime-1.1.0-sources.jar * - *
Tiles Request - tiles-request-servlet-1.0.6-sources.jar * - *
  - tiles-request-api-1.0.6-sources.jar * - *
  - tiles-request-jsp-1.0.6-sources.jar * - *
Guava guava-13.0.1-sources.jar guava-17.0-sources.jar * - *

[Step 5]

Update the referenced libraries in all of the following files, using replace string.

  • $YOUR_ECLIPSE_WTP_PROJECT/.classpath
  • $YOUR_ECLIPSE_WTP_PROJECT/build.xml
.. tabularcolumns:: |p{0.25\linewidth}|p{0.30\linewidth}|p{0.30\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|
Library Name Before After Non MB3 JPA
TERASOLUNA Server Framework for Java (5.x) Common Library terasoluna-gfw-common-1.0.1.RELEASE terasoluna-gfw-common-5.0.0.RELEASE * - *
  terasoluna-gfw-web-1.0.1.RELEASE terasoluna-gfw-web-5.0.0.RELEASE * - *
  terasoluna-gfw-security-core-1.0.1.RELEASE terasoluna-gfw-security-core-5.0.0.RELEASE * - *
  terasoluna-gfw-security-web-1.0.1.RELEASE terasoluna-gfw-security-web-5.0.0.RELEASE * - *
  terasoluna-gfw-jpa-1.0.1.RELEASE terasoluna-gfw-jpa-5.0.0.RELEASE   - *
Spring Framework spring-aop-3.2.10.RELEASE spring-aop-4.1.4.RELEASE * - *
  spring-aspects-3.2.10.RELEASE spring-aspects-4.1.4.RELEASE * - *
  spring-beans-3.2.10.RELEASE spring-beans-4.1.4.RELEASE * - *
  spring-context-3.2.10.RELEASE spring-context-4.1.4.RELEASE * - *
  spring-context-support-3.2.10.RELEASE spring-context-support-4.1.4.RELEASE * - *
  spring-core-3.2.10.RELEASE spring-core-4.1.4.RELEASE * - *
  spring-expression-3.2.10.RELEASE spring-expression-4.1.4.RELEASE * - *
  spring-jdbc-3.2.10.RELEASE spring-jdbc-4.1.4.RELEASE * - *
  spring-orm-3.2.10.RELEASE spring-orm-4.1.4.RELEASE * - *
  spring-tx-3.2.10.RELEASE spring-tx-4.1.4.RELEASE * - *
  spring-web-3.2.10.RELEASE spring-web-4.1.4.RELEASE * - *
  spring-webmvc-3.2.10.RELEASE spring-webmvc-4.1.4.RELEASE * - *
Spring Data Commons spring-data-commons-1.6.4.RELEASE spring-data-commons-1.9.1.RELEASE * - *
Spring Security spring-security-acl-3.1.4.RELEASE spring-security-acl-3.2.5.RELEASE * - *
  spring-security-config-3.1.4.RELEASE spring-security-config-3.2.5.RELEASE * - *
  spring-security-core-3.1.4.RELEASE spring-security-core-3.2.5.RELEASE * - *
  spring-security-taglibs-3.1.4.RELEASE spring-security-taglibs-3.2.5.RELEASE * - *
  spring-security-web-3.1.4.RELEASE spring-security-web-3.2.5.RELEASE * - *
Hibernate hibernate-core-4.2.3.Final hibernate-core-4.3.7.Final   - *
  hibernate-entitymanager-4.2.3.Final hibernate-entitymanager-4.3.7.Final   - *
Hibernate Commons Annotations hibernate-commons-annotations-4.0.2.Final hibernate-commons-annotations-4.0.5.Final   - *
Javassist javassist-api-3.15.0-GA javassist-api-3.18.1-GA   - *
Spring Data JPA spring-data-jpa-1.4.3.RELEASE spring-data-jpa-1.7.1.RELEASE   - *
AspectJ aspectjrt-1.7.4 aspectjrt-1.8.4 * - *
  aspectjweaver-1.7.4 aspectjweaver-1.8.4 * - *
Logback logback-classic-1.0.13 logback-classic-1.1.2 * - *
  logback-core-1.0.13 logback-core-1.1.2 * - *
SLF4J jcl-over-slf4j-1.7.5 jcl-over-slf4j-1.7.8 * - *
  slf4j-api-1.7.5 slf4j-api-1.7.8 * - *
Bean Validation API validation-api-1.0.0.GA validation-api-1.1.0.Final * - *
Hibernate Validator hibernate-validator-4.3.1.Final hibernate-validator-5.1.3.Final * - *
JBoss Logging 3 jboss-logging-3.1.0.GA jboss-logging-3.1.3.GA * - *
Apache Commons BeanUtils commons-beanutils-1.8.3 commons-beanutils-1.9.2 * - *
Dozer dozer-5.4.0 dozer-5.5.1 * - *
Apache Commons Lang commons-lang3-3.1 commons-lang3-3.3.2 * - *
Joda Time joda-time-2.2 joda-time-2.5 * - *
Jadira Usertype usertype.core-3.0.0.GA usertype.core-3.2.0.GA   - *
  usertype.spi-3.0.0.GA usertype.spi-3.2.0.GA   - *
Apache Commons DBCP commons-dbcp-1.2.2 .patch_DBCP264_DBCP372 commons-dbcp2-2.0.1 * - *
Apache Commons Pool commons-pool-1.6 commons-pool2-2.2 * - *
Commons Digester commons-digester-2.0 commons-digester-2.1 * - *
Tiles tiles-api-2.2.2 tiles-api-3.0.5 * - *
  tiles-core-2.2.2 tiles-core-3.0.5 * - *
  tiles-jsp-2.2.2 tiles-jsp-3.0.5 * - *
  tiles-servlet-2.2.2 tiles-servlet-3.0.5 * - *
  tiles-template-2.2.2 tiles-template-3.0.5 * - *
Guava guava-13.0.1 guava-17.0 * - *

[Step 6]

Delete referenced libraries(following jar files) from the settings of Eclipse WTP project.

  • $YOUR_ECLIPSE_WTP_PROJECT/.classpath
  • $YOUR_ECLIPSE_WTP_PROJECT/build.xml
.. tabularcolumns:: |p{0.30\linewidth}|p{0.55\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|
Library Name Prefix jar file Non MB3 JPA
Java Persistence API 2.0 hibernate-jpa-2.0-api-1.0.1.Final   - *
Java Transaction API 1.1 jboss-transaction-api_1.1_spec-1.0.1.Final   - *
Jackson jackson-core-asl-1.9.7 * - *
  jackson-mapper-asl-1.9.7 * - *

[Step for all blank projects]

.classpath

<!-- ### Need to delete following classpath entries ### -->

<!-- omitted -->

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/jackson-core-asl-1.9.7.jar"
    sourcepath="libsrc/jackson-core-asl-1.9.7-sources.jar" />

<!-- omitted -->

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/jackson-mapper-asl-1.9.7.jar"
    sourcepath="libsrc/jackson-mapper-asl-1.9.7-sources.jar" />

<!-- omitted -->

build.xml

<!-- ### Need to delete following classpath entries ### -->

<path id="build.classpath">
    <!-- ... -->
    <pathelement location="${lib.dir}/jackson-core-asl-1.9.7.jar"/>
    <pathelement location="${lib.dir}/jackson-mapper-asl-1.9.7.jar"/>
    <!-- ... -->
</path>

[Step for JPA blank project only]

.classpath

<!-- ### Need to delete following classpath entries ### -->

<!-- omitted -->

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar"
    sourcepath="libsrc/hibernate-jpa-2.0-api-1.0.1.Final-sources.jar" />

<!-- omitted -->

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/jboss-transaction-api_1.1_spec-1.0.1.Final.jar"
    sourcepath="libsrc/jboss-transaction-api_1.1_spec-1.0.1.Final-sources.jar" />

<!-- omitted -->

build.xml

<!-- ### Need to delete following classpath entries ### -->

<path id="build.classpath">
    <!-- ... -->
    <pathelement location="${lib.dir}/hibernate-jpa-2.0-api-1.0.1.Final.jar"/>
    <!-- ... -->
    <pathelement location="${lib.dir}/jboss-transaction-api_1.1_spec-1.0.1.Final.jar"/>
    <!-- ... -->
</path>

[Step 7]

Add referenced libraries(following jar files) to the settings of Eclipse WTP project.

  • $YOUR_ECLIPSE_WTP_PROJECT/.classpath
  • $YOUR_ECLIPSE_WTP_PROJECT/build.xml
.. tabularcolumns:: |p{0.30\linewidth}|p{0.55\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|
Library Name Prefix jar file Non MB3 JPA
TERASOLUNA Server Framework for Java (5.x) Common Library terasoluna-gfw-jodatime-5.0.0.RELEASE * - *
Java Persistence API 2.1 hibernate-jpa-2.1-api-1.0.0.Final   - *
Java Persistence API 2.1 hibernate-jpa-2.1-api-1.0.0.Final   - *
Java Annotation Indexer jandex-1.1.0.Final   - *
JBoss Logging I18n Annotations jboss-logging-annotations-1.2.0.Final   - *
Java Transaction API 1.2 jboss-transaction-api_1.2_spec-1.0.0.Final   - *
Jackson jackson-annotations-2.4.4 * - *
  jackson-core-2.4.4 * - *
  jackson-databind-2.4.4 * - *
  jackson-datatype-joda-2.4.4 * - *
Dozer dozer-spring-5.5.1 * - *
Tiles Autotag Core tiles-autotag-core-runtime-1.1.0 * - *
Tiles Request tiles-request-servlet-1.0.6 * - *
  tiles-request-api-1.0.6 * - *
  tiles-request-jsp-1.0.6 * - *

[Step for all blank projects]

.classpath

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/terasoluna-gfw-jodatime-5.0.0.RELEASE.jar"
    sourcepath="libsrc/terasoluna-gfw-jodatime-5.0.0.RELEASE-sources.jar" />

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/jackson-annotations-2.4.4.jar"
    sourcepath="libsrc/jackson-annotations-2.4.4-sources.jar" />

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/jackson-core-2.4.4.jar"
    sourcepath="libsrc/jackson-core-2.4.4-sources.jar" />

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/jackson-databind-2.4.4.jar"
    sourcepath="libsrc/jackson-databind-2.4.4-sources.jar" />

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/jackson-datatype-joda-2.4.4.jar"
    sourcepath="libsrc/jackson-datatype-joda-2.4.4-sources.jar" />

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/dozer-spring-5.5.1.jar"
    sourcepath="libsrc/dozer-spring-5.5.1-sources.jar" />

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/tiles-autotag-core-runtime-1.1.0.jar"
    sourcepath="libsrc/tiles-autotag-core-runtime-1.1.0-sources.jar" />

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/tiles-request-servlet-1.0.6.jar"
    sourcepath="libsrc/tiles-request-servlet-1.0.6-sources.jar" />

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/tiles-request-api-1.0.6.jar"
    sourcepath="libsrc/tiles-request-api-1.0.6-sources.jar" />

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/tiles-request-jsp-1.0.6.jar"
    sourcepath="libsrc/tiles-request-jsp-1.0.6-sources.jar" />

build.xml

<!-- ### Need to delete following classpath entries ### -->

<path id="build.classpath">
    <!-- ... -->
    <pathelement location="${lib.dir}/terasoluna-gfw-jodatime-5.0.0.RELEASE.jar"/>
    <pathelement location="${lib.dir}/jackson-annotations-2.4.4.jar"/>
    <pathelement location="${lib.dir}/jackson-core-2.4.4.jar"/>
    <pathelement location="${lib.dir}/jackson-databind-2.4.4.jar"/>
    <pathelement location="${lib.dir}/jackson-datatype-joda-2.4.4.jar"/>
    <pathelement location="${lib.dir}/dozer-spring-5.5.1.jar"/>
    <pathelement location="${lib.dir}/tiles-autotag-core-runtime-1.1.0.jar"/>
    <pathelement location="${lib.dir}/tiles-request-servlet-1.0.6.jar"/>
    <pathelement location="${lib.dir}/tiles-request-api-1.0.6.jar"/>
    <pathelement location="${lib.dir}/tiles-request-jsp-1.0.6.jar"/>
    <!-- ... -->
</path>

[Step for JPA blank project only]

.classpath

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar"
    sourcepath="libsrc/hibernate-jpa-2.1-api-1.0.0.Final-sources.jar" />

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/jandex-1.1.0.Final.jar"
    sourcepath="libsrc/jandex-1.1.0.Final-sources.jar" />

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/jboss-logging-annotations-1.2.0.Final.jar"
    sourcepath="libsrc/jboss-logging-annotations-1.2.0.Final-sources.jar" />

<classpathentry kind="lib"
    path="src/main/webapp/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar"
    sourcepath="libsrc/jboss-transaction-api_1.2_spec-1.0.0.Final-sources.jar" />

build.xml

<!-- ### Need to delete following classpath entries ### -->

<path id="build.classpath">
    <!-- ... -->
    <pathelement location="${lib.dir}/hibernate-jpa-2.1-api-1.0.0.Final.jar"/>
    <pathelement location="${lib.dir}/jandex-1.1.0.Final.jar"/>
    <pathelement location="${lib.dir}/jboss-logging-annotations-1.2.0.Final.jar"/>
    <pathelement location="${lib.dir}/jboss-transaction-api_1.2_spec-1.0.0.Final.jar"/>
    <!-- ... -->
</path>
⚠️ **GitHub.com Fallback** ⚠️