Fórum

Current URL ...... generates exception: null

thumbnail
Subhasis Roy, modificado 11 Anos atrás.

Current URL ...... generates exception: null

Expert Postagens: 275 Data de Entrada: 20/01/12 Postagens Recentes
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
thumbnail
Juan Gonzalez P, modificado 11 Anos atrás.

RE: Current URL ...... generates exception: null

Liferay Legend Postagens: 3089 Data de Entrada: 28/10/08 Postagens Recentes
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.
thumbnail
Subhasis Roy, modificado 11 Anos atrás.

RE: Current URL ...... generates exception: null

Expert Postagens: 275 Data de Entrada: 20/01/12 Postagens Recentes
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
thumbnail
Subhasis Roy, modificado 11 Anos atrás.

RE: Current URL ...... generates exception: null

Expert Postagens: 275 Data de Entrada: 20/01/12 Postagens Recentes
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>