Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Subhasis Roy
Current URL ...... generates exception: null
August 3, 2012 2:07 AM
Answer

Subhasis Roy

Rank: Expert

Posts: 284

Join Date: January 19, 2012

Recent Posts

Hi,

I am using liferay 6.1ee with apache2.2 and mysql for my project.
When ever I am trying to access url I am getting the following error.

09:02:35,537 ERROR [IncludeTag:426] Current URL /web/testsite.com/forgot-username generates exception: java.lang.NullPointerException
09:02:35,537 ERROR [IncludeTag:154] java.lang.NullPointerException
at com.liferay.taglib.aui.InputTag.updateFormValidators(InputTag.java:268)
at com.liferay.taglib.aui.InputTag.doEndTag(InputTag.java:45)
at org.apache.jsp.html.taglib.ui.captcha.simplecaptcha_jsp._jspx_meth_aui_005finput_005f0(simplecaptcha_jsp.java:540)
at org.apache.jsp.html.taglib.ui.captcha.simplecaptcha_jsp._jspService(simplecaptcha_jsp.java:472)
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)



I have checked the following blog:

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

I have also commented out the following two properties in my portal-ext.properties file and tried. but getting the same error.

portal-ext.properties file
##web.server.http.port=80
##web.server.https.port=443


Can any one please suggest anything
Juan Gonzalez
RE: Current URL ...... generates exception: null
August 3, 2012 2:17 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2794

Join Date: October 28, 2008

Recent Posts

If you are using a load balancer (Apache) you probably have to set some web.server.* properties:

http://www.liferay.com/es/documentation/liferay-portal/6.1/user-guide/-/ai/web-server

like web.server.host, for example.
Subhasis Roy
RE: Current URL ...... generates exception: null
August 30, 2012 12:27 AM
Answer

Subhasis Roy

Rank: Expert

Posts: 284

Join Date: January 19, 2012

Recent Posts

Juan Gonzalez P:
If you are using a load balancer (Apache) you probably have to set some web.server.* properties:

http://www.liferay.com/es/documentation/liferay-portal/6.1/user-guide/-/ai/web-server

like web.server.host, for example.


Thanks Juan for your input.

I found out one interesting thing.

This exception only occurs for those pages where I imported the following tag.

<%@ taglib uri="/WEB-INF/tld/liferay-ui.tld" prefix="liferay-ui" %>

And the exception happened because I have not used "<aui:form>" tag. Rather I have used "<s:form>" tag. So the error is occuring due to this.\

Reference url: http://www.liferay.com/community/forums/-/message_boards/message/14283786

But I am using struts2 portlet. So I will not be able to use <aui:form>

Is there any other way to handle this null pointer exception without using <aui:form> tag
Subhasis Roy
RE: Current URL ...... generates exception: null
August 30, 2012 4:27 AM
Answer

Subhasis Roy

Rank: Expert

Posts: 284

Join Date: January 19, 2012

Recent Posts

Subhasis Roy:
Juan Gonzalez P:
If you are using a load balancer (Apache) you probably have to set some web.server.* properties:

http://www.liferay.com/es/documentation/liferay-portal/6.1/user-guide/-/ai/web-server

like web.server.host, for example.


Thanks Juan for your input.

I found out one interesting thing.

This exception only occurs for those pages where I imported the following tag.

<%@ taglib uri="/WEB-INF/tld/liferay-ui.tld" prefix="liferay-ui" %>

And the exception happened because I have not used "<aui:form>" tag. Rather I have used "<s:form>" tag. So the error is occuring due to this.\

Reference url: http://www.liferay.com/community/forums/-/message_boards/message/14283786

But I am using struts2 portlet. So I will not be able to use <aui:form>

Is there any other way to handle this null pointer exception without using <aui:form> tag



Resolved the problem ultimately


I have changed the implementation a bit in the jsp

<tr>
<td class="tdLabel">&nbsp;</td>
<td>
<portlet:resourceURL var="captchaURL" />
<img alt="<liferay-ui:message key="text-to-identify" />" class="captcha" src="<%= captchaURL %>" />
<aui:input label="text-verification" name="captchaText" size="10" type="text" value="">
<aui:validator name="required" />
</aui:input>
<s:hidden name="captchaTextHidden" value="hiddenCaptcha" />
</td>
</tr>