Re: Filter class not found problem

2007-04-04 Thread Hassan Schroeder

On 4/4/07, Frank W. Zammetti [EMAIL PROTECTED] wrote:


As per my post last night, I discovered that the problem starts in
6.0.10...


FWIW, I just installed 6.0.10 and dumped in a webapp of mine that
uses a Filter as a front controller, and it works fine.

I have both JAVA_HOME and JRE_HOME defined for convenience (so I
can switch as I test/upgrade versions); right now it's Java  1.6.0-b105
as

echo $JAVA_HOME

/usr/local/jdk1.6.0

echo $JRE_HOME

/usr/local/jdk1.6.0/jre

So I'd say it's not a problem intrinsic to /all/ Filters...

--
Hassan Schroeder  [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]



Re: Filter class not found problem

2007-04-04 Thread Frank W. Zammetti
On Wed, April 4, 2007 11:21 am, Hassan Schroeder wrote:
 FWIW, I just installed 6.0.10 and dumped in a webapp of mine that
 uses a Filter as a front controller, and it works fine.

 I have both JAVA_HOME and JRE_HOME defined for convenience (so I
 can switch as I test/upgrade versions); right now it's Java  1.6.0-b105
 as
 echo $JAVA_HOME
 /usr/local/jdk1.6.0
 echo $JRE_HOME
 /usr/local/jdk1.6.0/jre

 So I'd say it's not a problem intrinsic to /all/ Filters...

Fair to say... I noticed your not under Windows, which is potentially a
big difference... but in any case, if it was a problem with my filter
itself, I wouldn't expect it to be working in 6.0.9 with the same
environment otherwise... also note I didn't recompile it when moving
between 6.0.9 and 6.0.10, so nothing weird going on there.  I just don't
get it.

Ah well, I've burned enough cycles on it... I can happily continue my real
work under 6.0.9, no problem, but if anyone has any other ideas I'm
certainly interested in hearing them... like I said, I don't know if this
is a Tomcat bug or not, but I certainly can't explain it :)

Frank



 --
 Hassan Schroeder  [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]



Re: Filter class not found problem

2007-04-03 Thread Rashmi Rubdi

On 4/2/07, Frank W. Zammetti [EMAIL PROTECTED] wrote:

Hey folks... I'm having a real pain of a problem here... vital stats:

JRE 1.6.0-b105 (JDK 6)
Tomcat 6.0.10



Since you have installed the JRE and not the JDK, I suppose you must
set the JRE_HOME environment variable, and remove the JAVA_HOME
environment variable.

On my installation of Tomcat 6.0.10 there is no
CATALINA_HOME/common/lib , but there's only a CATALINA_HOME/lib
folder which contains servlet-api.jar by default.

So I recommend using the default folder structure that came with
Tomcat 6.0.10 fresh install.

It should be fine if you have servlet-api.jar which contains the
javax.servlet.Filter class under
k:\tomcat6010\lib\





For completeness, environment variables I have:

CATALINA_HOME=k:\tomcat6010
JAVA_HOME=c:\java15
Path=c:\java15\bin;k:\tomcat6010\bin;x:\classes\apache-ant-1.7.0\bin
...NO classpath defined...

I don't think there's any other relevant env vars.


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



Re: Filter class not found problem

2007-04-03 Thread Frank W. Zammetti
I actually do have the JDK installed, my bad for not stating that
clearly... I was just stating the JRE version that would be used by
Tomcat, since the JRE of course comes with the JDK, but I wasn't clear...
you do raise an intersting point though, I wonder if I have to specify
JRE_HOME anyway?  I can tell you that when I start Tomcat, it reports the
JRE directory as c:\java15, exactly as I expect, so I kind of doubt that's
it.

FYI, I am in fact using the directory structure Tomcat had by default,
which is CATALINA_HOME/lib, and servlet-api.jar is in there... I just
tried creating CATALINA_HOME/common/lib because all the documentation I
found online talks about that directory, and while I figured it was just
documentation not having been updated for the latest version, I figured it
was worth a try.

Bottom line: I have it set up as you say, except for the JRE_HOME env var,
which I tend to doubt will do it (will try when I get home tonight
anyway), but I'm still stuck with the same problem.

As another fact mixed in: I tried a simple test: I dropped to a command
prompt and just tried to compile a simple filter on its own... it failed
because none of the servlet API classes were in the classpath.  This is
good because it proves I don't have a servlet.jar floating around in the
system classpath (I was still hoping the FAQ entry about a stray
servlet-api.jar floating around might be right, but that would seem to
indicate pretty strongly it isn't).

Frank


-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Tue, April 3, 2007 3:11 am, Rashmi Rubdi wrote:
 On 4/2/07, Frank W. Zammetti [EMAIL PROTECTED] wrote:
 Hey folks... I'm having a real pain of a problem here... vital stats:

 JRE 1.6.0-b105 (JDK 6)
 Tomcat 6.0.10


 Since you have installed the JRE and not the JDK, I suppose you must
 set the JRE_HOME environment variable, and remove the JAVA_HOME
 environment variable.

 On my installation of Tomcat 6.0.10 there is no
 CATALINA_HOME/common/lib , but there's only a CATALINA_HOME/lib
 folder which contains servlet-api.jar by default.

 So I recommend using the default folder structure that came with
 Tomcat 6.0.10 fresh install.

 It should be fine if you have servlet-api.jar which contains the
 javax.servlet.Filter class under
 k:\tomcat6010\lib\




 For completeness, environment variables I have:

 CATALINA_HOME=k:\tomcat6010
 JAVA_HOME=c:\java15
 Path=c:\java15\bin;k:\tomcat6010\bin;x:\classes\apache-ant-1.7.0\bin
 ...NO classpath defined...

 I don't think there's any other relevant env vars.

 -
 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]



Re: Filter class not found problem (looks like a possible Tomcat bug)

2007-04-03 Thread Frank W. Zammetti
I've managed to narrow this problem down quite a bit, and long and short 
of it is that the problem is specific to 6.0.10.


I tried a number of versions in the 6.x branch including 6.0.0, 6.0.4, 
6.0.8 and 6.0.9, and in all of them my webapp starts up just fine, no 
complaints about the Filter class, things work as expected.


In 6.0.10 however, I get the complaint about the Filter class not found. 
 I even went and re-downloaded the 6.0.10 bundle (just the plain zip 
version, not the installer) and the problem was present immediately 
after unzipping and copying my webapp over.


Now, this of course may not be a bug... maybe there's simply something 
about 6.0.10 I don't know that I need to do, in fact I'm hoping and even 
expecting that to be the case, but it's certainly a possible bug too... 
can anyone think of anything that would tell us one way or another?  Thanks!


Frank

Rashmi Rubdi wrote:

On 4/2/07, Frank W. Zammetti [EMAIL PROTECTED] wrote:

Hey folks... I'm having a real pain of a problem here... vital stats:

JRE 1.6.0-b105 (JDK 6)
Tomcat 6.0.10



Since you have installed the JRE and not the JDK, I suppose you must
set the JRE_HOME environment variable, and remove the JAVA_HOME
environment variable.

On my installation of Tomcat 6.0.10 there is no
CATALINA_HOME/common/lib , but there's only a CATALINA_HOME/lib
folder which contains servlet-api.jar by default.

So I recommend using the default folder structure that came with
Tomcat 6.0.10 fresh install.

It should be fine if you have servlet-api.jar which contains the
javax.servlet.Filter class under
k:\tomcat6010\lib\





For completeness, environment variables I have:

CATALINA_HOME=k:\tomcat6010
JAVA_HOME=c:\java15
Path=c:\java15\bin;k:\tomcat6010\bin;x:\classes\apache-ant-1.7.0\bin
...NO classpath defined...

I don't think there's any other relevant env vars.


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






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

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



Re: Filter class not found problem

2007-04-03 Thread Rashmi Rubdi

On 4/3/07, Frank W. Zammetti [EMAIL PROTECTED] wrote:

I actually do have the JDK installed, my bad for not stating that
clearly...


If you have the full JDK installed then please set the JAVA_HOME
environment variable to the JDK's root folder.

Reasoning: If you look in catalina.bat , it says

JAVA_HOME   Must point at your Java Development Kit installation.
  Required to run the with the debug argument.


I wonder if I have to specify
JRE_HOME anyway?


You can delete the JRE_HOME env variable, it defaults to JAVA_HOME if absent.


so I kind of doubt that's
it.


I don't know much about Filters, but you may want to set the
debug=true on the Context, just to see if you get more user-friendly
exception messages in the log files. Usually the log files contain
additional messages that give additional clues.


FYI, I am in fact using the directory structure Tomcat had by default,
which is CATALINA_HOME/lib, and servlet-api.jar is in there... I just
tried creating CATALINA_HOME/common/lib because all the documentation I
found online talks about that directory, and while I figured it was just
documentation not having been updated for the latest version, I figured it
was worth a try.


I think it will be a while before the documents catch-up. I have
Tomcat 6.0.1 , and everything is as it came with the default install -
I have a few projects , I don't use Filters but I don't get any other
exception message so far.



As another fact mixed in: I tried a simple test: I dropped to a command
prompt and just tried to compile a simple filter on its own... it failed
because none of the servlet API classes were in the classpath.  This is
good because it proves I don't have a servlet.jar floating around in the
system classpath (I was still hoping the FAQ entry about a stray
servlet-api.jar floating around might be right, but that would seem to
indicate pretty strongly it isn't).


It is better to carefully examine the system wide classpath and remove
unnecessary paths, if possible temporarily remove the classpath and
see if the Filter classes could be located.

An incomplete or incorrect system classpath does cause problems, it's
better to not set the system wide classpath.

-Rashmi

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



Re: Filter class not found problem

2007-04-02 Thread Pulkit Singhal

Hello Frank,

It seems to me that the error is not so much about the Filter you want to
load but the fact that it can't find the javax/servlet/Filter class which is
(I think) supposed to be part of the servlet-api.jar ... I know you said
that its bundled but try moving that jar around. Or at least crack open that
jar in winzip or list the files using the jar command to make sure it really
does have the javax.servlet.Filter class.

On 4/1/07, Frank W. Zammetti [EMAIL PROTECTED] wrote:


Hey folks... I'm having a real pain of a problem here... vital stats:

JRE 1.6.0-b105 (JDK 6)
Tomcat 6.0.10

I have a filter that compiles fine but will not initialize... error that
appears on Tomcat startup:

Apr 2, 2007 1:04:38 AM org.apache.catalina.core.StandardContextfilterStart
SEVERE: Exception starting filter MasterControlFilter
java.lang.NoClassDefFoundError: javax/servlet/Filter
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
   at java.security.SecureClassLoader.defineClass(
SecureClassLoader.java:124)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
...and so on...

The filter is contained within a JAR in my webapp's WEB-INF/lib
directory.  I've verified the filter is in the correct package, and that
web.xml specifies the correct class name.

I've spent about an hour Googling, and I've found numerous references to
seemingly similar problems, but no answers... I've verified that there
is no other servlet-api.jar floating around... I did notice a number of
places that said servlet-api.jar should be in CATALINA_HOME/common/lib,
but it's in CATALINA_HOME/lib in my installation (that's how it came out
of the distro)... I assume that's just some old documentation I'm
finding, but maybe not?

For completeness, environment variables I have:

CATALINA_HOME=k:\tomcat6010
JAVA_HOME=c:\java15
Path=c:\java15\bin;k:\tomcat6010\bin;x:\classes\apache-ant-1.7.0\bin
...NO classpath defined...

I don't think there's any other relevant env vars.  Can anyone point me
in the right direction?  I'm pretty well stuck at the moment until I get
this resolved.  Thanks!

Frank


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
(2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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




Re: Filter class not found problem

2007-04-02 Thread Frank W. Zammetti
Yes I agree, that's what I thought the problem was too, I was just 
working through eliminating any problems on my part (which is probably 
still the cause, but seemingly in a less than obvious way now)... I 
confirmed the Filter class is in servlet-api.jar, and it's in 
javax/servlet... I also moved that JAR to CATALINA_HOME/common/lib and 
noted that now Tomcat won't even start, so clearly it's using that JAR 
when it's in CATALINA_HOME/lib where it was originally.


I'm at a loss on this one... any other ideas out there?  This is my 
first time using the newer JDK and the newer Tomcat... is there anything 
more one has to do nowadays besides put an exploded webapp in 
CATALINA_HOME/webapps?  Could this be some funky classloader issue 
somehow?  Thanks!


Frank

Pulkit Singhal wrote:

Hello Frank,

It seems to me that the error is not so much about the Filter you want to
load but the fact that it can't find the javax/servlet/Filter class 
which is

(I think) supposed to be part of the servlet-api.jar ... I know you said
that its bundled but try moving that jar around. Or at least crack open 
that
jar in winzip or list the files using the jar command to make sure it 
really

does have the javax.servlet.Filter class.

On 4/1/07, Frank W. Zammetti [EMAIL PROTECTED] wrote:


Hey folks... I'm having a real pain of a problem here... vital stats:

JRE 1.6.0-b105 (JDK 6)
Tomcat 6.0.10

I have a filter that compiles fine but will not initialize... error that
appears on Tomcat startup:

Apr 2, 2007 1:04:38 AM 
org.apache.catalina.core.StandardContextfilterStart

SEVERE: Exception starting filter MasterControlFilter
java.lang.NoClassDefFoundError: javax/servlet/Filter
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
   at java.security.SecureClassLoader.defineClass(
SecureClassLoader.java:124)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
...and so on...

The filter is contained within a JAR in my webapp's WEB-INF/lib
directory.  I've verified the filter is in the correct package, and that
web.xml specifies the correct class name.

I've spent about an hour Googling, and I've found numerous references to
seemingly similar problems, but no answers... I've verified that there
is no other servlet-api.jar floating around... I did notice a number of
places that said servlet-api.jar should be in CATALINA_HOME/common/lib,
but it's in CATALINA_HOME/lib in my installation (that's how it came out
of the distro)... I assume that's just some old documentation I'm
finding, but maybe not?

For completeness, environment variables I have:

CATALINA_HOME=k:\tomcat6010
JAVA_HOME=c:\java15
Path=c:\java15\bin;k:\tomcat6010\bin;x:\classes\apache-ant-1.7.0\bin
...NO classpath defined...

I don't think there's any other relevant env vars.  Can anyone point me
in the right direction?  I'm pretty well stuck at the moment until I get
this resolved.  Thanks!

Frank


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
(2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

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