Thursday, February 17, 2011

Build Failure while running "ConfigEngine.sh/bat wp-modify-ldap-security" task for LDAP configuration on websphere portal server 6.1.5

Error:

00000055 exception     E com.ibm.ws.wim.config.LDAPRepositoryConfigHelper getEntityType CWWIM5014E LDAP entity type PersonAccount is not found.
00000055 exception     E com.ibm.ws.wim.config.LDAPRepositoryConfigHelper getEntityType
                                 com.ibm.websphere.wim.exception.WIMConfigurationException: CWWIM5014E LDAP entity type PersonAccount is not found.
    at com.ibm.ws.wim.config.LDAPRepositoryConfigHelper.getEntityType(LDAPRepositoryConfigHelper.java:1251)
    at com.ibm.ws.wim.config.LDAPRepositoryConfigHelper.deleteIdMgrLDAPEntityType(LDAPRepositoryConfigHelper.java:355)
    at com.ibm.ws.wim.config.commands.LDAPRepositoryConfig.deleteIdMgrLDAPEntityType(LDAPRepositoryConfig.java:145)
    at com.ibm.ws.wim.config.commands.IdMgrRepositoryConfigCommandsProvider.deleteIdMgrLDAPEntityType(IdMgrRepositoryConfigCommandsProvider.java:227)

Solution:

 Goto the path ../wp_profile\config\cells\chnsp\wim\config\wimconfig.xml

  modify the file with adding the below code, it should be added after the tag

</config:ldapServerConfiguration>

            <config:ldapEntityTypes name="PersonAccount" searchFilter="">
        <config:objectClasses>inetorgperson</config:objectClasses>
      </config:ldapEntityTypes>
      <config:ldapEntityTypes name="Group" searchFilter="">
        <config:objectClasses>groupOfNames</config:objectClasses>
      </config:ldapEntityTypes>
      <config:groupConfiguration>
        <config:memberAttributes dummyMember="uid=dummy" name="member" objectClass="groupOfNames"
            scope="direct"/>
      </config:groupConfiguration>

How to checkout projects from SVN using command prompt

Prerequisite:

  Download CollabNet Subversion Command-Line Client from  http://www.collab.net/downloads/subversion/

Checkout:

 mvn scm:checkout -DconnectionUrl=scm:svn:http://example.com/svn/trunk/ -DcheckoutDirectory=/home/jp -Dusername=user@example.com -Dpassword=example

Update:

mvn scm:update

Wednesday, February 16, 2011

Useful linux commands

1. List the JAVA processes running on linux:

          ps -ef | grep java | awk '{print $2 "  "  $8}'

     Result:
         
           2070  /opt/Portal61/WebSphere/AppServer/java/bin/java
           7440  /opt/IBM/WebSphere/AppServer61/java/bin/java
           8952  /usr/java/jdk1.5.0_11/bin/java

Open windows share folder on linux

Mount:

mount -t cifs -o username=jp, password=jp //192.168.183.1/doc /home/prakash/doc

Unmount:

umount -f /home/prakash/doc

WinSCP is the best tool that is used to transfer the data between windows and linux. But if we consider the transfer rate it will take much time to transfer, so, as you consider transfer rate windows share is the best one.

Tuesday, February 15, 2011

How to get cobertura coverage report for *VO.java files


In some scenario where we want to take coverage report for *VO.java files which has only setters and getters. We might have tried with mvn cobertura:cobertura command where we ever getting coverage for other java files not for VO.java files.

Workaround:

                Default behavior of exclusion file type is **/*VO.class.
 Solution:

<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.2</version>

<configuration>
    <instrumentation>
        <includes>
            <include>**/*VO.class</include>
        </includes>

        <excludes>
            <exclude>**/*Test.class</exclude>
        </excludes>
    </instrumentation>
</configuration>
</plugin>

How to disble "Expression Language" in JSP

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html" isELIgnored="false" %>

<table>
    <tr>
        <td>
            <c:out value="${message}"/>
        </td>
    </tr>
</table>