Thank You for your answers and your valid critique (aka rants)

> In your document, you failed to mention Tomcat version, JRE version, or OS
> version. I'm going to assume that from the following path
>
> /opt/narahari/paas/webapps
>
> that you're running on some sort of Linux / UNIX / MacOS (ie, not Windows).
>

Yes to the above sentence, I am on SLES 11.2

>
> I'm going to further assume that you're running a version of Tomcat
> downloaded from tomcat.apache.org (probably a bad assumption), and that
> you're running some variant of Tomcat 7 (probably a less bad assumption).
>

Yes apache-tomcat-7.0.37 from tomcat.apache.org for the above sentence.

>
> For those people who didn't read the linked document:
>
> Here's what you tried:
>
> <Context docBase="/opt/adp/paas/**webapps/ptl"
>          antiResourceLocking="false" />
>
> <Context docBase="/opt/adp/paas/**webapps/ptl#cts"
>          antiResourceLocking="false" />
>
> And your complaint is:
>
> sh$>/opt/narahari/paas/adp-**tomcat/work/Catalina/**localhost/ptl_cts
>     /WEB-INF> ll
> total 8
> drwxr-x--- 4 virtual wheel 4096 2013-06-27 14:01 classes
> drwxr-x--- 2 virtual wheel 4096 2013-06-27 14:01 lib
>
> None of the other stuff is getting unpacked.
>
> 1. Why are you looking in the WORK folder?
>

For the above question, I really dont know why but colleague said that wars
are unarchived there.  So I presume from your answer it is of no value to
look there.

2. Why are you using such a convoluted way of deploying your apps?
>

Not really convoluted, we want to put our wars outside of tomcat's inbuilt
webapps dir (another team owns and installs tomcat and not as root)


> 3. Are you running your Tomcat as root? (don't do this)
>

For the above question , no it is not run as root.


> From the fine Tomcat documentation
>
> http://tomcat.apache.org/**tomcat-7.0-doc/config/host.**html<http://tomcat.apache.org/tomcat-7.0-doc/config/host.html>
> http://tomcat.apache.org/**tomcat-7.0-doc/config/context.**html<http://tomcat.apache.org/tomcat-7.0-doc/config/context.html>
>
> there are two things to note.
>
> 1. docBase is only valid if it points to a location outside of the
>    Host's appBase
>

For the above, are you saying that docBase should point to folder other
than <Host> element's app base location (in my case it is appBase="webapps"
) and my docBase=/opt/narahari/paas/webapps which is outside of
CATALINA_BASE and CATALINA_HOME folders.

>
> Failure to do so will result in partial deployments, double deployments,
> and all sorts of unpleasantness. I haven't actually tried breaking the
> rules, so I don't know exactly what happens.
>
> 2. WAR files outside of appBase are not exploded
>
> This was changed in Tomcat 7 (see the following -
> http://tomcat.apache.org/**migration-7.html#Deployment<http://tomcat.apache.org/migration-7.html#Deployment>
> )
>
> In short, the docBase must point to either the WAR file or an exploded
> directory.
>
> Again, if a docBase is used, it must point to a location outside of the
> Host's appBase. If it points to a directory, the web application must be
> exploded. Otherwise, it must point to a WAR file, and the application will
> be run from that WAR file.
>
> For the above point, I put the artifact as a WAR file in the
/opt/narahari/paas/webapps folder but when tomcat starts and tries to to
run from the ptl#cts.war, I see the following error.  Our app is trying to
read WEB-INF/faces-config.xml (JSF app) but error occurs as below.

16:04:22,878 INFO  [ConfigServlet] com.alp.rev.config.ConfigServlet.init():
Entering.
16:04:22,878 INFO  [ConfigServlet] com.alp.rev.config.ConfigServlet.init():
FILEINPUTSTREAM VERSION 1.0
16:04:22,878 INFO  [ConfigServlet]
com.alp.rev.config.ConfigServlet.init(): configFiles
= [/WEB-INF/faces-config.xml]
16:04:22,878 INFO  [ConfigServlet] com.alp.rev.config.ConfigServlet.init():
Full path to Faces configuration file [null]
16:04:22,878 ERROR [ConfigServlet] com.alp.rev.config.ConfigServlet.init():
Error trying to read file [null]. Exception =
[java.lang.NullPointerException]
java.lang.NullPointerException
        at java.io.FileInputStream.<init>(FileInputStream.java:116)
        at java.io.FileInputStream.<init>(FileInputStream.java:79)
        at com.adp.revit.config.ConfigServlet.init(ConfigServlet.java:59)
        at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)

Thank you for your help and suggestions on incomplet information when I
posted.

-Narahari

PS: On the other hand, if I manually expand ptl#cts.war manually and then
point to expanded folder in the docBase attribute, I dont see exceptions.
 Just a point for  your reference

Reply via email to