Tomcat 6.0 fails to read symlink(symbolic link) file


 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications Tomcat 6.0 fails to read symlink(symbolic link) file
# 1  
Old 06-05-2013
Tomcat 6.0 fails to read symlink(symbolic link) file

Hello all experts, Im in a situation where Tomcat simply does not want to read this file through the symlink....
I checked permissions..OK
Also checked file & tomcat owner...all OK.

This is what I have my /tomcat/conf/Catalina/local/appname.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 does not read the symbolically linked file but if replaced with the real file , works fine.
My tomcat version is 6.0.14 on linux RHEL 5 & jdk1.6.0_16
Any ideas where the issue might be?
All help is very much appreciated.
# 2  
Old 06-05-2013
I don't know details about Tomcat, but it seems it does an lstat() then checks the attributes and aborts if not a "plain file".
Try a hard link instead - it is much harder to detect a hard-link!
# 3  
Old 06-05-2013
i tried to do a hardlink but fails because the target file is on a different filesystem.
Smilie
# 4  
Old 06-07-2013
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.
This User Gave Thanks to KingaKoopa For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Symbolic link

Hi, trying to understand more about symblic link, when I compiled a program called "match" in one folder ~/downloadsoftware/I want this program to be accessible like a system command by putting a symbolic link in /usr/bin/ Not by setting the $PATH method in .bashrc at this time. What I did is:... (4 Replies)
Discussion started by: yifangt
4 Replies

2. UNIX for Dummies Questions & Answers

[Solved] Symbolic link not allowed or link target not accessible

Hi everybody, I read about treads realted to this issue but they did not resovle issue given below. Please help me resolve issue given below I have html file under /srv/www/htdocs/actual_folder ls actual_folder/ test.html and following link works... (0 Replies)
Discussion started by: newbielgn
0 Replies

3. Programming

g++ fails to link to static library when compilation and link in single command

Hello All, I've encountered a strange behaviour from g++ that doesn't make sense to me. Maybe you can shed some light on it: I have a bunch of source files and want to compile them and link them with a static library liba.a located in /usr/local/lib64 into an executable Approach 1 works... (0 Replies)
Discussion started by: magelord
0 Replies

4. Shell Programming and Scripting

ln -s creates symlink in symlink, if [ -f ... ] says file that exists doesn't exist

Hi Forums, I got a little problem, I made a few modifications to the code of the launch script of a testing server(minecraft) and now updating is broken aswell as the automatic directory creation. These Lines somehow create an endless symlink that refers to itself and I don't know how to fix... (0 Replies)
Discussion started by: Xaymar
0 Replies

5. Shell Programming and Scripting

Symbolic link to an empty file shows size 2

Hi, I have created an empty file and a symbolic link to a file. But when I issue the following commands, I am getting the output 2. stat -c "%s" linkfile du -hb linkfile Why this is happening? (4 Replies)
Discussion started by: royalibrahim
4 Replies

6. Shell Programming and Scripting

symbolic link to an executable file

I have a script within my home folder and want to be able to execute it without using the sh command. I know that if it was in ~/bin and executable I could do it just by typing the file name, but would rather keep it in the current file structure I tried creating a soft link in ~/bin,... (5 Replies)
Discussion started by: Jaloopa
5 Replies

7. Solaris

symlink on link file

Hi all, I want to create a symlink on a link file, i mean, there is a file which is actually a symlink of some version. Now i want to create one more symlink on that link file. EX: there is a file: uat -> version prod -> version Now i want to create one more link on these 'uat' and... (1 Reply)
Discussion started by: raghu.iv85
1 Replies

8. UNIX for Dummies Questions & Answers

How to find .dat file in symbolic link

Hi, I am trying to find all files in a directory that have .dat and .int extensions and removing them. rm -f `find ${MY_DIR} -type f -name '*.dat' -o -name '*.int'` This works fine if $MY_DIR is a regular directory. However when $MY_DIR is a symbolic link then this command fails. How... (1 Reply)
Discussion started by: neeto
1 Replies

9. UNIX for Dummies Questions & Answers

need some info about symbolic link and hard link

hello folks how y'all doin well i have some questions about symbolic link and hard link hope some one answer me i open terminal and join as root and i wrote ln -s blah blah then i wrote ls i see red file called blah blah but didn't understand what is this can some one explain and... (2 Replies)
Discussion started by: detective linux
2 Replies

10. UNIX for Dummies Questions & Answers

get symbolic link file

hi all, I am trying to ftp and get some symbolic link file as it is instead of getting whatever it is pointing at. Is it do-able? Thx in advance. (11 Replies)
Discussion started by: andrec
11 Replies
Login or Register to Ask a Question