Error Updating user privileges 1.4RC3

6 views
Skip to first unread message

Ben Wagner

unread,
Apr 6, 2010, 2:10:31 PM4/6/10
to xnat_discussion
I've been trying to modify user privileges for a new datatype. The
permissions were not "sticking" and when reviewing the logs I find the
following message. I can't update to the 1.4 final yet (custom
scripts need testing), but need to update these permissions. With the
web interface not cooperating, is there a way to do this through REST
or XML?

Thanks,
Ben


2010-04-06 13:56:24,437 [http-8080-Processor16] ERROR
org.nrg.xdat.turbine.modules.actions.ModifyUserPrivileges - Invokation
of public void
org.nrg.xdat.turbine.modules.actions.ModifyUserPrivileges.doPerform(org.apache.turbine.util.RunData,org.apache.velocity.context.Context)
throws java.lang.Exception
java.lang.NullPointerException
at
org.nrg.xdat.turbine.modules.actions.ModifyUserPrivileges.SetUserProperties(ModifyUserPrivileges.java:
136)
at
org.nrg.xdat.turbine.modules.actions.ModifyUserPrivileges.storeChanges(ModifyUserPrivileges.java:
200)
at
org.nrg.xdat.turbine.modules.actions.ModifyUserPrivileges.doPerform(ModifyUserPrivileges.java:
66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.apache.turbine.util.velocity.VelocityActionEvent.executeEvents(VelocityActionEvent.java:
136)
at
org.apache.turbine.util.velocity.VelocityActionEvent.perform(VelocityActionEvent.java:
78)
at
org.apache.turbine.modules.actions.VelocityAction.perform(VelocityAction.java:
72)
at
org.apache.turbine.modules.actions.VelocitySecureAction.perform(VelocitySecureAction.java:
61)
at
org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:96)
at
org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:
113)
at org.apache.turbine.modules.Page.build(Page.java:53)
at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:
98)
at org.apache.turbine.Turbine.doGet(Turbine.java:751)
at org.apache.turbine.Turbine.doPost(Turbine.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
210)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
172)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:
433)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
151)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
870)
at org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:
665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:
528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:
81)
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:636)

Timothy Olsen

unread,
Apr 9, 2010, 10:51:55 AM4/9/10
to xnat_di...@googlegroups.com
Ben,

In XNAT 1.4 user privileges are managed via userGroups. You should not need to edit the permissions for actual users. Rather, you should modify the permissions of the groups they belong to.

Just to confirm the issue is what I think it is, when you create a new project do you have permissions for the new data-type on that new project?

Tim

Thanks,
Ben

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To post to this group, send email to xnat_di...@googlegroups.com.
To unsubscribe from this group, send email to xnat_discussi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xnat_discussion?hl=en.

Timothy Olsen

unread,
Apr 13, 2010, 4:35:28 PM4/13/10
to xnat_di...@googlegroups.com
In RC3, there was a bug which prevented newly created data-types from being usable in pre-existing projects. This bug has been resolved in later versions. FYI, you are only infected by this bug if you setup a new data-type while using the RC3 release.

If you've encountered this bug, the easiest course of action would be to re-setup your site via the more recent release and add the data-type like new.

However, if you need to upgrade an existing database, I've successfully managed to fix the existing projects in a test server with this issue.

First, run the following SQL in your PostgreSQL server:


DELETE FROM xdat_field_mapping WHERE xdat_field_mapping_id IN (
SELECT xdat_field_mapping_id
FROM xdat_field_mapping xfm
LEFT JOIN xdat_field_mapping_set xfms ON xfm.xdat_field_mapping_set_xdat_field_mapping_set_id=xfms.xdat_field_mapping_set_id
LEFT JOIN xdat_element_access xea ON xfms.permissions_allow_set_xdat_elem_xdat_element_access_id=xea.xdat_element_access_id
WHERE xea.element_name='xdat:element_security'
);

DELETE FROM xdat_field_mapping_set WHERE xdat_field_mapping_set_id IN (
SELECT xdat_field_mapping_set_id
FROM xdat_field_mapping_set xfms
LEFT JOIN xdat_element_access xea ON xfms.permissions_allow_set_xdat_elem_xdat_element_access_id=xea.xdat_element_access_id
WHERE xea.element_name='xdat:element_security'
);

DELETE FROM xdat_element_access WHERE xdat_element_access_id IN (
SELECT xdat_element_access_id
FROM xdat_element_access xea
WHERE xea.element_name='xdat:element_security'
);


Second, you will need to download and re-store (upload) the xml for each effected user group (owner, member, collaborator for each project). Obviously if you have a long list of projects this could be painful. We may be able to find a way to use the REST api in 1.4.0 after you've upgraded the site to allow scripting of this.

After doing these steps, I was able to create new instances of the data-type in preexisting projects. Re-store the group xmls for a project, and test if this will fix your issues.

Tim

-----Original Message-----
From: xnat_di...@googlegroups.com [mailto:xnat_di...@googlegroups.com] On Behalf Of Ben Wagner
Sent: Tuesday, April 06, 2010 1:11 PM
To: xnat_discussion
Subject: Error Updating user privileges 1.4RC3

Thanks,
Ben

--

the...@wagners.homeip.net

unread,
Apr 19, 2010, 8:36:05 AM4/19/10
to xnat_di...@googlegroups.com
Hello Tim,
I've tried you're instructions below with no success. Do I need to
update to a newer code base before issuing these instructions?

Still in RC3:
Execute SQL given.
Download/Upload XML for a group.

Error received (in webapps/logs/xdat.log):
2010-04-19 08:32:06,100 [http-8080-Processor21] ERROR
org.nrg.xdat.turbine.modules.actions.ModifyGroupPrivileges - Invokation of
public void
org.nrg.xdat.turbine.modules.actions.ModifyGroupPrivileges.doPerform(org.apache.turbine.util.RunData,org.apache.velocity.context.Context)
throws java.lang.Exception
java.lang.NullPointerException
at
org.nrg.xdat.turbine.modules.actions.ModifyGroupPrivileges.SetGroupProperties(ModifyGroupPrivileges.java:187)
at
org.nrg.xdat.turbine.modules.actions.ModifyGroupPrivileges.storeChanges(ModifyGroupPrivileges.java:231)
at
org.nrg.xdat.turbine.modules.actions.ModifyGroupPrivileges.doPerform(ModifyGroupPrivileges.java:43)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)

Timothy Olsen

unread,
Apr 19, 2010, 11:22:06 AM4/19/10
to xnat_di...@googlegroups.com
The ModifyGroupPrivileges error is fixed in 1.4. The Modify Group Permissions page will not be functional until you upgrade to 1.4.

I was hoping we could fix the data-type issues that have been stored in your database independent of that bug.

If you go to an existing project, click the Edit Details form, and submit the form it should add permissions for your recently added data-type. FYI, so long as you don't change any variables on that page, this should not affect your project in any negative ways.

What is your time line for moving to 1.4? Some features in 1.4 would be very helpful in getting this working.

the...@wagners.homeip.net

unread,
Apr 19, 2010, 11:45:49 AM4/19/10
to xnat_di...@googlegroups.com
Hello Tim,
My timeline is updating REST calls in existing code. I'm working on
that now, and should hopefully have it resolved within the week.
Reply all
Reply to author
Forward
0 new messages