Re: [Dspace-tech] Edit Item Template Error

2011-02-13 Thread Michael White
Hi Claudia,

 Are you trying this as instance admin or with a different role?

I'm a member of the main Administrator group, so I assume that means I am an 
instance admin.

 Did you change any of the dspace.cfg delegation setting in this section 
 # Authorization system configuration - Delegate ADMIN # 
 especially 
 #core.authorization.community-admin.collection.template-item = true 
 #core.authorization.collection-admin.template-item = true

No, I hadn't changed either of these from the installation defaults, although I 
note that collection-admin.template-item was false (by default?) - anyway, I 
tried changing this to true, and I also uncommented the 
community-admin.collection.template-item=true line, just to make this 
explicit (you never know!). Unfortunately neither of these changes appeared to 
have any effect :-(

 On a vanilla instance of 1.6.2 jspui this works fine for the instance 
 administrator and a 
 collection administrator (default, no delegation rules set).

OK, so, as I guessed, this isn't an issue generally, so presumably has 
something to do with the fact that this is a migrated instance - I set up a 
dev 1.6.2 alongside our old live v1.4, made all our local changes and additions 
on 1.6 (Request a copy, home grown auth module, and a few other minor bits and 
pieces), and then migrated 1.4 to 1.6 by copying over the assetstore and other 
key directories, pgdumping the 1.4 database, deleting the 1.6 DB and copying 
over the 1.4 DB and running the upgrade scripts (including removing the 
spurious constraints) - after re-indexing, everything seemed to be working fine 
- this is the first major problem I've hit . . . .

Does anyone have any ideas what might cause this behaviour?

Any assistance very welcome!

Cheers,

Mike

Michael White 
Research Information System (RIS) Project
Information Services
S8, Library
University of Stirling 
Stirling SCOTLAND 
FK9 4LA 
Email: michael.wh...@stir.ac.uk 
Tel: +44 (0) 1786 466877 
Fax: +44 (0) 1786 466880
http://www.is.stir.ac.uk/aboutis/teams/aldt/eld.php
Date: Fri, 11 Feb 2011 17:24:15 +0100
From: Claudia J?rgen  claudia.juer...@ub.tu-dortmund.de
Subject: Re: [Dspace-tech] Edit Item Template Error
To: dspace-tech@lists.sourceforge.net
Message-ID: 4d5562af.3060...@ub.tu-dortmund.de
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hello Michael,

your values for the template item are correct, it is not in_archive, not 
withdrawn and got no owning collection nor a submitter.

On a vanilla instance of 1.6.2 jspui this works fine for the instance 
administrator and a collection administrator (default, no delegation rules set).

Are you trying this as instance admin or with a different role?
Did you change any of the dspace.cfg delegation setting in this section # 
Authorization system configuration - Delegate ADMIN # especially 
#core.authorization.community-admin.collection.template-item = true 
#core.authorization.collection-admin.template-item = true


Hope that helps

Claudia J?rgen


Am 11.02.2011 15:15, schrieb Michael White:
 Hi,

 Using JSP UI on v1.6.2 (recently migrated from v1.4.2) - I'm trying to 
 edit Item Templates, but I'm getting an Internal Server Error whenever 
 I click the Edit button to access an existing Item Template (all our 
 Collections are created with templates in order to automatically 
 populate a type attribute):

 -- URL Was: https://dspace.stir.ac.uk/tools/edit-item?item_id=263 --
 Method: GET -- Parameters were: -- item_id: 263


 Exception: java.lang.NullPointerException at
 org.dspace.app.util.AuthorizeUtil.authorizeWithdrawItem(AuthorizeUtil.
 java:590)


at
org.dspace.app.webui.servlet.admin.EditItemServlet.showEditForm(EditItemServlet.java:494)
 at
 org.dspace.app.webui.servlet.admin.EditItemServlet.doDSGet(EditItemSer
 vlet.java:167)


at
org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:151)
 at
 org.dspace.app.webui.servlet.DSpaceServlet.doGet(DSpaceServlet.java:99
 )


at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
 cationFilterChain.java:269)etc

  I did a search on the DSpace tech archives but couldn't find anything 
 - I also did a search in JIRA and turned up something that may be 
 similar/related: https://jira.duraspace.org/browse/DS-184 NPE from 
 Edit Collection, Item Template, Edit Authorizations - however, this 
 appears to be related to the XMLUI, relates to v1.5 and states that 
 the issue was fixed in v1.6 - but as I can't even get into the item 
 template, I'm not sure this is related!

 I also had a poke around the database for things with item_id=263 - 
 when I look in the item table I see:

 item_id  submitter_id  in_archive  withdrawn  last_modified
 owning_collection 263  NULL  FALSE   FALSE
 2008-03-03 16:37:26.636+00  NULL

 - I don't know if this is what

