Re: Win2K, Apache 2.0.43 and Tomcat 4.1.18

2003-01-12 Thread jmong
you might consider checking your httpd.conf (it wasn't included), 
there should be something like the following:

on a typical solaris install using mod_jk. I haven't worked with 
mod_jk2 before (so there might be some differences .. but the idea 
should be the same)

#
LoadModule libexec/mod_jk (blah)
AddModule mod_jk (blah)

#
JKWorkersFile /path/to/workers.properties

#
JKLogLevel debug
JKMount /examples/*.jsp 
JKMount /examples/servlet/* 

John Turner, I believe has a tutorial regarding this or perhaps 
something close to what you need .. (please search the list .. I 
believe its along those lines..)

The bottom line is that for you to get apache to talk to tomcat you 
need two things (a) the connector .. which looks like you have it (b) 
the definition of what to do with a request once it gets to tomcat... 
so you'll have to convince apache to essentially say (very simplified)

a.) client requests /examples. apache receives request
b.) apache checks to see if its something it handles
c.) apache sees JKMount /examples/
d.) apache "forwards" the request to the mod_jk module and the mod_jk 
module takes the request
e.) tomcat receives the request and tries to map this request to its 
available contexts, if it can't find it ... you'll get a "500" No 
Context or something along those lines.


Hope that helps.

Jan-Michael

- Original Message -
From: "Tom Holmes Jr." <[EMAIL PROTECTED]>
Date: Sunday, January 12, 2003 9:25 pm
Subject: Win2K, Apache 2.0.43 and Tomcat 4.1.18

> I have spent the last three days looking at all the JK2 docs, and 
> all the
> sites, and even checked the archives of this list. I believe I 
> have done my
> due diligence on doing research before posting this message, 
> believe me it
> was a last resort.
> 
> 1) Apache 2.0.43 was installed and works great on port 80
> 2) Tomcat 4.1.18 was installed and it works great on port 8080 if 
> I run it
> as a standalone.
> 
> I do want to integrate these two products and use Apache 2.0.43 on 
> port 80.
> 
> So, the httpd.conf works great with loading the module mod_jk2-
> 2.0.43.dll,no problem there.
> The file  $(tomcat_home)\conf\server.xml  hasn't been changed at 
> all, maybe
> it needs to be.
> 
> I tried following the web-site instructions on:
> http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/doc/
> on setting up the jk2.properties
> 
> 
> my jk2.properties:  these are the only properties set, everything 
> else is
> commented out.
> This is supposed to be the configuration to make JNI work for AJP13.
> 
> # Set the desired handler list
> # handler.list=apr,request,channelJni
> handler.list=apr,request,channelJni
> 
> # If set to inprocess the mod_jk2 will Register natives itself
> # This will enable the starting of the Tomcat from mod_jk2
> apr.jniModeSo=inprocess
> 
> 
> For size reasons, I am going to include the workers2.properties 
> file which
> lives in the correct location of:
> ${apache_home}\conf\workers2.properties
> 
> So, where is what works  http://localhost:8080/examples  all 
> the JSP's
> work and all the Servlets work, but that is the local web-server 
> of tomcat.
> I want the same thing to work with http://localhost/examples as well.
> 
> So, what am I doing wrong ... because there is something not set 
> correctly,but I am tearing my hair out by not being able to get 
> this working.
> 
> I am also going to include my error log so you can see what is 
> going on with
> that.  This is the error log from Apache 2.0.43.
> 
> Please look at my files and see what you can do to help me with my 
> mistakes.TIA.
> 
> Tom
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Win2K, Apache 2.0.43 and Tomcat 4.1.18

2003-01-12 Thread Tom Holmes Jr.
I have spent the last three days looking at all the JK2 docs, and all the
sites, and even checked the archives of this list. I believe I have done my
due diligence on doing research before posting this message, believe me it
was a last resort.

1) Apache 2.0.43 was installed and works great on port 80
2) Tomcat 4.1.18 was installed and it works great on port 8080 if I run it
as a standalone.

I do want to integrate these two products and use Apache 2.0.43 on port 80.

So, the httpd.conf works great with loading the module mod_jk2-2.0.43.dll,
no problem there.
The file  $(tomcat_home)\conf\server.xml  hasn't been changed at all, maybe
it needs to be.

I tried following the web-site instructions on:
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/doc/
on setting up the jk2.properties


my jk2.properties:  these are the only properties set, everything else is
commented out.
This is supposed to be the configuration to make JNI work for AJP13.

# Set the desired handler list
# handler.list=apr,request,channelJni
handler.list=apr,request,channelJni

# If set to inprocess the mod_jk2 will Register natives itself
# This will enable the starting of the Tomcat from mod_jk2
apr.jniModeSo=inprocess


For size reasons, I am going to include the workers2.properties file which
lives in the correct location of:
${apache_home}\conf\workers2.properties

So, where is what works  http://localhost:8080/examples  all the JSP's
work and all the Servlets work, but that is the local web-server of tomcat.
I want the same thing to work with http://localhost/examples as well.

So, what am I doing wrong ... because there is something not set correctly,
but I am tearing my hair out by not being able to get this working.

I am also going to include my error log so you can see what is going on with
that.  This is the error log from Apache 2.0.43.

Please look at my files and see what you can do to help me with my mistakes.
TIA.

 Tom



workers2.properties
Description: Binary data


error.log
Description: Binary data
--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: ldap library for tomcat

2003-01-12 Thread Peng Tuck Kwok
Martin Smith wrote:

I don't think he needs an LDAP library: I think he needs to use 
JNDIRealm authentication . Haven't checked lately,
but I have the 
impression that's in the standard Tomcat distribution now.

Yes it is in the standard Tomcat distribution now. I think it has been 
included since version 4 came out. Can't say much about version 3 .




martin


Eriam Schaffter wrote:


Or maybe a free one .. have a look at com.novell.ldap on 
http://www.openldap.org ..

eriam

Rob A. Augustinus a écrit:

import javax.naming.ldap;

-Original Message-
From: Fathi Ben Nasr [mailto:[EMAIL PROTECTED]] Sent: Saturday, 
January 11, 2003 5:40
To: 'Tomcat Users List'
Subject: ldap library for tomcat



Hello,

   Can someone tell me where can I find a free (open source or a like)
ldap.jar for tomcat as I want to set up tomcat to authenticate users
aginst an openldap directory server.

TIA.
Fathi B.N.

(See attached file: smime.p7s)


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 


-
Ce courrier a ete considere comme non infecte par les virus connu de 
notre outil de detection. Soyez cependant prudent avec les pieces 
jointes. Merci.

 





--
To unsubscribe, e-mail:   

For additional commands, e-mail: 








--
To unsubscribe, e-mail:   

For additional commands, e-mail: 






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




mod_webapp causes 2 instances of the one webapp

2003-01-12 Thread Etienne Deleflie
Hello,

I am using mod_webapp to connect Apache 2.0.43 to Tomcat 4.0.1

Problem is that both Tomcat AND Apache each cause an instance of the 
same webapp. So the one webapp is instantiated twice (this breaks all 
sorts of socket stuff we have in our webapp)

there is a reference to this problem (in the tomcat-dev archives) here:
http://w6.metronet.com/~wjm/tomcat/2001/Oct/msg00792.html

... but I cant work out how to change my config to make sure that only 1 
 instance of the webapp is created.

can anyone help ?

below is my server.xml, and my httpd.conf


server.xml:

[snip]

  


 port="8008" minProcessors="5" maxProcessors="75"
 enableLookups="true"
 acceptCount="10" debug="0"/>


 name="Apache" debug="0" appBase="webapps">

  
  prefix="apache_log." suffix=".txt"
  timestamp="true"/>

  



  

[snip]

httpd.conf:

[snip]


	WebAppConnection conn warp xenakis:8008
	WebAppDeploy myWebapp conn /plug/
	WebAppInfo info


[snip]

-

any help is appreciated

etienne



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Q: Dynamic database connection pooling?

2003-01-12 Thread David Boyer
Instead of predefining connections in either server.xml or another file
(such as using DBCP or DBPool), is it possible to have connection pools
created on-the-fly?

For example in IIS 5.0 under Windows 2000, database connections are
automatically pooled. When an ASP requests a database connection, IIS sees
if there's a connection pool that matches the connection string of the
current request. If there is, it checks for an unused connection in the pool
and either reuses it or (if needed) creates a new one. If no pool exists for
that connection string, IIS creates a pool and a new connection in the pool.

Is there an existing implementation for Tomcat that'll do this, or is it a
matter of writing my own connection manager?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: ldap library for tomcat

2003-01-12 Thread Martin Smith
I don't think he needs an LDAP library: I think he needs to use 
JNDIRealm authentication . Haven't checked lately, but I have the 
impression that's in the standard Tomcat distribution now.

martin


Eriam Schaffter wrote:

Or maybe a free one .. have a look at com.novell.ldap on 
http://www.openldap.org ..

eriam

Rob A. Augustinus a écrit:

import javax.naming.ldap;

-Original Message-
From: Fathi Ben Nasr [mailto:[EMAIL PROTECTED]] Sent: Saturday, 
January 11, 2003 5:40
To: 'Tomcat Users List'
Subject: ldap library for tomcat



Hello,

   Can someone tell me where can I find a free (open source or a like)
ldap.jar for tomcat as I want to set up tomcat to authenticate users
aginst an openldap directory server.

TIA.
Fathi B.N.

(See attached file: smime.p7s)


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 


-
Ce courrier a ete considere comme non infecte par les virus connu de 
notre outil de detection. Soyez cependant prudent avec les pieces 
jointes. Merci.

 





--
To unsubscribe, e-mail:   

For additional commands, e-mail: 








--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: mod_jk error 404 with Apache 1.3.27, Tomcat 4.1.18

2003-01-12 Thread Randall Perry
I discovered that the URL I was using to access the pages was wrong.

Never mind. It's working fine. :)


> That's not it. I get the following error from 'apachectl configtest' :
>   Context should start with /
> 
>> Use:
>> JkMount *.jsp ajp13
>> JkMount /examples/* ajp13

-- 
Randall Perry
sysTame

Xserve Web Hosting/Co-location
Website Development/Promotion
Mac Consulting/Sales

http://www.systame.com/



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: mod_jk error 404 with Apache 1.3.27, Tomcat 4.1.18

2003-01-12 Thread Randall Perry
That's not it. I get the following error from 'apachectl configtest' :
Context should start with /

> Use:
> JkMount *.jsp ajp13
> JkMount /examples/* ajp13

-- 
Randall Perry
sysTame

Xserve Web Hosting/Co-location
Website Development/Promotion
Mac Consulting/Sales

http://www.systame.com/



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: session across different domains ?

2003-01-12 Thread Tim Funk
Add something to your webapp which logs when it is loaded. If you see 2 
log messages - then it is being loaded twice. One for each virtual host.

-Tim

Albrecht Berger wrote:
I am at a loss. My last guesses:
- Its a programming issue
- Your tomcat has virtual hosting set up that tomcat treats 
localhost/webapp and 192.x.x.x/webapp as different webapps


thanks,
I forgot this point.

I have defined a virtual host for localhost to directly map the webapp,
but no one for 192.x.x.x !
Is it possible to map more than one domain in a virtual host definition
to one webapp ?

Thx for your help so far, I think I would never have searched
my problem in the virtual hosts section.


Thx 
berger

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




How do I catch JSP compiler errrors in rd.include()?

2003-01-12 Thread Jason Novotny

Hi,

I'm doing the following in a Java class:

 RequestDispatcher rd = context.getRequestDispatcher("/some.jsp", req,
res);

and I want to display any compile-time or run-time excpetions. Is there
some kind of
JspException object in the request containing this information?

Thanks, Jason


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: session across different domains ?

2003-01-12 Thread Albrecht Berger
> I am at a loss. My last guesses:
> - Its a programming issue
> - Your tomcat has virtual hosting set up that tomcat treats 
> localhost/webapp and 192.x.x.x/webapp as different webapps

thanks,
I forgot this point.

I have defined a virtual host for localhost to directly map the webapp,
but no one for 192.x.x.x !
Is it possible to map more than one domain in a virtual host definition
to one webapp ?

Thx for your help so far, I think I would never have searched
my problem in the virtual hosts section.


Thx 
berger

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




4.1.18 installation problems

2003-01-12 Thread Nathan McMinn
Hi all,

After installing tomcat 4.1.18 on windows 2000, I get the following
exception trying to access my web application.  This app worked fine with
4.0.6.  I have also included my web.xml file for this application.  Thanks
in advance.

org.apache.jasper.JasperException: org/apache/xerces/framework/XMLParser
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
48)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:550)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)
at java.lang.Thread.run(Thread.java:536)
http://java.sun.com/dtd/web-app_2_3.dtd";>
js  text/javascript
  
Login.jsp  
  WWEX Security
Constraint  
Worldwide Express  
/*  
  user
  
CONFIDENTIAL

BASIC  Worldwide
Express



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Can't find JAVA_HOME

2003-01-12 Thread jmong
I concur with Paul's observation below... please check to see if the 
tomcat is running as a different user and if so either adjust the 
user's login shell (.profile (bourne) or .cshrc (c-shell)) and add the 
appropriate java binary

also do the following when tomcat attempts to run

/bin/ps -ef | grep java (assuming your on solaris)

check to see the /path/to/the/java binary that is being used and set 
your java_home to that... 

also you can add additional debugging statements to the startup 
scripts... for example edit /path/to/tomcat/bin/catalina.sh and add a 
var to echo out $JAVA_HOME to see what its trying to set it to.

Good luck

Jan-Michael

- Original Message -
From: Paul Yunusov <[EMAIL PROTECTED]>
Date: Sunday, January 12, 2003 7:37 am
Subject: Re: Can't find JAVA_HOME

> On Sunday 12 January 2003 03:34 am, David Durst wrote:
> > I just dumped the tomcat 4.1.18 from RPM onto a system.
> > It can't seem to find JAVA_HOME.
> >
> > I echo $JAVA_HOME
> > and it comes back perfect, any clues
> 
> Specific error messages and echo output, please? Also, you could 
> be running 
> Tomcat as one user and echo as another - environments are going to 
> be 
> different.
> 
> Paul
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>For additional commands, e-mail: 
> 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [ OT ] what source code control system?

2003-01-12 Thread Noel J. Bergman
> If it is this simple, you gotta wonder...why no "cvs rename" command...

Because, as Jeff Schnitzer points out, it doesn't work.  But some people use
CVS more as a backup utility for emergency restoration of old versions than
as a revision control system.  However, others do consider that at any given
moment, you should be able to rebuild any previous version for testing,
support, or what-have-you.

--- Noel


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Basic questions

2003-01-12 Thread jmong
Hi there,

Paul's suggestion in #1 is probably the best way to go.. Here's a quick 
way to do it on solaris.

# add the user to the OS
useradd myuser

# switch to C-shell
/bin/csh

# run the following script

#!/bin/sh

JAVA_HOME=/usr/java
TOMCAT_HOME=/usr/local/tomcat

su - myuser -c "${TOMCAT_HOME}/bin/startup.sh"

a typical crontab entry

0 0 * * * cd /path/to/script ; ./restart_tomcat.sh > /var/log/myout.dat

which says run at midnight every day.

A couple of things, make sure that the myuser has the proper CLASSPATH 
settings and that it can find webserver.jar and servlet.jar and all 
other necessary JAR files (in this case I normally would create 
a .profile or .cshrc file in the user's home dir) and make sure that it 
owns the directories that it needs to write to such as work for example

There are probably more elegant ways to do this but that should get you 
started.

For your second question, Paul's suggestion abou the Controller servlet 
sounds very interesting... though I haven't tried that myself..

The simplest way I could think of is that you almost have to write a 
redirect servlet/snippet that will redirect based on the server 
time ... I know in Apache there is conditional re-writing like this... 
though it escapes me at the moment. please check httpd.apache.org and 
search for Rewrite Rules.. I think it was in their examples section if 
memory serves me right.

Hope that helps.

Jan-Michael

- Original Message -
From: Paul Yunusov <[EMAIL PROTECTED]>
Date: Saturday, January 11, 2003 12:43 pm
Subject: Re: Basic questions

> On Saturday 11 January 2003 03:34 pm, Denise Mangano wrote:
> > Hey all :)
> >
> > Throughout my learning experience with Tomcat, I have gotten 
> curious about
> > the following things.  This is mostly just for informational 
> purposes.> Inquiring minds want to know ; )
> >
> > #1:  Is it possible to set Tomcat to restart (as user tomcat) on a
> > schedule?
> >
> >
> > #2:  Is there anyway to set something up that if a user attempts 
> to access
> > my app within a specific time frame they are redirected to a 
> different> page. For example, when my user accesses my webapp they 
> go to
> > www.myhost.com/mywebapp and they are brought to index.jsp page.  
> However,> if the same exact URL is accessed within a specific time 
> frame, they would
> > be brought to index2.jsp.
> >
> > Thanks!
> >
> > Denise
> 
> Hi,
> 
> #1: It's OS-specific, and you can do it in a few ways, from 
> writing a shell 
> script to developing a native application. If you use UNIX, try 
> man crond at 
> the prompt.
> 
> #2: Have a Controller servlet that will forward (RequestDispatcher 
> comes to 
> mind) to different JSPs based on any criteria including time. Ah, 
> the 
> advantages of Model 2...
> 
> Paul
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>For additional commands, e-mail: 
> 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: help - tomcat/dbcp deployment

2003-01-12 Thread Rasputin
* Paul Yunusov <[EMAIL PROTECTED]> [0127 19:27]:
> On Sunday 12 January 2003 02:50 pm, David Durst wrote:
> > > Well, to get DBCP working was not difficult at all. I just followed
> > > Tomcat how-to docs. And, as I learned from other people, it's being used
> > > on a production level.
 >
> > I have been trying to get this damn thing working w/ postgres for about
> > a week now.

> > I got it working on 1 machine (MY DESKTOP) from a completely fresh install
> > of 4.1.18 w/ J2SDK 1.4.

> > I attempted to duplicate the enviroment on the development server, and I
> > think I have achieved duplication, BUT it still doesn't work.

> > It seems not not be able to find the JDBC driver, it thinks the
> > driverClassName I am passing through is NULL.
 
> Try putting the driver's jar file in $JAVA_HOME/jre/lib/ext 

I put the j2ee jarfile for postgresql in $catalina_home/common/lib/,
that worked fine. Get the latest jar from jdbc.postgresql.org and try that.
If the OP still has trouble and wants to compare notes, post again - this was a
doddle with my setup. 

I'm using PgSQL 7.2.3 ( upgrading to 7.3.1 as I type this),
tomcat 4.1.18 and suns 1.3.1 jdk. Only snag I had was using md5 passwords to
authenticate tomcat itself, I fixed that by using the 7.3 postgresql jarfile.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JDBCRealm

2003-01-12 Thread Rasputin
* Rob Abernethy IV <[EMAIL PROTECTED]> [0130 19:30]:
> Alright, I finally have my answer.  Postgres prepends the username to the 
> password before creating the digest.  For example, if I wish to create a 
> postgres account with the username 'tomcat' and password 'tomcat', postgres 
> will prepend 'tomcat' to 'tomcat' to create 'tomcattomcat' and then make the 
> digest.  Unfortunately, I don't think there is any way to tell postgres 
> *not* to use a salt when creating the encrypted version of the password.

I don't see this with my setup, so I guess it's specific to pgsql system passwords.
Have you tried asking on the postgresql mailing lists?

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Class clash error with log4j?

2003-01-12 Thread Holger Wiechert
I've got a problem with log4j on Linux and maybe the reason is
Tomcat-related. I post it to this list too since it's hard to tell,
what causes this error.

The errors are:
log4j:WARN Failed to set property [maxFileSize] to value "200KB".
java.lang.IllegalArgumentException: object is not an instance of declaring
class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:196)
at
org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:155)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:120
)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:87)
at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.jav
a:645)
at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.jav
a:603)
at
org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigur
ator.java:500)
at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:
406)
at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:
432)
at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.
java:460)
at org.apache.log4j.LogManager.(LogManager.java:113)
at org.apache.log4j.Logger.getLogger(Logger.java:94)
at de.myclasses.strutsstuff.BaseAction.(BaseAction.java:26)
--- truncated ---
log4j:WARN Failed to set property [append] to value "true".
java.lang.IllegalArgumentException: object is not an instance of declaring
class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:196)
at
org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:155)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:120
)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:87)
at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.jav
a:645)
at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.jav
a:603)
at
org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigur
ator.java:500)
at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:
406)
at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:
432)
at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.
java:460)
at org.apache.log4j.LogManager.(LogManager.java:113)
at org.apache.log4j.Logger.getLogger(Logger.java:94)
at de.myclasses.strutsstuff.BaseAction.(BaseAction.java:26)
--- truncated ---
log4j:WARN Failed to set property [file] to value "/logs/my.log".
java.lang.IllegalArgumentException: object is not an instance of declaring
class
--- truncated ---
log4j:WARN Failed to set property [maxBackupIndex] to value "10".
java.lang.IllegalArgumentException: object is not an instance of declaring
class   --- truncated ---
--- truncated ---
log4j:WARN File option not set for appender [RFA].
log4j:WARN Are you using FileAppender instead of ConsoleAppender?

The environment is as follows:

- Debian Linux Woody
- Sun JDK 1.4.1_01-b01
- log4j 1.2.7
- Tomcat 4.1.12-3
- Web-app uses struts1.1b2 (which itself uses commons-logging)

Tomcat's lib folders contain those jars:

shared/lib:
lrwxrwxrwx1 root root   36 Dec  4 14:55
jasper-compiler.jar -> ../../common/lib/jasper-compiler.jar
lrwxrwxrwx1 root root   35 Dec  4 14:55
jasper-runtime.jar -> ../../common/lib/jasper-runtime.jar

common/lib:
lrwxrwxrwx1 root root   21 Dec  4 14:55 ant.jar ->
../../../java/ant.jar
lrwxrwxrwx1 root root   37 Dec  4 14:55
commons-collections.jar -> ../../../java/commons-collections.jar
lrwxrwxrwx1 root root   37 Dec  4 14:55
commons-logging-api.jar -> ../../../java/commons-logging-api.jar
-rw-r--r--1 root root   182290 Oct 23 15:19 jasper-compiler.jar
-rw-r--r--1 root root69249 Oct 23 15:19 jasper-runtime.jar
-rw-r--r--1 root root28644 Oct 23 15:19 naming-common.jar
-rw-r--r--1 root root 9584 Oct 23 15:19 naming-factory.jar
-rw-r--r--1 root ro

help - Tomcat/Linux deployment

2003-01-12 Thread Igor I. Tovstopyat-Nelip
I was doing a development of the servlet/JSP web app on Windows and now
I'm deploying it on Linux RedHat7.2 for production. The software used is
Tomcat - MySQL - DBCP connection pool.

On Windows my app is running fine but I have the following problem on
Linux. The app runs stable all day long but next morning I can't login to
my app, the exception says: 'Connection Failure'.

Also, immediately after I start Tomcat on Linux I see a lot (26) of java
processes running. As I understand, they are Tomcat internal threads
launched as OS processes, because Linux JVMs (I tried both SUN's and
IBM's) use "green", not native threads.

Now, as the time goes by, the number of these threads/processes grows, and
when I try next morning to login, the server cannot create extra processes
needed to fulfill the client's request, because on Linux/UNIX the number
of user processes is limited.

Can anybody tell me if I understand this right, and what might be a
workaround?

Thank you.

Igor TN



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JDBCRealm

2003-01-12 Thread Rob Abernethy IV
Alright, I finally have my answer.  Postgres prepends the username to the 
password before creating the digest.  For example, if I wish to create a 
postgres account with the username 'tomcat' and password 'tomcat', postgres 
will prepend 'tomcat' to 'tomcat' to create 'tomcattomcat' and then make the 
digest.  Unfortunately, I don't think there is any way to tell postgres 
*not* to use a salt when creating the encrypted version of the password.

--
Robert Abernethy IV
Dynamic Edge, Inc.
734.975.0460

> Ok, I got Java and Perl to come up with the same digest.  Postgres' 
> is different.  I think it has something to do with the 'salt'. 
>  Postgres uses the username as salt.  I don't know much about MD5 
> encryption, but it seems as though Java is using a different salt 
> and, therefore, coming up with a different digest.
> 
> --
> Robert Abernethy IV
> Dynamic Edge, Inc.
> 734.975.0460
> 
> > Clear-text password: tomcat
> >
> > java org.apache.catalina.RealmBase -a MD5 tomcat
> > 1b359d8753858b55befa0441067aaed3
> >
> > select passwd from pg_shadow where usename='tomcat'
> > md5efcc1c51a80be13b59cdb96d758a0184
> >
> > md5sum -t < tomcat
> > 042d39e062dd4bf342e088dc832526f9
> >
> > String password = "tomcat";
> > byte[] md_password = password.getBytes();
> > MessageDigest md = MessageDigest.getInstance("MD5");
> > byte[] md_hash = md.digest(md_password);
> > System.out.println(md_hash);
> > [B@15f5897
> >
> > So obviously the authentication is failing because the MD5'd
> > passwords don't match.  Tomcat is calculating the digest using the
> > RealmBase and the digest stored in the table was created by
> > Postgres.  Is there a reason why these are all different?
> >
> > --
> > Robert Abernethy IV
> > Dynamic Edge, Inc.
> > 734.975.0460
> >
> > > - Original Message -
> > >
> > > > The MD5'd password *is* in the pg_shadow.passwd column.  I don't see
> what
> > > > I'm doing wrong.
> > >
> > > Is Postgres (or anything other than Java) generating the MD5'd
> > > passwords for the pg_shadow table?  If so, have you manually
> > > generated the MD5's to see if they are the same?
> > >
> > > Even if they are you can run into problems with storage formats.  If
> > > Postgres is using a different char set than the Java JVM for 
manipulating
> > > the strings, you can have mismatches.
> > >
> > > Also, if you use CHAR instead of  VARCHAR you may have extra spaces
> > > stuck on the end of the returned string to pad it out.
> > >
> > > The MD5 is longer than the string it is generated from so you need
> > > to make sure you have plenty of room for it.
> > >
> > > For example if Java is using UTF-8 and Postgres is using Win1251,
> > >  the same character can be represented by different numbers.  You
> > > usually see this with special or non-english characters.  Your web
> > > app stores a string in the database, then you look at it with a
> > > database with a browsing tool and some characters are different or
> > > get returned as ???.
> > >
> > > This can play hell with MD5 calculations.
> > >
> > > > And, as far as confusing postgres users with tomcat users,
> > > > is there a problem with using the same user for both?  I kind of 
thought
> > > > that was the point.  When I create a user, they can use the same
> username
> > > > and password to access tomcat web apps that they use to connect to 
the
> > > > database.
> > >
> > > That only works if you wait to define connections inside your web
> > > app.  This severely limits the effectiveness of connection pools.
> > >
> > > That chews up huge amounts of resources in a web app used by lots of
> > > users because building and tearing down connections uses a lot of
> > > cycles and memory.
> > >
> > > Even if you pool in your web app each user will have their own pool
> > > and at least one real connection will have to be opened for each user.
> > >
> > > You can get around this on some databases if they let you set the
> > > role or the user on an open connection.  That is very non-standard
> > > and could cause problems if you switch databases.
> > >
> > > All users of a web app usually share the same database
> > > username/password in a connection pooled environment where you are
> > > using a dataSource.  It gets locked in at the time the dataSource is
> > > set up.  So all users of the web app have the same read, update,
> > > select privleges.  If you want to restrict that on a per user basis
> > > you have to enforce that in your web app, usually using Tomcat Roles.
> > >
> > > A Tomcat Role differs from a database Role, so you have to be
> > > careful there. You may or may not have access to the databases user
> > > Role table depending on the database.  The problem is that if your
> > > dataSource belongs to user "tomcat" and user "Joe" logs into the web
> > > app the database may not let tomcat look at Joe's database Roles for
> > > security reasons.
> > >
> > > >
> > > > Thanks for the pointers on security.  Both Tomcat and Postgres are on
> the

Re: help - tomcat/dbcp deployment

2003-01-12 Thread Paul Yunusov
On Sunday 12 January 2003 02:50 pm, David Durst wrote:
> > Well, to get DBCP working was not difficult at all. I just followed
> > Tomcat how-to docs. And, as I learned from other people, it's being used
> > on a production level.
> >
> > My Tomcat's version is 4.1.12.
> >
> > Thank you.
> > Igor TN
>
> I have been trying to get this damn thing working w/ postgres for about
> a week now.
>
> I got it working on 1 machine (MY DESKTOP) from a completely fresh install
> of 4.1.18 w/ J2SDK 1.4.
>
> I attempted to duplicate the enviroment on the development server, and I
> think I have achieved duplication, BUT it still doesn't work.
>
> It seems not not be able to find the JDBC driver, it thinks the
> driverClassName I am passing through is NULL.

Try putting the driver's jar file in $JAVA_HOME/jre/lib/ext 

Paul

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: help - tomcat/dbcp deployment

2003-01-12 Thread David Durst
> Well, to get DBCP working was not difficult at all. I just followed
> Tomcat how-to docs. And, as I learned from other people, it's being used
> on a production level.
>
> My Tomcat's version is 4.1.12.
>
> Thank you.
> Igor TN

I have been trying to get this damn thing working w/ postgres for about
a week now.

I got it working on 1 machine (MY DESKTOP) from a completely fresh install
of 4.1.18 w/ J2SDK 1.4.

I attempted to duplicate the enviroment on the development server, and I
think I have achieved duplication, BUT it still doesn't work.

It seems not not be able to find the JDBC driver, it thinks the
driverClassName I am passing through is NULL.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Debian packages

2003-01-12 Thread Reynir Hübner
Ok...Thanx for your comment...

-reynir


> -Original Message-
> From: Charles Baker [mailto:[EMAIL PROTECTED]] 
> Sent: 12. janúar 2003 15:05
> To: Tomcat Users List
> Subject: Re: Debian packages
> 
> 
> 
> --- Reynir_Hübner <[EMAIL PROTECTED]> wrote:
> > Has anyone created debian packages of tomcat 4.1.x ?
> > Please inform me of where to find these if there are
> > any available (I've only found some unstable
> > packages).
> > 
> > Thanx
> > [EMAIL PROTECTED]
> 
> That is one of the reasons I upgraded my machine to
> unstable. I've had few problems so far, and none
> related to tomcat and java. Of course the machine in
> question is not a mission critical server. YMMV.
> 
> =
> [EMAIL PROTECTED]
> http://www.charleshbaker.com/~chb/
> If you cannot in the long run tell everyone what you have 
> been doing, your doing was worthless. -- Edwim Schrodinger
> 
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now. 
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: mod_jk error 404 with Apache 1.3.27, Tomcat 4.1.18

2003-01-12 Thread mech
Use:

JkMount *.jsp ajp13
JkMount /examples/* ajp13

> -Original Message-
> From: Randall Perry [mailto:[EMAIL PROTECTED]] 
> Sent: Sonntag, 12. Januar 2003 19:52
> To: [EMAIL PROTECTED]
> Subject: mod_jk error 404 with Apache 1.3.27, Tomcat 4.1.18
> 
> 
> Successfully installed tomcat 4.1.18 and can access it on 
> port 8080. Jsp & servlets run ok.
> 
> Installed mod_jk.so v1.2.2, configured apache and get no 
> errors on startup.
> 
> But, though I can access the directory pointed to by JKMount, 
> and can load static .html, no .jsp or servlet examples will run.
> 
> My machine is a Mac Xserve running OS 10.2.3 server.
> 
> Relevant configs appear below.
> 
> Any help is appreciated.
> 
> 
> workers.properties
> 
> # Setup for Mac OS X 
> workers.tomcat_home=/usr/local/jakarta-tomcat-4.1.18
> workers.java_home=/System/Library/Frameworks/JavaVM.framework/Home
> worker.list=ajp13
> 
> #Definition for Ajp13 worker
> worker.ajp13.port=8009
> worker.ajp13.host=127.0.0.1
> worker.ajp13.type=ajp13
> 
> 
> httpd.conf
> 
> LoadModule jk_module/usr/libexec/httpd/mod_jk.so
> AddModule mod_jk.c
> 
> 
> DocumentRoot /usr/local/jakarta-tomcat-4.1.18
> JKMount /*.jsp ajp13
> JKMount /webapps/examples/servlet/* ajp13
> 
> 
> JkWorkersFile 
> /usr/local/jakarta-tomcat-4.1.18/conf/jk/workers.properties
> JkLogFile /usr/local/jakarta-tomcat-4.1.18/logs/mod_jk.log
> JkLogLevel debug
> 
> 
> mod_jk.log
> 
> [Sun Jan 12 13:36:49 2003]  [jk_ajp13_worker.c (108)]: Into 
> ajp13_worker_factory [Sun Jan 12 13:36:49 2003]  [jk_worker.c 
> (171)]: wc_create_worker, about to validate and init ajp13 
> [Sun Jan 12 13:36:49 2003]  [jk_ajp_common.c (1219)]: Into 
> jk_worker_t::validate [Sun Jan 12 13:36:49 2003]  
> [jk_ajp_common.c (1239)]: In jk_worker_t::validate for worker 
> ajp13 contact is 127.0.0.1:8009 [Sun Jan 12 13:36:49 2003]  
> [jk_ajp_common.c (1267)]: Into jk_worker_t::init [Sun Jan 12 
> 13:36:49 2003]  [jk_ajp_common.c (1287)]: In 
> jk_worker_t::init, setting socket timeout to 0 [Sun Jan 12 
> 13:36:49 2003]  [jk_worker.c (187)]: wc_create_worker, done 
> [Sun Jan 12 13:36:49 2003]  [jk_worker.c (238)]: 
> build_worker_map, removing old ajp13 worker 
> [Sun Jan 12 13:36:49 2003]  [jk_worker.c (250)]: 
> build_worker_map, done [Sun Jan 12 13:36:49 2003]  
> [jk_worker.c (111)]: wc_open, done 1 [Sun Jan 12 13:36:59 
> 2003]  [jk_uri_worker_map.c (460)]: Into 
> jk_uri_worker_map_t::map_uri_to_worker
> [Sun Jan 12 13:36:59 2003]  [jk_uri_worker_map.c (477)]: 
> Attempting to map URI '/webapps/examples/jsp' [Sun Jan 12 
> 13:36:59 2003]  [jk_uri_worker_map.c (599)]: 
> jk_uri_worker_map_t::map_uri_to_worker, done without a match 
> [Sun Jan 12 13:37:00 2003]  [jk_uri_worker_map.c (460)]: Into 
> jk_uri_worker_map_t::map_uri_to_worker
> [Sun Jan 12 13:37:00 2003]  [jk_uri_worker_map.c (477)]: 
> Attempting to map URI '/webapps/examples/jsp/' [Sun Jan 12 
> 13:37:00 2003]  [jk_uri_worker_map.c (599)]: 
> jk_uri_worker_map_t::map_uri_to_worker, done without a match 
> [Sun Jan 12 13:37:00 2003]  [jk_uri_worker_map.c (460)]: Into 
> jk_uri_worker_map_t::map_uri_to_worker
> [Sun Jan 12 13:37:00 2003]  [jk_uri_worker_map.c (477)]: 
> Attempting to map URI '/webapps/examples/jsp/index.html'
> [Sun Jan 12 13:37:00 2003]  [jk_uri_worker_map.c (599)]: 
> jk_uri_worker_map_t::map_uri_to_worker, done without a match 
> [Sun Jan 12 13:37:00 2003]  [jk_uri_worker_map.c (460)]: Into 
> jk_uri_worker_map_t::map_uri_to_worker
> [Sun Jan 12 13:37:00 2003]  [jk_uri_worker_map.c (477)]: 
> Attempting to map URI '/webapps/examples/jsp/index.html'
> [Sun Jan 12 13:37:00 2003]  [jk_uri_worker_map.c (599)]: 
> jk_uri_worker_map_t::map_uri_to_worker, done without a match 
> [Sun Jan 12 13:37:07 2003]  [jk_uri_worker_map.c (460)]: Into 
> jk_uri_worker_map_t::map_uri_to_worker
> [Sun Jan 12 13:37:07 2003]  [jk_uri_worker_map.c (477)]: 
> Attempting to map URI '/webapps/examples/jsp/num/numguess.jsp'
> [Sun Jan 12 13:37:07 2003]  [jk_uri_worker_map.c (558)]: 
> jk_uri_worker_map_t::map_uri_to_worker, Found a suffix match 
> ajp13 -> *.jsp [Sun Jan 12 13:37:07 2003]  [jk_worker.c 
> (132)]: Into wc_get_worker_for_name ajp13 [Sun Jan 12 
> 13:37:07 2003]  [jk_worker.c (136)]: wc_get_worker_for_name, 
> done  found a worker [Sun Jan 12 13:37:07 2003]  
> [jk_ajp_common.c (1404)]: Into jk_worker_t::get_endpoint [Sun 
> Jan 12 13:37:07 2003]  [jk_ajp_common.c (1116)]: Into 
> jk_endpoint_t::service [Sun Jan 12 13:37:07 2003]  
> [jk_ajp_common.c (295)]: Into ajp_marshal_into_msgb [Sun Jan 
> 12 13:37:07 2003]  [jk_ajp_common.c (432)]: 
> ajp_marshal_into_msgb - Done [Sun Jan 12 13:37:07 2003]  
> [jk_connect.c (158)]: Into jk_open_socket [Sun Jan 12 
> 13:37:07 2003]  [jk_connect.c (165)]: jk_open_socket, try to 
> connect socket = 6 [Sun Jan 12 13:37:07 2003]  [jk_connect.c 
> (174

Re: help - tomcat/dbcp deployment

2003-01-12 Thread Igor I. Tovstopyat-Nelip
Well, to get DBCP working was not difficult at all. I just followed Tomcat
how-to docs. And, as I learned from other people, it's being used on a
production level.

My Tomcat's version is 4.1.12.

Thank you.
Igor TN


> Hi,
>
> I developed a web-app consisting mostly of servlets and JSP, almost no
> static content. The application uses mysql and obtains connections from
> a dbcp connection pool.
>
> Now I'm deploying it for production on Linux (RedHat 7.2) in a tomcat
> standalone configuration. (Almost no static content, no cgi, no virtual
> hosts, no clustering, so I decided Apache httpd is not really needed.)
>
> It works pretty good for some time but ... The next morning the server
> is up and running but I can't obtain connection. When I'm trying to
> login into the app, the LoginServlet which is supposed to get a
> connection from the pool gives me an exception. Unfortunately, I can't
> show it here now, because I didn't copy it, and it will appear next time
> only tomorrow. But it reports something like Connection Failure, so it
> looks like a
> connection cannot be obtained from the pool.
>
> I'm quite positive that all my ResultSet's, Statement's and Connection's
> are closed in all appropriate places, and I'm also using
> 'removeAbandoned' in the server.xml descriptor.
>
> What can be the source of this problem?
>
> Also, immediately after my tomcat server is started, I lookup the
> running processes ( ps -ux ) and see that 25 JVM's is launched. Why so
> many? Is this normal? And what scares me is that all of those 25 JVM's
> are using 6% of memory each ( 25*6% > 100% ! ). At least this is what
> the ps command shows. Can anybody shed some light on this?
>
> Is DBCP good for production? I configured it exactly as the Tomcat docs
> instruct.
>
> I will appreciate any comments and advices.
>
> Thank you.

Wow! you actually got DBCP working
What version of tomcat are you using???






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Changes in jsps do not appear

2003-01-12 Thread Michael Muratet
On Sun, 12 Jan 2003 10:35:50 -0500
Paul Yunusov <[EMAIL PROTECTED]> wrote:

> On Saturday 11 January 2003 11:15 pm, Michael Muratet wrote:
> > Greetings
> >
> > I am using Tomcat 4.1.10 in its standalone mode. My understanding of
> > the documentation is that every time a jsp is requested, the source
> > is checked and reparsed if it is more recent than the object in
> > memory.(Where would this be?)
> >
> > I have a jsp that I have changed, but the changes do not appear. I
> > have reloaded the web app via the manager app, and I have even
> > restarted tomcat and still no change. I don't see anything in the
> > logs that would indicate a problem, although I'm not sure what I'm
> > looking for.
> >
> > Does anybody have any ideas where to start looking?
> >
> > Thanks.
> >
> > Mike
> 
> Try posting the relative path to your JSP file on the server and the
> URL you use to access it. While you're at that , you could check if
> you did save the updated copy on the server or not. I personally have
> never had a problem like yours.
> 
> Paul
> 

Thanks.

Not more than 15 minutes after I sent the question, I discovered that
the author of the code (a legacy) had hardwired the path inside the
index.jsp. Putting the file into subdirectory where it was expected
solved the problem. As Sherlock Holmes said, "when you eliminate all the
other possibilities..."

Mike

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




mod_jk error 404 with Apache 1.3.27, Tomcat 4.1.18

2003-01-12 Thread Randall Perry
Successfully installed tomcat 4.1.18 and can access it on port 8080. Jsp &
servlets run ok.

Installed mod_jk.so v1.2.2, configured apache and get no errors on startup.

But, though I can access the directory pointed to by JKMount, and can load
static .html, no .jsp or servlet examples will run.

My machine is a Mac Xserve running OS 10.2.3 server.

Relevant configs appear below.

Any help is appreciated.


workers.properties

# Setup for Mac OS X
workers.tomcat_home=/usr/local/jakarta-tomcat-4.1.18
workers.java_home=/System/Library/Frameworks/JavaVM.framework/Home
worker.list=ajp13

#Definition for Ajp13 worker
worker.ajp13.port=8009
worker.ajp13.host=127.0.0.1
worker.ajp13.type=ajp13


httpd.conf

LoadModule jk_module/usr/libexec/httpd/mod_jk.so
AddModule mod_jk.c


DocumentRoot /usr/local/jakarta-tomcat-4.1.18
JKMount /*.jsp ajp13
JKMount /webapps/examples/servlet/* ajp13


JkWorkersFile /usr/local/jakarta-tomcat-4.1.18/conf/jk/workers.properties
JkLogFile /usr/local/jakarta-tomcat-4.1.18/logs/mod_jk.log
JkLogLevel debug


mod_jk.log

[Sun Jan 12 13:36:49 2003]  [jk_ajp13_worker.c (108)]: Into
ajp13_worker_factory
[Sun Jan 12 13:36:49 2003]  [jk_worker.c (171)]: wc_create_worker, about to
validate and init ajp13
[Sun Jan 12 13:36:49 2003]  [jk_ajp_common.c (1219)]: Into
jk_worker_t::validate
[Sun Jan 12 13:36:49 2003]  [jk_ajp_common.c (1239)]: In
jk_worker_t::validate for worker ajp13 contact is 127.0.0.1:8009
[Sun Jan 12 13:36:49 2003]  [jk_ajp_common.c (1267)]: Into jk_worker_t::init
[Sun Jan 12 13:36:49 2003]  [jk_ajp_common.c (1287)]: In jk_worker_t::init,
setting socket timeout to 0
[Sun Jan 12 13:36:49 2003]  [jk_worker.c (187)]: wc_create_worker, done
[Sun Jan 12 13:36:49 2003]  [jk_worker.c (238)]: build_worker_map, removing
old ajp13 worker 
[Sun Jan 12 13:36:49 2003]  [jk_worker.c (250)]: build_worker_map, done
[Sun Jan 12 13:36:49 2003]  [jk_worker.c (111)]: wc_open, done 1
[Sun Jan 12 13:36:59 2003]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Sun Jan 12 13:36:59 2003]  [jk_uri_worker_map.c (477)]: Attempting to map
URI '/webapps/examples/jsp'
[Sun Jan 12 13:36:59 2003]  [jk_uri_worker_map.c (599)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Sun Jan 12 13:37:00 2003]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Sun Jan 12 13:37:00 2003]  [jk_uri_worker_map.c (477)]: Attempting to map
URI '/webapps/examples/jsp/'
[Sun Jan 12 13:37:00 2003]  [jk_uri_worker_map.c (599)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Sun Jan 12 13:37:00 2003]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Sun Jan 12 13:37:00 2003]  [jk_uri_worker_map.c (477)]: Attempting to map
URI '/webapps/examples/jsp/index.html'
[Sun Jan 12 13:37:00 2003]  [jk_uri_worker_map.c (599)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Sun Jan 12 13:37:00 2003]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Sun Jan 12 13:37:00 2003]  [jk_uri_worker_map.c (477)]: Attempting to map
URI '/webapps/examples/jsp/index.html'
[Sun Jan 12 13:37:00 2003]  [jk_uri_worker_map.c (599)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Sun Jan 12 13:37:07 2003]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Sun Jan 12 13:37:07 2003]  [jk_uri_worker_map.c (477)]: Attempting to map
URI '/webapps/examples/jsp/num/numguess.jsp'
[Sun Jan 12 13:37:07 2003]  [jk_uri_worker_map.c (558)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a suffix match ajp13 -> *.jsp
[Sun Jan 12 13:37:07 2003]  [jk_worker.c (132)]: Into wc_get_worker_for_name
ajp13
[Sun Jan 12 13:37:07 2003]  [jk_worker.c (136)]: wc_get_worker_for_name,
done  found a worker
[Sun Jan 12 13:37:07 2003]  [jk_ajp_common.c (1404)]: Into
jk_worker_t::get_endpoint
[Sun Jan 12 13:37:07 2003]  [jk_ajp_common.c (1116)]: Into
jk_endpoint_t::service
[Sun Jan 12 13:37:07 2003]  [jk_ajp_common.c (295)]: Into
ajp_marshal_into_msgb
[Sun Jan 12 13:37:07 2003]  [jk_ajp_common.c (432)]: ajp_marshal_into_msgb -
Done
[Sun Jan 12 13:37:07 2003]  [jk_connect.c (158)]: Into jk_open_socket
[Sun Jan 12 13:37:07 2003]  [jk_connect.c (165)]: jk_open_socket, try to
connect socket = 6
[Sun Jan 12 13:37:07 2003]  [jk_connect.c (174)]: jk_open_socket, after
connect ret = 0
[Sun Jan 12 13:37:07 2003]  [jk_connect.c (183)]: jk_open_socket, set
TCP_NODELAY to on
[Sun Jan 12 13:37:07 2003]  [jk_connect.c (200)]: jk_open_socket, return, sd
= 6
[Sun Jan 12 13:37:07 2003]  [jk_ajp_common.c (614)]: In
jk_endpoint_t::ajp_connect_to_endpoint, connected sd = 6
[Sun Jan 12 13:37:07 2003]  [jk_ajp_common.c (642)]: sending to ajp13 #263
[Sun Jan 12 13:37:07 2003]  [jk_ajp_common.c (884)]: ajp_send_request 2:
request body to send 0 - request body to resend 0
[Sun Jan 12 

Re: http://localhost and DNS

2003-01-12 Thread Nick Sophinos
>Very often I am experiencing problem to browse http://localhost even I
use dot 
>notation http://127.0.0.1 it seems to me there is some problem with my
access
>to ISP's DNS server.

The point of the localhost or 127.0.0.1 (loopback) interface is that you
do not need a 
network connection to test network applications, so long as your client
(browser) and server
are on the same machine.  Being connected to a network should have no
effect on this.

>do I need some extra permission/service from ISP company to run web
server application 
>at my computer.

If you want this computer to be accessed on the internet, then you
normally need a static
IP address.  Even if you have that, some large ISPs disallow its customers
running servers.

- Nick


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JNDI Problem under 4.1

2003-01-12 Thread Jacob Kjome

Actually, you can define your JNDI Datasource in  
and then define a  inside your context although I would have 
thought that  would have worked as well?

Jake

At 10:25 PM 1/12/2003 +1300, you wrote:
On Sun, 12 Jan 2003 21:32, Jacob Kjome wrote:
> change "user" to "username" and "driverName" to "url"

Did this - but still had the same problem.

A little reading put me right however, as I have now found that the reason 
was
that I was attempting to define the context in the . This
appears to work in 4.0, but not in 4.1. Instead you need to specify the
resource in a specific context, ie:






usernametim
passwordpassword
driverClassNameorg.postgresql.Driver
urljdbc:postgresql://localhost/foobar




All appears okay now, thanks for the quick replies,
Regards,

Peter



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: http://localhost and DNS

2003-01-12 Thread Paul Yunusov
On Sunday 12 January 2003 02:23 pm, Tomislav Miladinovic wrote:
> Hi All,
>
> Very often I am experiencing problem to browse http://localhost even I use
> dot notation http://127.0.0.1 it seems to me there is some problem with my
> access to ISP's DNS server. I would like to ask any one from Canada using
> Rogers' ISP about their experience, let me know please have you experienced
> this problem. One question more, do I need some extra permission/service
> from ISP company to run web server application at my computer.
>
> Regards,
> Tomislav

http://www.wikipedia.org/wiki/Off_topic

Paul

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




http://localhost and DNS

2003-01-12 Thread Tomislav Miladinovic
Hi All,

Very often I am experiencing problem to browse http://localhost even I use dot 
notation http://127.0.0.1 it seems to me there is some problem with my access to ISP's 
DNS server. I would like to ask any one from Canada using Rogers' ISP about their 
experience, let me know please have you experienced this problem. One question more, 
do I need some extra permission/service from ISP company to run web server application 
at my computer.

Regards,
Tomislav



Re: Can't find JAVA_HOME

2003-01-12 Thread Paul Yunusov
On Sunday 12 January 2003 03:34 am, David Durst wrote:
> I just dumped the tomcat 4.1.18 from RPM onto a system.
> It can't seem to find JAVA_HOME.
>
> I echo $JAVA_HOME
> and it comes back perfect, any clues

Specific error messages and echo output, please? Also, you could be running 
Tomcat as one user and echo as another - environments are going to be 
different.

Paul

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Changes in jsps do not appear

2003-01-12 Thread Paul Yunusov
On Saturday 11 January 2003 11:15 pm, Michael Muratet wrote:
> Greetings
>
> I am using Tomcat 4.1.10 in its standalone mode. My understanding of the
> documentation is that every time a jsp is requested, the source is
> checked and reparsed if it is more recent than the object in memory.
> (Where would this be?)
>
> I have a jsp that I have changed, but the changes do not appear. I
> have reloaded the web app via the manager app, and I have even restarted
> tomcat and still no change. I don't see anything in the logs that would
> indicate a problem, although I'm not sure what I'm looking for.
>
> Does anybody have any ideas where to start looking?
>
> Thanks.
>
> Mike

Try posting the relative path to your JSP file on the server and the URL you 
use to access it. While you're at that , you could check if you did save the 
updated copy on the server or not. I personally have never had a problem like 
yours.

Paul

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Debian packages

2003-01-12 Thread Charles Baker

--- Reynir_Hübner <[EMAIL PROTECTED]> wrote:
> Has anyone created debian packages of tomcat 4.1.x ?
> Please inform me of where to find these if there are
> any available (I've only found some unstable
> packages). 
> 
> Thanx
> [EMAIL PROTECTED]

That is one of the reasons I upgraded my machine to
unstable. I've had few problems so far, and none
related to tomcat and java. Of course the machine in
question is not a mission critical server. YMMV.

=
[EMAIL PROTECTED]
http://www.charleshbaker.com/~chb/
If you cannot in the long run tell everyone what you have been doing,
your doing was worthless. -- Edwim Schrodinger

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: ldap library for tomcat

2003-01-12 Thread Rob Augustinus

now I'm getting confused :-)
but still it's good to see some alternatives..
I need to implement ldap for authorisation in a couple
of months.. so I'll need to check this out as well..

Rob

On Sun, Jan 12, 2003 at 12:33:24PM +0530, Kaustuv Sharma wrote:
> I too am using the Netscape Directory SDK for Java since 2 years, and it hasn't 
>given me any trouble. It is quite stable and has a good documentation and tutorials 
>to go with it.
> 
> Regards,
> Kaustuv
>   - Original Message - 
>   From: David Durst 
>   To: [EMAIL PROTECTED] 
>   Sent: Sunday, January 12, 2003 2:27 AM
>   Subject: Re: ldap library for tomcat
> 
> 
>   > Or maybe a free one .. have a look at com.novell.ldap on
>   > http://www.openldap.org ..
>   >
>   > eriam
>   >
>   > Rob A. Augustinus a ?crit:
>   >
>   >>import javax.naming.ldap;
> 
>   Netscape has a package that I have used, very stable and solid.
>   I never checked into the licensesing because I was working on a
>   academic project.
> 
>   I believe you can also cruise through ldap using JNDI which is probably
>   a overall better long term solution then using LDAP specific libraries.
> 
>   Just a thought.
> 
> 
> 
> 
>   --
>   To unsubscribe, e-mail:   
>   For additional commands, e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Can't find JAVA_HOME

2003-01-12 Thread Rasputin
* David Durst <[EMAIL PROTECTED]> [0102 08:02]:
> I just dumped the tomcat 4.1.18 from RPM onto a system.
> It can't seem to find JAVA_HOME.
> 
> I echo $JAVA_HOME
> and it comes back perfect, any clues

what does 

ls $JAVA_HOME 

return?

If your java binary is in /opt/bin/java, it should be set to
/opt , not /opt/bin

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: HTTP Status 404 with Tomcat 4.1.18

2003-01-12 Thread Nihita Goel
Thanks It is working this way.
Nihita

Paul Yunusov wrote:

> On Saturday 11 January 2003 10:03 am, Paul Yunusov wrote:
> > You don't need to add a context for your webapp to server.xml. Add this to
> > your webapp's web.xml:
> >
> > 
> >   AnyNameWorks
> >TestServlet
> >  
> >
> > 
> >   AnyNameWorks
> >   /AnotherNameWorksHere
> > 
> >
> > Then try accessing the servlet with this URL:
> >
> > http://localhost:8080/AnotherNameWorksHere
> >
> > Tomcat requires you to map all your resources like servlets to URL
> > patterns. Before Tomcat 4.1.12 a special servlet called Invoker was
> > automatically mapped to /servlet/* pattern and it invoked your servlets for
> > you. You can find commented out lines related to that in the server's
> > web.xml in the conf directory. If you want more info search this list and
> > check out conf/web.xml.
> >
> > Paul
>
> Sorry there, the URL should be
> http://localhost:8080/myapp/AnotherNameWorksHere as your context name seems
> to be myapp.
>
> Paul
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
Nihita Goel
Head, ADP Cell
Tata Institute of Fundamental Research
Mumbai
Ph : 2152971 Extn 2548





Re: JNDI Problem under 4.1

2003-01-12 Thread peterha
On Sun, 12 Jan 2003 21:32, Jacob Kjome wrote:
> change "user" to "username" and "driverName" to "url"

Did this - but still had the same problem.

A little reading put me right however, as I have now found that the reason was 
that I was attempting to define the context in the . This 
appears to work in 4.0, but not in 4.1. Instead you need to specify the 
resource in a specific context, ie:






usernametim
passwordpassword
driverClassNameorg.postgresql.Driver
urljdbc:postgresql://localhost/foobar




All appears okay now, thanks for the quick replies,
Regards,

Peter



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: trouble w/ jk2 vs. Apache2 on OSX 10.2.3: "Segmentation fault $HTTPD -k $ARGV"

2003-01-12 Thread Anthony Marlowe
Hi Richard,

Which package did you use to create the mod_jk2.so and jkjni.so? I 
build everything from the:
jakarta-tomcat-connectors-jk2-2.0.2-src source and every things works 
correctly.

Included is a copy of my jk2.properties and workers2.properties. The 
[vm:] is at present, because I working o a version with JBoss 3.0.5. 
With both versions I using Tomcat 4.1.18.  As for java either use 1.3.1 
or the DP8 version of 1.4.1.



workers2.properties
Description: Binary data


jk2.properties
Description: application/applefile


jk2.properties
Description: application/text



Regards,

Tony

On Saturday, Jan 11, 2003, at 19:04 Europe/Berlin, R Blake wrote:


hi all,

i've successfully installed Apache2 & Tomcat on OSX 10.2.3 

both run great in standalone . but Apache2 + Coyote jk2 refuses to
launch/function 

Apache2 is a CVS build, & server-info is:

Server Version: Apache/2.1.0-dev (Unix) mod_perl/1.99_07-dev 
Perl/v5.8.0
PHP/4.4.0-dev mod_auth_pgsql/2.0b6 DAV/2 Server Built: Jan 6 2003 
00:37:56
API Version: 20020903:0
Hostname/port: testserver.internal.blakers.net:80
Timeouts: connection: 300keep-alive: 300
MPM Name: Worker
MPM Information: Max Daemons: 1 Threaded: yes Forked: yes
Server Root: /usr
Config File: /etc/apache2/httpd.conf

Tomcat is binary: jakarta-tomcat-4.1.18

jk2 is built/installed from CVS (timestamp: 01/10/03 01:18:27)

"LoadModule jk2_module libexec/apache2/mod_jk2.so" is added to 
httpd.conf

tomcat starts as usual -- fine

with/without tomcat running, an attempt to launch apache (apachectl 
start)
results in:

apachectl start

/usr/sbin/apachectl: line 87:  1601 Segmentation fault  $HTTPD -k 
$ARGV

removing the jk2 LoadModule makes the error go away .

Apache's error_log is:

[Fri Jan 10 12:34:39 2003] [info] mod_unique_id: using ip addr 
172.30.10.3
[Fri Jan 10 12:34:40 2003] [info] mod_unique_id: using ip addr 
172.30.10.3
[Fri Jan 10 12:34:41 2003] [notice] Digest: generating secret for 
digest
authentication ... [Fri Jan 10 12:34:41 2003] [notice] Digest: done
[Fri Jan 10 12:34:41 2003] [notice] Apache/2.1.0-dev (Unix)
mod_perl/1.99_07-dev Perl/v5.8.0 PHP/4.4.0-dev mod_auth_pgsql/2.0b6 
DAV/2
configured -- re [Fri Jan 10 12:34:41 2003] [info] Server built: Jan  6
2003 00:37:56 [Fri Jan 10 12:34:41 2003] [debug] worker.c(1736):
AcceptMutex: posixsem (default: posixsem) [Fri Jan 10 12:35:47 2003] 
[info]
removed PID file /var/run/httpd.pid (pid=1587) [Fri Jan 10 12:35:47 
2003]
[notice] caught SIGTERM, shutting down [Fri Jan 10 12:35:50 2003] 
[info]
mod_unique_id: using ip addr 172.30.10.3

my first surmise is that there is a problem with the jk2 connector 
build,
but i'm not sure, and haven't the foggiest as to how to check/where to
begin 

thoughts/suggestion?

richard


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: JNDI Problem under 4.1

2003-01-12 Thread Jacob Kjome

change "user" to "username" and "driverName" to "url"

Jake

At 09:23 PM 1/12/2003 +1300, you wrote:

I have just installed Tomcat 4.1 - to date I have been using Tomcat 4.0. In
4.0 I have the following resource in the DefaultContext. I have copied this
context from the sever.xml of 4.0 to the server.xml of the 4.1 version.
Otherwise the war I am deploying on both is identical.





userjoe
passwordbloggs
driverClassNameorg.postgresql.Driver
driverNamejdbc:postgresql://localhost/foobar




In 4.0 everything runs fine, however when I run 4.1 I get the following:
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

I did a search on google and there is one instance of something like a fix -
however it was due to the resource parameters being outside a context. In
this situation the resource parameters are clearly inside the DefaultContext.

I also did a search of the tomcat list and didn't find an answer. I was
wondering if I should stick with 4.0, or if there is a simple fix for 4.1?

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: Various bugs with mod_jk and mod_jk2? And doesApache2.0.43+mod_jk2=inevitable hanging?

2003-01-12 Thread Raiden
In the tomcat-dev group there were a few discussions/code patches to
support a ForwardDirectories JkOption in mod_jk (which didn't work for me
when I tried, BTW) which would send a request to Tomcat for each file
listed in the DirectoryIndex (if it matched the correct URI mappings).

I was hoping there was some sort of option like that currently in use.

-Raiden



On Sun, 12 Jan 2003, Bill Barker wrote:

>
> "Raiden" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> > Just as a followup, even though all of the below still holds true, I did
> > find out my problem with Apache 2.0.43 (it was a DNS misconfiguration that
> > eventually held Apache up, even though I don't have it resolving host
> > names).
> >
> > So, Apache 2.0.43 is now running fine with mod_jk2.  However, it still has
> > the problem where DirectoryIndex won't check for an index.jsp through
> > tomcat by default, which creates a problem for those of us that have
> > Apache on Tomcat running on separate machines.
>
> And how, exactly is Apache supposed to figure this out? ;-)
>
> The simplest way to work around this is to create a minimalist directory
> structure on the Apache box with dummy (e.g. zero length) index.jsp files.
> Apache can then figure out that it needs to serve 'index.jsp', and send the
> request to the Tomcat box to serve the actual page.
>
> >
> > Anyone have a workaround for this? (Besides creating empty index.jsp files
> > to trick Apache).
> >
> > Thanks,
> > -Raiden
> >
> >
> > On Sat, 11 Jan 2003, Raiden wrote:
> >
> > > Hello,
> > >
> > > I wanted to get Apache 2.0.43 and mod_jk2 working.  They seemed to setup
> > > fine, and handle requests just great.  But after a while, Apache starts
> > > hanging on every other request.  I tried mod_jk, and it still does
> > > this.  I removed all traces of both mod_jks, and it still does
> eventually
> > > starts hanging, even on static image requests that are not run through
> > > Tomcat.  I'm assuming it's a problem with Apacheand my setup (Redhat
> > > 8.0).  Anyone else have similar issues?
> > >
> > > Anyhow, so I went back to Apache 1.3.27, which does not hang at all.
> Now,
> > > here's where I noticed two weird things:
> > >
> > > #1) Apache 1.3.27 with mod_jk2 - mod_rewrites that have the [P] flag to
> > > proxy don't seem to actually get interpreted and sent over to Tomcat.
> > >
> > > #2) Apache 1.3.27 with mod_jk - mod_rewrites DO get interpreted.  But,
> > > with Apache and Tomcat residing on two physical servers, Apache does not
> > > send over a request for index.jsp if the URL does not exactly specify
> it,
> > > even if the DirectoryIndex is set.  (So, /index.jsp WILL go to Tomcat,
> > > but / will not, and is just processed as an Apache level index view.)
> > > I've had to actually create fake index.jsp files in a mock directory
> > > structure on the Apache side to trick it into sending index.jsp as
> > > default to Tomcat.
> > >
> > > Does anyone know how to fix either of those strange behaviors?  Or
> BETTER
> > > yet, has anyone had the hanging problem with Apache 2.0.43 and mod_jk2,
> > > and found a way to fix it?
> > >
> > > Thanks,
> > > -Raiden
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> 
> > > For additional commands, e-mail:
> 
> > >
>
>
>
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




JNDI Problem under 4.1

2003-01-12 Thread peterha
I have just installed Tomcat 4.1 - to date I have been using Tomcat 4.0. In 
4.0 I have the following resource in the DefaultContext. I have copied this 
context from the sever.xml of 4.0 to the server.xml of the 4.1 version. 
Otherwise the war I am deploying on both is identical.





userjoe
passwordbloggs
driverClassNameorg.postgresql.Driver
driverNamejdbc:postgresql://localhost/foobar




In 4.0 everything runs fine, however when I run 4.1 I get the following:
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

I did a search on google and there is one instance of something like a fix - 
however it was due to the resource parameters being outside a context. In 
this situation the resource parameters are clearly inside the DefaultContext.

I also did a search of the tomcat list and didn't find an answer. I was 
wondering if I should stick with 4.0, or if there is a simple fix for 4.1?

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Webapp specific endorsed dir?

2003-01-12 Thread Jacob Kjome

It violates the Sun classloading spec to load endorsed classes from 
WEB-INF/lib or WEB-INF/classes.  There are a number of bugs that have been 
filed on this and the conclusion of all of them is that Tomcat simply won't 
support any sort of overriding of XML or DOM libraries from the webapp 
classloader.  If you want to override jdk1.4.x endorsed packages, you must 
use common/endorsed.  If you just want to use specific xerces classes, you 
can remove them from common/endorsed (and make sure they don't exist in 
common/lib). Then, create a separate instance of Tomcat using CATALINA_BASE 
and create a CATALINA_BASE/shared/lib directory.  Put your xerces jar there 
and your app will use your custom version of Xerces rather than any default 
ones that Tomcat provides.

That is the only way I know to use a specific version of xerces 
per/app.  Of course you can always just replace Tomcat's version of xerces 
with yours and force all apps to your yours by putting it in common/endorsed.

Jake

At 06:47 PM 1/11/2003 -0800, you wrote:
Hi all,

Is there a way for webapps to declare jars that can override jars in 
Tomcat's common/endorsed directory?  For example, if I want to my webapp 
to use a specific version of Xerces, independent of what gets distributed 
with Tomcat, what do I have to do?  Right now, with Tomcat 4.1.18, if I 
have a copy of xercesImpl.jar in /WEB-INF/lib I get:

Exception during startup processing
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Caused by: java.lang.VerifyError: Cannot inherit from final class
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at 
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1664)
at 
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:953)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1394)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.createContentDispatcher(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.(XMLDocumentFragmentScannerImpl.java:249)
at 
org.apache.xerces.impl.XMLDocumentScannerImpl.(XMLDocumentScannerImpl.java:245)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.(Unknown 
Source)
at 
org.apache.xerces.parsers.IntegratedParserConfiguration.createDocumentScanner(Unknown 
Source)
at 
org.apache.xerces.parsers.DTDConfiguration.(DTDConfiguration.java:367)
at 
org.apache.xerces.parsers.StandardParserConfiguration.(StandardParserConfiguration.java:198)
at 
org.apache.xerces.parsers.IntegratedParserConfiguration.(Unknown Source)
at 
org.apache.xerces.parsers.IntegratedParserConfiguration.(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:296)
at java.lang.Class.newInstance(Class.java:249)
at 
org.apache.xerces.util.ObjectFactory.newInstance(ObjectFactory.java:266)
at 
org.apache.xerces.util.ObjectFactory.findJarServiceProvider(ObjectFactory.java:360)
at 
org.apache.xerces.util.ObjectFactory.createObject(ObjectFactory.java:185)
at 
org.apache.xerces.util.ObjectFactory.createObject(ObjectFactory.java:120)
at org.apache.xerces.parsers.SAXParser.(SAXParser.java:140)
at org.apache.xerces.parsers.SAXParser.(SAXParser.java:125)
at 
org.apache.xerces.jaxp.SAXParserImpl.(SAXParserImpl.java:102)
at 
org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImpl.java:95)
at org.apache.commons.digester.Digester.getParser(Digester.java:676)
at 
org.apache.commons.digester.Digester.getXMLReader(Digester.java:892)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at 
org.apache.catalina.startup.ContextConfig.defaultConfig(ContextConfig.java:548)
at 
org.apache.catalina.startup.ContextConfig.start(ContextCo

Can't find JAVA_HOME

2003-01-12 Thread David Durst
I just dumped the tomcat 4.1.18 from RPM onto a system.
It can't seem to find JAVA_HOME.

I echo $JAVA_HOME
and it comes back perfect, any clues



--
To unsubscribe, e-mail:   
For additional commands, e-mail: