That doesn't sound like the intended behavior.
Which branch of the code are you running?
The code for deleting data is not very robust (mainly because we don't use it much, especially not removing large projects). However, it usually wouldn’t fail in such frustrating fashion, and it was already on my list for review. Within XNAT deleting data is especially slow. Speeding it up is possible, but would probably require more time then I have now.
The sequence of events the Delete Project option goes thorough is...
START
For each subject in project
For each experiment in subject
For each assessor in experiment
Delete assessment
End
Delete experiment
End
Delete subject
End
Delete project
END
The code is structured in this way to prevent an sql statement that is GB in size and to provide for security checks at each level (shared subjects wouldn’t need to be deleted). Each step involves updating metadata and history tables with associated triggers. This is part of the speed problem.
The java code for this is in the DeleteProjectData action.
In even the last released code, the project may be deleted even if the deletion of an individual subject, expt or assessment failed. I'll need to review this. However, the hanging page is surprising to me. The last step of the process is to delete the project. So the fact that your project was deleted, leads me to believe that the process completed, and the action should have completed.
Were there any errors in your xdat.log, sql.log, or catalina.out?
I have a more recent version of the code available that I can check in. It primarily included more thorough security review for non standard structures (shared subjects without shared experiments, etc). However, I don't think it will be any quicker. Ideally, it would prevent the deletion of the project if previous steps failed. Let me know which branch you are on.
Regarding fixing your post delete database...
It may be easier to roll back to a backup if you have one available (we keep nightly copies of our db). If you don’t have a recent backup, then you’ll need to fix the database.
I would create a dummy project through the website. Then run some SQL to add any orphaned subjects or experiments to that project. Something like…
UPDATE xnat_experimentData SET project=’DUMMY_ID’ WHERE project IS NULL;
UPDATE xnat_subjectData SET project=’DUMMY_ID’ WHERE project IS NULL;
FYI, if your file paths are relative, the references to the file system will be broken unless you use a project with the same id as the previous one.
Once they are added in the database, you can return to the web site to navigate the contents (see what got deleted and what didn’t).
Tim
Another option for this would be to delete the data via the REST interface. I know one of my test scripts creates a project with 100 subjects (10 MR each), and then deletes it. I’ve never timed it, but it always completes successfully. I have a more recent copy of that code as well.
I was trying to install 1.4rc2 on my new Thinkpad w700 running 64-bit Vista. The
setup step produced the error below. I have 64-bit jdk.
Anyone has seen this or has a clue?
There was no problem with my older Thinkpad.
Thanks,
Yong
----------------------------------------------------------------------------
C:\xnat>bin\setup.bat -Ddeploy=true
Using XDAT Installation: C:\xnat
Using JAVA_HOME: C:\Program Files\java\jdk1.6.0_13
.
Verify java version (with 'java -version')
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.2
Plugin cache will be regenerated
build:start:
xdat:setup:
[echo] HOME: C:\xnat
xdat:testDB:
xdat:verifyPLPGSQL:
xdat:copyMavenJars:
[echo] HOME: C:\xnat
[echo] USER HOME: C:\Users\yong
[echo] INCLUDE XNAT TEMPLATE: true
[echo] ROOT SCHEMA: C:\xnat\schemas
xdat:modifyTurbine:
[delete] Deleting 1 files from C:\xnat\plugin-resources\plugins
[delete] Deleting 39 files from C:\xnat\plugin-resources\cache
[delete] Deleted 27 directories from C:\xnat\plugin-resources\cache
xdat:setupLib:
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
[copy] Copying 1 file to C:\xnat\lib
java.io.IOException: Cannot run program "command.com": CreateProcess error=2,
The system cannot find the file specifie
at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
at java.lang.Runtime.exec(Runtime.java:593)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:64
6)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:416)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:427)
at
org.apache.tools.ant.taskdefs.Execute.getProcEnvironment(Execute.java:180)
at
org.apache.tools.ant.taskdefs.Property.loadEnvironment(Property.java:455)
at org.apache.tools.ant.taskdefs.Property.execute(Property.java:359)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:185)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at
org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.java:79)
at
org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction(Mav
enGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
at
org.apache.maven.jelly.tags.werkz.MavenAttainGoalTag.doTag(MavenAttainGoalTag.ja
va:127)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at
org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.java:79)
at
org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction(Mav
enGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
at
org.apache.maven.jelly.tags.werkz.MavenAttainGoalTag.doTag(MavenAttainGoalTag.ja
va:127)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at
org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.java:79)
at
org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction(Mav
enGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:671)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.cli.App.doMain(App.java:488)
at org.apache.maven.cli.App.main(App.java:1239)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find
the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
... 45 more
xdat:buildGenericExecutables:
[copy] Copying 1 file to C:\xnat\plugin-resources\misc
[copy] Copying 1 file to C:\xnat\plugin-resources\misc
xdat:editGenericExecutable:
[copy] Copying 1 file to C:\xnat\bin
[copy] Copying 1 file to C:\xnat\bin
The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
I've checked out the source again, and was able to do an installation with the
fixed maven.xml. However, the "Cannot run program "command.com" error is still
there. You won't see it if you let the set up run to the end.
Also, the set up script didn't recognize "JAVA_HOME" env viable even though it
was set. As a result, the scripts (StoreXML.bat etc) were not generated
properly.
Thanks,
Yong
Alexis, you could export the users xml and then restore them. FYI, you may run into problems if you don’t re-create your projects before storing the user XML.
I believe you could use the command prompt tool ‘Browse’ to export all of the user xmls. It is preinstalled in XNAT_HOME/bin. Pass in : -e xdat:user
Tim
I found a local copy of Vista to test on. Its 32-bit, but is also having some issues. It doesn't seem to like this ant command:
<ant:property environment="env"/>
It is throwing an error about '16-bit MS-DOS Subsystem'.
A little background info...
XNAT uses Maven to manage the install process (something we aren't necessarily excited about...). Maven allows the use of Ant commands. Maven 1.0.2 is included in XNAT/plugin-resources/maven.
Ant allowed the assignment of the environmental variable set to a property using the 'offending' command. This was used to access the JAVA_HOME value (env.JAVA_HOME). It appears something within the Ant assignment is breaking in Vista. My quick attempt at upgrading Maven's version of Ant (plugin-resources/maven/lib) didn't go smoothly. Maybe there is a better way to access the environmental variables in maven. It may take some time for me to resolve. You can take a stab at it, if you like.
In the meantime, it appears XNAT needs some work before it is usable on Vista.
Tim
Thanks,
Yong
Thanks,
Yong
xdat:verifyPLPGSQL:
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:646)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:416)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:427)
at org.apache.tools.ant.taskdefs.Execute.getProcEnvironment(Execute.java:180)
at org.apache.tools.ant.taskdefs.Property.loadEnvironment(Property.java:455)
at org.apache.tools.ant.taskdefs.Property.execute(Property.java:359)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:185)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.java:79)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction(MavenGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
at org.apache.maven.jelly.tags.werkz.MavenAttainGoalTag.doTag(MavenAttainGoalTag.java:127)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.java:79)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction(MavenGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
at org.apache.maven.jelly.tags.werkz.MavenAttainGoalTag.doTag(MavenAttainGoalTag.java:127)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.java:79)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction(MavenGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:671)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.cli.App.doMain(App.java:488)
at org.apache.maven.cli.App.main(App.java:1239)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)