Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
service builder sasmita swain September 24, 2012 11:05 PM
RE: service builder Vishal Panchal September 24, 2012 11:15 PM
RE: service builder Mazhar Alam September 25, 2012 12:03 AM
RE: service builder sasmita swain September 25, 2012 1:54 AM
RE: service builder Mazhar Alam September 25, 2012 2:07 AM
RE: service builder sasmita swain September 25, 2012 2:18 AM
RE: service builder sasmita swain September 25, 2012 2:22 AM
RE: service builder Mazhar Alam September 25, 2012 2:29 AM
RE: service builder sasmita swain September 25, 2012 2:39 AM
RE: service builder Vishal Panchal September 25, 2012 2:45 AM
RE: service builder sasmita swain September 25, 2012 2:56 AM
RE: service builder sasmita swain September 25, 2012 2:58 AM
RE: service builder Vishal Panchal September 25, 2012 3:05 AM
RE: service builder sasmita swain September 25, 2012 3:24 AM
RE: service builder Vishal Panchal September 25, 2012 4:43 AM
RE: service builder sasmita swain September 25, 2012 8:54 PM
RE: service builder Vishal Panchal September 25, 2012 10:00 PM
RE: service builder sasmita swain September 25, 2012 10:43 PM
RE: service builder sasmita swain September 25, 2012 11:11 PM
RE: service builder Vishal Panchal September 25, 2012 11:15 PM
RE: service builder sasmita swain September 25, 2012 11:26 PM
RE: service builder Vishal Panchal September 25, 2012 11:29 PM
RE: service builder sasmita swain September 26, 2012 12:08 AM
RE: service builder Vishal Panchal September 26, 2012 12:56 AM
RE: service builder sasmita swain September 26, 2012 1:45 AM
RE: service builder sasmita swain September 26, 2012 2:36 AM
RE: service builder sasmita swain September 26, 2012 2:37 AM
RE: service builder Vishal Panchal September 26, 2012 3:42 AM
RE: service builder sasmita swain September 26, 2012 4:02 AM
RE: service builder Vishal Panchal September 26, 2012 4:12 AM
RE: service builder sasmita swain September 26, 2012 4:24 AM
RE: service builder Harish Kumar September 26, 2012 4:51 AM
RE: service builder sasmita swain September 26, 2012 8:45 PM
RE: service builder sasmita swain September 26, 2012 9:09 PM
RE: service builder Vishal Panchal September 26, 2012 9:32 PM
RE: service builder sasmita swain September 26, 2012 9:42 PM
RE: service builder sasmita swain September 26, 2012 10:00 PM
RE: service builder sasmita swain September 26, 2012 10:17 PM
RE: service builder Chandrasekhar Kothuri October 3, 2012 4:40 AM
RE: service builder Vishal Panchal September 25, 2012 2:17 AM
sasmita swain
service builder
September 24, 2012 11:05 PM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

hi

i am using liferay 6.1..i have created own custom table using service builer.but i want to add extra column like user id given by liferay..how to add liferay existing column in custom table?

please give some suggestion

Thanks in advance
Sasmita
Vishal Panchal
RE: service builder
September 24, 2012 11:15 PM
Answer

Vishal Panchal

Rank: Expert

Posts: 276

Join Date: May 20, 2012

Recent Posts

sasmita swain:
hi

i am using liferay 6.1..i have created own custom table using service builer.but i want to add extra column like user id given by liferay..how to add liferay existing column in custom table?

please give some suggestion

Thanks in advance
Sasmita


Hi sasmita ,

You can simply add one more field in your custom table.
Now , when you try to insert data in your table you can get current userId from themeDisplay.getUserId();
Is that your solution.?

Thanks & Regards,
Vishal R. Panchal
Mazhar Alam
RE: service builder
September 25, 2012 12:03 AM
Answer

Mazhar Alam

Rank: Regular Member

Posts: 188

Join Date: November 25, 2011

Recent Posts

Agreed with Vishal's solution.
sasmita swain
RE: service builder
September 25, 2012 1:54 AM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

thanks for your reply

where should i write themedisplay.getUserId();?
can i create userid extra column direct from table?
Mazhar Alam
RE: service builder
September 25, 2012 2:07 AM
Answer

Mazhar Alam

Rank: Regular Member

Posts: 188

Join Date: November 25, 2011

Recent Posts

You have to create userId field within your service.xml and when you build service a column userId will be added to your table..
Then when you try to insert various values into your table at that time use themedisplay.getUserId() and set its value in the respective userId field.
Vishal Panchal
RE: service builder
September 25, 2012 2:17 AM
Answer

