FAQ Database Discussion Community


Change database in Liferay with losing any data

liferay,hook,liferay-6,portlet,liferay-theme
As of today, I am developing the liferay portal enhancements with default hsql database. I have implemented many features and created multiple sites and site templates with different roles and user. 1) Now I want to change the database from hsql database to PostgreSQL. Now how can I change the...

Liferay roles and permissions for publishing

permissions,liferay-6,roles
I am new to Liferay, since there are many roles in Liferay, i'm in confusion. I need to implement a particular scenario like, Admin --> can publish Users(under admin) --> can edit content and make request to admin for publishing can any one explain how to implement this...

How to add preference option to the liferay portlet

liferay,liferay-6,portlet,portal
I want to create a portlet where the portlet allow access to the remote application. That is the content of the portlet should be dynamic so for the same reason I want to add one option "Preferences" in the portlet (Where the look and feel and configuration options exists). In...

Custom Taglib in liferay using Spring MVC & Maven?

java,spring,maven,liferay,liferay-6
How do i proceed with creating a custom Taglib in a liferay.For now i have a portlet created in place. My obvious questions are: Do i need to create a hook plugin and override a jsp for acheiving this target? Do i need to download any jars? Which all files...

How to create a new(original) struts path?

liferay,liferay-6,struts-1
I have tried overriding existing StrutsPortletAction before with their existing struts path with success. However, I can't seem to do the same if I were to try creating my own struts action path. <hook> <custom-jsp-dir>/custom_jsps</custom-jsp-dir> <struts-action> <struts-action-path>/portal/set_viewers/</struts-action-path> <struts-action-impl>com.mine.blogs.hook.BlogEntryViewerStrutsPortletAction</struts-action-impl> </struts-action> </hook> The eclispe IDE gives me this error...

How to delete a portlet in Liferay 6.1 programmatically from code

java,javascript,java-ee,liferay,liferay-6
I'm working on Liferay 6.1 I want to delete a portlet in Liferay 6.1 from my code. What I have done so far is: <a onclick="Liferay.Portlet.close('#p_p_id_28_'); return false;">Remove</a> Above code is working fine. But it is working on the current page only i.e. it can delete the portlet(s) which is...

liferay portlet non-liferay JNDI data source null

oracle,tomcat7,jndi,liferay-6,portlet
For a Liferay 6.2 custom portlet accessing a non liferay Oracle database we are running into an issue where the data source returned is null. We have configured the tomcat/conf/context.xml <!-- Adding custom New non liferay datasource --> <Resource name="jdbc/NewPool" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST...

Liferay portal-ext LDAP configuration

java,active-directory,ldap,liferay,liferay-6
For the first time i configured the LDAP connection i did it through the Liferay control panel and everything worked just fine. But now i want to configure it through portal-ext.properties file, these are my configurations: ldap.auth.enabled=true ldap.import.enabled=true ldap.import.on.startup=true ldap.import.method=user ldap.auth.required=true ldap.export.enabled=false ldap.base.provider.url=ldap://******************** ldap.base.dn=******************** ldap.security.principal=********************...

Customizing liferay Calendar portlet

liferay,liferay-6,liferay-ide
I'm trying to customize Calendar portlet using this below instructions. https://www.liferay.com/it/documentation/liferay-portal/6.2/development/-/ai/creating-plugins-to-extend-plugins-liferay-portal-6-2-dev-guide-03-en Its basically creating Plugins to extend plugins. In order to achieve above, I need "Calendar-portlet.war" . I don't find any war file for calendar portlet for my version. So i decided to build myself. Then i downloaded Portal plugins...

liferay 6: reach main site from breadcrumb

liferay,liferay-6
We have liferay 6.1-ga2 serving a main site and several subsites. In the protal settings we set /home as standard homepage, logout-page and root-url. Now if we navigate to a subpage /web/projectFoo and then want to return the main-site by clicking the link in the breadcrumb or manually typing http://example.com/...

Liferay 6.2 Hook deployment strange behaviour

liferay,hook,liferay-6
I have deployed a document library hook which includes many jsp files under custom_jsps. Recently, I wanted to change folder_action.jsp, so I changed it and deployed it normally in document library portlet. As it was expected, a folder_action.portal.jsp was created containing the original file. However, I've noticed something strange. After...

I am working on a MVC Portlet and the document i am saving is not going to db

liferay,liferay-6
Here is my Action Class, where I have to save any document to database but its not working and getting error in console that NoSuchMethodException (javax.portlet.ActionRequest, javax.portlet.ActionResponse) package com.test.docupload; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import javax.portlet.ResourceRequest; import javax.portlet.ResourceResponse; import javax.portlet.PortletException; import com.liferay.counter.service.CounterLocalServiceUtil; import...

How to host a newportal instance in liferay

liferay,liferay-6
I have created a new portal instance in liferay. I want to host it in my local Ubuntu machine. What i have done is created a WEB ID as newportal.com Virtual host as www.newportal.com and the mail domain as newportal.com thanks...

Set setcontenttype in action mapping?

liferay,liferay-6,portlet,content-type
Can anyone tell me how i can set content type to "UTF-8" using action response like resource Response? I dont see any setContentType for actionResponse. In Resource Mapping we can do it like resourceResponse.setContentType("text/html; charset=UTF-8"); I also tried to encode the string using . messageToCust=new String (messageToCust.getBytes ("ISO-8859-1"), "UTF-8"); Is...

Hide Sign Out Link in Liferay 6.2 Dockbar

liferay,liferay-6,liferay-theme
In Liferay 6.1, we created a hook to hide the sign out link in the dockbar. However, when I look at the code for 6.2, I see the following: <c:if test="<%= themeDisplay.isShowSignOutIcon() %>"> <aui:nav-item cssClass="sign-out" href="<%= themeDisplay.getURLSignOut() %>" iconCssClass="icon-off" label="sign-out" /> </c:if> No matter how much I google, I can't...

Liferay 6.1.2 CE not displaying images after migration to other server

liferay,jboss7.x,liferay-6
We have moved a Liferay Portal Community Edition 6.1.2 CE installation from one server to another "as it is", by copying the war files and all directories. Everything works fine, just the images (located in "document_library") are not displayed in the browser. On both servers, the old one and the...

SMTP Exception handling

java,exception-handling,smtp,javamail,liferay-6
I'm developing a code to send mail in Liferay... The probleme here is that I want to send an error message portletRequest.setAttribute("mailError", new String("smobile.error.mail")) when the mail Server ( SMTP) is down.. Here is the source code. try { MailMessage mailMessage = new MailMessage(); mailMessage.setFrom(new InternetAddress(fromEmail)); mailMessage.setSubject(subjectTemplate); mailMessage.setBody(bodyTemplate); mailMessage.setHTMLFormat(true); mailMessage.setTo(new...

Liferay homepage is not found after starting the server in Eclipse

eclipse,tomcat,liferay,tomcat7,liferay-6
I have set up a Liferay Tomcat Server in Eclipse. After the server starts and I go to localhost:8181 (where I configured the server), the page is empty. Also, if I right click the server in Eclipse and select Open Liferay Portal Home, a 404 Page Not Found is displayed....

customize error message for required field with in liferay

validation,liferay,liferay-6,liferay-aui
I'm trying to validate a required Select option with aui. for input fields the code below works without any issue : <aui:input name="name" value="${name}" label="name"> <aui:validator name="required" errorMessage="your-message-here"></aui:validator> </aui:input> But with Select option field, I cannot customise the required error message : for example : <aui:select required="true" label="field.label" id="id" name="name"...

How to ignore Liferay user removed from LDAP errors?

ldap,log4j,liferay,liferay-6,openldap
I have a Liferay 6.1 instance that is connected to LDAP. New users get imported nicely, but when I remove a user from the LDAP directory, Liferay starts throwing exceptions when it tries to sync users from LDAP. These seem to be safe to ignore, but they produce several megabytes...

Include ftl file in ext plugin

maven,liferay,liferay-6
I have ext-plugin and I would like to override this file: portal-impl\src\com\liferay\portlet\dynamicdatamapping\dependencies\ddm\documentlibrary.ftl. After maven build, this file isn't include in my porta-impl-ext.jar. In my portal-impl-ext's pom.xml I have this code: <build> <plugins> <plugin> <groupId>com.liferay.maven.plugins</groupId> <artifactId>liferay-maven-plugin</artifactId> <version>${liferay.maven.plugin.version}</version> <configuration>...

Where can we get the liferay Iframe portlet source code?

