Hi Ben,

this is exactly the question. As these directories are created and used
by other software changing the # sign to something else involves
modifications to these programs and therefore hours/days of work too.
I've decided to put in a few hours to evaluate the situation before
making a conclusion.

Can anybody confirm the #-sign is a reserved char (maybe because the
classloader is a URL-Classloader and #'s in URLs are used for anchors)
for tomcat - but not for java itself anymore?

Even if it's a tomcat bug but would be marked as "will not fix" for
whatever reasons i'm fine. Just want to have all available informations/
statements before i open bug report.

Has anybody been able to start a tomcat server from such a directory?

kind regards,
   Markus

ben short wrote:
> Why not just change it to /export/home/markus/tomcat_1 or something
> and be done with it. Is trying to make it work with a # really worth
> the time an effort? Think in terms of hours spent * hourly rate or
> hour spent that you could be doing something else.
> 
> Just my opinion.
> 
> On 8/8/07, Markus Schiegl <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> as far as i see the shell has no problems passing the # character.
>> I've added "ps auxwww |grep java" after the java call in catalina.sh,
>> just to verify the java-program itself is called with the correct
>> values, see below:
>>
>> $ ~/tomcat#1/apache-tomcat-6.0.13/bin$ ./startup.sh
>> Using CATALINA_BASE:  /export/home/markus/tomcat#1/apache-tomcat-6.0.13
>> Using CATALINA_HOME:   /export/home/markus/tomcat#1/apache-tomcat-6.0.13
>> Using CATALINA_TMPDIR:
>> /export/home/markus/tomcat#1/apache-tomcat-6.0.13/temp
>> Using JRE_HOME:       /usr/java
>> markus    2877  0.6  1.842428 8964 pts/1    R 23:20:06  0:00
>> /usr/java/bin/java
>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>> -Djava.util.logging.config.file=/export/home/markus/tomcat#1/apache-tomcat-6.0.13/conf/logging.properties
>> -Djava.endorsed.dirs=/export/home/markus/tomcat#1/apache-tomcat-6.0.13/endorsed
>> -classpath
>> :/export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin/bootstrap.jar:/export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin/commons-logging-api.jar
>> -Dcatalina.base=/export/home/markus/tomcat#1/apache-tomcat-6.0.13
>> -Dcatalina.home=/export/home/markus/tomcat#1/apache-tomcat-6.0.13
>> -Djava.io.tmpdir=/export/home/markus/tomcat#1/apache-tomcat-6.0.13/temp
>> org.apache.catalina.startup.Bootstrap start
>> $ ~/tomcat#1/apache-tomcat-6.0.13/bin$ pwd
>> /export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin
>> $ ~/tomcat#1/apache-tomcat-6.0.13/bin$
>>
>> thanks!
>>
>> kind regards,
>>    Markus
>>
>> P.S shell commands with # between or after other characters are ok, e.g.
>> $ echo bla # 1
>> bla
>> $ echo bla#1
>> bla#1
>> $ echo bla#
>> bla#
>>
>> Fargusson.Alan wrote:
>>> The # character starts a comment in the shell.  Try quoting the pathname, 
>>> or put a \ in front of the #.
>>>
>>> I would bet that your mkdir and cd commands didn't do what you think they 
>>> did.
>>>
>>> -----Original Message-----
>>> From: Markus Schiegl [mailto:[EMAIL PROTECTED]
>>> Sent: Wednesday, August 08, 2007 1:54 PM
>>> To: users@tomcat.apache.org
>>> Subject: Tomcat and path with pound sign (#) -> ClassNotFoundException
>>>
>>>
>>> Hi there,
>>>
>>> starting Tomcat from a path containing a pound sign (#) somewhere
>>> results in a ClassNotFoundException.
>>>
>>> I've checked this with
>>> - Solaris Sparc/X86 + Mac OS X
>>> - Java 5 + 6
>>> - Tomcat 5.5.23 + 6.0.13
>>>
>>> example:
>>> - mkdir /export/home/markus/tomcat#1
>>> - extract tomcat within this directory
>>> - export JAVA_HOME=/usr/java (JDK 6)
>>> - /export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin/startup.sh
>>>   or
>>>   cd /export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin ; ./startup.sh
>>>
>>> output from catalina.sh with the java call (added set -x to catalina.sh
>>> - i.e. no problem of the calling script omitting something)
>>>
>>> /usr/java/bin/java
>>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>>> -Djava.util.logging.config.file=/export/home/markus/tomcat#1/apache-tomcat-6.0.13/conf/logging.properties
>>> -Djava.endorsed.dirs=/export/home/markus/tomcat#1/apache-tomcat-6.0.13/endorsed
>>> -classpath
>>> :/export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin/bootstrap.jar:/export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin/commons-logging-api.jar
>>> -Dcatalina.base=/export/home/markus/tomcat#1/apache-tomcat-6.0.13
>>> -Dcatalina.home=/export/home/markus/tomcat#1/apache-tomcat-6.0.13
>>> -Djava.io.tmpdir=/export/home/markus/tomcat#1/apache-tomcat-6.0.13/temp
>>> org.apache.catalina.startup.Bootstrap start
>>>
>>> $cat catalina.out
>>> java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
>>>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>>>         at java.security.AccessController.doPrivileged(Native Method)
>>>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>>         at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
>>>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)
>>>
>>>
>>> truss output: path was truncated after the # sign:
>>>
>>> ...
>>> 2717/2:         read(5, "CAFEBABE\0\0\0 1\00701\0".., 142)      = 142
>>> 2717/2:
>>> stat64("/export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin/org/apache/catalina/security/SecurityClassLoad.class",
>>> 0xD230ABF0) Err#2 ENOENT
>>> 2717/2:         llseek(9, 1422, SEEK_SET)                       = 1422
>>> 2717/2:         read(9, " P K0304\n\0\0\0\b\0F91C".., 30)       = 30
>>> 2717/2:         llseek(9, 1504, SEEK_SET)                       = 1504
>>> 2717/2:         read(9, "95 W k o14 U18 ~ f [DAC3".., 1634)     = 1634
>>> 2717/2:         brk(0x08172F08)                                 = 0
>>> 2717/2:         brk(0x08176F08)                                 = 0
>>> 2717/9:         pollsys(0x00000000, 0, 0xCFCA9CD8, 0x00000000)  = 0
>>> 2717/2:
>>> stat64("/export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin/org/apache/catalina/startup/Catalina.class",
>>> 0xD230B3D0) Err#2 ENOENT
>>> 2717/2:         stat64("/export/home/markus/tomcat", 0xD230AA60) Err#2
>>> ENOENT
>>> 2717/2:         stat64("/export/home/markus/tomcat", 0xD230AA60) Err#2
>>> ENOENT
>>> 2717/2:         stat64("/export/home/markus/tomcat", 0xD230AA60) Err#2
>>> ENOENT
>>> 2717/2:         stat64("/export/home/markus/tomcat", 0xD230AA60) Err#2
>>> ENOENT
>>> 2717/3:         lwp_cond_wait(0x0806F7A0, 0x0806F788, 0xD208DB48, 0)
>>> (sleeping...)
>>> 2717/3:         lwp_cond_wait(0x0806F7A0, 0x0806F788, 0xD208DB48, 0)
>>> Err#62 ETIME
>>> 2717/9:         pollsys(0x00000000, 0, 0xCFCA9CD8, 0x00000000)  = 0
>>> 2717/2:         stat64("/export/home/markus/tomcat", 0xD230AA60) Err#2
>>> ENOENT
>>> 2717/2:         stat64("/export/home/markus/tomcat", 0xD230AA60) Err#2
>>> ENOENT
>>> 2717/2:         stat64("/export/home/markus/tomcat", 0xD230AA60) Err#2
>>> ENOENT
>>> ...
>>>
>>> Although there is a rather old but maybe similar bug at:
>>> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4231042
>>> i supose somewhere the road this has been fixed, as i have no problems
>>> with JAVA 5/6 and other java programs otherwise my tests where flawed.
>>>
>>> Installing the jdk in such a directory (e.g. /opt/java#6) works with
>>> tomcat, too.
>>>
>>> Can anybody confirm that "#" is still a special character (for tomcat)?
>>> Unfortunately i'm somewhat forced to place tomcat installations/
>>> instances into such (with #) directories.
>>>
>>> Any fix possible?
>>>
>>> thanks in advance!
>>>
>>> kind regards,
>>>    Markus
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to