RE: war file is not expanding

2004-06-03 Thread john cho

Yoav,
but can u explain why that is the hack?  After I did change the docBase to
the WAR, the WAR file did not expand but serving web request.
Can u shed some light on this?

thanks,

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 02, 2004 11:23 AM
To: Tomcat Users List
Subject: RE: war file is not expanding



Hi,
Specify the docBase as the WAR itself (and leave unpackWARs=true) to
get the WAR file unpacked.  What you're doing with the slashes is a
hack.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: john cho [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 02, 2004 11:07 AM
To: [EMAIL PROTECTED]
Subject: war file is not expanding

Hi all,
i have problem of not expanding war file related with server.xml

in server.xml, i have context element which has docBase and path
attributes.

Context docBase=/var/tomcat4/webapps/testApp path =/testApp
reloadable=true/Context  -- in this case, the war file in /webapps
does not expand.

However, if i do change it as follows with ending / in docBase and
path
attributes:

Context docBase=/var/tomcat4/webapps/testApp/ path =/testApp/
reloadable=true/Context , it does expand the war file.


I have moved also xerces.xml to /common/endorsed/ to be sure with
Tomcat
xml parser related issues.  But still the same problem.

Anybody with insights on this problem would be appreciates.

thanks,



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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



war file is not expanding

2004-06-02 Thread john cho
Hi all,
i have problem of not expanding war file related with server.xml

in server.xml, i have context element which has docBase and path attributes.

Context docBase=/var/tomcat4/webapps/testApp path =/testApp 
reloadable=true/Context  -- in this case, the war file in /webapps does not 
expand.

However, if i do change it as follows with ending / in docBase and path attributes:

Context docBase=/var/tomcat4/webapps/testApp/ path =/testApp/ 
reloadable=true/Context , it does expand the war file.


I have moved also xerces.xml to /common/endorsed/ to be sure with Tomcat xml parser 
related issues.  But still the same problem.

Anybody with insights on this problem would be appreciates.

thanks,


Re: Tomcat 5: default unpackWARs bahaviour?

2004-06-01 Thread john cho
Hi,
I have war file to be deployed at /webapps.  However, if i don't have a
ending / at the end of docBase and path, it does not expand.  So, one of
the admins puts / at the end of docBase and path attriubtes in the
Context, it starts to expand, however, it has been creating another
problems.

I am guessing it might be relate to xml parser issue.  If anybody has the
same problems and can share the thought and solutions, I would appreciate it
very much.

thanks,


- Original Message - 
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, May 28, 2004 8:54 AM
Subject: RE: Tomcat 5: default unpackWARs bahaviour?



Hi,
Don't rely on a default value for unpackWARs: put it in your
instructions that it must be true, because that's a place where your
webapp deviates from the Servlet Specification (which only requires
containers to support packed WARs).

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Simon Brooke [mailto:[EMAIL PROTECTED]
Sent: Friday, May 28, 2004 6:28 AM
To: 'Tomcat Users List'
Subject: Tomcat 5: default unpackWARs bahaviour?

-BEGIN PGP SIGNED MESSAGE-

I'm busy writing installation instructions for a webapp, and I've just
had
my
first draft sent back to me as 'much too technical and complex'.

For the webapp to work, I need 'unpackWARs' to be true in the
server.xml
file.
A lot of Tomcat 4 distributions I've seen (including the Debian one,
which
I
mostly use) come with 'unpackWARs' false.

In the 5.0.24 binary tarball I've downloaded from jakarta.apache.org
unpackWARs is true. Is this policy? Can I rely on unpackWARs being true
in
Tomcat 5 distributions downloaded from jakarta.apache.org? If so it
makes
my
installation instructions much simpler.

Cheers

Simon

- --
[EMAIL PROTECTED] (Simon Brooke) http://www.jasmine.org.uk/~simon/

 Tony Blair's epitaph, #1: Here lies Tony Blair.
 Tony Blair's epitaph, #2: Trust me.

-BEGIN PGP SIGNATURE-
Version: 2.6.3ia
Charset: noconv

iQCVAwUBQLcUO3r1UrYJMbiJAQFugQQAkgVMzf5onkPS/CUThcCXqEQnj3HdXVBZ
QSq6gD0DUt8/wwWkVCbcFEU6nCE7884KzTXc3JDLd58G1qcP7lPwfnTon5eR8Zzr
TF0vBzuPto2bJDCXGrBttOWFuNco1YFfMTu3wJYRSAJkyYBfmoX0LHEWR5s9fNfC
tyhtCVnH2a8=
=LGgP
-END PGP SIGNATURE-

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




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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



Re: Memory problems with Tomcat 4.1.27

2004-06-01 Thread john cho
There could be many issues related with this kind of problems.
1.  Based upon your large loading process, check your database with your dba
such as how many open cursors and so on.
2.  u did not close each connection, statement, resultset and it keeps
building up.
3.  I guess u are looping thru the loading.   During the looping, close any
loose hole.


once u identify any one of those, i can help u further.

- Original Message - 
From: Anand Narasimhan [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Cc: 'Anand Narasimhan' [EMAIL PROTECTED]
Sent: Friday, May 28, 2004 3:02 PM
Subject: Memory problems with Tomcat 4.1.27


 Hi,

 I am trying to debug a memory consumption issue with an application. I
 would
 appreciate any help I can get.

 The application I am debugging is a web application written using
 j2sdk 1.4.1_02 and struts 1.0.2. The tomcat version I am using is
 4.1.27.
 The backend has a relational database (sybase/oracle) and the database
 access
 is through JDBC. The tomcat server is running on Solaris 2.8. The max
 heap size
 for the JVM (using -Xmx) is set to 512M. I tried increasing it to 1024M
 as
 well.

 The problem is under reasonably large load, the overall process size of
 tomcat
 (reported by top) keeps increasing and eventually tomcat stops
 responding. I
 tried running tomcat with OptimizeIt hoping to find out if there are any
 leaks.
 When running with OptimizeIt the memory consumption increases much
 faster than
 when running without OptimizeIt. At this point OptimizeIt reports that
 about
 300M of heap is being used. But the overall process size is about 900M.

 I tried turing on the -Xloggc option. The output of -Xloggc also shows
 that
 the heap size is well withing the limits. In some cases towards the end
 of the
 GC log, I noticed that each GC cycle takes about 17 - 20 secs.

 Any suggestions regarding how to proceed debugging this problem would be

 greatly appreciated. Are there any docs or any white papers that would
 help
 understand the relation between the heap and the overall process memory?

 Thanks
 Anand


 

 Anand Narasimhan
 [EMAIL PROTECTED]




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



peruserpooldatasource resourcefactory

2004-05-22 Thread john cho
i have been developing using WSAD to use connection pooling and has been very 
successful.   However, once we moved our application to Linux, I am getting the 
exception message javax.naming.NamingException: Cannot create resource instance  I 
think lot of people worked on this part of connection pooling aware of this problem 
very well, because I spent quite amount of time on this issue and saw many people with 
this issue.

Configuration wise, /common/lib/common jars file locations wise, everything works out 
fine for me.  I don't see any issue with my configuration now after so much time spent 
on this issue and it works fine in WSAD(of course, there are some issues related with 
that too).   

Now, the question is... 
1.  when i did check the resourceRef, i don't see all ResourceParams parameters i did 
define in my server.xml.  Such as defaultMaxActive, dataSourceName and so on do not 
appear in the ResourceRef.   However, if u check ResourceRef during Tomcat 
initialization process, it shows all the parameters in ResourceParams.

2.  So, i am getting to ask u guys, is this another bug?  I am going to spend another 
weekends for this problme, it looks that ResourceFactory does not read in all the 
necessary parameters when it is invoked by 
javax.naming.spi.NamingManager.getObjectInstance...



If anybody solved this kind of the problem, i would appreciate you sharing your pains.

many thanks in advance,


chao.



Using PerUserPoolDataSource is required for our own business requirement.

Server.xml..
 Resource auth=Container name=jdbc/DC1DEVCPDS 
type=org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS/
ResourceParams name=jdbc/DC1DEVCPDS

parameternamefactory/namevalueorg.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS/value/parameter
parameternameuser/namevaluevalue//parameter
parameternamepassword/namevalue//parameter

parameternamedriver/namevalueoracle.jdbc.driver.OracleDriver/value/parameter

parameternameurl/namevaluejdbc:oracle:thin:@mydatabase:1521:DC1DEV/value/parameter
/ResourceParams
- 

Resource auth=Container name=jdbc/DC1DEV 
type=org.apache.commons.dbcp.datasources.PerUserPoolDataSource/

ResourceParams 
name=jdbc/DC1DEVparameternamefactory/namevalueorg.apache.commons.dbcp.datasources.PerUserPoolDataSourceFactory/value/parameter

parameternamedefaultMaxActive/namevalue10/value/parameter

parameternamedefaultMaxIdle/namevalue5/value/parameter

parameternamedefaultMaxWait/namevalue1/value/parameter

parameternamedataSourceName/namevaluejava:comp/env/jdbc/DC1DEVCPDS/value/parameter

/ResourceParams

web.xml

resource-refdescriptionDC1DEV/descriptionres-ref-namejdbc/DC1DEV/res-ref-nameres-typeorg.apache.commons.dbcp.datasources.PerUserPoolDataSource/res-typeres-authContainer/res-authres-sharing-scopeShareable/res-sharing-scope/resource-ref
 

resource-refdescriptionDC1DEVCPDS/descriptionres-ref-namejdbc/DC1DEVCPDS/res-ref-nameres-typeorg.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS/res-typeres-authContainer/res-auth/resource-ref



[22 May 2004 11:42:22,215] INFO  [TP-Processor2] locator.ServiceLocator [] - Binding 
object
[22 May 2004 11:42:22,216] INFO  [TP-Processor2] locator.ServiceLocator [] - 
ResourceRef:
ResourceRef[className=javax.sql.DataSource,factoryClassLocation=null,factory 
ClassName=org.apache.naming.factory.ResourceFactory,{type=description,content=simpleDS},{type=scope,content=Shareable},{type=auth,content=Container}]
[22 May 2004 11:42:22,216] INFO  [TP-Processor2] locator.ServiceLocator[] - next
[22 May 2004 11:42:22,217] INFO  [TP-Processor2] locator.ServiceLocator[] - Binding : 
*
[22 May 2004 11:42:22,217] INFO  [TP-Processor2] locator.ServiceLocator[] - 
DC1DEVCPDS:
org.apache.naming.ResourceRef:ResourceRef[className=org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS,factoryClassLocation=null,factoryClassName=org
.apache.naming.factory.ResourceFactory,{type=description,content=DC1DEVCPDS},{type=scope,content=Shareable},{type=auth,content=Container}]
[22 May 2004 11:42:22,217] INFO  [TP-Processor2] locator.ServiceLocator[] - Binding 
object
[22 May 2004 11:42:22,218] INFO  [TP-Processor2] locator.ServiceLocator[] - 
ResourceRef:
ResourceRef[className=org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS,factoryClassLocation=null,factoryClassName=org.apache.naming.factory.Resourc
eFactory,{type=description,content=DC1DEVCPDS},{type=scope,content=Shareable},{type=auth,content=Container}]
[22 May 2004 11:42:22,218] INFO  [TP-Processor2] locator.ServiceLocator[] - next
[22 May 2004 11:42:22,218] INFO  [TP-Processor2] locator.ServiceLocator[] - Binding : 
*
[22 May 2004 11:42:22,219] INFO  [TP-Processor2] locator.ServiceLocator[] - DC1DEV:
org.apache.naming.ResourceRef:ResourceRef[className=org.apache.commons.dbcp.datasources.PerUserPoolDataSource,factoryClassLocation=null,factoryClassName

Apache/Tomcat sendRedirect :0 problem

2002-11-28 Thread John Cho
Hello,

I'm having an issue with Tomcat 4.1.12 and Apache 1.3.x where if I make a 
call to response.sendRedirect(http://hostname/servlet/foo;) Apache for 
some reason sends a redirect URL to the browser in the form of:

http://hostname:0/servlet/foo

Does anyone know what is causing this? And how to fix it?

I can get around the problem only by using a RequestDispatcher.forward 
instead of the redirect but that's not optimal for me as I want the 
browser's URL changed. And although the :0 has no effect on IE, Mozilla 
doesn't like it at all.

I apologize in advance if this is a common problem although I've search 
the archives and can find only one email that also mentions this problem 
and the thread doesn't discuss a resolution.

Thanks,
john


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




Re: Apache/Tomcat sendRedirect :0 problem

2002-11-28 Thread John Cho
Hi David,

It works for me if you specify a port. I see the problem if you don't 
specify the port (assume port 80).

My setup has apache serving port 80 but redirecting requests /servlet/* 
to Tomcat 4.1.12 using mod_jk. A servlet on Tomcat then redirects via 
http://hostname/servlet/foo; which gets back to the browser as 
http://hostname:0/servlet/foo;... problem goes away if I'm running on a 
non-default port like 8080 but shows up if I use the default port.

john
 
On Thu, 28 Nov 2002, David Brown wrote:

 John Cho writes: 
 
  Hello, 
  
  I'm having an issue with Tomcat 4.1.12 and Apache 1.3.x where if I make a 
  call to response.sendRedirect(http://hostname/servlet/foo;) Apache for 
  some reason sends a redirect URL to the browser in the form of: 
  
  http://hostname:0/servlet/foo 
  
  Does anyone know what is causing this? And how to fix it? 
  
  I can get around the problem only by using a RequestDispatcher.forward 
  instead of the redirect but that's not optimal for me as I want the 
  browser's URL changed. And although the :0 has no effect on IE, Mozilla 
  doesn't like it at all. 
  
  I apologize in advance if this is a common problem although I've search 
  the archives and can find only one email that also mentions this problem 
  and the thread doesn't discuss a resolution. 
  
  Thanks,
  john 
  
  
  --
  To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: mailto:[EMAIL PROTECTED] 
  
  
 
 Hello John, this works for me: 
 response.sendRedirect(http://hostname:8080/servlet/foo;). All servers: 
 smtpd, httpd, ftpd, others and tc listen on predefined ports. look closer at 
 the docs. hope this helps, david. 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


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