Fórumok

[Resolved]AutoLoginFilter:Current URL /web/guest/ generates exception: null

Ram A, módosítva 11 év-val korábban

[Resolved]AutoLoginFilter:Current URL /web/guest/ generates exception: null

Junior Member Bejegyzések: 76 Csatlakozás dátuma: 2013.01.16. Legújabb bejegyzések
Hi,
I am getting the following error frequentlry in my liferay application.

09:21:07,365 ERROR [AutoLoginFilter:231] Current URL /web/guest/status-details generates exception: null
09:21:07,365 ERROR [AutoLoginFilter:231] Current URL /web/guest/status-details generates exception: null
09:21:07,367 ERROR [AutoLoginFilter:231] Current URL /web/guest/ generates exception: null
09:21:07,369 ERROR [AutoLoginFilter:231] Current URL /web/guest/ generates exception: null.



Please help me to come out of this issue.


Thanks in advance
Ram
thumbnail
Mika Koivisto, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Liferay Legend Bejegyzések: 1519 Csatlakozás dátuma: 2006.08.07. Legújabb bejegyzések
You probably have a AutoLogin hook that produces NullPointerException.
Ram A, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Junior Member Bejegyzések: 76 Csatlakozás dátuma: 2013.01.16. Legújabb bejegyzések
Thanks Mika for the reply.

Yes i have a autologin hook in my application which was implemented using SSOFilter.

Please help me in which senario it is giving that error.


Thanks in advance
Ram
Ram A, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Junior Member Bejegyzések: 76 Csatlakozás dátuma: 2013.01.16. Legújabb bejegyzések
Mika Koivisto:
You probably have a AutoLogin hook that produces NullPointerException.



Yes i have an autologin hook developed with SSOFilter.

when ever i am accessing home page in my application it is giving the following error.
AutoLoginFilter:231 Current URL /web/guest/ generates exception: null.

for example if i access any page say "sample page" then it is giving the following error in console.log.
15:03:35,856 ERROR [AutoLoginFilter:231] Current URL /sample-page generates exception: null
15:03:35,858 ERROR [AutoLoginFilter:231] Current URL /sample-page generates exception: null

Can anyone help me regarding this issue.


Thanks and Regards
Ram
thumbnail
Mika Koivisto, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Liferay Legend Bejegyzések: 1519 Csatlakozás dátuma: 2006.08.07. Legújabb bejegyzések
You should run it in debugger to see where it throws the NullPointerException.
Ram A, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Junior Member Bejegyzések: 76 Csatlakozás dátuma: 2013.01.16. Legújabb bejegyzések
Thanks Mika for the reply.

I am new to Liferay.Can you please let me know how to run the liferay application in debugger and
how to configure debugger in eclipse to debug my application using Liferay tomcat 6.0.6.

Thanks in advance
Ram
Ajeet Singh, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

New Member Bejegyzések: 14 Csatlakozás dátuma: 2012.03.27. Legújabb bejegyzések
You need to see that, are you passing the userName and password properly or not in the auto login hook. If you can post the sample code then it may be easy to figure out.

Debugging is same like web application debugging. You have to set the debug points, deploy it and start the tomcat in debug mode.

Regards,
Ajeet Singh
Ram A, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Junior Member Bejegyzések: 76 Csatlakozás dátuma: 2013.01.16. Legújabb bejegyzések
Thanks Ajeet for the reply.
I am returning the user credentials in Autologin hook as String array.
It was declared as String[] userdetails=null;

When we got the user details we are setting the user details as follows.
userdetails=new String[2];
userdetails[0] = username;
userdetails[1] = password;
When i tried print those before passing userdetails,It is printing the user details(user name and password) properly.
But it is throwing null pointer exception also.

So i changed String[] userdetails=null; to String[] userdetails=new String[2];.
Then it is not throwing null pointer exception.

Please help me whether this is correct or not.



Thanks in advance
Ram A
thumbnail
Mika Koivisto, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Liferay Legend Bejegyzések: 1519 Csatlakozás dátuma: 2006.08.07. Legújabb bejegyzések
It's expecting 3 element String array where the last element is boolean whether the password is encrypted or not.
Ram A, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Junior Member Bejegyzések: 76 Csatlakozás dátuma: 2013.01.16. Legújabb bejegyzések
Thanks Mika for reply.

Yes it is a 3 elements String array .i forgot to mention in the previous update.
3rd element in the String array is userdetails[2]= Boolean.TRUE.toString();.

so instead of String[] userdetails=null, we can initialize it as String[] userdetails=new String[3].

And Autologin hook (SSOFilter) is called3 times while authenticating the uses.Not sure why.

Please help me to solve this.


Thanks in advance
Ram
Ram A, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Junior Member Bejegyzések: 76 Csatlakozás dátuma: 2013.01.16. Legújabb bejegyzések
Hi ,

when i tried to login to my application it is giving the below stacktrace.

