List Info

Thread: BaseAdminPlugin - NullPointException - admin action




BaseAdminPlugin - NullPointException - admin action
country flaguser name
Austria
2007-07-26 03:52:29
Hi,

in order to integrate blojsom 3.0 into an existing system I 

implemented another version of BaseAdminPlugin. After
creating a new  
blog I always get this error message when I'm trying to make
a new  
blog entry or any other admin action:

java.lang.NullPointerException
	org.blojsom.authorization.database.DatabaseAuthorizationPro
vider.checkPermission(DatabaseAuthorizationProvider.java:169
)
	org.blojsom.plugin.admin.BaseAdminPlugin.checkPermission(Ba
seAdminPlugin.java:253)
	org.blojsom.plugin.admin.EditBlogEntriesPlugin.process(Edit
BlogEntriesPlugin.java:244)
	org.blojsom.servlet.BlojsomServlet.service(BlojsomServlet.j
ava:253)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802
)
	org.blojsom.filter.PermalinkFilter.doFilter(PermalinkFilter
.java:207)
	org.blojsom.filter.SkipEntriesFilter.doFilter(SkipEntriesFi
lter.java:103)
	org.blojsom.filter.PageFilter.doFilter(PageFilter.java:167)

	org.blojsom.filter.FeedFilter.doFilter(FeedFilter.java:198)

	edu.yale.its.tp.cas.client.filter.CASFilter.doFilter(CASFil
ter.java:156)

My plugin is working for blog 21 but not for 112. I don't
know where I  
should go on searching for this bug.

output of the console when trying to make a new blog entry
for blog 21:

Jul 26 10:24:49 DEBUG [http-8080-Processor23]
servlet.BlojsomServlet -  
Adding last-modified header for current date
Jul 26 10:24:51 DEBUG [http-8080-Processor23]  
velocity.VelocityDispatcher - Retrieved template for page: 

org/blojsom/plugin/admin/templates/admin.vm
Jul 26 10:24:51 DEBUG [http-8080-Processor23]  
velocity.VelocityDispatcher - Dispatched to flavor page
template:  
org/blojsom/plugin/admin/templates/admin.vm
Jul 26 10:24:54 DEBUG [Thread-1] moblog.MoblogPlugin -
Moblog plugin  
off to take a nap
Jul 26 10:25:23 DEBUG [http-8080-Processor24]
core.StandardWrapper -    
Returning non-STM instance
Jul 26 10:25:23 DEBUG [http-8080-Processor24]
filter.FeedFilter -  
Handling feed filter request: /21/
Jul 26 10:25:23 DEBUG [http-8080-Processor24]
filter.PageFilter -  
Handling page filter request: /21/
Jul 26 10:25:23 DEBUG [http-8080-Processor24]
filter.SkipEntriesFilter  
- Handling skip entries request: /21/
Jul 26 10:25:23 DEBUG [http-8080-Processor24]
filter.PermalinkFilter -  
Handling permalink request: /21
Jul 26 10:25:25 DEBUG [http-8080-Processor24]
database.DatabaseFetcher  
- blojsom path info: /
Jul 26 10:25:25 DEBUG [http-8080-Processor24]
database.DatabaseFetcher  
- User requested category: /
Jul 26 10:25:25 DEBUG [http-8080-Processor24]
servlet.BlojsomServlet -  
blojsom plugin execution:
org.blojsom.plugin.admin.EditBlogEntriesPlugin
Jul 26 10:25:25 DEBUG [http-8080-Processor24]  
admin.EditBlogEntriesPlugin - User requested new blog entry
action
Jul 26 10:25:25 DEBUG [http-8080-Processor24]  
common.RSSEnclosurePlugin - Handling process blog entry
event
Jul 26 10:25:25 DEBUG [http-8080-Processor24]  
language.LanguageSelectionPlugin - Handling process blog
entry event
Jul 26 10:25:28 DEBUG [http-8080-Processor24]
servlet.BlojsomServlet -  
Adding last-modified header for current date
Jul 26 10:25:28 DEBUG [http-8080-Processor24]  
velocity.VelocityDispatcher - Retrieved template for page: 

org/blojsom/plugin/admin/templates/admin-add-blog-entry.vm
Jul 26 10:25:28 DEBUG [http-8080-Processor24]  
velocity.VelocityDispatcher - Dispatched to flavor page
template:  
org/blojsom/plugin/admin/templates/admin-add-blog-entry.vm

output of the console when trying to make a new blog entry
for blog 112:

