Could not find screen for Login.vm

197 views
Skip to first unread message

Benjamin Yvernault

unread,
Oct 22, 2015, 6:45:56 AM10/22/15
to xnat_discussion
Hi,

I found a previous thread on this and I did all the different suggestions to fix this but nothing is working.
I am trying to install a new XNAT instance call qs-controls on a CentOs 7 VM. 

I have this error when I start tomcat and try to access the page:

Horrible Exception: java.lang.Exception: Could not find screen for Login.vm
	at org.apache.turbine.modules.screens.VelocityScreen.buildTemplate(VelocityScreen.java:104)
	at org.apache.turbine.modules.screens.TemplateScreen.doBuild(TemplateScreen.java:101)
	at org.apache.turbine.modules.Screen.build(Screen.java:57)
	at org.apache.turbine.modules.ScreenLoader.eval(ScreenLoader.java:104)
	at org.apache.turbine.modules.ScreenLoader.exec(ScreenLoader.java:119)
	at org.apache.turbine.modules.screens.TemplateScreen.doRedirect(TemplateScreen.java:163)
	at org.apache.turbine.modules.screens.TemplateScreen.doRedirect(TemplateScreen.java:187)
	at org.nrg.xdat.turbine.modules.screens.SecureScreen.isAuthorized(SecureScreen.java:226)
	at org.nrg.xdat.turbine.modules.screens.SecureScreen.doBuildTemplate(SecureScreen.java:121)
	at org.apache.turbine.modules.screens.TemplateScreen.doBuild(TemplateScreen.java:100)
	at org.apache.turbine.modules.Screen.build(Screen.java:57)
	at org.apache.turbine.modules.ScreenLoader.eval(ScreenLoader.java:104)
	at org.apache.turbine.modules.layouts.VelocityOnlyLayout.doBuild(VelocityOnlyLayout.java:92)
	at org.apache.turbine.modules.Layout.build(Layout.java:53)
	at org.apache.turbine.modules.LayoutLoader.exec(LayoutLoader.java:98)
	at org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:146)

It's weird because all the different .vm are present in tomcat7/webapps/qs-controls/xnat-templates folder (Login.vm as well).

I checked the logs but I don't find any error except :

INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
WEBAPP:/qs-controls
SOURCE: /opt/tomcat7/webapps/qs-controls/
[Thread-18] ERROR db.PoolDBUtils  - SELECT pg_get_serial_sequence('xnat_projectData_resource','xnat_projectData_resource_id') AS col_name
[Thread-18] ERROR db.PoolDBUtils  - SELECT pg_get_serial_sequence('xnat_projectData_investigator','xnat_projectData_investigator_id') AS col_name
[Thread-18] ERROR db.PoolDBUtils  - SELECT * FROM xnat_projectData_investigator_xnat_projectData_investigator_id_seq
[Thread-18] ERROR db.PoolDBUtils  - SELECT * FROM xnat_projectData_investigator_xnat_projectData_investigator__seq
[Thread-18] ERROR db.PoolDBUtils  - SELECT pg_get_serial_sequence('xnat_subjectData_resource','xnat_subjectData_resource_id') AS col_name
[Thread-18] ERROR db.PoolDBUtils  - SELECT pg_get_serial_sequence('xnat_experimentData_resource','xnat_experimentData_resource_id') AS col_name
[Thread-18] ERROR db.PoolDBUtils  - SELECT * FROM xnat_experimentData_resource_xnat_experimentData_resource_id_seq
[Thread-18] ERROR db.PoolDBUtils  - SELECT pg_get_serial_sequence('xnat_datatypeProtocol_fieldGroups','xnat_datatypeProtocol_fieldGroups_id') AS col_name
[Thread-18] ERROR db.PoolDBUtils  - SELECT * FROM xnat_datatypeProtocol_fieldGroups_xnat_datatypeProtocol_fieldGroups_id_seq
[Thread-18] ERROR db.PoolDBUtils  - SELECT * FROM xnat_datatypeProtocol_fieldGro_xnat_datatypeProtocol_fieldGro_seq
Oct 22, 2015 10:57:29 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /opt/apache-tomcat-7.0.64/webapps/qs-controls.war has finished in 40,949 ms
Oct 22, 2015 10:57:29 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Oct 22, 2015 10:57:29 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Oct 22, 2015 10:57:29 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 92158 ms

Do you have any idea what could be the issue?

To give a little more information on the settings :
database name: xnat
database user: xnat

For XNAT:
    version 1.6.5  
For VM:
    CentOS Linux release 7.1.1503 (Core) 
For postgres:
    psql (PostgreSQL) 9.3.10
For java:
    java version "1.7.0_85"
    OpenJDK Runtime Environment (rhel-2.6.1.2.el7_1-x86_64 u85-b01)
    OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mode)
For tomcat:
    Apache Tomcat Version 7.0.64
For Apache, it's:
    Server version: Apache/2.4.6 (CentOS)
    Server built:   Aug 24 2015 18:11:25

Kind regards,

Ben

Herrick, Rick

unread,
Oct 22, 2015, 7:50:58 AM10/22/15
to xnat_di...@googlegroups.com

I suspect that you’ve run into a very weird bug that happens on occasion that I’ve never been able to figure out. Sometimes the app name you choose makes PostgreSQL become case sensitive to names in the SQL. So in this case, if you go into psql and try to run this query:

 

SELECT pg_get_serial_sequence('xnat_projectData_resource','xnat_projectData_resource_id') AS col_name

 

That will fail, but this will work:

 

SELECT pg_get_serial_sequence('xnat_projectdata_resource','xnat_projectdata_resource_id') AS col_name

 

If that’s the case, you can try building your app again from scratch—i.e. delete the deployments and projects folders—and change the app name from qs-controls to qscontrols. I’ve had this happen with numbers in the app name as well as dashes. What’s weird is that I’ve had it work just fine with numbers and dashes in the app name too. And I’ve not been able to find what it is that triggers psql to become case sensitive.

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To post to this group, send email to xnat_di...@googlegroups.com.
Visit this group at http://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/d/optout.




The material in this message is private and may contain Protected Healthcare Information (PHI). If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Benjamin Yvernault

unread,
Oct 22, 2015, 8:13:17 AM10/22/15
to xnat_discussion
So the funny part is that I can run:

SELECT pg_get_serial_sequence('xnat_projectData_resource','xnat_projectData_resource_id') AS col_name

or 

SELECT pg_get_serial_sequence('xnat_projectdata_resource','xnat_projectdata_resource_id') AS col_name

and I don't have any error (see below).

xnat=> SELECT pg_get_serial_sequence('xnat_projectData_resource','xnat_projectData_resource_id') AS col_name
xnat-> SELECT pg_get_serial_sequence('xnat_projectdata_resource','xnat_projectdata_resource_id') AS col_name
xnat-> SELECT pg_get_serial_sequence('xnat_projectData_resource','xnat_projectData_resource_id') AS col_name
xnat-> 

So I don't know if that issue is actually an issue. 

Anyway, I will try to rename my app qscontrols without the dash and see if that works. 

Cheers,

Ben

Benjamin Yvernault

unread,
Oct 22, 2015, 8:46:48 AM10/22/15
to xnat_discussion
You are right Rick.

I renamed the project qscontrols and now it's working.
Weird.

Thank you for the suggestion. I though about changing the dynamo without dash and same for the dbuser but i didn't think about the XNAT project name.

Cheers,

Ben

Herrick, Rick

unread,
Oct 22, 2015, 10:25:15 AM10/22/15
to xnat_di...@googlegroups.com

In psql, make sure you’re terminating the queries with a semicolon, so:

 

SELECT pg_get_serial_sequence('xnat_projectData_resource','xnat_projectData_resource_id') AS col_name;

 

When you see the psql prompt turn from ‘=>’ into ‘->’, that means it’s a continuous statement. This lets you do things like this:

 

xnat=> SELECT * FROM xdat_user

xnat-> WHERE login = 'admin';

 

That helps make the query more readable and easier to detect errors or things you want to change.

 

Now, what’s interesting is that I just ran these queries myself on a working XNAT installation:

 

xnat=> SELECT pg_get_serial_sequence('xnat_projectData_resource','xnat_projectData_resource_id') AS col_name;

ERROR:  column "xnat_projectData_resource_id" of relation "xnat_projectdata_resource" does not exist

xnat=> \d xnat_projectData_resource

                                                               Table "public.xnat_projectdata_resource"

                     Column                     |       Type        |                                            Modifiers

------------------------------------------------+-------------------+--------------------------------------------------------------------------------------------------

xnat_projectdata_id                            | character varying | not null

xnat_abstractresource_xnat_abstractresource_id | integer           | not null

xnat_projectdata_resource_id                   | integer           | not null default nextval('xnat_projectdata_resource_xnat_projectdata_resource_id_seq'::regclass)

Indexes:

    "xnat_projectdata_resource_pkey" PRIMARY KEY, btree (xnat_projectdata_resource_id)

Foreign-key constraints:

    "xnat_projectdata_resource_xnat_abstractresource_xnat_abstr_fkey" FOREIGN KEY (xnat_abstractresource_xnat_abstractresource_id) REFERENCES xnat_abstractresource(xnat_abstractresource_id) ON UPDATE CASCADE ON DELETE CASCADE

    "xnat_projectdata_resource_xnat_projectdata_id_fkey" FOREIGN KEY (xnat_projectdata_id) REFERENCES xnat_projectdata(id) ON UPDATE CASCADE ON DELETE CASCADE

 

xnat=> SELECT pg_get_serial_sequence('xnat_projectdata_resource','xnat_projectdata_resource_id') AS col_name;

                             col_name

-------------------------------------------------------------------

public.xnat_projectdata_resource_xnat_projectdata_resource_id_seq

(1 row)

 

So I guess the column names are always case sensitive? But… in the SQL for this installation, the column names are camel-cased just as they are in the query. So it appears that PostgreSQL is lower-casing the names before creating them. And somehow the way all of this works changes based on the XNAT app name… Weird. So you can see why this is a hard thing to track down!

Benjamin Yvernault

unread,
Oct 22, 2015, 10:28:38 AM10/22/15
to xnat_di...@googlegroups.com
I realised after the email that I didn’t terminate the query, oups.

Yes, I spend two days trying to find the issue. When I saw that changing the name of the xnat project app by removing the dash makes it work, it killed me :). 

Thank you Rick for your help.

Ben

You received this message because you are subscribed to a topic in the Google Groups "xnat_discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xnat_discussion/Su4IYP731lo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xnat_discussi...@googlegroups.com.

Matt South

unread,
Aug 16, 2018, 5:33:38 PM8/16/18
to xnat_discussion
This is picking up an old thread, but please bear with me.  After yesterday's L1TF security patches were applied to our Ubuntu 14.04 boxes I found that tomcat stopped working on all of them.  When I try and start the tomcat7 server I see errors like this in catalina.out on startup:

Aug 16, 2018 5:21:30 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common/classes], exists: [false], isDirectory: [false], canRead: [false]
Aug 16, 2018 5:21:30 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common], exists: [false], isDirectory: [false], canRead: [false]
Aug 16, 2018 5:21:30 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server/classes], exists: [false], isDirectory: [false], canRead: [false]
Aug 16, 2018 5:21:30 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server], exists: [false], isDirectory: [false], canRead: [false]
Aug 16, 2018 5:21:30 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
Aug 16, 2018 5:21:30 PM org.apache.catalina.startup.ClassLoaderFactory validateFile

These suggest some mixup with the CATALINA_HOME and CATALINA_BASE environment variables (the common and shared directories are under /var/lib/tomcat7 in the ubuntu repository installation, not /usr/share/tomacat7) but I havent yet found out exactly how to resolve this issue - please shout if you have an idea!

All my xnat 1.6.5 instances running in ubuntu 14.04 had dashes in their instance names, as in Ben's case at the beginning of this thread.  I had some XNAT 1.7 instances as well, but this version XNAT doesnt allow dashes in the instance name.

As well as ubuntu 14.04 I already had some XNAT's running on ubuntu 16.04 and their tomcat installations survived the security patches so I thought I'd try upgrading the underlying operating system instead of fixing the tomcat issue - I was going to have to do this soon anyway as 14.04 falls out of it's support window in April.  This upgrade strategy works for XNAT 1.7 instances but for XNAT 1.6.5 instances, while tomcat starts (yay!), xnat gives the error that Ben highlights at the top of this thread.  And that makes sense because the upgrade from ubuntu 14.04 to 16.04 automatically upgrades java from version 1.7 to version 1.8 and my 1.6.5 instances still have dashes in their instance names. I believe the fix may be to remove the dash from the instance name.  So my question is: Is there a way to update the instance name at the database level so that I can restore my 1.6.5 instances?

Actually there are two questions in this post which I'll reiterate for clarity:
1. Any ideas for how to fix my broken ubuntu 14.04 tomcats?
2. Any ideas for updating the instance name of an xnat 1.6.5 instance at the database level?

best wishes

Matt


On Thursday, 22 October 2015 15:28:38 UTC+1, Benjamin Yvernault wrote:
I realised after the email that I didn’t terminate the query, oups.

Yes, I spend two days trying to find the issue. When I saw that changing the name of the xnat project app by removing the dash makes it work, it killed me :). 

Thank you Rick for your help.

Ben

Herrick, Rick

