Fórum

Layout - Blank page ( getURL java.lang.NullPointerException)

Stan M, modificado 15 Anos atrás.

Layout - Blank page ( getURL java.lang.NullPointerException)

Regular Member Postagens: 208 Data de Entrada: 28/01/08 Postagens Recentes
LP 5.1.1, Tomcat 5.5 Bundle, WOL

Sometimes new users do not get pages after first successful login. Sometimes rebooting Liferay and then trying again works. Would it be possible to get an explanation? The catalina.out usually contains complains about the nav_item in the navigation.vm from the classic template. The classic theme is used instead of the Jedi theme configured by default in WOL.




1) catalina.out

21:23:59,059 ERROR [velocity:154] Method getURL threw exception for reference $nav_item in template _SERVLET_CONTEXT_/html/themes/classic/templates/navigation.vm at  [11,42]
21:23:59,061 ERROR [IncludeTag:52] Current URL /c/portal/layout?p_l_id=0 generates exception: Invocation of method 'getURL' in  class com.liferay.portal.theme.NavItem threw exception java.lang.NullPointerException @ _SERVLET_CONTEXT_/html/themes/classic/templates/navigation.vm[11,52]
21:23:59,066 ERROR [IncludeTag:52] java.lang.NullPointerException
        at com.liferay.portal.util.PortalImpl.getLayoutFriendlyURL(PortalImpl.java:999)
        at com.liferay.portal.util.PortalImpl.getLayoutURL(PortalImpl.java:849)
        at com.liferay.portal.util.PortalImpl.getLayoutURL(PortalImpl.java:838)
        at com.liferay.portal.util.PortalUtil.getLayoutURL(PortalUtil.java:245)
        at com.liferay.portal.model.impl.LayoutImpl._getURL(LayoutImpl.java:675)
        at com.liferay.portal.model.impl.LayoutImpl.getRegularURL(LayoutImpl.java:546)
        at com.liferay.portal.theme.NavItem.getRegularURL(NavItem.java:102)
        at com.liferay.portal.theme.NavItem.getURL(NavItem.java:98)
        at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
        at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
        at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
        at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
        at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:448)
        at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
        at org.apache.velocity.runtime.directive.Parse.render(Parse.java:224)
        at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
        at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:88)


2) navigation.vm

<div id="navigation" class="sort-pages modify-pages">
        <ul>
                #foreach ($nav_item in $nav_items)
                        #if ($nav_item.isSelected())
                                #set ($nav_item_class = "selected")
                        #else
                                #set ($nav_item_class = "")
                        #end

                        <li class="$nav_item_class">
                                <a href="$nav_item.getURL()" $nav_item.gettarget()><span>$nav_item.getName()</span></a>

                                #if ($nav_item.hasChildren())
                                        <ul class="child-menu">
                                                #foreach ($nav_child in $nav_item.getChildren())
                                                        <li>
                                                                <a href="$nav_child.getURL()" $nav_child.gettarget()>$nav_child.getName()</a>
                                                        </li>
                                                #end
                                        </ul>
                                #end
                        </li>
                #end
        </ul>
</div>

Stan M, modificado 15 Anos atrás.

RE: Layout - Blank page ( getURL java.lang.NullPointerException&#

Regular Member Postagens: 208 Data de Entrada: 28/01/08 Postagens Recentes
New members are presented with a blank page eventhough they login with the correct login/password combination. The browser is blank with http://<hostname>/c/portal/layout?p_l_id=0 in URL. When the browser is closed and loaded again, the user is unable to authenticate.

Now, when Liferay is restarted, a visitor is able to create an account without problems. However, I do not want to restart and the problem eventually comes back.

Question(s):

- How is the URL being generated?

http://<hostname>/c/portal/layout?p_l_id=0

- What other information in addition to the above do I need to provide to get assistance?

- Any ideas?
Stan M, modificado 15 Anos atrás.

RE: Layout - Blank page ( getURL java.lang.NullPointerException&a

Regular Member Postagens: 208 Data de Entrada: 28/01/08 Postagens Recentes
The following tickets appear to have the same errors:

LEP-7412 and LEP-7309
Bernardo Riveira Faraldo, modificado 15 Anos atrás.

RE: Layout - Blank page ( getURL java.lang.NullPointerException&a

Regular Member Postagens: 135 Data de Entrada: 30/10/08 Postagens Recentes
Same thing here. emoticon Did you find anything about it?
thumbnail
Sanya Presich, modificado 15 Anos atrás.

You don't have permissions to view this page message after login new user

Junior Member Postagens: 95 Data de Entrada: 05/03/09 Postagens Recentes
The same with LR 5.2.3

In the portal-ext.properties I have:
layout.user.private.layouts.enabled=false
layout.user.public.layouts.enabled=false

In the previous posts I saw that users have such problem after writing these lines...

Shortly about this error:

1. Create new account.
2. Login.

3. You redirects to http://{your web-site}/c/portal/layout?p_l_id=0 and see error-message: You do not have permissions to view this page (smth like that in english)

4. Link to My account in menu doesn't work. (no reaction on clicking)

5.--> Go to conrol panel --> Return to Guest ---> All is OK.

6. But when try to re-login error returns.

So, any thoughts?
thumbnail
Sagar A Vyas, modificado 12 Anos atrás.

RE: Layout - Blank page ( getURL java.lang.NullPointerException)

Liferay Master Postagens: 679 Data de Entrada: 17/04/09 Postagens Recentes
com.liferay.portal.theme.NavItem threw exception java.lang.NullPointerException @ SERVLET_CONTEXT/html/themes/classic/templates/navigation.vm[11,52]


I got this issue again and again and its really frustrated to restart server every time.

Please let me know if some one get proper solution of this.

Thanks,
Sagar Vyas