07:58:14,067 ERROR [AutoLoginFilter:231] Current URL / generates exception: null
07:58:14,067 DEBUG [AutoLoginFilter:191] [http-80-2]=> com.liferay.portal.servlet.filters.autologin.AutoLoginFilter /c/portal/layout
07:58:14,145 DEBUG [AutoLoginFilter:207] [http-80-2]=< com.liferay.portal.servlet.filters.autologin.AutoLoginFilter /c/portal/layout 78 ms
07:58:14,161 DEBUG [AutoLoginFilter:207] [http-80-2]< com.liferay.portal.servlet.filters.autologin.AutoLoginFilter /web/guest/ 94 ms
07:58:17,661 DEBUG [AutoLoginFilter:78] class com.liferay.portal.servlet.filters.autologin.AutoLoginFilter is enabled
07:58:17,661 WARN [AutoLoginFilter:218] java.lang.NullPointerException
java.lang.NullPointerException
at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:184)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
at com.liferay.portal.servlet.filters.sso.ntlm.NtlmFilter.processFilter(NtlmFilter.java:272)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:280)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
at com.liferay.portal.servlet.filters.sso.ntlm.NtlmFilter.processFilter(NtlmFilter.java:272)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
at com.liferay.portal.servlet.filters.absoluteredirects.AbsoluteRedirectsFilter.processFilter(AbsoluteRedirectsFilter.java:85)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)


Please help me to solve this..

Thanks in advance
Ram A
Ram A, módosítva 11 év-val korábban

AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Junior Member Bejegyzések: 76 Csatlakozás dátuma: 2013.01.16. Legújabb bejegyzések
Hi ,

i have autologin hook and its 'portal-hook.properies' contains the property auto.login.hooks=com.sample.SSOFilter.

and my portal-ext.properties also contains the same property auto.login.hooks=com.sample.SSOFilter.

is the mentioned error is because of this configuration?

is this property needed in two places?

Please help me to solve this.




Thanks and Regards
Ram A
Siby Mathew, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Expert Bejegyzések: 268 Csatlakozás dátuma: 2011.03.04. Legújabb bejegyzések
Hi Ram,
The NPE is caused because the auto.login.hooks property could not be read.

Solution :
Place the property only in one file inside the portlet/src folder and give the properties file name in the <portal-properties> tag inside liferay-hook.xml

Thanks,
Siby
Ram A, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Junior Member Bejegyzések: 76 Csatlakozás dátuma: 2013.01.16. Legújabb bejegyzések
Siby Mathew:
Hi Ram,
The NPE is caused because the auto.login.hooks property could not be read.

Solution :
Place the property only in one file inside the portlet/src folder and give the properties file name in the <portal-properties> tag inside liferay-hook.xml

Thanks,
Siby



Thanks Siby for the reply.
This is my liferay-hook.xml
<hook>
<portal-properties>portal-hook.properties</portal-properties>
</hook>
Below is my portal-hook.properties
auto.login.hooks=com.sample.SSOFilter

And portal-ext.properties file contains the below property.
auto.login.hooks=com.sample.SSOFilter

so you mean deleting the above line from portal-ext.properties solves the problem.
Am i correct?

Thanks and Regards
Ram A
Siby Mathew, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Expert Bejegyzések: 268 Csatlakozás dátuma: 2011.03.04. Legújabb bejegyzések
Yes..Please delete it from portal-ext.properties. You might need to restart the server.
Ram A, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Junior Member Bejegyzések: 76 Csatlakozás dátuma: 2013.01.16. Legújabb bejegyzések
Thanks Siby for the help .

i will try this by deleting from portal-ext.properties.

so what i understood from this is portal-hook.properties file overrides that property from portal-ext.properties.
So when we tried to login to the application it is looking for the autologin class which is mentioned in portal-hook.properties.

But one small doubt.
when will the property from portal-ext.properties will be read?i mean on server startup or when user tries to login to the application.


can you please explain.


Thanks and Regards
Ram A
Siby Mathew, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Expert Bejegyzések: 268 Csatlakozás dátuma: 2011.03.04. Legújabb bejegyzések
Hi Ram,
Actually all these properties are present inside portal.properties inside the liferay core.
You can add portal-ext.properties to the server folder for overriding these properties.

Some of these properties are hook-able. i.e It can be overridden using a hook.
So in your case, you are using a hook to override the property. Hence the property needs to be present only inside your hook.

Liferay reads the portal.properties and portal-ext.properties during server startup. (The latter overrides the former)
However, the hookable properties are overridden when you deploy your hook.

Thanks,
Siby
Ram A, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Junior Member Bejegyzések: 76 Csatlakozás dátuma: 2013.01.16. Legújabb bejegyzések
Thanks Siby for the help.

By commenting auto.login.hooks proeprty in portal_ext.properties file,teh error was gone.

now i am not getting the error regarding null.

Thanks and regards
Ram A
Siby Mathew, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Expert Bejegyzések: 268 Csatlakozás dátuma: 2011.03.04. Legújabb bejegyzések
Great !.. Please mark as answer and change title to RESOLVED
Ram A, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Junior Member Bejegyzések: 76 Csatlakozás dátuma: 2013.01.16. Legújabb bejegyzések
Siby Mathew:
Great !.. Please mark as answer and change title to RESOLVED



Hi Siby,
may i know how to mark as answer and change the title to RESOLVED.



regards
Ram A
Siby Mathew, módosítva 11 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Expert Bejegyzések: 268 Csatlakozás dátuma: 2011.03.04. Legújabb bejegyzések
You can edit the title of your original post add "RESOLVED"
I think "Mark as an answer" option is present only if the post is marked as a question.

Thanks,
Siby
thumbnail
Archi Madhu, módosítva 10 év-val korábban

RE: AutoLoginFilter:231 Current URL /web/guest/ generates exception: null

Regular Member Bejegyzések: 237 Csatlakozás dátuma: 2008.03.25. Legújabb bejegyzések
Thanks everyone, it was helpful!