Vishal Panchal

Rank: Expert

Posts: 276

Join Date: May 20, 2012

Recent Posts

sasmita swain:
thanks for your reply

where should i write themedisplay.getUserId();?
can i create userid extra column direct from table?



Hi sasmita swain,

As per Mazhar Alam,
you can add one more property in your service.xml
e.g. <column name="userId" type="long"/>
Now when you will insert some value in your custom table at that time you will need too provide userId value as you providing values to other fields.
so this time you need to use themeDisplay.getUserId() .

Thanks & Regards,
Vishal R. Panchal
sasmita swain
RE: service builder
September 25, 2012 2:18 AM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

long userId = themeDisplay.getUserId();
i am using above code.but it is not comming. userid is not inserting. from user table what liferay has given
sasmita swain
RE: service builder
September 25, 2012 2:22 AM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

sasmita swain:
long userId = themeDisplay.getUserId();
i am using above code.but it is not comming. userid is not inserting. from user table what liferay has given
Attachments: emp1-portlet.rar (126.2k)
Mazhar Alam
RE: service builder
September 25, 2012 2:29 AM
Answer

Mazhar Alam

Rank: Regular Member

Posts: 188

Join Date: November 25, 2011

Recent Posts

/*to get userId*/

ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
long userid= themeDisplay.getUserId();

/*to insert*/

Use the impl class -
like-

Yourentityimpl impl = new Yourentityimpl();
impl.setUserId(userid);


Thats it!!!!!
sasmita swain
RE: service builder
September 25, 2012 2:39 AM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

thanks

i got that user id..but i want custom user id means when a user login ,that user id go to user database.that user id i want to fetch in my custom table.by default 10196 userid is comming for test@liferay.com..
Vishal Panchal
RE: service builder
September 25, 2012 2:45 AM
Answer

Vishal Panchal

Rank: Expert

Posts: 276

Join Date: May 20, 2012

Recent Posts

sasmita swain:
thanks

i got that user id..but i want custom user id means when a user login ,that user id go to user database.that user id i want to fetch in my custom table.by default 10196 userid is comming for test@liferay.com..


By Using themeDisplay.getUserId(); you will get the userId of a User who is currently logged In.

Thanks & Regards,
Vishal R. Panchal
sasmita swain
RE: service builder
September 25, 2012 2:56 AM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

ya i have used that one..but it is comming default userid
sasmita swain
RE: service builder
September 25, 2012 2:58 AM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

here my attached file
Attachments: emp1-portlet.rar (126.2k)
Vishal Panchal
RE: service builder
September 25, 2012 3:05 AM
Answer

Vishal Panchal

Rank: Expert

Posts: 276

Join Date: May 20, 2012

Recent Posts

sasmita swain:
ya i have used that one..but it is comming default userid


Are you inserting by login as test@liferay.com..?
If yes than create new user and than try to insert again you will have different userId as same as newly created user's Id.


Thanks & Regards,
Vishal R. Panchal
sasmita swain
RE: service builder
September 25, 2012 3:24 AM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

thanks

i got userid..anather thing is i want to retrieve empname,emp salary based on userid..e.g-userid=16727,emp name=sasmita.emp sal=20000.i want to retreive these in my form

can you tell me how to do?
Vishal Panchal
RE: service builder
September 25, 2012 4:43 AM
Answer

Vishal Panchal

Rank: Expert

Posts: 276

Join Date: May 20, 2012

Recent Posts

sasmita swain:
thanks

i got userid..anather thing is i want to retrieve empname,emp salary based on userid..e.g-userid=16727,emp name=sasmita.emp sal=20000.i want to retreive these in my form

can you tell me how to do?


All You have to do is make finder in service.xml for the column userId.


Thanks & Regards,
Vishal R. Panchal
sasmita swain
RE: service builder
September 25, 2012 8:54 PM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

hi
i have done same way.ut it is not retrieving.can u give me codes?
Vishal Panchal
RE: service builder
September 25, 2012 10:00 PM
Answer

Vishal Panchal

Rank: Expert

Posts: 276

Join Date: May 20, 2012

Recent Posts

sasmita swain:
hi
i have done same way.ut it is not retrieving.can u give me codes?


Hi sasmita swain , as per your code in your service.xml you have already added finder method for the column empName

same way you have to add finder on column as below
<finder name="UserId" return-type="Collection">
<finder-column name="userId" />
</finder>

Than build service.

Next Go to *LocalServiceimpl.java add your finder code
public List<Employee> findByUserId(long userId) throws SystemException
{
List<Employee> empObj=employeePersistence.findByUserId(userId);

return empObj;
}

Now again build service again.
So you have findByUserId method accessible through EmployeeLocalServiceUtil.findByUserId(userId)



Thanks & Regards,
Vishal R. Panchal
sasmita swain
RE: service builder
September 25, 2012 10:43 PM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

hi vishal
i have done same way but it is not comming.can you check my code.check my attached file.

Thanks
Attachments: kusum-portlet.rar (116.0k)
sasmita swain
RE: service builder
September 25, 2012 11:11 PM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

hi vishal
after build impl class,findByUserId accessible through universityLocalServiceUtil.

<%List<University> uni=UniversityLocalServiceUtil.findByUserId(10196);%>
<aui:input type="text" label="Name" name="nm" value=<%=uni.get(index);%>"/> but uni.getuniversityName() is not comming
Vishal Panchal
RE: service builder
September 25, 2012 11:15 PM
Answer

Vishal Panchal

Rank: Expert

Posts: 276

Join Date: May 20, 2012

Recent Posts

sasmita swain:
hi vishal
after build impl class,findByUserId accessible through universityLocalServiceUtil.

<%List<University> uni=UniversityLocalServiceUtil.findByUserId(10196);%>
<aui:input type="text" label="Name" name="nm" value=<%=uni.get(index);%>"/> but uni.getuniversityName() is not comming


Hi, Try this

<%List<University> uni=UniversityLocalServiceUtil.findByUserId(10196);%>
<aui:input type="text" label="Name" name="nm" value=<%=uni.get(0).getuniversityName();%>"/>


Thanks& Regards,
Vishal R. Panchal
sasmita swain
RE: service builder
September 25, 2012 11:26 PM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

thanks vishal

i got it.but why it is inserting multiple times in database?
2.i want to keep session of userid.,i have given handcoding userid

Thanks
Vishal Panchal
RE: service builder
September 25, 2012 11:29 PM
Answer

Vishal Panchal

Rank: Expert

Posts: 276

Join Date: May 20, 2012

Recent Posts

sasmita swain:
thanks vishal

i got it.but why it is inserting multiple times in database?
2.i want to keep session of userid.,i have given handcoding userid

Thanks


Hi ,sasmita

<%
ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
List<University> uni=UniversityLocalServiceUtil.findByUserId(themeDisplay.getUserId());
%>
<aui:input type="text" label="Name" name="nm" value=<%=uni.get(0).getuniversityName();%>"/>

By doing this you need not to hard-code userid everytime.!

Thanks & Regards,
Vishal R. Panchal
sasmita swain
RE: service builder
September 26, 2012 12:08 AM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

hi
after adding this following errors are comming
06:59:46,877 ERROR [PortletRequestDispatcherImpl:108] org.apache.jasper.JasperException: An exception occurred processing JSP page /html/celos/view.jsp at line 32

29: <aui:fieldset>
30:
31:
32: <% ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
33: List<University> uni=UniversityLocalServiceUtil.findByUserId(themeDisplay.getUserId());
34: %>
35: <aui:input type="text" label="Name" name="nm" value="<%=uni.get(0).getUniName()%>"/>


Stacktrace:
org.apache.jasper.JasperException: An exception occurred processing JSP page /html/celos/view.jsp at line 32

29: <aui:fieldset>
30:
31:
32: <% ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
33: List<University> uni=UniversityLocalServiceUtil.findByUserId(themeDisplay.getUserId());
34: %>
35: <aui:input type="text" label="Name" name="nm" value="<%=uni.get(0).getUniName()%>"/>


Stacktrace:
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
at com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:316)
at com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:105)
at com.liferay.util.bridges.mvc.MVCPortlet.include(MVCPortlet.java:366)
at com.liferay.util.bridges.mvc.MVCPortlet.include(MVCPortlet.java:382)
at com.liferay.util.bridges.mvc.MVCPortlet.doView(MVCPortlet.java:145)
at com.liferay.portal.kernel.portlet.LiferayPortlet.doDispatch(LiferayPortlet.java:211)
at com.liferay.util.bridges.mvc.MVCPortlet.doDispatch(MVCPortlet.java:318)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:637)
at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:722)
at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:426)
at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1215)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:4735)
at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1455)
at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processPortlet(RuntimePortletImpl.java:213)
at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processPortlet(RuntimePortletImpl.java:148)
at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processTemplate(RuntimePortletImpl.java:309)
at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processTemplate(RuntimePortletImpl.java:234)
at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:106)
at org.apache.jsp.html.portal.layout.view.portlet_jsp._jspService(portlet_jsp.java:512)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
at com.liferay.portal.action.LayoutAction.includeLayoutContent(LayoutAction.java:412)
at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:680)
at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:244)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:174)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:533)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:201)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:135)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:304)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:201)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:241)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:55)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:80)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:208)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at org.apache.jsp.html.celos.view_jsp._jspService(view_jsp.java:188)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
... 190 more
06:59:46,878 ERROR [PortletServlet:97] javax.portlet.PortletException: org.apache.jasper.JasperException: An exception occurred processing JSP page /html/celos/view.jsp at line 32
Vishal Panchal
RE: service builder
September 26, 2012 12:56 AM
Answer

