07 October 2015

Tomcat Console --> File

Running  Liferay eclipse on 4 GB ram  makes my system slow or eclipse will in hanged state

So thought of running  tomcat through cmd prompt. to search errors in tomcat console i find difficult

so i have thought of redirecting the  tomcat output console to a file

the first step is to open the startup.bat file in editor and search for following command

call "%EXECUTABLE%"  start %CMD_LINE_ARGS% 

replace that line with following line 

call "%EXECUTABLE%" run >..\logs\outputfile.log 2>&1 start %CMD_LINE_ARGS% run >..\logs\outputfile.log 2>&1 

now all the tomcat console will be redirected to a file

Display login portlet on any page

For displaying login portlet on any page  we can use following url pattern
to display sigin portlet on page

Liferayurl +/-/+ portletid

for sign in portlet we need to use

To dispay login page  on any page  folowing is the url pattern

Using locale in liferay theme

Following steps should be  taken for getting the message besad on locale in theme

here i have used french as an example


enable french language in portal,

first login as admin go to control panel 
click on a portal settings links
frm the right side menu from miscilaneous tab select display settings

Thaen select the language you prefered and in languages portlet frm the configuration tab 
select languages u want to display


display locale text in liferay  theme
#language(propertyname ) in theme vm


Portal-ext.properties file

admin.email.from.address=test@liferay.com
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.password=root
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
liferay.home=C:/Liferay/liferay-portal-6.2-ce-ga3
setup.wizard.enabled=false
locales.enabled=nl_NL,en_US,
terms.of.use.required=false
users.screen.name.allow.numeric=true
locales.beta=
velocity.engine.restricted.variables=
journal.template.velocity.restricted.variables=

03 October 2015

Push project to github

http://guides.railsgirls.com/github/

Groovy and Grails Application with JTable

1) we  need to create Controller in Grails application

package com.netjets

class AirportController {
  def airportService
    def index() { }
def list() {

String list=airportService.list()
render(text:list,contentType:'application/json')
 
}
def create() {
log.info "params.alternateAirport: ${params.alternateAirport},params.notes: ${params.notes}"
String list=airportService.create(params.alternateAirport,params.notes)
render(text:list,contentType:'application/json')
}
def delete() {
String list=airportService.delete(params.id.toInteger())
render(text:list, contentType:'application/json')
}
def update() {
String list=airportService.update(params.id.toInteger(),params.alternateAirport,params.notes)
render(text:list,contentType:'application/json')
}
}

2) we need to define service layer in service folder

package com.netjets

import grails.transaction.Transactional
import com.netjets.Airport
import java.util.List
import java.util.ArrayList
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.reflect.TypeToken;

@Transactional
class AirportService {

    String list() {
Gson gson = new Gson();
List<Airport> lstUser=new ArrayList<Airport>();
 
String listData="";
try{
lstUser=Airport.list()
JsonElement element = gson.toJsonTree(lstUser, new TypeToken<List<Airport>>() {}.getType());
JsonArray jsonArray = element.getAsJsonArray();
listData=jsonArray.toString();
listData="{\"Result\":\"OK\",\"Records\":"+listData+"}";
}catch(Exception ex){
listData="{\"Result\":\"ERROR\",\"Message\":"+ex.getMessage()+"}"

ex.printStackTrace()

}
return listData
    }
String create(String altAirport,String notes)
{
Gson gson = new Gson();
String listData=""
try{
 Airport airport=new Airport()
 airport.alternateAirport=altAirport
 airport.notes=notes
 airport.save()
 log.info "altAirport: ${altAirport},notes: ${notes}"

def json="{\"id\":${airport.id},\"alternateAirport\":\"${airport.alternateAirport}\",\"notes\":\"${airport.notes}\"}"

log.info "json: ${json}"
  listData="{\"Result\":\"OK\",\"Record\":"+json+"}";
   log.info "listData: ${listData}"
}catch(Exception e)
{
listData="{\"Result\":\"ERROR\",\"Message\":"+e.getStackTrace().toString()+"}";
e.printStackTrace()
}
return listData
}

String update( int id, String altAirport,String notes)
{

String listData=""
try{
 Airport airport= Airport.get(id)
 airport.alternateAirport=altAirport
 airport.notes=notes
 airport.save()

  listData="{\"Result\":\"OK\"}"
}catch(Exception e)
{
listData="{\"Result\":\"ERROR\",\"Message\":"+e.getStackTrace().toString()+"}";
e.printStackTrace()
}
return listData
}

String delete( int id)
{
String listData=""
try{
 Airport airport= Airport.get(id)
   airport.delete()

  listData="{\"Result\":\"OK\"}"
}catch(Exception e)
{
listData="{\"Result\":\"ERROR\",\"Message\":"+ex.getStackTrace().toString()+"}";
e.printStackTrace()
}
return listData
}
}

3) finally we need to define view for our application where we render the view.gsp

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>index</title>


<link rel="stylesheet" href="${resource(dir: 'css/metro/crimson', file: 'jtable.css')}" type="text/css">
<link rel="stylesheet" href="${resource(dir: 'css', file: 'jquery-ui-1.10.3.custom.css')}" type="text/css">
<script src="${resource(dir: 'js', file: 'jquery-1.8.2.js')}" type="text/javascript"></script>
<script src="${resource(dir: 'js', file: 'jquery-ui-1.10.3.custom.js')}" type="text/javascript"></script>
<script src="${resource(dir: 'js', file: 'jquery.jtable.js')}" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('#PersonTableContainer').jtable({
            title: 'Table of Airport',
            actions: {
                listAction: '${createLink(controller:'airport',action:'list')}',
                createAction:'${createLink(controller:'airport',action:'create')}',
                updateAction: '${createLink(controller:'airport',action:'update')}',
                deleteAction: '${createLink(controller:'airport',action:'delete')}'
            },
            fields: {
                id: {
               
                    key: true,
                    list: false,
                    create:false
                },
                alternateAirport: {
                    title: 'Alternate Airport',
                    width: '30%',
                    edit:true
                },
                notes: {
                    title: 'notes',
                    width: '30%',
                    edit:true
                }            
            }
        });
        $('#PersonTableContainer').jtable('load');
    });
</script>


</head>
<body>
<div style="width:60%;margin-right:20%;margin-left:20%;text-align:center;">

<div id="PersonTableContainer"></div>
</div>
</body>
</html>

You can find the code github repository https://github.com/sricanth/Sri-src/tree/master/ajax

Usage of paginator in web content

Following is the code in  of structure template of liferay webcontent in liferay

Structure

<root available-locales="en_US" default-locale="en_US">
<dynamic-element dataType="string" indexType="keyword" localizable="true" name="Question" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="small">
<dynamic-element dataType="html" fieldNamespace="ddm" indexType="keyword" localizable="true" name="Answer" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-text-html" width="small">
<meta-data locale="en_US">
<entry name="label">
<![CDATA[HTML]]>
</entry>
<entry name="predefinedValue">
<![CDATA[]]>
</entry>
<entry name="tip">
<![CDATA[]]>
</entry>
</meta-data>
</dynamic-element>
<dynamic-element dataType="string" indexType="keyword" localizable="true" name="Category" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small">
<meta-data locale="en_US">
<entry name="label">
<![CDATA[Text]]>
</entry>
<entry name="predefinedValue">
<![CDATA[]]>
</entry>
<entry name="tip">
<![CDATA[]]>
</entry>
</meta-data>
</dynamic-element>
<meta-data locale="en_US">
<entry name="label">
<![CDATA[Text]]>
</entry>
<entry name="predefinedValue">
<![CDATA[]]>
</entry>
<entry name="tip">
<![CDATA[]]>
</entry>
</meta-data>
</dynamic-element>
</root>




Template


<script type="text/javascript">


    
    
   


YUI().use(
  'aui-pagination',
  function(Y) {
      
   showpage=function(pageno)
   {
   
   
      if(pageno=="1")
      {
        
       Y.one(".content1").hide();
       Y.one('.content2').hide();
       Y.one("#pagination1").hide();
       Y.one("#pagination2").hide();
        Y.one('.content').show();
         Y.one('#pagination').show();
      }
      if(pageno=="2")
      {
        
       Y.one(".content").hide();
       Y.one('.content2').hide();
       Y.one("#pagination").hide();
       Y.one("#pagination2").hide();
       Y.one('.content1').show();
         Y.one('#pagination1').show();
      }
      if(pageno=="3")
      {
       
      Y.one(".content1").hide();
       Y.one('.content').hide();
       Y.one("#pagination1").hide();
       Y.one("#pagination").hide();
       Y.one('.content2').show();
         Y.one('#pagination2').show();
      }
   };
    
    var pages = Y.all('.content div');
    var pages1 = Y.all('.content1 div');
    var pages2=Y.all('.content2 div');

   

    new Y.Pagination(
      {
        boundingBox: '#pagination',
        circular: false,
        contentBox: '#pagination .pagination-content',
         
        on: {
          changeRequest: function(event) {
          
         
            var instance = this,
                state = event.state,
                lastState = event.lastState;
              

            if (lastState) {
                pages.item(lastState.page - 1).setStyle('display', 'none');
            }

            pages.item(state.page - 1).setStyle('display', 'block');
          }
        },
        
        page: 1,
        total: 8
      }
    ).render();
    
    new Y.Pagination(
      {
        boundingBox: '#pagination1',
        circular: false,
        contentBox: '#pagination1 .pagination-content1',
        on: {
          changeRequest: function(event) {
          
         
            var instance = this,
                state = event.state,
                lastState = event.lastState;
              

            if (lastState) {
                pages1.item(lastState.page - 1).setStyle('display', 'none');
            }

            pages1.item(state.page - 1).setStyle('display', 'block');
          }
        },
        total: 16,
        page: 1
      }
    ).render();
    
    new Y.Pagination(
      {
        boundingBox: '#pagination2',
        circular: false,
        contentBox: '#pagination2 .pagination-content2',
        on: {
          changeRequest: function(event) {
          
         
            var instance = this,
                state = event.state,
                lastState = event.lastState;
              

            if (lastState) {
                pages2.item(lastState.page - 1).setStyle('display', 'none');
            }

            pages2.item(state.page - 1).setStyle('display', 'block');
          }
        },
        total: 6,
        page: 1
      }
    ).render();
    
    if(window.location.hash) {
      var hash = window.location.hash.substring(1); //Puts hash in variable, and removes the # character
      
      showpage(hash);
      // hash found
  } else {
     Y.all(".content1").hide();
       Y.all('.content2').hide();
       Y.all("#pagination1").hide();
       Y.all("#pagination2").hide();
  }

    
  }
);
</script>


#if (!$Question.getSiblings().isEmpty())





<div class="content">
#set ($counter = 0)
#foreach ($cur_Question in $Question.getSiblings())
#if( $cur_Question.Category.getData() == "first" )
 #set ($counter = $counter + 1)
 #if ( $couter != 1)
 <div style="display:none">
    <h3> $cur_Question.getData()</h3>
     $cur_Question.Answer.getData()
  </div>
  #else
   <div>
    <h3> $cur_Question.getData()</h3>
     $cur_Question.Answer.getData()
  </div>
#end


#end
      
#end
#end
 
  
</div>

<div id="pagination">
  <ul class="pagination pagination-content">
    <li><a href="#">Prev</a></li>
    <li><a href="#">First</a></li>
    <li><a href="#">2</a></li>
    <li><a href="#">3</a></li>
    <li><a href="#">Next</a></li>
  </ul>
</div>

#if (!$Question.getSiblings().isEmpty())





<div class="content1">
#set ($counter = 0)
#foreach ($cur_Question in $Question.getSiblings())
#if( $cur_Question.Category.getData() == "second" )
 #set ($counter = $counter + 1)
 #if ( $couter != 1)
 <div style="display:none">
    <h3> $cur_Question.getData()</h3>
     $cur_Question.Answer.getData()
  </div>
#else
<div>
    <h3> $cur_Question.getData()</h3>
     $cur_Question.Answer.getData()
  </div>

#end
#end
      
#end
#end
 
  
</div>

<div id="pagination1">
  <ul class="pagination1 pagination-content1">
    <li><a href="#">Prev</a></li>
    <li><a href="#">1</a></li>
    <li><a href="#">2</a></li>
    <li><a href="#">3</a></li>
    <li><a href="#">Next</a></li>
  </ul>
</div>

#if (!$Question.getSiblings().isEmpty())





<div class="content2">
#set ($counter = 0)
#foreach ($cur_Question in $Question.getSiblings())
#if( $cur_Question.Category.getData() == "third" )
 #set ($counter = $counter + 1)
 #if ( $couter != 1)
 <div style="display:none">
    <h3> $cur_Question.getData()</h3>
     $cur_Question.Answer.getData()
  </div>
  #else
  
<div>
    <h3> $cur_Question.getData()</h3>
     $cur_Question.Answer.getData()
  </div>
  #end

#end
      
#end
#end
 
  
</div>

<div id="pagination2">
  <ul class="pagination2 pagination-content2">
    <li><a href="#">Prev</a></li>
    <li><a href="#">1</a></li>
    <li><a href="#">2</a></li>
    <li><a href="#">3</a></li>
    <li><a href="#">Next</a></li>
  </ul>
</div>

<div id="chapters">
            <ul>
                
                    
                    
                        
                        
                            <li><a href="javascript:void(0)" onclick="showpage('1')";>1</a>
                            </li>
                        
                    
                
                    
                    
                        
                            <li class="active"><a href="javascript:void(0)" onclick="showpage('2')";>2</a>
                            </li>
                        
                        
                    
                
                    
                    
                        
                        
                            <li><a href="javascript:void(0)" onclick="showpage('3')";>3</a>
                            </li>
                        
                    
                
            </ul>
        </div>

property for reading parmeters and making ajax calls

to read the parameters and enable ajax calls in Liferay portal add  following 
properties in Liferay-portlet.properties

<requires-namespaced-parameters>false</requires-namespaced-parameters>
         <ajaxable>true</ajaxable>

login with screen name and email address

http://www.liferay.com/web/lauri.hiltunen/blog/-/blogs/tip-of-the-day-login-magic-by-overriding-struts-actions


package com.sample.login;

import javax.portlet.ActionRequest;
import javax.portlet.filter.ActionRequestWrapper;

import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.util.PortalUtil;

public class LoginParamWrapper extends ActionRequestWrapper {


@Override
public String getParameter(String name) {
String value=super.getParameter(name);
if(LoginParamKeys.LOGIN.equals(name) && Validator.isEmailAddress(value))
{
ActionRequest actionRequest=this.getRequest(); 
long companyId=PortalUtil.getCompanyId(actionRequest);
value=LoginNameResolver.resolveScreenNameFromEmailAddress(value, companyId);
}
// TODO Auto-generated method stub
return value;
}

public LoginParamWrapper(ActionRequest request) {
super(request);
// TODO Auto-generated constructor stub
}

}

--
package com.sample.login;

import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.model.User;
import com.liferay.portal.service.UserLocalServiceUtil;

public class LoginNameResolver {
public static String resolveScreenNameFromEmailAddress(String email,long companyId)
{
String screenName="";
try {
User user=UserLocalServiceUtil.getUserByEmailAddress(companyId, email);
screenName=user.getScreenName();
} catch (PortalException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SystemException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
 return screenName;
}

}
---

package com.sample.login;

import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletConfig;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import javax.portlet.ResourceRequest;
import javax.portlet.ResourceResponse;

import com.liferay.portal.kernel.struts.BaseStrutsPortletAction;
import com.liferay.portal.kernel.struts.StrutsPortletAction;

public class LoginAction extends BaseStrutsPortletAction {

@Override
public void processAction(StrutsPortletAction originalStrutsPortletAction,
PortletConfig portletConfig, ActionRequest actionRequest,
ActionResponse actionResponse) throws Exception {
// TODO Auto-generated method stub
originalStrutsPortletAction.processAction(originalStrutsPortletAction, portletConfig, new LoginParamWrapper(actionRequest), actionResponse);
}

@Override
public String render(StrutsPortletAction originalStrutsPortletAction,
PortletConfig portletConfig, RenderRequest renderRequest,
RenderResponse renderResponse) throws Exception {
// TODO Auto-generated method stub
return originalStrutsPortletAction.render(originalStrutsPortletAction, portletConfig, renderRequest,
renderResponse);
}

@Override
public void serveResource(StrutsPortletAction originalStrutsPortletAction,
PortletConfig portletConfig, ResourceRequest resourceRequest,
ResourceResponse resourceResponse) throws Exception {
// TODO Auto-generated method stub
originalStrutsPortletAction.serveResource(originalStrutsPortletAction, portletConfig,
resourceRequest, resourceResponse);
}

}
---
package com.sample.login;

public class LoginParamKeys {
public static String LOGIN="login";

}

Database sherd in liferay with JNDI


Sharding is a type of database partitioning that separates very large databases the into smaller, faster, more easily managed parts called datashards. The word shard means a small part of a whole

Steps for liferay sharding :
1)     Initially add JNDI entries in portal-ext.properties and root.xml file as follows
portal-ext.properties jdbc.default.jndi.name=jdbc/LiferayPool
root.xml:
 <Resource
       name="jdbc/LiferayPool"
       auth="Container"
       type="javax.sql.DataSource"
       driverClassName="com.mysql.jdbc.Driver"
       url="jdbc:mysql://localhost/lportal80?useUnicode=true&amp;characterEncoding=UTF-8&amp;useFastDateParsing=false"
       username="root"
       password="root"
       maxActive="150"
       maxIdle="30"
       maxWait="10000"
        />
Start the liferay server .
2)     Add the site , users , pages ,webcontent , documents form admin console .
3)     Now stop the sever .
4)     Enable instance specific properties  
                         we need to add -Dcompany-id-properties=true in your java arguments . set them to JAVA_OPS in bin/setevn.bat. 
                     Add the  below property in portal-ext.properties file
                      include-and-override=portal-<web-id>.properties
5)     Add JNDI entries for shard in portal-ext.properties and root.xml
Portal-ext.properties: jdbc.one.jndi.name=jdbc/LiferayPoolSherd
Root.xml :
<Resource
       name="jdbc/LiferayPoolSherd"
       auth="Container"
       type="javax.sql.DataSource"
       driverClassName="com.mysql.jdbc.Driver"
       url="jdbc:mysql://localhost/lportal81?useUnicode=true&amp;characterEncoding=UTF-8&amp;useFastDateParsing=false"
       username="root"
       password="root"
       maxActive="150"
       maxIdle="30"
       maxWait="10000"
        />

6)     Add spring specific properties for supporting shard.
spring.configs=\
        META-INF/base-spring.xml,\
        \
        META-INF/hibernate-spring.xml,\
        META-INF/infrastructure-spring.xml,\
        META-INF/management-spring.xml,\
        \
        META-INF/util-spring.xml,\
        \
        META-INF/jpa-spring.xml,\
        \
        META-INF/executor-spring.xml,\
        \
        META-INF/audit-spring.xml,\
        META-INF/cluster-spring.xml,\
        META-INF/editor-spring.xml,\
        META-INF/jcr-spring.xml,\
        META-INF/ldap-spring.xml,\
        META-INF/messaging-core-spring.xml,\
        META-INF/messaging-misc-spring.xml,\
        META-INF/mobile-device-spring.xml,\
        META-INF/notifications-spring.xml,\
        META-INF/poller-spring.xml,\
        META-INF/rules-spring.xml,\
        META-INF/scheduler-spring.xml,\
        META-INF/search-spring.xml,\
        META-INF/workflow-spring.xml,\
        \
        META-INF/counter-spring.xml,\
                        META-INF/document-library-spring.xml,\
        META-INF/mail-spring.xml,\
        META-INF/portal-spring.xml,\
        META-INF/portlet-container-spring.xml,\
        META-INF/staging-spring.xml,\
        META-INF/virtual-layouts-spring.xml,\
        \
        META-INF/monitoring-spring.xml,\
        \
        #META-INF/dynamic-data-source-spring.xml,\
        META-INF/shard-data-source-spring.xml,\
       #META-INF/memcached-spring.xml,\
        \
        classpath*:META-INF/ext-spring.xml

7)     Create the file  by name  portal-<web-id>.properties and place in the same folder as of portal-ext.properties .
8)     By using this sharding works properly, but  there is some issues
Like for some portlet like custom or calender the table is not created on both instance DB.
So, for this we need to add following property at once:
        Add the below entries in portal-<web-id>.properties
verify.frequency=-1
verify.processes=com.liferay.portal.verify.VerifyDocumentLibrary
                    

9)     Finally root.xml should look as below .
<Context path="" crossContext="true">
        <Resource
       name="jdbc/LiferayPool"
       auth="Container"
       type="javax.sql.DataSource"
       driverClassName="com.mysql.jdbc.Driver"
       url="jdbc:mysql://localhost/lportal80?useUnicode=true&amp;characterEncoding=UTF-8&amp;useFastDateParsing=false"
       username="root"
       password="root"
       maxActive="150"
       maxIdle="30"
       maxWait="10000"
        />
        <Resource
       name="jdbc/LiferayPoolSherd"
       auth="Container"
       type="javax.sql.DataSource"
       driverClassName="com.mysql.jdbc.Driver"
       url="jdbc:mysql://localhost/lportal81?useUnicode=true&amp;characterEncoding=UTF-8&amp;useFastDateParsing=false"
       username="root"
       password="root"
       maxActive="150"
       maxIdle="30"
       maxWait="10000"
        />
</Context>


And portal-ext.properties file should look like below


jdbc.default.jndi.name=jdbc/LiferayPool
jdbc.one.jndi.name=jdbc/LiferayPoolSherd
shard.selector=com.liferay.portal.dao.shard.ManualShardSelector
include-and-override=portal-domain2.com.properties

#
    # Input a list of comma delimited Spring configurations. These will be
    # loaded after the bean definitions specified in the contextConfigLocation
    # parameter in web.xml.
    #
    # Note that there is a special case for hibernate-spring.xml and
    # jpa-spring.xml. Even though both files are specified, only one will
    # actually load at runtime based on the property "persistence.provider".
    #
    spring.configs=\
        META-INF/base-spring.xml,\
        \
        META-INF/hibernate-spring.xml,\
        META-INF/infrastructure-spring.xml,\
        META-INF/management-spring.xml,\
        \
        META-INF/util-spring.xml,\
        \
        META-INF/jpa-spring.xml,\
        \
        META-INF/executor-spring.xml,\
        \
        META-INF/audit-spring.xml,\
        META-INF/cluster-spring.xml,\
        META-INF/editor-spring.xml,\
        META-INF/jcr-spring.xml,\
        META-INF/ldap-spring.xml,\
        META-INF/messaging-core-spring.xml,\
        META-INF/messaging-misc-spring.xml,\
        META-INF/mobile-device-spring.xml,\
        META-INF/notifications-spring.xml,\
        META-INF/poller-spring.xml,\
        META-INF/rules-spring.xml,\
        META-INF/scheduler-spring.xml,\
        META-INF/search-spring.xml,\
        META-INF/workflow-spring.xml,\
        \
        META-INF/counter-spring.xml,\
                        META-INF/document-library-spring.xml,\
        META-INF/mail-spring.xml,\
        META-INF/portal-spring.xml,\
        META-INF/portlet-container-spring.xml,\
        META-INF/staging-spring.xml,\
        META-INF/virtual-layouts-spring.xml,\
        \
        META-INF/monitoring-spring.xml,\
        \
        #META-INF/dynamic-data-source-spring.xml,\
        META-INF/shard-data-source-spring.xml,\
       #META-INF/memcached-spring.xml,\
        \
        classpath*:META-INF/ext-spring.xml



Start the server.

Login with as admin .
Go to control-panel , then go to server administration .
Execute the button with lable

“Verify database tables of all plugins. “

Create the new instance with name domain2.com.

Now go to url

Domain2.com:8080/
Use the default user email id  test@domain2.com and test is the password