Am 13.09.2007 um 02:41 schrieb Shaun Burriss:
> We haven't been able to reproduce the problem through navigating My
> DSpace, but it will occur when we link directly to one of the pages.
I guess that is exactly the point.
> java.lang.NullPointerException
> at org.apache.jsp.mydspace.subscriptions_jsp._jspService
> (subscriptions_jsp.java:83)
Look at this file, [dspace-install]/jsp/mydspace/subscriptions.jsp.
At line 83 I could not find anything exceptional, but it is followed by
<%
if (updated)
{
%>
Now, what is "updated"? At the very beginning after the copyright
boilerplate
there are these lines:
<%--
- Show a user's subscriptions and allow them to be modified
-
- Attributes:
- subscriptions - Collection[] - collections user is subscribed to
- updated - Boolean - if true, subscriptions have just
been updated
--%>
So this page expects to be called with two attributes.
Some lines later, these attributes get extracted:
<%
Collection[] subscriptions =
(Collection[]) request.getAttribute("subscriptions");
boolean updated =
((Boolean) request.getAttribute("updated")).booleanValue();
%>
As you invoke the page without attributes, "updated" neither gets set
to either true or false, which would be valid boolean values. It remains
in indetermined state aka null. This is what your error message
reported:
java.lang.NullPointerException
You could argue that the programmers should initialize attributes before
loading them, but ... . They could also throw a general exception if
they
cannot initialize them. That would probably be the java way. I dont
know whether exceptions are used throughout the jsp frontend or only in
the backend. As the jsp frontend will be phased out some day, it is
also not likely that it gets overhauled. After all, it does not look
like a severe problem.
> An example is below, but we have found that a similar error occurs
> when we visit other pages such as perform-task.jsp, preview-task.jsp.
<%--
- Perform task page
-
- Attributes:
- workflow.item: The workflow item for the task being performed
--%>
<%--
- Preview task page
-
- workflow.item: The workflow item for the task they're performing
--%>
actually it should happen with every page inside mydspace besides
main.jsp
and task-complete.jsp which are the only pages that dont require
attributes.
BTW, when investigating your problem I found you directories being
browsable, such as:
<http://images.swinburne.edu.au/mydspace/>
<http://images.swinburne.edu.au/login/>
<http://images.swinburne.edu.au/layout/>
Is that intended? From my perspective, this is a configuration error.
Bye, Christian
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech