From: Conrad H. <co...@cg...> - 2014-01-09 22:35:57
|
On 1/9/2014 2:22 PM, Luca Clementi wrote: > On Thu, Jan 9, 2014 at 1:45 PM, Conrad Huang <co...@cg...> wrote: >> On 1/9/2014 11:35 AM, Luca Clementi wrote: >>> > [...] >> The debug code clears it up a bit. Here's the end of catalina.out (adding >> debugging code but leaving deploy as "deploy"): >> >>> INFO: Server startup in 2609 ms >>> 2014-01-09 13:28:08,074 INFO >>> edu.sdsc.nbcr.opal.util.OpalDeployService$Deployer.run(OpalDeployService.java:160) >>> - initDeployServlet: axis URL: >>> http://xxx.xxx.ucsf.edu:8080/opal2/servlet/AxisServlet >>> 2014-01-09 13:28:08,075 INFO >>> edu.sdsc.nbcr.opal.util.OpalDeployService$Deployer.run(OpalDeployService.java:161) >>> - initDeployServlet: deploy path: deploy >>> 2014-01-09 13:28:08,075 INFO >>> edu.sdsc.nbcr.opal.util.OpalDeployService$Deployer.run(OpalDeployService.java:162) >>> - initDeployServlet: deploy path: /var/www/deploy >>> >>> Exception in thread "OpalDeployer" java.lang.NullPointerException >>> at >>> edu.sdsc.nbcr.opal.util.OpalDeployService$Deployer.run(OpalDeployService.java:178) >> >> >> The full deploy path is relative to /var/www, which is the home directory of >> user "apache" which is the account we use for running this instance of >> tomcat. I guess tomcat6 does not change directory from where it was started >> to $CATALINA_HOME. Our startup script uses "su - apache -c ..." to start >> tomcat, so it starts in ~apache or /var/www. Specifying the full path in >> etc/opal.properties makes everything work. I have one service deployed! >> > > That does not make much sense to me :-( > It should not use the current working directory (that was my first test). > What script do you use to start up tomcat? > You should use the $CATALINA_HOME/bin/startup.sh which sets the proper > working directory: > clem@hermes:~/projects/opaltoolkit$ apache-tomcat-6.0.37/bin/startup.sh > Using CATALINA_BASE: /home/clem/projects/opaltoolkit/apache-tomcat-6.0.37 > Using CATALINA_HOME: /home/clem/projects/opaltoolkit/apache-tomcat-6.0.37 > Using CATALINA_TMPDIR: /home/clem/projects/opaltoolkit/apache-tomcat-6.0.37/temp > Using JRE_HOME: /usr > Using CLASSPATH: > /home/clem/projects/opaltoolkit/apache-tomcat-6.0.37/bin/bootstrap.jar > > No matter where I start it from.... > I tried to reproduce your problem but still no luck > cd /tmp > su - clem -c /home/clem/projects/opaltoolkit/apache-tomcat-6.0.37/bin/startup.sh > > > Luca > We're on Redhat Enterprise Linux 6. There is no startup.sh in /usr/share/tomcat6/bin. I copied the startup file from /etc/init.d/tomcat6. In that script it invokes /usr/sbin/tomcat6, which ultimately runs java with no intervening chdir: /usr/lib/jvm/java/bin/java -Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory -classpath :/usr/local/opal-tomcat6/bin/bootstrap.jar:/usr/local/opal-tomcat6/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar -Dcatalina.base=/usr/local/opal-tomcat6 -Dcatalina.home=/usr/local/opal-tomcat6 -Djava.endorsed.dirs= -Djava.io.tmpdir=/usr/local/opal-tomcat6/temp -Djava.util.logging.config.file=/usr/local/opal-tomcat6/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start Conrad |