unread,
Aug 17, 2018, 12:50:10 PM8/17/18
to xnat_di...@googlegroups.com

Hey Matt,

 

Those Tomcat warnings are actually just an artifact of the packaging on Ubuntu/Debian. It’s fixed in later releases. Basically the CATALINA_BASE and CATALINA_HOME settings get screwed up. I think CATALINA_BASE should be /var/lib/tomcat7 and CATALINA_HOME should be /usr/share/tomcat7, but you’ve probably got CATALINA_BASE set to /usr/share/tomcat7. You should be able to find the values Tomcat’s using by looking in the catalina.out log. I have this on my VM:

 

Aug 15, 2018 11:14:05 AM org.apache.catalina.startup.VersionLoggerListener log

INFO: CATALINA_BASE:         /var/lib/tomcat7

Aug 15, 2018 11:14:05 AM org.apache.catalina.startup.VersionLoggerListener log

INFO: CATALINA_HOME:         /usr/share/tomcat7

 

Sometimes messing with those variables can be like pulling out one of the bottom supports on a house of cards, so another workaround is to create symlinks between the folders (run as root or add sudo to each command):

 

$ ln -s /var/lib/tomcat7/common /usr/share/tomcat7/common

$ ln -s /var/lib/tomcat7/server /usr/share/tomcat7/server

$ ln -s /var/lib/tomcat7/shared /usr/share/tomcat7/shared

$ service tomcat7 restart

 

All that said, unless you’re adding classes to Tomcat directly (where they’re accessible to all web apps running on the server), these folders are irrelevant. That’s why the messages are warnings and not errors: you would see something bad happen if you tried to reference classes that aren’t contained on your web app’s classpath, but XNAT doesn’t do that. Historically there were certain types of code that needed to be in the Tomcat server folders in order to work properly because of issues with the Java security manager and that’s where those folders came from. Nowadays that sort of restriction isn’t really used any more.

 

Regarding setting the site ID, this is stored in two places: the configuration data store and the archive specification table. The latter is the easier one to see and change:

 

xnat=> SELECT site_id FROM arc_archivespecification;

site_id

---------

XNAT-BAD-MKAY

(1 row)

 

xnat=> UPDATE arc_archivespecification SET site_id = 'XNAT';

UPDATE 1

 

The configuration data store is a bit more complicated, because it’s stored as text in the configuration data table but you need to get to the currently active row through the xhbm_configuration table, so you’d need to do a query like this:

 

SELECT d.contents

FROM xhbm_configuration_data d

  LEFT JOIN xhbm_configuration c ON d.id = c.config_data

WHERE c.tool = 'site' AND c.path = 'siteConfiguration' AND c.enabled = TRUE;

 

You can get the ID of the row in the data table as well, modify the contents in there to change the site ID, and update it directly back in the table. That should reset the site ID completely, so hopefully you’ll be able to start!

 

-- 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

Phone: +1 (314) 273-1645


For more options, visit https://groups.google.com/d/optout.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Matt South

unread,
Aug 19, 2018, 12:39:58 PM8/19/18
to xnat_discussion
Hi Rick, thanks for the hints - most appreciated.   Another kernel update on Saturday morning fixed my downed ubuntu14.04 tomcats, so that issue is no longer so live for me, though I still need to understand why this happened.  It didnt happen on other similar instances I have elsewhere, so its somewhat localised to a particular physical site.   I agree the catalina.out warnings I pointed out were red herrings, I'd just not spotted them before, and in the period I experienced this outage, tomcat couldnt get any further than printing those to catalina.out in its startup.

I still have one test instance which doesnt come up after I upgraded the OS, perhaps due to the site_id. The first query you suggest is straightforward and I find that actually I have spaces in the site_id, not dashes. Perhaps this is just as bad?  Interestingly, I cant find any reference to the site_id string in the xhbm_configuration_data.contents field.  I modified the last clause in your suggested query to this:

SELECT d.contents FROM xhbm_configuration_data d LEFT JOIN xhbm_configuration c ON d.id = c.config_data WHERE c.tool = 'site' AND c.path = 'siteConfiguration' AND c.status = 'enabled';

But even with this change I dont see the string.  What sort of lines were you expecting to see?  I do see an "undefined = undefined" line.  Fixing the site_id in xbmh_archivespecification doesnt change things for me. On startup in catalina.out, before and after, I see lots of lines like:

org.nrg.xft.exception.ElementNotFoundException: Element not found: 'arc:ArchiveSpecification'

and the Horrible Exception about Login.vm in the browser.

Thanks again

Matt
Reply all
Reply to author
Forward
0 new messages