Re: [Dspace-tech] Filter-media in 15
Larry Stone wrote: It _should_ never get an NPE over a missing configuration key. Given our sparse testing resources it behooves us to make the code as resilient as possible. I'll disagree slightly - it isn't necessarily wrong for code to blow up. In cases like this, it's probably better for the code to blow up, than to quietly pretend to work, with only a vigilant pair of eyes on the log file realising if it isn't. But it should blow up with something more useful than an NPE - testing the returned value for null, or catching the NPE and rethrowing a more descriptive exception. G This email has been scanned by Postini. For more information please visit http://www.postini.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech
[Dspace-tech] Filter-media in 15
When I run filter-media in 1.5, I'm getting: -bash-3.2$ ./filter-media Applying Media Filters Exception in thread main java.lang.NullPointerException at org.dspace.app.mediafilter.MediaFilterManager.main(MediaFilterManager.ja va:240) - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech
Re: [Dspace-tech] Filter-media in 15
I see that it blows up on: String enabledPlugins = ConfigurationManager.getProperty(MEDIA_FILTER_PLUGINS_KEY); filterNames = enabledPlugins.split(,\\s*); But when I check the dspace.cfg file I don't see a MEDIA_FILTER_PLUGINS_KEY Filter-media will need to be run as a cron job in 1.5, right? Thanks! Jose -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Blanco, Jose Sent: Friday, July 11, 2008 11:14 AM To: dspace-tech@lists.sourceforge.net Subject: [Dspace-tech] Filter-media in 15 When I run filter-media in 1.5, I'm getting: -bash-3.2$ ./filter-media Applying Media Filters Exception in thread main java.lang.NullPointerException at org.dspace.app.mediafilter.MediaFilterManager.main(MediaFilterManager.ja va:240) - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech
Re: [Dspace-tech] Filter-media in 15
Jose, Actually that MEDIA_FILTER_PLUGINS_KEY is a constant that is set to filter.plugins in the MediaFilterManager.java class. So, you should have a filter.plugins entry in your 1.5 dspace.cfg file. The structure of the settings in dspace.cfg have changed somewhat in the 1.5 dspace.cfg file. So, you may want to review them closely. In fact, if you haven't modified your filter-media settings for 1.4, you may just want to copy them over from a fresh 1.5 dspace.cfg file. I hope that helps... - Tim Blanco, Jose wrote: I see that it blows up on: String enabledPlugins = ConfigurationManager.getProperty(MEDIA_FILTER_PLUGINS_KEY); filterNames = enabledPlugins.split(,\\s*); But when I check the dspace.cfg file I don't see a MEDIA_FILTER_PLUGINS_KEY Filter-media will need to be run as a cron job in 1.5, right? Thanks! Jose -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Blanco, Jose Sent: Friday, July 11, 2008 11:14 AM To: dspace-tech@lists.sourceforge.net Subject: [Dspace-tech] Filter-media in 15 When I run filter-media in 1.5, I'm getting: -bash-3.2$ ./filter-media Applying Media Filters Exception in thread main java.lang.NullPointerException at org.dspace.app.mediafilter.MediaFilterManager.main(MediaFilterManager.ja va:240) - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech -- Tim Donohue Research Programmer, Illinois Digital Environment for Access to Learning and Scholarship (IDEALS) University of Illinois at Urbana-Champaign [EMAIL PROTECTED] | (217) 333-4648 - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech
Re: [Dspace-tech] Filter-media in 15
Thank you! That did it. -Original Message- From: Tim Donohue [mailto:[EMAIL PROTECTED] Sent: Friday, July 11, 2008 1:15 PM To: Blanco, Jose Cc: dspace-tech@lists.sourceforge.net Subject: Re: [Dspace-tech] Filter-media in 15 Jose, Actually that MEDIA_FILTER_PLUGINS_KEY is a constant that is set to filter.plugins in the MediaFilterManager.java class. So, you should have a filter.plugins entry in your 1.5 dspace.cfg file. The structure of the settings in dspace.cfg have changed somewhat in the 1.5 dspace.cfg file. So, you may want to review them closely. In fact, if you haven't modified your filter-media settings for 1.4, you may just want to copy them over from a fresh 1.5 dspace.cfg file. I hope that helps... - Tim Blanco, Jose wrote: I see that it blows up on: String enabledPlugins = ConfigurationManager.getProperty(MEDIA_FILTER_PLUGINS_KEY); filterNames = enabledPlugins.split(,\\s*); But when I check the dspace.cfg file I don't see a MEDIA_FILTER_PLUGINS_KEY Filter-media will need to be run as a cron job in 1.5, right? Thanks! Jose -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Blanco, Jose Sent: Friday, July 11, 2008 11:14 AM To: dspace-tech@lists.sourceforge.net Subject: [Dspace-tech] Filter-media in 15 When I run filter-media in 1.5, I'm getting: -bash-3.2$ ./filter-media Applying Media Filters Exception in thread main java.lang.NullPointerException at org.dspace.app.mediafilter.MediaFilterManager.main(MediaFilterManager. ja va:240) -- -- - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech -- --- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech -- Tim Donohue Research Programmer, Illinois Digital Environment for Access to Learning and Scholarship (IDEALS) University of Illinois at Urbana-Champaign [EMAIL PROTECTED] | (217) 333-4648 - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech
Re: [Dspace-tech] Filter-media in 15
It _should_ never get an NPE over a missing configuration key. Given our sparse testing resources it behooves us to make the code as resilient as possible. Could you submit a bug report about this (or, even better, a patch) -- ideally it could would *log an error* if the configuration property is missing and set filternames to some default that may be illogical (i.e. empty list of plugins) but at least won't blow up. The error log entry explains the exact problem to the admin, who may not have known about the new configuration key, but can now tell exactly what to look for. See org.dspace.core.PluginManager for an example; it has a lot of protection against configuration errors because those are to be expected when plugin configurations get changed at every site. -- Larry I see that it blows up on: String enabledPlugins = ConfigurationManager.getProperty(MEDIA_FILTER_PLUGINS_KEY); filterNames = enabledPlugins.split(,\\s*); But when I check the dspace.cfg file I don't see a MEDIA_FILTER_PLUGINS_KEY Filter-media will need to be run as a cron job in 1.5, right? Thanks! Jose -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Blanco, Jose Sent: Friday, July 11, 2008 11:14 AM To: dspace-tech@lists.sourceforge.net Subject: [Dspace-tech] Filter-media in 15 When I run filter-media in 1.5, I'm getting: -bash-3.2$ ./filter-media Applying Media Filters Exception in thread main java.lang.NullPointerException at org.dspace.app.mediafilter.MediaFilterManager.main(MediaFilterManager.ja va:240) - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech