context.xml, hotdeploy

2008-06-13 Thread Fu-Tung Cheng
Hi Mark,

Yeah I don't think the cleanup for 42747 will help with this issue.  The other 
thing that I forgot to mention is that the behavior is inconsistent between 
exploded deployment and war deployment.  In war deployment the file will be 
copied to the conf/Catalina location.  In exploded deployment the file will 
remain where it is and be used from where it is.  

In war deployment I still find it useful to hotdeploy files to the exploded 
directory and with the current implementation, hotdeploying the context.xml 
file will not work in war deployment mode.  It will work in exploded deployment 
mode, if I manually have the war exploded instead of allowing tc to explode it 
for me.

Would you not consider the inconsistent behavior to be a bug?

Thanks for the response,

Fu-Tung   


In terms of my usage of context.xml I am not doing anything special in fact 
pretty much to the letter of the example in the sun docs for form based 
authentication.  The only thing that is different is that my authentication 
source happens to be war based and running in the tc web container.  There 
isn't anything strictly wrong with that.  There are other approaches I could 
use, a different authentication source, have the authentication source run in a 
separately launched and configured tc container, etc.  In any case this is 
tangential to the bug report.

https://issues.apache.org/bugzilla/show_bug.cgi?id=45202

--- Comment #1 from Mark Thomas <[EMAIL PROTECTED]>  2008-06-13 11:59:06 PST ---
Copying to conf is an intentional design decision. There are a few things that
need cleaning up in this area (see bug 42747) but I don't think changes for
that bug are going to help you. If you want to discuss the reasons behind the
design decision, please use the dev list.


  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



hotdeploy of war files results in static variable being null

2008-07-23 Thread Fu-Tung Cheng
Hi,

I sometime hotdeploy my war file to tomcat 6.0.16.  I have noticed that a 
static variable in one of my classes then ends up being null.

The variable is initialized as follows:

private static Logger logger = Logger.getLogger(MyClass.class);

and then used below in a method:

public void mymethod(String mystring) {
  logger.info(mystring + " did something");
}   

This is a little annoying as I then need to restart the server for this class 
to work properly.  

Is this a known bug?  I could probably create a little sample war file to 
demonstrate the issue but I don't want to go through that if you guys already 
know about the issue.

Thanks,

Fu-Tung


  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hotdeploy of war files results in static variable being null

2008-07-23 Thread Fu-Tung Cheng
Hi Felix,

Thank you for the link.  Quite informative!!!

Fu-Tung

--- On Wed, 7/23/08, Felix Gnass <[EMAIL PROTECTED]> wrote:

> From: Felix Gnass <[EMAIL PROTECTED]>
> Subject: Re: hotdeploy of war files results in static variable being null
> To: "Tomcat Developers List" 
> Date: Wednesday, July 23, 2008, 4:26 PM
> Hi,
> 
> as far as I know Tomcat's WebappClassloader sets final
> static references 
> to null upon re-deployments to prevent memory leaks. The
> following page 
> describes what's happening: 
> http://wiki.apache.org/jakarta-commons/Logging/StaticLog
> 
> One possible solution would be not to use static loggers.
> 
> Best regards,
> -Felix
> 
> 
> Fu-Tung Cheng wrote:
> > Hi,
> >
> > I sometime hotdeploy my war file to tomcat 6.0.16.  I
> have noticed that a static variable in one of my classes
> then ends up being null.
> >
> > The variable is initialized as follows:
> >
> > private static Logger logger =
> Logger.getLogger(MyClass.class);
> >
> > and then used below in a method:
> >
> > public void mymethod(String mystring) {
> >   logger.info(mystring + " did something");
> > }   
> >
> > This is a little annoying as I then need to restart
> the server for this class to work properly.  
> >
> > Is this a known bug?  I could probably create a little
> sample war file to demonstrate the issue but I don't
> want to go through that if you guys already know about the
> issue.
> >
> > Thanks,
> >
> > Fu-Tung
> >
> >
> >   
> >
> >
> >
> -
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ant download - failed

2008-08-05 Thread Fu-Tung Cheng
Hi,