[Dspace-tech] Edit Item Template Error

2011-02-11 Thread Michael White
Hi,

Using JSP UI on v1.6.2 (recently migrated from v1.4.2) - I'm trying to edit 
Item Templates, but I'm getting an Internal Server Error whenever I click the 
Edit button to access an existing Item Template (all our Collections are 
created with templates in order to automatically populate a type attribute):

-- URL Was: https://dspace.stir.ac.uk/tools/edit-item?item_id=263
-- Method: GET
-- Parameters were:
-- item_id: 263


Exception:
java.lang.NullPointerException
at 
org.dspace.app.util.AuthorizeUtil.authorizeWithdrawItem(AuthorizeUtil.java:590)
at 
org.dspace.app.webui.servlet.admin.EditItemServlet.showEditForm(EditItemServlet.java:494)
at 
org.dspace.app.webui.servlet.admin.EditItemServlet.doDSGet(EditItemServlet.java:167)
at 
org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:151)
at 
org.dspace.app.webui.servlet.DSpaceServlet.doGet(DSpaceServlet.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)etc

I did a search on the DSpace tech archives but couldn't find anything - I also 
did a search in JIRA and turned up something that may be similar/related: 
https://jira.duraspace.org/browse/DS-184 NPE from Edit Collection, Item 
Template, Edit Authorizations - however, this appears to be related to the 
XMLUI, relates to v1.5 and states that the issue was fixed in v1.6 - but as I 
can't even get into the item template, I'm not sure this is related!

I also had a poke around the database for things with item_id=263 - when I 
look in the item table I see:

item_id  submitter_id  in_archive  withdrawn  last_modified   
owning_collection 
263  NULL  FALSE   FALSE  2008-03-03 16:37:26.636+00  NULL

- I don't know if this is what this should look like, but it suggests to me 
(but I'm only guessing) that this item id does relate to a Collection (or an 
item template)?

- and looking at the Collection table, I see that the item with the 
template_item_id=263 relates to the Collection in question (i.e. the one 
whose template I was trying to edit that caused the above error).

However, if I go to the Items section in the admin interface in the jsp ui, 
if I enter the item_id 263 into the Internal ID search box, when I try and 
find the item, I get a similar Internal Server Error:

-- URL Was: 
https://dspace.stir.ac.uk/tools/edit-item?handle=item_id=263submit=Find
-- Method: GET
-- Parameters were:
-- handle: 
-- submit: Find
-- item_id: 263


Exception:
java.lang.NullPointerException
at 
org.dspace.app.util.AuthorizeUtil.authorizeWithdrawItem(AuthorizeUtil.java:590)
at 
org.dspace.app.webui.servlet.admin.EditItemServlet.showEditForm(EditItemServlet.java:494)
etc

- but, if I enter the handle for the collection that this item_id belongs to 
(as gleaned from the error when I try and edit that collections Item Template), 
which is 1893/213, I get (correctly) taken to a page that says:

The ID you entered isnt a valid item ID. If you're trying to edit a community 
or collection, you need to use the communities/collections admin page.

- which seems like much better behaviour, and does suggest some kind of problem 
with resolving the item_id for a collection (or, more like, a misunderstanding 
on my part as to what is actually going on here :-) )?

I've also tried this with Collections copied over from v1.4.2 and new 
collections created in v1.6.2, but it fails in both cases.

I'm guessing this isn't a general problem, otherwise I would have found other 
reports, so it may relate to the fact that this is a new v1.6.2 installation, 
and I migrated over the database from v1.4.2 (by copying over the assetstore 
etc, wiping the v1.6 DB, and then restoring a pgdump from v1.4 DB into the v1.6 
DB and running the upgrade scripts)? Everything else (at least everything else 
that I've tested!) seems to be working as expected though . . .

Has anyone else encountered anything like this? Anyone have any suggestions how 
I can fix it or work around it? I'm fairly desperate to make these changes to 
the Item Templates, so any assistance very gratefully accepted!

Cheers,

Mike

Michael White 
Research Information System (RIS) Project
Information Services
S8, Library
University of Stirling 
Stirling SCOTLAND 
FK9 4LA 
Email: michael.wh...@stir.ac.uk 
Tel: +44 (0) 1786 466877 
Fax: +44 (0) 1786 466880
http://www.is.stir.ac.uk/aboutis/teams/aldt/eld.php



-- 
The Sunday Times Scottish University of the Year 2009/2010
The University of Stirling is a charity registered in Scotland, 
 number SC 011159.


--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.

Re: [Dspace-tech] Edit Item Template Error

2011-02-11 Thread Claudia Jürgen
Hello Michael,

your values for the template item are correct, it is not in_archive, not 
withdrawn and got no owning collection nor a submitter.

On a vanilla instance of 1.6.2 jspui this works fine for the instance 
administrator and a collection administrator (default, no delegation 
rules set).

Are you trying this as instance admin or with a different role?
Did you change any of the dspace.cfg delegation setting in this section
# Authorization system configuration - Delegate ADMIN #
especially
#core.authorization.community-admin.collection.template-item = true
#core.authorization.collection-admin.template-item = true


Hope that helps

Claudia Jürgen


Am 11.02.2011 15:15, schrieb Michael White:
 Hi,

 Using JSP UI on v1.6.2 (recently migrated from v1.4.2) - I'm trying
 to edit Item Templates, but I'm getting an Internal Server Error
 whenever I click the Edit button to access an existing Item
 Template (all our Collections are created with templates in order to
 automatically populate a type attribute):

 -- URL Was: https://dspace.stir.ac.uk/tools/edit-item?item_id=263 --
 Method: GET -- Parameters were: -- item_id: 263


 Exception: java.lang.NullPointerException at
 org.dspace.app.util.AuthorizeUtil.authorizeWithdrawItem(AuthorizeUtil.java:590)


at 
org.dspace.app.webui.servlet.admin.EditItemServlet.showEditForm(EditItemServlet.java:494)
 at
 org.dspace.app.webui.servlet.admin.EditItemServlet.doDSGet(EditItemServlet.java:167)


at 
org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:151)
 at
 org.dspace.app.webui.servlet.DSpaceServlet.doGet(DSpaceServlet.java:99)


at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)etc

  I did a search on the DSpace tech archives but couldn't find
 anything - I also did a search in JIRA and turned up something that
 may be similar/related: https://jira.duraspace.org/browse/DS-184 NPE
 from Edit Collection, Item Template, Edit Authorizations - however,
 this appears to be related to the XMLUI, relates to v1.5 and states
 that the issue was fixed in v1.6 - but as I can't even get into the
 item template, I'm not sure this is related!

 I also had a poke around the database for things with item_id=263 -
 when I look in the item table I see:

 item_id  submitter_id  in_archive  withdrawn  last_modified
 owning_collection 263  NULL  FALSE   FALSE
 2008-03-03 16:37:26.636+00  NULL

 - I don't know if this is what this should look like, but it suggests
 to me (but I'm only guessing) that this item id does relate to a
 Collection (or an item template)?

 - and looking at the Collection table, I see that the item with the
 template_item_id=263 relates to the Collection in question (i.e.
 the one whose template I was trying to edit that caused the above
 error).

 However, if I go to the Items section in the admin interface in the
 jsp ui, if I enter the item_id 263 into the Internal ID search box,
 when I try and find the item, I get a similar Internal Server Error:

 -- URL Was:
 https://dspace.stir.ac.uk/tools/edit-item?handle=item_id=263submit=Find


-- Method: GET
 -- Parameters were: -- handle:  -- submit: Find -- item_id:
 263


 Exception: java.lang.NullPointerException at
 org.dspace.app.util.AuthorizeUtil.authorizeWithdrawItem(AuthorizeUtil.java:590)


at 
org.dspace.app.webui.servlet.admin.EditItemServlet.showEditForm(EditItemServlet.java:494)
 etc

 - but, if I enter the handle for the collection that this item_id
 belongs to (as gleaned from the error when I try and edit that
 collections Item Template), which is 1893/213, I get (correctly)
 taken to a page that says:

 The ID you entered isnt a valid item ID. If you're trying to edit a
 community or collection, you need to use the communities/collections
 admin page.

 - which seems like much better behaviour, and does suggest some kind
 of problem with resolving the item_id for a collection (or, more
 like, a misunderstanding on my part as to what is actually going on
 here :-) )?

 I've also tried this with Collections copied over from v1.4.2 and new
 collections created in v1.6.2, but it fails in both cases.

 I'm guessing this isn't a general problem, otherwise I would have
 found other reports, so it may relate to the fact that this is a new
 v1.6.2 installation, and I migrated over the database from v1.4.2 (by
 copying over the assetstore etc, wiping the v1.6 DB, and then
 restoring a pgdump from v1.4 DB into the v1.6 DB and running the
 upgrade scripts)? Everything else (at least everything else that I've
 tested!) seems to be working as expected though . . .

 Has anyone else encountered anything like this? Anyone have any
 suggestions how I can fix it or work around it? I'm fairly desperate
 to make these changes to the Item Templates, so any assistance very
 gratefully