iframe,liferay,liferay-6,portlet,spring-portlet-mvc
I need to a portlet to access the remote applications. So I need the Iframe type portlet. I have tested the I frame on liferay portal. I need the source code of the Iframe portlet, so that I need to customize it as required and ddeploy the same on to...

How to add a custom section to the User Edit Screen in Liferay?

liferay,liferay-6,liferay-aui,liferay-ide
I want to customize the User-Edit page in Liferay 6.2. First of all I wanted to add a new section to the bar on the right of the user edit screen (http://i.imgur.com/dshV5cJ.png). I have realized this with properties like users.form.add.main=customportlet When i click on the new created section it opens...

Liferay internal dependencies

maven,liferay,liferay-6
Is there any wiki page or something, where I can find the Liferay internal dependencies with version? For example: i want to use log4j logging, or commons-fileupload I have Maven project, i declare a new dependency, with a provided scope. But what version should I use? (We are working with...

Difference between Liferay Mobile SDK and Liferay Screens

mobile,liferay,liferay-6
Can someone tell me the difference between Liferay Mobile SDK and Liferay Screens? Thanks a lot....

Changing request parameter value in Struts2 interceptor

java,struts2,request,liferay-6,interceptor
Does anybody know if it is possible to change/remove request parameter values in a Struts2 interceptor? The request parameter Map is an instance of UnmodifiableMap so it doesn't look like it can be manipulated with in the interceptor. UPDATE: I'm using Liferay so uParamsMap will be an UnmodifiableMap public String...

How to update the portlet view with a web page?

java,liferay,liferay-6,portlet
In my application, I need to access the remote applications (The application which is running on other tomcat instance) dynamically in my portlet. So I have created the portlet in view and edit mode so that I am able see the "preferences" option in portlet setting options. my preference page...

Liferay 6.2 - tomcat bundle shutdown issue

java,linux,tomcat,liferay-6
I am running into an issue where I am unable to shutdown the Liferay 6.2 tomcat bundle on the server via the bundled shutdown script on the new linux server. The steps I took are: Installed the bundle by unziping it. Uploaded the custom portal-ext.properties in the default liferay home...

Liferay only show page that have children

java,permissions,liferay,liferay-6
I'm working with permissions on Liferay and i'm facing a problem. I have this page structure: ->Page 1 ---->Child page 1 ---->Child page 2 ---->Child page 3 ->Page 2 (...) Each child page (1,2,3) have diferent permissions. What i want is to make 'Page 1' only visible to users who...

Liferay's messages - extend duration

liferay,liferay-6
is it possible to extend time when Liferay's Sesssion Messages (and Session Errors) are displayed on the page ? Normally it lasts like 8 seconds and it's not enough for me. I use Liferay 6.1.1....

AJAX Call not working in liferay 6.2.2?

ajax,liferay,hook,liferay-6
I am trying to perform a AJAX Call. But what i get is ResourceURL as undefined when i see the error in chrome. Below is my code. Declaration: <liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" var="mainURL" /> Implementation: xhr2.open("POST", resourceURL , false); But at implmentation i get resourceURL as undefined. In 6.1 it...

Liferay Table Column Description

liferay,liferay-6
I am trying to understand the field level description for each table in life ray which are related to user management. I did not understand the purpose of some columns in the following tables. USER_: GRACELOGINCOUNT FACEBOOKID PORTRAITID GROUP_: PARENTGROUPID LIVEGROUPID TREEPATH TYPE_ TYPESETTINGS REMOTESTAGINGGROUPCOUNT ADDRESS: TYPEID PRIMARY_ PHONE: TYPEID...

Verify in another portlet-A whether the portlet-B is deployed or not

liferay,liferay-6,portlet
Requirement JSP code in portlet-A's JSP includes another portlet as: <liferay-portlet:runtime portletName="portlet-B_WAR_portletbportlet" /> If portlet-B is undeployed it shows a message - portlet-B is unavailable. We need to check when portlet-B is unavailable and do some other functionality and show some other stuff Question Is it possible to check in...

Users in Guest role see default theme instead custom one for given layouts

liferay,liferay-6,liferay-theme
Users in Guest role see default theme instead custom one for pages which inherit from defined custom theme. This seems to be very strange problem. Even though layouts have specified to inherit theme from parent theme: Use the same look and feel of the Public Pages. Guests see them as...

Saving preferences in a embedded portlet added with liferay-portlet:runtime tag

liferay,liferay-6
I created a portlet (parent) that shows as the content of accordion an embedded portlet (also created by me). As context, below the JSP (view mode) of the parent portlet: <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> <%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %> <jsp:useBean id="titulo" class="java.lang.String" scope="request" /> <portlet:defineObjects /> <%! String idPortlet="test_WAR_boxportlet_INSTANCE_fadewsio22a";...

Issue while deploying the Orbeon Form builder portlet

ant,liferay,liferay-6,portlet,orbeon
I want to deploy the Form Runner separately, For the same reason I tried to create the proxy-portlet with reference to the following link, https://github.com/orbeon/orbeon-forms/wiki/Form-Runner-~-Portal-~-Liferay-Proxy-Portlet-Guide. I tried the following command to generate the Proxy-Portlet, ant proxy-portlet-war The build gets success and generated the war file (orbeon-4.7.0.pre.20150129-proxy-portlet.war) then I renamed the...

In liferay market place, I am unable to submit the project

liferay,liferay-6
In Liferay market place i am stuck at the place "Upload Liferay Plugin Packages " When ever i am trying to upload a war file Please help me to short it out :)...

Could not find or load main class com.liferay.portal.tools.SassToCssBuilder

java,xml,eclipse,liferay,liferay-6
I'm using Liferay 6.2 CE. When I'm deploying my portlet, this error message is shown. Buildfile: /home/matej/liferay-plugins-sdk-6.2/portlets/RegistrationForm-portlet/build.xml war: [java] Error: Could not find or load main class com.liferay.portal.tools.SassToCssBuilder BUILD FAILED /home/matej/liferay-plugins-sdk-6.2/build-common.xml:2468: The following error occurred while executing this line: /home/matej/liferay-plugins-sdk-6.2/build-common.xml:2473: The following error occurred while executing this line:...

Liferay 6.2 clustering issue with multicast

lucene,cluster-computing,liferay-6,ehcache,jgroups
I am trying to cluster ehcache and lucene with Liferay 6.2 EE sp2 bundle on 2 servers with mutlicast enabled. WE have Apache HTTPD servers fronting tomcat servers using reverse proxy. A valid 6.2 license is deployed on both the nodes. We user the following properties in the portal-ext.properties: cluster.link.enabled=true...

Auto deploy Liferay portlets in Netbeans

tomcat,netbeans,liferay,liferay-6,portlet
how do you automatically deploy Liferay portlets in Netbeans? Every time I build a project, have to copy .war file to Tomcat deploy directory in Liferay. Is it possible to deploy .war file automatically, when project is built?

Identify that the logged in user is an administrator or not using velocity

liferay,liferay-6,liferay-theme
I would like to identify that the logged in user is an administrator or not using velocity. The goal is to show the dockbar to the administrator user(s) only. I have tried following code, but is not working for me: #if ($is_signed_in && $permissionChecker.isGroupAdmin($group_id)) #dockbar() #end Please help me!!!...

How to trigger scheduler job immediately in liferay 6.1.1

quartz-scheduler,liferay-6
for project needed, I need a button when I click it it will trigger a scheduler job immediately in liferay 6.1.1. I know before liferay 4.2 there is a API JobScheduler.triggerJob() to make it happen. but in the 6.1.1 this API is removed, is there any other way I can...

How to pass HTTP request to Web-Service

ajax,web-services,liferay,liferay-6,portlet
From my portlet JSP, I am trying to make a Ajax call to web-service. My aim is to pass HTTP request object as a parameter to web-service method. Please suggest.

Liferay control panel to code

java,liferay-6
I'm new to Liferay but I have to update (fix bug and add some enhancement) a site made with Liferay 6.1.1 I have a form that create an organization and a blank site for it. The problem is that currently, an admin have to go to the control panel, change...

Lifefay freemarker ADT: methods unavailable?

java,liferay,liferay-6,freemarker
I'm trying to work on some ADT for asset publisher (Documents and Media type), but I often have a message telling me that : Expression assetRenderer.getDataRepositoryId is undefined or Expression assetRenderer.getFileEntryId is undefined I found some threads where people said that we must add velocity.engine.restricted.classes= velocity.engine.restricted.variables= freemarker.engine.restricted.classes= freemarker.engine.restricted.variables= in portal-ext.properties...

Liferay 6.2 Documents migration from filesystem to DB

database,liferay,liferay-6,data-migration
I am going to move from storing document files in filesystem to Database. I would like to know the following before proceeding. Migration of existing documents in filesystem, is executed through control panel by selecting the DBStore hook. Is this right? Do I need to perform some other actions? Regarding...

How to get Liferay login user details in servlet(Portlet)?

session,servlets,liferay,liferay-6,portlet
I have deployed my application as a porlet on Liferay, Now I need to perform session management while performing the business logic (in servlet). Let's say I have deployed my servlet on liferay. I am using liferay 6.2, Tomcat 7, I am submitting one form to servlet before performing the...

Issue while running the service builder on life ray

spring,hibernate,liferay,liferay-6,liferay-service-builder
With reference to the following tutorial, https://www.liferay.com/documentation/liferay-portal/6.2/development/-/ai/generating-your-service-layer-liferay-portal-6-2-dev-guide-04-en I have created and deployed the service builder. Now view page is showing as expected and on click of Add location button the new form is showing up with respective fields, There I am entering some data and trying to save the data....

Service builder doesn't delete table in DB

liferay,liferay-6,liferay-service-builder
Hi all, I'm using LR 6.1. I created a new entity Called " Recommendation" in service.xml then a run BuildServices with Ant to generate the service builder Files. Now I want to delete the Entity. So I Deleted if from service.xml, but nothing happens in Data base and the other...

Actual difference between organization owner and organization administrator in Liferay

liferay,liferay-6
I am new to liferay and I am exploring User Roles. I have created an organization and 2 users are associated with it say user1 and user2. User1 is organization owner and user2 is organization administrator. Now my question is what is the actual difference between organization owner and organization...

How to render a web page in a portlet view

liferay,liferay-6,portlet,jsrender,jsr286
Can any one please guide me that how can we render the custom web page view in the portlet. i.e, I have a input text box in my where user can enter the target URL and on click of the submit button the portlet content should display the target URL...

Liferay database table work flow?

liferay,liferay-6
I am new to Liferay. Now I need to create the flow chart which has the Liferay table work flow in following scenarios, 1) What are the list of table will reflect/update if we create the site admin? 2) What are the list of table will reflect/update if we create...

Can't get the liferay login user details in portlet

liferay,liferay-6,portlet,liferay-theme
I have one proxy portlet and one Generic portlet. Here I am sending Post data from proxy portlet to generic portlet. While sending the data I use post method and sending to the view.jsp page. In view.jsp I am able to get the form data through input stream. Now the...

Cannot login using ldap user in Liferay

ldap,liferay,liferay-6,liferay-ide
It was working until few days back but right now it doesnt login in.It shows authentication failed please try again.Im using Liferay 6.2 and this is my portal-ext.properties #jdbc.default.jndi.name=jdbc/LiferayPool jdbc.default.driverClassName=com.mysql.jdbc.Driver jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false jdbc.default.username=root jdbc.default.password=root echolaide.database.name=echolaidedb echolaide.database.username=root...

How to call Generic Portlet methods from servlet?

java,servlets,liferay,liferay-6,portlet
I have created a portlet and able all my business logic is performing in a servlet. I need to get the liferay login user details in the servlet. SO I have created a class which will extend the GenericPortlet. Now My question is how can I call that class I...

how to integrate CMS component of Liferay in a Spring java application?

spring-mvc,content-management-system,liferay-6,drools-guvnor
I have very dynamic content for each section of the web portal.The rules for that content are stored in the rule engine drools along with the content,Now I want to separate the content part from drools so as to make content editable via UI. Liferay has been opted as CMS....

Bootstrap dropdown-menu not working in Liferay 6.2

jquery,html,css,twitter-bootstrap,liferay-6
I'm trying to do a new navbar in Liferay 6.2, but dropdown menu isn't working. I suspect AUI is guilty of this, but not sure here you got my code: <div class="navbar"> <div class="navbar-inner"> <div class="container"> .... <div class="btn-group"> <button type="button" class="btn btn-danger" data-toggle="dropdown" data-target="#demo"> simple collapsible </button> <ul class="dropdown-menu...