I am just trying to build tomcat for the first time.  I have jdk 1.6.0.03-b05 
and ant 1.7.0 and I am using the source download 6.0.18.  This is on windows xp.

I am following the steps from :  

http://tomcat.apache.org/tomcat-6.0-doc/building.html

Following is the error extract.

Thank you,

Fu-Tung



build-tomcat-dbcp:
 [copy] Copying 67 files to c:\usr\share\java\tomcat6-deps\dbcp
[mkdir] Created dir: c:\usr\share\java\tomcat6-deps\dbcp\src\java\org\apache
\tomcat\dbcp
 [move] Moving 63 files to c:\usr\share\java\tomcat6-deps\dbcp\src\java\org\
apache\tomcat\dbcp
[mkdir] Created dir: c:\usr\share\java\tomcat6-deps\dbcp\classes
[javac] Compiling 63 source files to c:\usr\share\java\tomcat6-deps\dbcp\cla
sses
[javac] c:\usr\share\java\tomcat6-deps\dbcp\src\java\org\apache\tomcat\dbcp\
dbcp\BasicDataSource.java:44: org.apache.tomcat.dbcp.dbcp.BasicDataSource is not
 abstract and does not override abstract method isWrapperFor(java.lang.Class)
 in java.sql.Wrapper
[javac] public class BasicDataSource implements DataSource {
[javac]^
[javac] c:\usr\share\java\tomcat6-deps\dbcp\src\java\org\apache\tomcat\dbcp\
dbcp\DelegatingStatement.java:46: org.apache.tomcat.dbcp.dbcp.DelegatingStatemen
t is not abstract and does not override abstract method isPoolable() in java.sql
..Statement
[javac] public class DelegatingStatement extends AbandonedTrace implements S
tatement {
[javac]^
[javac] c:\usr\share\java\tomcat6-deps\dbcp\src\java\org\apache\tomcat\dbcp\
dbcp\DelegatingStatement.java:131: isClosed() in org.apache.tomcat.dbcp.dbcp.Del
egatingStatement cannot implement isClosed() in java.sql.Statement; attempting t
o assign weaker access privileges; was public
[javac] protected boolean isClosed() {
[javac]   ^
[javac] c:\usr\share\java\tomcat6-deps\dbcp\src\java\org\apache\tomcat\dbcp\
dbcp\DelegatingPreparedStatement.java:50: org.apache.tomcat.dbcp.dbcp.Delegating
PreparedStatement is not abstract and does not override abstract method setNClob
(int,java.io.Reader) in java.sql.PreparedStatement
[javac] public class DelegatingPreparedStatement extends DelegatingStatement

[javac]^
[javac] c:\usr\share\java\tomcat6-deps\dbcp\src\java\org\apache\tomcat\dbcp\
dbcp\DelegatingCallableStatement.java:53: org.apache.tomcat.dbcp.dbcp.Delegating
CallableStatement is not abstract and does not override abstract method setNClob
(java.lang.String,java.io.Reader) in java.sql.CallableStatement
[javac] public class DelegatingCallableStatement extends DelegatingPreparedS
tatement
[javac]^
[javac] c:\usr\share\java\tomcat6-deps\dbcp\src\java\org\apache\tomcat\dbcp\
dbcp\DelegatingConnection.java:51: org.apache.tomcat.dbcp.dbcp.DelegatingConnect
ion is not abstract and does not override abstract method createStruct(java.lang
..String,java.lang.Object[]) in java.sql.Connection
[javac] public class DelegatingConnection extends AbandonedTrace
[javac]^
[javac] c:\usr\share\java\tomcat6-deps\dbcp\src\java\org\apache\tomcat\dbcp\
dbcp\DelegatingResultSet.java:55: org.apache.tomcat.dbcp.dbcp.DelegatingResultSe
t is not abstract and does not override abstract method updateNClob(java.lang.St
ring,java.io.Reader) in java.sql.ResultSet
[javac] public class DelegatingResultSet extends AbandonedTrace implements R
esultSet {
[javac]^
[javac] c:\usr\share\java\tomcat6-deps\dbcp\src\java\org\apache\tomcat\dbcp\
dbcp\PoolablePreparedStatement.java:41: org.apache.tomcat.dbcp.dbcp.PoolablePrep
aredStatement is not abstract and does not override abstract method setNClob(int
,java.io.Reader) in java.sql.PreparedStatement
[javac] public class PoolablePreparedStatement extends DelegatingPreparedSta
tement implements PreparedStatement {
[javac]^
[javac] c:\usr\share\java\tomcat6-deps\dbcp\src\java\org\apache\tomcat\dbcp\
dbcp\PoolingConnection.java:42: org.apache.tomcat.dbcp.dbcp.PoolingConnection is
 not abstract and does not override abstract method createStruct(java.lang.Strin
g,java.lang.Object[]) in java.sql.Connection
[javac] public class PoolingConnection extends DelegatingConnection implemen
ts Connection, KeyedPoolableObjectFactory {
[javac]^
[javac] c:\usr\share\java\tomcat6-deps\dbcp\src\java\org\apache\tomcat\dbcp\
dbcp\PoolingDataSource.java:45: org.apache.tomcat.dbcp.dbcp.PoolingDataSource is
 not abstract and does not override abstract method isWrapperFor(java.lang.Class
) in java.sql.Wrapper
[javac] public class PoolingDataSource implements DataSource {
[javac]^
[javac] c:\usr\share\java\tomcat6-deps\dbcp\src\java\org\apache\tomcat\dbcp\
dbcp\cpdsadapter\ConnectionImpl.java:41: org.apache.tomcat.dbcp.dbcp.cpdsadapter
..ConnectionImpl is not abstract and does not override abstract method 
createStru
ct(java.lang.String,java.lang.Object[]) in java.sql.Connection
[javac] class ConnectionImpl impleme

Re: ant download - failed

2008-08-05 Thread Fu-Tung Cheng
Hi Mark,

Thanks for the help using the 1.5 jdk worked.

Could the building instructions be updated or would jdk 1.6 work for build.xml 
just not extras.xml?

http://tomcat.apache.org/tomcat-6.0-doc/building.html

>>Download a Java Development Kit (JDK) release (version 1.5.x or later)

Fu-Tung


--- On Tue, 8/5/08, Mark Thomas <[EMAIL PROTECTED]> wrote:

> From: Mark Thomas <[EMAIL PROTECTED]>
> Subject: Re: ant download - failed
> To: "Tomcat Developers List" 
> Date: Tuesday, August 5, 2008, 8:26 AM
> Fu-Tung Cheng wrote:
> > Hi,
> > 
> > I am just trying to build tomcat for the first time. 
> I have jdk 1.6.0.03-b05 and ant 1.7.0 and I am using the
> source download 6.0.18.  This is on windows xp.
> 
> You can't build Tomcat on a 1.6 JDK due to a dbcp
> incompatibility (to be 
> fair to commons, Sun broke the API). If you use a 1.5 JDK
> you'll be fine.
> 
> Mark
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



overwrite bin/tomcat-juli.jar with extras/tomcat-juli.jar results in ClassNotFound

2008-08-05 Thread Fu-Tung Cheng
I am trying to follow the log4j setup for tomcat found here:

http://tomcat.apache.org/tomcat-6.0-doc/logging.html

I built the extras and replaced the jar files as directed but now I get an 
exception at startup:

The stack trace follows.  In general though the problem appears to be that the 
extras/tomcat-juli.jar does not contain ClassLoaderLogManager but the original 
bin/tomcat-juli.jar that I overwrote following the instructions did contain it.

Thank you,

Fu-Tung


Could not load Logmanager "org.apache.juli.ClassLoaderLogManager"
java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager
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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.util.logging.LogManager$1.run(LogManager.java:166)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.(LogManager.java:156)
at java.util.logging.Logger.getLogger(Logger.java:274)
at org.apache.juli.logging.impl.Jdk14Logger.getLogger(Jdk14Logger.java:1
81)
at org.apache.juli.logging.impl.Jdk14Logger.(Jdk14Logger.java:61)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.juli.logging.impl.LogFactoryImpl.createLogFromClass(LogFac
toryImpl.java:1116)
at org.apache.juli.logging.impl.LogFactoryImpl.discoverLogImplementation
(LogFactoryImpl.java:914)
at org.apache.juli.logging.impl.LogFactoryImpl.newInstance(LogFactoryImp
l.java:604)
at org.apache.juli.logging.impl.LogFactoryImpl.getInstance(LogFactoryImp
l.java:336)
at org.apache.juli.logging.impl.LogFactoryImpl.getInstance(LogFactoryImp
l.java:310)
at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:685)
at org.apache.catalina.startup.Bootstrap.(Bootstrap.java:54)
Can't load log handler "1catalina.org.apache.juli.FileHandler"
java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler
java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler


  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: overwrite bin/tomcat-juli.jar with extras/tomcat-juli.jar results in ClassNotFound

2008-08-05 Thread Fu-Tung Cheng
I figured out the issue.

I needed to run the normal ant before ant -f extras.xml.

Thanks,

Fu-Tung


--- On Tue, 8/5/08, Fu-Tung Cheng <[EMAIL PROTECTED]> wrote:

> From: Fu-Tung Cheng <[EMAIL PROTECTED]>
> Subject: overwrite bin/tomcat-juli.jar with extras/tomcat-juli.jar results in 
> ClassNotFound
> To: dev@tomcat.apache.org
> Date: Tuesday, August 5, 2008, 4:48 PM
> I am trying to follow the log4j setup for tomcat found here:
> 
> http://tomcat.apache.org/tomcat-6.0-doc/logging.html
> 
> I built the extras and replaced the jar files as directed
> but now I get an exception at startup:
> 
> The stack trace follows.  In general though the problem
> appears to be that the extras/tomcat-juli.jar does not
> contain ClassLoaderLogManager but the original
> bin/tomcat-juli.jar that I overwrote following the
> instructions did contain it.
> 
> Thank you,
> 
> Fu-Tung
> 
> 
> Could not load Logmanager
> "org.apache.juli.ClassLoaderLogManager"
> java.lang.ClassNotFoundException:
> org.apache.juli.ClassLoaderLogManager
> 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
> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
> at
> java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at
> java.util.logging.LogManager$1.run(LogManager.java:166)
> at
> java.security.AccessController.doPrivileged(Native Method)
> at
> java.util.logging.LogManager.(LogManager.java:156)
> at
> java.util.logging.Logger.getLogger(Logger.java:274)
> at
> org.apache.juli.logging.impl.Jdk14Logger.getLogger(Jdk14Logger.java:1
> 81)
> at
> org.apache.juli.logging.impl.Jdk14Logger.(Jdk14Logger.java:61)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> 
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
> orAccessorImpl.java:39)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
> onstructorAccessorImpl.java:27)
> at
> java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at
> org.apache.juli.logging.impl.LogFactoryImpl.createLogFromClass(LogFac
> toryImpl.java:1116)
> at
> org.apache.juli.logging.impl.LogFactoryImpl.discoverLogImplementation
> (LogFactoryImpl.java:914)
> at
> org.apache.juli.logging.impl.LogFactoryImpl.newInstance(LogFactoryImp
> l.java:604)
> at
> org.apache.juli.logging.impl.LogFactoryImpl.getInstance(LogFactoryImp
> l.java:336)
> at
> org.apache.juli.logging.impl.LogFactoryImpl.getInstance(LogFactoryImp
> l.java:310)
> at
> org.apache.juli.logging.LogFactory.getLog(LogFactory.java:685)
> at
> org.apache.catalina.startup.Bootstrap.(Bootstrap.java:54)
> Can't load log handler
> "1catalina.org.apache.juli.FileHandler"
> java.lang.ClassNotFoundException:
> 1catalina.org.apache.juli.FileHandler
> java.lang.ClassNotFoundException:
> 1catalina.org.apache.juli.FileHandler
> 
> 
>   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Default tomcat logging configuration not log4j, why?

2008-08-07 Thread Fu-Tung Cheng
Hi,

Before I switch my production server to use the log4j logging methods as 
detailed below.  I was wondering why this isn't the default configuration.  Is 
there a disadvantage to using log4j as the default logger? 

http://tomcat.apache.org/tomcat-6.0-doc/logging.html

Thank you,

Fu-Tung


  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]