Vishal Panchal

Rank: Expert

Posts: 276

Join Date: May 20, 2012

Recent Posts

Hi ,

In your jsp page
Add two lines

<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
<liferay-theme:defineObjects />
and than your code.
<% List<University> uni=UniversityLocalServiceUtil.findByUserId(themeDisplay.getUserId()); %>
<aui:input type="text" label="Name" name="nm" value="<%=uni.get(0).getUniName()%>"/>

Thanks,
Vishal R. Panchal
sasmita swain
RE: service builder
September 26, 2012 1:45 AM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

error:
<% List<University> uni=UniversityLocalServiceUtil.findByUserId(themeDisplay.getUserId());%>
34:
35: <aui:input type="text" label="Name" name="nm" value="<%=uni.get(0).getUniName() %>"/>
36: <aui:input type="text" label="salary" name="sal" value="<%=uni.get(0).getUnisal() %>"/>
37: <aui:button type="submit" value="Save" />
38: </aui:fieldset>


Stacktrace:
at com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:110)
at com.liferay.util.bridges.mvc.MVCPortlet.include(MVCPortlet.java:366)
at com.liferay.util.bridges.mvc.MVCPortlet.include(MVCPortlet.java:382)
at com.liferay.util.bridges.mvc.MVCPortlet.doView(MVCPortlet.java:145)
at com.liferay.portal.kernel.portlet.LiferayPortlet.doDispatch(LiferayPortlet.java:211)
at com.liferay.util.bridges.mvc.MVCPortlet.doDispatch(MVCPortlet.java:318)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:637)
at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:722)
at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:426)
at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1215)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:4735)
at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1455)
at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processPortlet(RuntimePortletImpl.java:213)
at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processPortlet(RuntimePortletImpl.java:148)
at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processTemplate(RuntimePortletImpl.java:309)
at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processTemplate(RuntimePortletImpl.java:234)
at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:106)
at org.apache.jsp.html.portal.layout.view.portlet_jsp._jspService(portlet_jsp.java:512)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
at com.liferay.portal.action.LayoutAction.includeLayoutContent(LayoutAction.java:412)
at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:680)
at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:244)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:174)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:533)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:201)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:135)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:304)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:201)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:241)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:55)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:80)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:208)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
sasmita swain
RE: service builder
September 26, 2012 2:36 AM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

hi

when i am loging by different user my portlet is not available means temporarily unavailable..but when i am loging by test@liferay.com it is working

Thanks
sasmita swain
RE: service builder
September 26, 2012 2:37 AM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

hi

when i am loging by different user my portlet is not available means temporarily unavailable..but when i am loging by test@liferay.com it is working
[render_portlet_jsp:154] java.lang.IndexOutOfBoundsException: Index: 0
Thanks
Vishal Panchal
RE: service builder
September 26, 2012 3:42 AM
Answer

Vishal Panchal

Rank: Expert

Posts: 276

Join Date: May 20, 2012

Recent Posts

sasmita swain:
hi

when i am loging by different user my portlet is not available means temporarily unavailable..but when i am loging by test@liferay.com it is working
[render_portlet_jsp:154] java.lang.IndexOutOfBoundsException: Index: 0
Thanks

Hi ,

Exactly what is happening when you logged in as different user you are getting different userID by using themeDisplay.getUserId();
let's assume you r getting 1234 userId fro different user.
now when you try to execute below code.
<%
List<University> uni=UniversityLocalServiceUtil.findByUserId(themeDisplay.getUserId());
%>

than you will have a null uni object because in database you dont have any record whose column userId has value 1234(i mean userId of newly created user)

so as you r getting null uni and your also trying to fetch data from null object by "uni.get(0).getUniName()" so thats why you are getting this java.lang.IndexOutOfBoundsException: Index: 0.

<aui:input type="text" label="Name" name="nm" value="<%=uni.get(0).getUniName() %>"/>

So make sure you have at least one record in your database with the newly created user's userId.
or
you have to place an if condition on the below lines,
<aui:input type="text" label="Name" name="nm" value="<%=uni.get(0).getUniName() %>"/>
<aui:input type="text" label="salary" name="sal" value="<%=uni.get(0).getUnisal() %>"/>
That above lines will only be execute if the uni object is not null.

Thanks,
Vishal R. Panchal
sasmita swain
RE: service builder
September 26, 2012 4:02 AM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

hi
when i am using hard coding it is retreiving.but after giving themedisplay.userid(),it is showing error.newly user is already there.
when i am creating new account new user id is not directly insert in to db.
can give if condition code
Attachments: kusum-portlet.rar (116.4k)
Vishal Panchal
RE: service builder
September 26, 2012 4:12 AM
Answer

Vishal Panchal

Rank: Expert

Posts: 276

Join Date: May 20, 2012

Recent Posts

Hi ,
modify your code accordingly.
add taglib : <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

<%
List<University> uni=UniversityLocalServiceUtil.findByUserId(themeDisplay.getUserId());
%>

<c:if test="${ not empty uni}">

<aui:input type="text" label="Name" name="nm" value="<%=uni.get(0).getUniName() %>"/>
<aui:input type="text" label="Name" name="nm" value="<%=uni.get(0).getUniName() %>"/>
<aui:input type="text" label="salary" name="sal" value="<%=uni.get(0).getUnisal() %>"/>

</c:if>

<aui:button type="submit" value="Save" />
sasmita swain
RE: service builder
September 26, 2012 4:24 AM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

[can not find taglib
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
Harish Kumar
RE: service builder
September 26, 2012 4:51 AM
Answer

Harish Kumar

Rank: Expert

Posts: 327

Join Date: July 31, 2010

Recent Posts

Add portal-dependency-jars=\
jstl-api.jar,\
jstl-impl.jar,\

in liferay-plugin-package.properties file.
sasmita swain
RE: service builder
September 26, 2012 8:45 PM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

hi
after adding jar files i am getting following errors
<c:if test="${ not empty uni}">
<aui:input type="text" label="Name" name="nm" value="<%=uni.get(0).getUniName() %>"/>
<aui:input type="text" label="salary" name="sal" value="<%=uni.get(0).getUnisal() %>"/>
<aui:button type="submit" value="Save" />
</c:if>
03:39:29,934 ERROR [render_portlet_jsp:154] org.apache.jasper.JasperException: /html/celos/view.jsp (line: 35, column: 0) According to TLD or attribute directive in tag file, attribute test does not accept any expressions
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:149)
at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1235)
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:870)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:889)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:889)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:475)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1790)

Thanks
sasmita swain
RE: service builder
September 26, 2012 9:09 PM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

hi vishal
Thanks a lot. i got solution.but one thing is when a new user create new account his user id is not inserting in custom database table.showing error portlet is unavailable.
is there any solution to solve this problem???

Thanks
Vishal Panchal
RE: service builder
September 26, 2012 9:32 PM
Answer

Vishal Panchal

Rank: Expert

Posts: 276

Join Date: May 20, 2012

Recent Posts

sasmita swain:
hi vishal
Thanks a lot. i got solution.but one thing is when a new user create new account his user id is not inserting in custom database table.showing error portlet is unavailable.
is there any solution to solve this problem???

Thanks


Hi sasmita ,
See when new user is created that time the userId will be generated and inserted in users_ table and some other tables like user_roles etc but not in your custom table.
But in your case you have to add the a single row in your custom table by logged In as the newly created user.


Thanks & Regards,
Vishal R. Panchal
sasmita swain
RE: service builder
September 26, 2012 9:42 PM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

hi
only i have to add new column and then insert or what?
can you give example with code
can you tell me briefly??
Thanks
sasmita swain
RE: service builder
September 26, 2012 10:00 PM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

hi vishal
i got that solution.we need not create new column.some logic t wrote in <aui:input type="text" label="Name" name="nm" value='<%=uni.size()>0?uni.get(0).getUniName():"" %>'/>

then it working fine...new user can login and it is inserting to custom db.

Thanks
sasmita swain
RE: service builder
September 26, 2012 10:17 PM
Answer

sasmita swain

Rank: Regular Member

Posts: 171

Join Date: February 24, 2012

Recent Posts

hi

when i am clicking multiple times save button it is inserting multiple times in db.but i want to keep one time in db byclicking save button multiple times

Thanks
Chandrasekhar Kothuri
RE: service builder
October 3, 2012 4:40 AM
Answer

Chandrasekhar Kothuri

Rank: Regular Member

Posts: 149

Join Date: July 6, 2009

Recent Posts

Check the following link:


http://www.liferay.com/community/forums/-/message_boards/message/9175840