Jul 26 10:27:57 DEBUG [http-8080-Processor22]
servlet.BlojsomServlet -  
Adding last-modified header for current date
Jul 26 10:27:57 DEBUG [http-8080-Processor22]  
velocity.VelocityDispatcher - Retrieved template for page: 

org/blojsom/plugin/admin/templates/admin.vm
Jul 26 10:27:57 DEBUG [http-8080-Processor22]  
velocity.VelocityDispatcher - Dispatched to flavor page
template:  
org/blojsom/plugin/admin/templates/admin.vm
Jul 26 10:28:00 DEBUG [http-8080-Processor22]
core.StandardWrapper -    
Returning non-STM instance
Jul 26 10:28:00 DEBUG [http-8080-Processor22]
filter.FeedFilter -  
Handling feed filter request: /112/
Jul 26 10:28:00 DEBUG [http-8080-Processor22]
filter.PageFilter -  
Handling page filter request: /112/
Jul 26 10:28:00 DEBUG [http-8080-Processor22]
filter.SkipEntriesFilter  
- Handling skip entries request: /112/
Jul 26 10:28:00 DEBUG [http-8080-Processor22]
filter.PermalinkFilter -  
Handling permalink request: /112
Jul 26 10:28:01 DEBUG [http-8080-Processor22]
database.DatabaseFetcher  
- blojsom path info: /
Jul 26 10:28:01 DEBUG [http-8080-Processor22]
database.DatabaseFetcher  
- User requested category: /
Jul 26 10:28:01 DEBUG [http-8080-Processor22]
servlet.BlojsomServlet -  
blojsom plugin execution:
org.blojsom.plugin.admin.EditBlogEntriesPlugin

It would be very nice if someone can give me a hint how I
can solve  
this problem. Thanks,

Ingo


------------------------------------------------------------
----
This message was sent using IMP, the Internet Messaging
Program.


------------------------------------------------------------
-------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and
a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Blojsom-users mailing list
Blojsom-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/blojsom-u
sers

Re: BaseAdminPlugin - NullPointException - admin action
country flaguser name
India
2007-07-26 07:39:45
Strange....
But i looked at Line 169 of DatabaseAuthorizationProvider.java. 

This is it :  DatabaseUser user = (DatabaseUser) userCriteria.uniqueResult(); (But my code has also been changed around so it may not be the same line...)

But what i suspect is that maybe the User that is being looked for, is not present in the Database. Have you by any chance changed to LDAP for authentication?

Some more details would be useful.. as in i can't understand why you'd want to re-write good old BaseAdmin?

Can you elaborate the problem?

~Shalini

Thank you for your email. Your credit card has been charged $5.99 for the first 10 words and $1.99 for each additional word in your message.


Ingo Baumann wrote:
pop.uni-linz.ac.at" type="cite">
Hi,

in order to integrate blojsom 3.0 into an existing system I  
implemented another version of BaseAdminPlugin. After creating a new  
blog I always get this error message when I'm trying to make a new  
blog entry or any other admin action:


java.lang.NullPointerException
	org.blojsom.authorization.database.DatabaseAuthorizationProvider.checkPermission(DatabaseAuthorizationProvider.java:169)
	org.blojsom.plugin.admin.BaseAdminPlugin.checkPermission(BaseAdminPlugin.java:253)
	org.blojsom.plugin.admin.EditBlogEntriesPlugin.process(EditBlogEntriesPlugin.java:244)
	org.blojsom.servlet.BlojsomServlet.service(BlojsomServlet.java:253)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

	org.blojsom.filter.PermalinkFilter.doFilter(PermalinkFilter.java:207)
	org.blojsom.filter.SkipEntriesFilter.doFilter(SkipEntriesFilter.java:103)
	org.blojsom.filter.PageFilter.doFilter(PageFilter.java:167)
	org.blojsom.filter.FeedFilter.doFilter(FeedFilter.java:198)
	edu.yale.its.tp.cas.client.filter.CASFilter.doFilter(CASFilter.java:156)

My plugin is working for blog 21 but not for 112. I don't know where I  
should go on searching for this bug.

output of the console when trying to make a new blog entry for blog 21:

Jul 26 10:24:49 DEBUG [http-8080-Processor23] servlet.BlojsomServlet -  
Adding last-modified header for current date
Jul 26 10:24:51 DEBUG [http-8080-Processor23]  
velocity.VelocityDispatcher - Retrieved template for page:  
org/blojsom/plugin/admin/templates/admin.vm
Jul 26 10:24:51 DEBUG [http-8080-Processor23]  
velocity.VelocityDispatcher - Dispatched to flavor page template:  
org/blojsom/plugin/admin/templates/admin.vm
Jul 26 10:24:54 DEBUG [Thread-1] moblog.MoblogPlugin - Moblog plugin  
off to take a nap
Jul 26 10:25:23 DEBUG [http-8080-Processor24] core.StandardWrapper -    
Returning non-STM instance
Jul 26 10:25:23 DEBUG [http-8080-Processor24] filter.FeedFilter -  
Handling feed filter request: /21/
Jul 26 10:25:23 DEBUG [http-8080-Processor24] filter.PageFilter -  
Handling page filter request: /21/
Jul 26 10:25:23 DEBUG [http-8080-Processor24] filter.SkipEntriesFilter  
- Handling skip entries request: /21/
Jul 26 10:25:23 DEBUG [http-8080-Processor24] filter.PermalinkFilter -  
Handling permalink request: /21
Jul 26 10:25:25 DEBUG [http-8080-Processor24] database.DatabaseFetcher  
- blojsom path info: /
Jul 26 10:25:25 DEBUG [http-8080-Processor24] database.DatabaseFetcher  
- User requested category: /
Jul 26 10:25:25 DEBUG [http-8080-Processor24] servlet.BlojsomServlet -  
blojsom plugin execution: org.blojsom.plugin.admin.EditBlogEntriesPlugin
Jul 26 10:25:25 DEBUG [http-8080-Processor24]  
admin.EditBlogEntriesPlugin - User requested new blog entry action
Jul 26 10:25:25 DEBUG [http-8080-Processor24]  
common.RSSEnclosurePlugin - Handling process blog entry event
Jul 26 10:25:25 DEBUG [http-8080-Processor24]  
language.LanguageSelectionPlugin - Handling process blog entry event
Jul 26 10:25:28 DEBUG [http-8080-Processor24] servlet.BlojsomServlet -  
Adding last-modified header for current date
Jul 26 10:25:28 DEBUG [http-8080-Processor24]  
velocity.VelocityDispatcher - Retrieved template for page:  
org/blojsom/plugin/admin/templates/admin-add-blog-entry.vm
Jul 26 10:25:28 DEBUG [http-8080-Processor24]  
velocity.VelocityDispatcher - Dispatched to flavor page template:  
org/blojsom/plugin/admin/templates/admin-add-blog-entry.vm

output of the console when trying to make a new blog entry for blog 112:

Jul 26 10:27:57 DEBUG [http-8080-Processor22] servlet.BlojsomServlet -  
Adding last-modified header for current date
Jul 26 10:27:57 DEBUG [http-8080-Processor22]  
velocity.VelocityDispatcher - Retrieved template for page:  
org/blojsom/plugin/admin/templates/admin.vm
Jul 26 10:27:57 DEBUG [http-8080-Processor22]  
velocity.VelocityDispatcher - Dispatched to flavor page template:  
org/blojsom/plugin/admin/templates/admin.vm
Jul 26 10:28:00 DEBUG [http-8080-Processor22] core.StandardWrapper -    
Returning non-STM instance
Jul 26 10:28:00 DEBUG [http-8080-Processor22] filter.FeedFilter -  
Handling feed filter request: /112/
Jul 26 10:28:00 DEBUG [http-8080-Processor22] filter.PageFilter -  
Handling page filter request: /112/
Jul 26 10:28:00 DEBUG [http-8080-Processor22] filter.SkipEntriesFilter  
- Handling skip entries request: /112/
Jul 26 10:28:00 DEBUG [http-8080-Processor22] filter.PermalinkFilter -  
Handling permalink request: /112
Jul 26 10:28:01 DEBUG [http-8080-Processor22] database.DatabaseFetcher  
- blojsom path info: /
Jul 26 10:28:01 DEBUG [http-8080-Processor22] database.DatabaseFetcher  
- User requested category: /
Jul 26 10:28:01 DEBUG [http-8080-Processor22] servlet.BlojsomServlet -  
blojsom plugin execution: org.blojsom.plugin.admin.EditBlogEntriesPlugin

It would be very nice if someone can give me a hint how I can solve  
this problem. Thanks,


Ingo


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Blojsom-users mailing list
lists.sourceforge.net">Blojsom-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/blojsom-users

  

DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails.

Re: BaseAdminPlugin - NullPointException - admin action
country flaguser name
Austria
2007-07-26 12:49:06
Thanx for your response, fixed bug. I had to re-write
BaseAdmin because 
I have to query users from another database  for
authentication. Instead 
of httpServletRequest.getRemoteUser() I tried the userid
from the other 
database which will be inserted in blojsom too. It's working
fine.

Ingo
> Strange....
> But i looked at Line 169 of
DatabaseAuthorizationProvider.java. 
>
> This is it :  DatabaseUser user = (DatabaseUser) 
> userCriteria.uniqueResult(); (But my code has also been
changed around 
> so it may not be the same line...)
>
> But what i suspect is that maybe the User that is being
looked for, is 
> not present in the Database. Have you by any chance
changed to LDAP 
> for authentication?
>
> Some more details would be useful.. as in i can't
understand why you'd 
> want to re-write good old BaseAdmin?
>
> Can you elaborate the problem?
>
> ~Shalini
>
> Thank you for your email. Your credit card has been
charged $5.99 for 
> the first 10 words and $1.99 for each additional word
in your message.
>
>
> Ingo Baumann wrote:
>> Hi,
>>
>> in order to integrate blojsom 3.0 into an existing
system I  
>> implemented another version of BaseAdminPlugin.
After creating a new  
>> blog I always get this error message when I'm
trying to make a new  
>> blog entry or any other admin action:
>>
>> java.lang.NullPointerException
>>
	org.blojsom.authorization.database.DatabaseAuthorizationPro
vider.checkPermission(DatabaseAuthorizationProvider.java:169
)
>>
	org.blojsom.plugin.admin.BaseAdminPlugin.checkPermission(Ba
seAdminPlugin.java:253)
>>
	org.blojsom.plugin.admin.EditBlogEntriesPlugin.process(Edit
BlogEntriesPlugin.java:244)
>>
	org.blojsom.servlet.BlojsomServlet.service(BlojsomServlet.j
ava:253)
>>
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802
)
>>
	org.blojsom.filter.PermalinkFilter.doFilter(PermalinkFilter
.java:207)
>>
	org.blojsom.filter.SkipEntriesFilter.doFilter(SkipEntriesFi
lter.java:103)
>>
	org.blojsom.filter.PageFilter.doFilter(PageFilter.java:167)

>>
	org.blojsom.filter.FeedFilter.doFilter(FeedFilter.java:198)

>>
	edu.yale.its.tp.cas.client.filter.CASFilter.doFilter(CASFil
ter.java:156)
>>
>> My plugin is working for blog 21 but not for 112. I
don't know where I  
>> should go on searching for this bug.
>>
>> output of the console when trying to make a new
blog entry for blog 21:
>>
>> Jul 26 10:24:49 DEBUG [http-8080-Processor23]
servlet.BlojsomServlet -  
>> Adding last-modified header for current date
>> Jul 26 10:24:51 DEBUG [http-8080-Processor23]  
>> velocity.VelocityDispatcher - Retrieved template
for page:  
>> org/blojsom/plugin/admin/templates/admin.vm
>> Jul 26 10:24:51 DEBUG [http-8080-Processor23]  
>> velocity.VelocityDispatcher - Dispatched to flavor
page template:  
>> org/blojsom/plugin/admin/templates/admin.vm
>> Jul 26 10:24:54 DEBUG [Thread-1]
moblog.MoblogPlugin - Moblog plugin  
>> off to take a nap
>> Jul 26 10:25:23 DEBUG [http-8080-Processor24]
core.StandardWrapper -    
>> Returning non-STM instance
>> Jul 26 10:25:23 DEBUG [http-8080-Processor24]
filter.FeedFilter -  
>> Handling feed filter request: /21/
>> Jul 26 10:25:23 DEBUG [http-8080-Processor24]
filter.PageFilter -  
>> Handling page filter request: /21/
>> Jul 26 10:25:23 DEBUG [http-8080-Processor24]
filter.SkipEntriesFilter  
>> - Handling skip entries request: /21/
>> Jul 26 10:25:23 DEBUG [http-8080-Processor24]
filter.PermalinkFilter -  
>> Handling permalink request: /21
>> Jul 26 10:25:25 DEBUG [http-8080-Processor24]
database.DatabaseFetcher  
>> - blojsom path info: /
>> Jul 26 10:25:25 DEBUG [http-8080-Processor24]
database.DatabaseFetcher  
>> - User requested category: /
>> Jul 26 10:25:25 DEBUG [http-8080-Processor24]
servlet.BlojsomServlet -  
>> blojsom plugin execution:
org.blojsom.plugin.admin.EditBlogEntriesPlugin
>> Jul 26 10:25:25 DEBUG [http-8080-Processor24]  
>> admin.EditBlogEntriesPlugin - User requested new
blog entry action
>> Jul 26 10:25:25 DEBUG [http-8080-Processor24]  
>> common.RSSEnclosurePlugin - Handling process blog
entry event
>> Jul 26 10:25:25 DEBUG [http-8080-Processor24]  
>> language.LanguageSelectionPlugin - Handling process
blog entry event
>> Jul 26 10:25:28 DEBUG [http-8080-Processor24]
servlet.BlojsomServlet -  
>> Adding last-modified header for current date
>> Jul 26 10:25:28 DEBUG [http-8080-Processor24]  
>> velocity.VelocityDispatcher - Retrieved template
for page:  
>>
org/blojsom/plugin/admin/templates/admin-add-blog-entry.vm
>> Jul 26 10:25:28 DEBUG [http-8080-Processor24]  
>> velocity.VelocityDispatcher - Dispatched to flavor
page template:  
>>
org/blojsom/plugin/admin/templates/admin-add-blog-entry.vm
>>
>> output of the console when trying to make a new
blog entry for blog 112:
>>
>> Jul 26 10:27:57 DEBUG [http-8080-Processor22]
servlet.BlojsomServlet -  
>> Adding last-modified header for current date
>> Jul 26 10:27:57 DEBUG [http-8080-Processor22]  
>> velocity.VelocityDispatcher - Retrieved template
for page:  
>> org/blojsom/plugin/admin/templates/admin.vm
>> Jul 26 10:27:57 DEBUG [http-8080-Processor22]  
>> velocity.VelocityDispatcher - Dispatched to flavor
page template:  
>> org/blojsom/plugin/admin/templates/admin.vm
>> Jul 26 10:28:00 DEBUG [http-8080-Processor22]
core.StandardWrapper -    
>> Returning non-STM instance
>> Jul 26 10:28:00 DEBUG [http-8080-Processor22]
filter.FeedFilter -  
>> Handling feed filter request: /112/
>> Jul 26 10:28:00 DEBUG [http-8080-Processor22]
filter.PageFilter -  
>> Handling page filter request: /112/
>> Jul 26 10:28:00 DEBUG [http-8080-Processor22]
filter.SkipEntriesFilter  
>> - Handling skip entries request: /112/
>> Jul 26 10:28:00 DEBUG [http-8080-Processor22]
filter.PermalinkFilter -  
>> Handling permalink request: /112
>> Jul 26 10:28:01 DEBUG [http-8080-Processor22]
database.DatabaseFetcher  
>> - blojsom path info: /
>> Jul 26 10:28:01 DEBUG [http-8080-Processor22]
database.DatabaseFetcher  
>> - User requested category: /
>> Jul 26 10:28:01 DEBUG [http-8080-Processor22]
servlet.BlojsomServlet -  
>> blojsom plugin execution:
org.blojsom.plugin.admin.EditBlogEntriesPlugin
>>
>> It would be very nice if someone can give me a hint
how I can solve  
>> this problem. Thanks,
>>
>> Ingo
>>
>>
>>
------------------------------------------------------------
----
>> This message was sent using IMP, the Internet
Messaging Program.
>>
>>
>>
------------------------------------------------------------
-------------
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems? 
Stop.
>> Now Search log events and configuration files using
AJAX and a browser.
>> Download your FREE copy of Splunk now >>  http://get.splunk.com/
>> _______________________________________________
>> Blojsom-users mailing list
>> Blojsom-userslists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/blojsom-u
sers
>>
>>   
>
> DISCLAIMER ========== This e-mail may contain
privileged and 
> confidential information which is the property of
Persistent Systems 
> Pvt. Ltd. It is intended only for the use of the
individual or entity 
> to which it is addressed. If you are not the intended
recipient, you 
> are not authorized to read, retain, copy, print,
distribute or use 
> this message. If you have received this communication
in error, please 
> notify the sender and delete all copies of this
message. Persistent 
> Systems Pvt. Ltd. does not accept any liability for
virus infected mails.
>
>
------------------------------------------------------------
------------
>
>
------------------------------------------------------------
-------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? 
Stop.
> Now Search log events and configuration files using
AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
>
------------------------------------------------------------
------------
>
> _______________________________________________
> Blojsom-users mailing list
> Blojsom-userslists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/blojsom-u
sers
>   


------------------------------------------------------------
-------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and
a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Blojsom-users mailing list
Blojsom-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/blojsom-u
sers

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )