[jboss-user] [JBoss Portal] - npe for wiki attachments
PeterJ
do-not-reply at jboss.com
Thu Oct 25 19:00:37 EDT 2007
JBoss AS 4.2.1, JBoss Portal 2.6.2, JBoss Wiki beta2
Has anybody noticed that you cannot upload attachments in the wiki? You get a null pointer exception in the commons file upload module.
Point of interest - JBoss Wiki builds with commons file upload 1.0, yet does not ship with it. JBoss Portal comes with commons file upload 1.2, so that is the one that gets used.
Apparently the MultipartStream class defined in commons file upload has the ability to notify someone regarding read events. According to the comments in the code, the notifier is optional (i.e., can be null). Unfortunately, whoever wrote the code never looked at that comment, hence the NPE when no notifier is provided.
Anyway, a simple patch to MultipartStream fixed the problem - I can now upload attachments. If anyone is interested, I can supply the patch. (Apparently someone else noticed this too because Apache's SVN repository has the fix.)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099064#4099064
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099064
More information about the jboss-user
mailing list