Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This is what I have my /tomcat/conf/context.xml

<Context>
    <Resource name="jdbc/black"
               driverClassName="oracle.jdbc.OracleDriver"
               auth="Container"
               type="javax.sql.DataSource"
               url=......................
               username="blah"
               password="whoaaa"/>

    <Resource name="jdbc/brown"
               .
               .
    <Resource name="jdbc/purple"

               .
               .
     <Context path="/appname" override="true" docBase="appname" reloadable="false" crossContext="true" allowLinking="true"/>
</Context>

I tried to add /tomcat/webapps/appname/META-INF/context.xml ( still doesnt work)

<Context>
<Context path="/appname" override="true" docBase="appname" reloadable="false" crossContext="true" allowLinking="true"/>
</Context>

But my app still cannot read the symbolically linked file but if replaced with the real file , works fine. My tomcat version is 6.0.14 on linux. Any ideas where the issue might be? All help is vert much appreciated.

share|improve this question
add comment

1 Answer

Make sure SELinux is permissive or disabled.

If so, then check the username running Tomcat versus the username which owns the symlink and destination.

share|improve this answer
    
SELinux is disabled and the permissions are good for file owner and process owner/username. Any other items to check please? –  vikingz Jun 5 '13 at 6:08
    
It should work, you are also allowing Linking so no problems there. Under your webapp, is the symlink pointing to the full path to the file you are trying to link? –  Schrute Jun 5 '13 at 16:25
    
yeah under our /webapp/appname/WEB-INF. my symlink is pointing to the real location of the file. I have changed it to several other locations , tmp etc and a location on the same filesystem , no joy. I even tried to add the <Context...docBae=....allowLinking...> to the server.xml , still nothing. But works fine if you move the actual fine under /WEB-INF –  vikingz Jun 5 '13 at 22:12
    
it was a bad xml file. fixed that and it worked fine.wrong context declaration( syntax was OK though) prohibited the entire line to be ignored hence the symlink wasn't being read(mainly the allowLinking=true) once fixed , it got picked up. –  vikingz Jun 7 '13 at 16:08
    
So the allow linking was not getting picked up makes sense. –  Schrute Jun 8 '13 at 23:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.