Problems with Startup of VIVO 1.9

383 views
Skip to first unread message

Sarbajit Dutta

unread,
Sep 22, 2016, 12:31:01 PM9/22/16
to VIVO Tech
Hi,

I am getting the following error when I start tomcat.

2016-09-22 12:27:21,301 ERROR [StartupStatus] From ApplicationSetup: Failed to initialize the Application.

java.lang.IllegalStateException: Can't find a value for the Vitro home directory. Looked in JNDI environment at 'java:comp/env/vitro/home'. Looked for a system property named 'vitro.home'. Looked in 'WEB-INF/resources/build.properties' for 'vitro.home'.

at edu.cornell.mannlib.vitro.webapp.application.VitroHomeDirectory$HomeDirectoryFinder.confirmExactlyOneResult(VitroHomeDirectory.java:160)

at edu.cornell.mannlib.vitro.webapp.application.VitroHomeDirectory$HomeDirectoryFinder.<init>(VitroHomeDirectory.java:82)

at edu.cornell.mannlib.vitro.webapp.application.VitroHomeDirectory.find(VitroHomeDirectory.java:27)

at edu.cornell.mannlib.vitro.webapp.application.ApplicationSetup.contextInitialized(ApplicationSetup.java:45)

at edu.cornell.mannlib.vitro.webapp.startup.StartupManager.initialize(StartupManager.java:179)

at edu.cornell.mannlib.vitro.webapp.startup.StartupManager.contextInitialized(StartupManager.java:65)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4813)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5272)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)



How can I resolve it?


Thanks,

Sarbajit

Ted.L...@thomsonreuters.com

unread,
Sep 22, 2016, 12:35:39 PM9/22/16
to vivo...@googlegroups.com
Hi Sarbajit,

I¹ve seen this too. The workaround is the create a file at
"webapp/src/main/webapp/WEB-INF/resources/build.properties² with the
contents:

vitro.home = /path/to/your/vitro/home


I would be curious to know what needs to happen to resolve this and not
have to use the workaround.

Ted
--
You received this message because you are subscribed to the Google Groups
"VIVO Tech" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to
vivo-tech+...@googlegroups.com.
To post to this group, send email to
vivo...@googlegroups.com <mailto:vivo...@googlegroups.com>.
Visit this group at
https://groups.google.com/group/vivo-tech
<https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_gro
up_vivo-2Dtech&d=CwMFaQ&c=4ZIZThykDLcoWk-GVjSLm9hvvvzvGv0FLoWSRuCSs5Q&r=MEu
0ehq3J4PDsGr9qhVjpDMYN3dy4zRLRt4WtaDCfZo&m=iBHg1WPgIDl3k8usUzNsmEUn8S36pzMc
iecU1Kla1HI&s=12FesX5rgxvUaIiXQNgXLO5eGo0RIV9tlRosGI7agIY&e=>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/vivo-tech/84a3e1c7-ba1e-4831-bd0f-42cc365
836f4%40googlegroups.com
<https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_m
sgid_vivo-2Dtech_84a3e1c7-2Dba1e-2D4831-2Dbd0f-2D42cc365836f4-2540googlegro
ups.com-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dfooter&d=CwMFaQ&c=4ZIZThykD
LcoWk-GVjSLm9hvvvzvGv0FLoWSRuCSs5Q&r=MEu0ehq3J4PDsGr9qhVjpDMYN3dy4zRLRt4Wta
DCfZo&m=iBHg1WPgIDl3k8usUzNsmEUn8S36pzMciecU1Kla1HI&s=cxOR753o7CeyHtxdjwVJW
sHO5LGIVuKW6DLGK_As09U&e=>.
For more options, visit
https://groups.google.com/d/optout
<https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_o
ptout&d=CwMFaQ&c=4ZIZThykDLcoWk-GVjSLm9hvvvzvGv0FLoWSRuCSs5Q&r=MEu0ehq3J4PD
sGr9qhVjpDMYN3dy4zRLRt4WtaDCfZo&m=iBHg1WPgIDl3k8usUzNsmEUn8S36pzMciecU1Kla1
HI&s=IS8ZkdRP3Bb3wMqQnzsavQiPF5Tb7gMnDNbFnQRVZXU&e=>.

Benjamin Gross

unread,
Sep 22, 2016, 12:46:00 PM9/22/16
to vivo...@googlegroups.com
Are you adding context elements to Tomcat?
https://groups.google.com/d/topic/vivo-tech/qxg1X_IcQx8/discussion

I got around this by adding the vitro/home path as an environmental variable within the Tomcat config context elements like so:
<Environment
type="java.lang.String"
name="vitro/home"
value="/usr/local/vivo/home" override="true”/>

Really, I should probably just remove the context elements from server.xml… 

Benjamin


To post to this group, send email to vivo...@googlegroups.com.
Visit this group at https://groups.google.com/group/vivo-tech.
To view this discussion on the web visit https://groups.google.com/d/msgid/vivo-tech/D4098013.49AE%25ted.lawless%40thomsonreuters.com.
For more options, visit https://groups.google.com/d/optout.

Sarbajit Dutta

unread,
Sep 22, 2016, 2:16:37 PM9/22/16
to VIVO Tech
Hi Ted,

Yes I also did the same in order to resolve it. But my question the error did not come up when I deployed it to my local machine. 

It came up now when I deployed it to our staging server. I am curious to know can this be resolved internally without creating a file in Tomcat webapps since that would mean whenever I freshly deploy the webapp I have to create the file.

Thanks,
Sarbajit

Sarbajit Dutta

unread,
Sep 22, 2016, 2:39:17 PM9/22/16
to VIVO Tech
Hi Benjamin,

I checked in webapp in installer project and it had context.xml and was deployed to tomcat with that. But still the error came up. I added  the stanza you mentioned to server.xml and removed build.properties from WEB-INF/resources and it worked.

Is there any way to make this work without adding the <Environment> stanza to server.xml?

Thanks,
Sarbajit

Graham Triggs

unread,
Sep 22, 2016, 3:46:34 PM9/22/16
to vivo...@googlegroups.com, Sarbajit Dutta
Hi,

There is something about the configuration of your staging Tomcat that is preventing it from reading the META-INF/context.xml

Maybe there was another, partially created context configuration in the server that was overriding it?

See the Tomcat documentation for the various places that it can read a context from - and check the staging server for the locations that it mentions:


Regards,
G

shuklay...@gmail.com

unread,
Sep 10, 2018, 7:38:04 AM9/10/18
to VIVO Tech
Hi,

I am getting the following error. 

FATAL: ApplicationSetup

    • Failed to initialize the Application.
    • edu.cornell.mannlib.vitro.webapp.application.ApplicationSetup
    • java.lang.IllegalStateException: Can't find a value for the Vitro home directory. Looked in JNDI environment at 'java:comp/env/vitro/home'. Looked for a system property named 'vitro.home'. Looked in 'WEB-INF/resources/build.properties' for 'vitro.home'.
      	at edu.cornell.mannlib.vitro.webapp.application.VitroHomeDirectory$HomeDirectoryFinder.confirmExactlyOneResult(VitroHomeDirectory.java:160)
      	at edu.cornell.mannlib.vitro.webapp.application.VitroHomeDirectory$HomeDirectoryFinder.(VitroHomeDirectory.java:82)
      	at edu.cornell.mannlib.vitro.webapp.application.VitroHomeDirectory.find(VitroHomeDirectory.java:27)
      	at edu.cornell.mannlib.vitro.webapp.application.ApplicationSetup.contextInitialized(ApplicationSetup.java:45)
      	at edu.cornell.mannlib.vitro.webapp.startup.StartupManager.initialize(StartupManager.java:175)
      	at edu.cornell.mannlib.vitro.webapp.startup.StartupManager.contextInitialized(StartupManager.java:65)
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5189)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
      	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1107)
      	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1841)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
    This is asking for vitro.home directory but VIVO 10.1 does not having vitro folder. So what path I should write in <Environment> tag

    Gross, Benjamin

    unread,
    Sep 10, 2018, 7:52:47 AM9/10/18
    to vivo...@googlegroups.com
    Hi,
    You should write the vivo home directory path in the <Environment> tag if you go that route. See the example here:
    <Environment
    type="java.lang.String"
    name="vitro/home"
    value="/usr/local/vivo/home" override="true”/>

    Replace /usr/local/vivo/home with the actual location of the VIVO home directory if it is different.

    Benjamin

    _____________________________
    Benjamin Gross
    Science and Academic Research | Clarivate Analytics

    YASHASVEE SHUKLA

    unread,
    Sep 10, 2018, 8:13:38 AM9/10/18
    to vivo...@googlegroups.com
    Thankyou for your reply.

    I have replaced the actual location of vivo home but same error occurs. 

    Reply all
    Reply to author
    Forward
    0 new messages