RE: SSL Handshake Error!

2005-10-25 Thread enLogica
mark, that did the trick!  Thanks so much. :)

Neal


-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 25, 2005 2:04 PM
To: 'Tomcat Users List'; [EMAIL PROTECTED]
Subject: RE: SSL Handshake Error!


Sounds like you are on the right path. The Equifax certificate must be
installed
in the trust store, not your key store. Where this is depends on whether you
are
using a JDK or a JRE but as an example, on my laptop the path is
D:\jdk1.5.0_05\jre\lib\security\cacerts

Mark

> -Original Message-
> From: Neal Cabage [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 25, 2005 8:00 PM
> To: Tomcat Users List
> Subject: SSL Handshake Error!
>
>
> Help!!!
>
> I use a secure (https) XML feed and it appears the provider
> recently switched SSL certificate providers and is now using
> an Equifax certificate.  Since that switch occured,
> my code is now throwing the following exceptions:
>
>
>
> javax.net.ssl.SSLHandshakeException:
> java.security.cert.CertificateException: Could not find
> trusted certificate
>
>
>
> Per the research I have done, I believe this must mean that
> the root certificate from Equifax must be installed in my
> local Keystore, in order to trust and decipher this
> certificate.  But attempts so far
>
>
> to import this into the keystore and obtain successful
> connection again have all failed.
>
> Does anyone know what is going on? Am I on the right path?
> Does anyone know what I am doing wrong?
>
>
>
> Thanks.
>
> Neal
>


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



? xmlValidation Attribute -- What's it Mean ?

2005-10-25 Thread Bob Bronson

Hi all,

I'm using TC 5.5.12.

Please look at this snippet from the server.xml that is distributed 
with TC:


 
  


Can anyone tell me what the 'xmlValidation' attribute on  is for? 
Obviously it has something to do with "XML validation" but what XML? Is 
it the corresponding web.xml? And how does the 'xmlNamespaceAware' 
attribute fit in? Every web.xml I've ever seen uses the default 
namespace?


And what's the comment about the Xerces 2.2 parser? I'm using Sun's JDK 
1.5.0. Does that use Xerces internally?


When I set the 'xmlValidation' attribute to 'true' I get a big stack 
trace. One would think it might be appropriate to offer a nice error 
message describing the problem.


I've looked at the latest TC documentation for  and it makes no 
mention of the 'xmlValidation' attribute:

http://tomcat.apache.org/tomcat-5.5-doc/config/host.html

Can someone please explain these two attributes? My web.xml is getting 
unwieldy and I'd like to start validating it.


Thanks very much.

--
Bob Bronson 




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



RE: Tracking

2005-10-25 Thread Richard Mixon
You do not say which version of Tomcat you are using. But in general you can
set the removeAbandoned* parameters to mitigate the problem (i.e. it will
take longer to stop responding).

If using 5.5.x look for the heading "Preventing dB connection pool leaks"
at:
 
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html

HTH - Richard

-Original Message-
From: Charles P. Killmer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 25, 2005 1:05 PM
To: Tomcat Users List
Subject: Tracking

I have a bunch of JSP files that all instantiate a single class file.
Is there a way for the class file to log which file called it and ideally
from which line the call was made?

 

My bigger problem is that I am using Connection pooling.  And if I don't
close every connection when I am down with it, the server stops responding.
Restart Tomcat and everything is back to normal.  Is there a setting to have
Tomcat close all connections for me when a request finishes?

 

Thank you for any thoughts.

Charles

 

 



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



DBCP connection leak after undeploy

2005-10-25 Thread Bogdan Calmac
I've written a simple web application consisting of a servlet which
does a select from a table and displays the result. It is then
packaged as a war and deployed using the tomcat ant task. After
executing the servlet, it is undeployed using the ant task again.
stdout confirms that the webapp is deployed and undeployed without
errors. The problem is that the connection to the DB is left open even
after undeploy.

Software used:
 - tomcat 5.5.9 on Windows
 - DBCP connection pool
 - MSSQL server

The datasource is defined in META-INF/context.xml with:

  

and then referenced in WEB-INF/web.xml with:

  
  DB Connection
  jdbc/default
  javax.sql.DataSource
  Container
  

The code accessing the database is:

private long getTitlesCount() {
  Connection conn = null;
  Statement stmt = null;
  ResultSet rs = null;
  try {
InitialContext cxt = new InitialContext();
DataSource ds = (DataSource) cxt.lookup(
"java:/comp/env/jdbc/default" );
conn = ds.getConnection();
stmt = conn.createStatement();
rs = stmt.executeQuery("select count(*) from titles");
if (rs.next())
  return rs.getLong(1);

  }
  catch(Exception e) {
System.out.println("Failed to retrive title count from the DB.");
e.printStackTrace();
  }
  finally {
if (rs != null) try { rs.close(); } catch (Exception e) {}
if (stmt != null) try { stmt.close(); } catch (Exception e) {}
if (conn != null) try { conn.close(); } catch (Exception e) {}
  }
  return -1;
}


If I deploy/undeploy several times, the number of leaked connections
is incremented with 1 each time.

If I execute the servlet several times, the number of connections
remains constant, which confirms that the servlet releases the
connection properly.

My guess is that the datasource is not tied to the webapp and it is
not notified/released when the webapp is undeployed.

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



web.xml tomcat war file

2005-10-25 Thread Dr. Laurence Leff
Initially, I found the TomCat so finicky about its war files 
that it made Morris look like a rat.

We set up the appropriate directory as indicated below
and then used jar to create the war file.  The problem resolved when
one went into the directory and did the jar.

That is instead of doing 
jar -cvf warname.war dirname

one should do

cd dirname
jar -cvf ../warname.war dirname

We now have Tomcat purring with the following system consisting of two
servlets:NewCourse and updatePrerequisites.  These two servlets are both in the 
package
RegistrationSystem.  Thus, one needs to write RegistrationSystem.NewCourse
or RegistrationSystem.Update
And the NewCourse.class and UpdatePrerequisites.class must be in
WEB-INF/classes/RegistrationSystem

That is, if one has a servlet SSS.java in package PPP
one must put the classes in 
dirname/WEB-INF/classes/PPP/SSS

One refers to the servlet as PPP.SSS

The servlet mapping says

  nnn
  PPP.SSS

   nnn
   /servlet/


The Action entry on the form is:

Action="/servlet/PPP.SSS"

Of course, nnn represents an internal name for the servlet to bind
the servlet-mapping entry with the servlet information.

(What we don't know is whether one can change the url-pattern line
to use anything other than /servlet.  
I tried it and get problems as described in the appendix.)

Here is the web.xml file that we successfully used:

http://java.sun.com/dtd/web-app_2_3.dtd";>

  Registration System
  Registration System
  
 C
 RegistrationSystem.NewCourse
  
  
  D
  RegistrationSystem.UpdatePrerequisites
  
  
C
/servlet/
  
  
 D
 /servlet/
  


Here is the Form that invokes the servlet


Course Name 
Course Number 



This posting is basically to help any "newbies" get started preparing their
own war files.   However, any insight into why TomCat likes its url-pattern
to be /servlet would be greatly appreciated and shared with the class I
am teaching.

These runs all occurred in Apache Tomcat/5.0.30 running on LINUX.

Most helpful was Professor Mike Litman of our University (WIU)
Also, helpful was the "Configuring and Using Apache Tomcat: A
Tutorial on Installing and Using Jakarta Tomcat 5.5 for Servlet and
JSP Development" on the www.coreservlets.com/Apache-Tomcat-Tutorial
(This helped me to understand that I needed RegistrationSystem.NewStudent
and not RegistrationSystem/NewStudent

I also read Chapter Six of Professional Apache Tomcat Five (by
Vivek Chopra, Amit Bakore, Jon Eaves, Ben Galbraith, Sing Li, Chanoch Wiggers).
This chapter includes a discussion of the servlet and servlet-mapping
tags in the web.xml file but I did not find an answer there. 
I also searched Tomcat, the Definitive Guide by Jason Brittain and 
Ian F. Darwin but did not find anything helpful there.
Of course, I also tried google using the appropriate keywords.

Dr. Laurence Leff  Western Illinois University, Macomb IL 61455 ||(309) 298-1315
Stipes 447 Assoc. Prof. of Computer Sci. Pager: 309-367-0787 FAX: 309-298-2302 
Secretary: eContracts Technical Committee OASIS Legal XML Member Section

  -- Appendix with Problem Files --
I set up a war file containing an HTML file to invoke a servlet, c.html
and the class file, servlet6 for a servlet.
The c.html file is:

Testing Servlet Six

Testing Servlet Six 

Please enter a number here: 



When, we enter URL of
http://toolman.wiu.edu:2345/servlet
(our machine is toolman.wiu.edu and I set up tomcat to listen on part 2345)

I got a directory listing containing "servlet"
This contained c.html. The URL corresponding to this is:
http://toolman.wiu.edu:2345/servlet/servlet/c.html
In other words, an extra directory name got inserted in the path.

When I try the c.html file and click the button,
the HTML error message indicates that it is looking for
/servlet/servlet/servlet/servlet6
At the top of the mozilla screen, the URL indicates
http://toolman.wiu.edu:2345/servlet/servlet/servlet/servlet6?number=44

The directory that we jarred is called servlet.

The \fBweb.xml\fR file is:


 servlet6
 no description
 
  servlet6
  servlet6
  no description
  servlet6
 
 

This is in /home/b_10/servlet/WEB-INF

Here is the output of jar -tvf servlet.war

 0 Thu Sep 29 16:19:16 CDT 2005 META-INF/
71 Thu Sep 29 16:19:16 CDT 2005 META-INF/MANIFEST.MF
 0 Thu Sep 29 15:42:30 CDT 2005 servlet/
   202 Thu Sep 29 15:37:54 CDT 2005 servlet/c.html
 0 Thu Sep 29 15:52:54 CDT 2005 servlet/WEB-INF/
   292 Thu Sep 29 15:52:20 CDT 2005 servlet/WEB-INF/web.xml
 0 Thu Sep 29 16:11:08 CDT 2005 servlet/WEB-INF/classes/
  1954 Thu Sep 29 16:11:28 CDT 2005 servlet/WEB-INF/classes/servlet6.class

We experienced this problem in other student accounts so this is one
report of the symptoms.

Here is a different web.xml file where we experienced these symptoms:


Servlet
 We need to add up numbers 

Lab
Lab


Lab
/servlet/Lab



And here is another set that created problems:

Got Message /REgistrationSystemTest/X/RegistrationSystem.NewCourse

RE: SSL Handshake Error!

2005-10-25 Thread Neal Cabage
Aaah!  Thanks Mark. We'll give it a shot.
 
Neal
 


Mark Thomas <[EMAIL PROTECTED]> wrote:
Sounds like you are on the right path. The Equifax certificate must be installed
in the trust store, not your key store. Where this is depends on whether you are
using a JDK or a JRE but as an example, on my laptop the path is
D:\jdk1.5.0_05\jre\lib\security\cacerts

Mark 

> -Original Message-
> From: Neal Cabage [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, October 25, 2005 8:00 PM
> To: Tomcat Users List
> Subject: SSL Handshake Error!
> 
> 
> Help!!!
> 
> I use a secure (https) XML feed and it appears the provider 
> recently switched SSL certificate providers and is now using 
> an Equifax certificate. Since that switch occured,
> my code is now throwing the following exceptions:
> 
> 
> 
> javax.net.ssl.SSLHandshakeException: 
> java.security.cert.CertificateException: Could not find 
> trusted certificate 
> 
> 
> 
> Per the research I have done, I believe this must mean that 
> the root certificate from Equifax must be installed in my 
> local Keystore, in order to trust and decipher this 
> certificate. But attempts so far 
> 
> 
> to import this into the keystore and obtain successful 
> connection again have all failed. 
> 
> Does anyone know what is going on? Am I on the right path? 
> Does anyone know what I am doing wrong? 
> 
> 
> 
> Thanks.
> 
> Neal
> 


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




Re: Why tomcat has a wrapped dbcp?

2005-10-25 Thread Darryl L. Miles

How do you find out which version of DBCP is in a particular version of TC ?


David Smith wrote:

>To avoid classloader collisions with webapps that directly use DBCP
>independant of Tomcat.
>
>AFAIK it's purely refactored to a separate package with no functional
>changes.
>
>--David
>
>Sam Lee wrote:
>
>  
>
>>Why tomcat has a wrapped dbcp? Is there any difference?
>>
>>
>>
>>


-- 
Darryl L. Miles



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



RE: DB2 and Tomcat 5.5 Issue

2005-10-25 Thread Jon Christensen
I did use COM.



"Niels Beekman" <[EMAIL PROTECTED]> 

10/25/2005 04:19 PM



To
Jon Christensen/National/Hewitt [EMAIL PROTECTED] Associates NA
cc

Subject
RE: DB2 and Tomcat 5.5 Issue






Classnames are case sensitive, did you type 'COM' instead of 'com'?

Niels

-Original Message-
From: Jon Christensen [mailto:[EMAIL PROTECTED] 
Sent: dinsdag 25 oktober 2005 20:01
To: users@tomcat.apache.org
Subject: DB2 and Tomcat 5.5 Issue

Has anyone been able to connect to a DB2 8.1 datasource using Tomcat
5.5? 
 I have been trying for a few days now and can only get one error
message: 


org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
driver 
of class 'COM.ibm.db2.jdbc.app.DB2Driver' for connect URL 
'jdbc:DB2:bfstst' at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSo
urc-e.java:780) 

at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSourc
e.j-ava:540) 


Caused by: java.sql.SQLException: No suitable driver  at 
java.sql.DriverManager.getDriver(DriverManager.java:243) 
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSo
urc-e.java:773) 

... 23 more 


I've got the db2java.jar (renamed from db2java.zip) in 
tomcat_home\common\lib and also in my web apps's lib directory. 

We are trying to switch from using WSAD 5.x to using Eclipse and Tomcat 
5.5 running under XP but this has been holding me up for quite some 
time now.  Any help would be greatly appreciated. 


Thanks, 


Jon 


 
The information contained in this e-mail and any accompanying documents
may contain information that is confidential or otherwise protected from
disclosure. If you are not the intended recipient of this message, or if
this message has been addressed to you in error, please immediately
alert the sender by reply e-mail and then delete this message, including
any attachments. Any dissemination, distribution or other use of the
contents of this message by anyone other than the intended recipient is
strictly prohibited.




 
The information contained in this e-mail and any accompanying documents may 
contain information that is confidential or otherwise protected from 
disclosure. If you are not the intended recipient of this message, or if this 
message has been addressed to you in error, please immediately alert the sender 
by reply e-mail and then delete this message, including any attachments. Any 
dissemination, distribution or other use of the contents of this message by 
anyone other than the intended recipient is strictly prohibited.



Re: DB2 and Tomcat 5.5 Issue

2005-10-25 Thread Rhino
I'm not running Tomcat 5.5 - in fact, I haven't even used my older Tomcat
setup (4.1.x) with DB2 V7 in quite a while and I haven't used it with DB2 V8
at all - but I use DB2 quite a bit with Java applications that I write so
perhaps I can help

The old JDBC drivers are deprecated as of Version 8 of DB2. However, you can
still use them if you like. New Universal drivers are provided with Version
8 and should be located in db2jcc.jar. The URLs for the new drivers change
just a little bit but the new syntax is documented in the Information
Center.

The manuals suggest that you need all to have all three of the following
jars in your classpath:

- sqllib\java\db2java.zip
- sqllib\java\db2jcc.jar
- sqllib\java\db2jcc_license_cu.jar

I'm guessing that you *might* get away with using just db2java.zip if you're
sticking to the old drivers. However, it would be best to put all three jars
on your classpath so that you can use either the old or new drivers at any
time without having to install anything else later.

Also, you *may* need some additional jars, depending on what you are doing.
Rather than cutting and pasting chunks of the manual and maybe missing
something, let me suggest that you go to the Information Center and put
"Setting up the Windows Java Environment" in the Search box; if you press
Go, you should see the page I mean.

If this advice doesn't help, you will find an active DB2 newsgroup at
comp.databases.ibm-db2 on Usenet. It is monitored by the IBM Toronto lab,
which is responsible for DB2 on Unix/Linux/Windows, and they often jump in
to help with questions people post. If you ask there, you are almost certain
to get a good answer.

By the way, I don't think you need to rename db2java.zip to db2java.jar; in
fact, that may be the source of your problem. You may want to try renaming
it back to db2java.zip FIRST and see if that resolves the problem before
worrying about adding any additional jars.

For what it's worth, I think your db2java.zip file is in the right place -
tomcat_home\common\lib - but you may want to double-check the Tomcat docs;
they may have made some changes for Tomcat 5.x and 5.5.x.

Rhino

- Original Message - 
From: "Jon Christensen" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, October 25, 2005 2:01 PM
Subject: DB2 and Tomcat 5.5 Issue


Has anyone been able to connect to a DB2 8.1 datasource using Tomcat  5.5?
 I have been trying for a few days now and can only get one error message:


org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver
of class 'COM.ibm.db2.jdbc.app.DB2Driver' for connect URL
'jdbc:DB2:bfstst' at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSourc­
e.java:780)

at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.j­
ava:540)


Caused by: java.sql.SQLException: No suitable driver  at
java.sql.DriverManager.getDriver(DriverManager.java:243)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSourc­
e.java:773)

... 23 more


I've got the db2java.jar (renamed from db2java.zip) in
tomcat_home\common\lib and also in my web apps's lib directory.

We are trying to switch from using WSAD 5.x to using Eclipse and Tomcat
5.5 running under XP but this has been holding me up for quite some
time now.  Any help would be greatly appreciated.


Thanks,


Jon



The information contained in this e-mail and any accompanying documents may
contain information that is confidential or otherwise protected from
disclosure. If you are not the intended recipient of this message, or if
this message has been addressed to you in error, please immediately alert
the sender by reply e-mail and then delete this message, including any
attachments. Any dissemination, distribution or other use of the contents of
this message by anyone other than the intended recipient is strictly
prohibited.








No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.361 / Virus Database: 267.12.5/148 - Release Date: 25/10/2005



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.361 / Virus Database: 267.12.5/148 - Release Date: 25/10/2005


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



jCIFS Jboss Tomcat IIS NTLM Authentication

2005-10-25 Thread Scott Shaver

Okay I've spent the last several days going over everything I could find on the 
web about setting this up and I still can't get it to work. I have the 
following setup:

jCIFS 1.2.6
JBoss 4.0.3 with Tomcat 5
Jakarta isapi_redirect 1.2.14
IIS 5.0
IE 6
Windows 2003 Domain Controller

A win2k machine running a small web app, on Jboss, with the 
jcifs.http.NtlmHttpFilter set up. An IIS box fronting the app server using the 
isapi redirector to pass the requests through to jboss. If I hit the app server 
directly with IE I see the following output from jboss:

14:06:24,692 INFO  [STDOUT] Transport1:   connect: state=0
14:06:24,692 INFO  [STDOUT] New data read: 
Transport1[MC4DC01<00>/999.16.11.10:0]
14:06:24,692 INFO  [STDOUT] 0: FF 53 4D 42 72 00 00 00 00 98 03 C0 00 00 00 
00  | SMBr..└|
00010: 00 00 00 00 00 00 00 00 00 00 73 59 00 00 06 00  |..sY|
14:06:24,692 INFO  [STDOUT] byteCount=50 but readBytesWireFormat returned 32
14:06:24,692 INFO  [STDOUT] Transport1: run connected
14:06:24,708 INFO  [STDOUT] Transport1: connected: state=3
14:06:24,724 INFO  [STDOUT] treeConnect: unc=\\MC4DCA01\IPC$,service=?
14:06:24,739 INFO  [STDOUT] New data read: 
Transport1[MC4DC01<00>/999.16.11.10:0]
14:06:24,739 INFO  [STDOUT] 0: FF 53 4D 42 73 00 00 00 00 98 03 C0 00 00 00 
00  | SMBs..└|
00010: 00 00 00 00 00 00 00 00 07 20 73 59 00 40 07 00  |. [EMAIL 
PROTECTED]|
14:06:24,755 INFO  [STDOUT] NtlmHttpFilter: MCDATACORPNT\sas1a780c successfully 
authenticated against 0.0.0.0<00>/172.16.11.10

which is great, that is extacly what I wanted it to do. I was authenticated 
against our domain controller. So it appears jCIFS is working. However when I 
then go to the application via the IIS server this happens:

12:32:17,115 INFO  [STDOUT] treeConnect: unc=\\MC4DCA01\IPC$,service=?
12:32:17,130 INFO  [STDOUT] New data read: 
Transport1[MC4DCA01<00>/999.16.11.10:0]
12:32:17,130 INFO  [STDOUT] 0: FF 53 4D 42 73 6D 00 00 C0 98 03 C0 00 00 00 
00  | SMBsm..└..└|
00010: 00 00 00 00 00 00 00 00 00 00 73 59 00 00 05 00  |..sY|
12:32:17,130 INFO  [STDOUT] NtlmHttpFilter: MCDATACORPNT\sas1a780c: 0xC06D: 
jcifs.smb.SmbAuthException: Logon failure: unknown user name or bad password.

12:32:17,146 INFO  [JkCoyoteHandler] Response already committed

So the question is: What is causing it to fail when going through IIS?

I'm only using the jcifs.http.domainController and jcifs.smb.client.domain 
settings in the web.xml for the filter.

Is it IIS? Is it the isapi_redirect ISAPI filter on IIS? Is it the AJP13 worker 
threads on the Jboss side? Is it something happening between the worker threads 
and the request hand-off to the tomcat server?

I have the entire list of instructions written down for how I have set all of 
this up if anyone needs to see it. I can get the logs from the ISAPI filter if 
that would help. I've seen many many thread about people having issues with 
this but no real answers and no configurations exactly like this. Any help is 
greatly appreciated.




SPECIAL NOTICE

All information transmitted hereby is intended only for the use of the
addressee(s) named above and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution
of confidential and privileged information is prohibited. If the reader
of this message is not the intended recipient(s) or the employee or agent
responsible for delivering the message to the intended recipient, you are
hereby notified that you must not read this transmission and that disclosure,
copying, printing, distribution or use of any of the information contained
in or attached to this transmission is STRICTLY PROHIBITED.

Anyone who receives confidential and privileged information in error should
notify us immediately by telephone and mail the original message to us at
the above address and destroy all copies.  To the extent any portion of this
communication contains public information, no such restrictions apply to that
information. (gate01)

RE: SSL Handshake Error!

2005-10-25 Thread Mark Thomas
Sounds like you are on the right path. The Equifax certificate must be installed
in the trust store, not your key store. Where this is depends on whether you are
using a JDK or a JRE but as an example, on my laptop the path is
D:\jdk1.5.0_05\jre\lib\security\cacerts

Mark 

> -Original Message-
> From: Neal Cabage [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, October 25, 2005 8:00 PM
> To: Tomcat Users List
> Subject: SSL Handshake Error!
> 
> 
> Help!!!
> 
> I use a secure (https) XML feed and it appears the provider 
> recently switched SSL certificate providers and is now using 
> an Equifax certificate.  Since that switch occured,
> my code is now throwing the following exceptions:
> 
>  
> 
> javax.net.ssl.SSLHandshakeException: 
> java.security.cert.CertificateException: Could not find 
> trusted certificate 
> 
>  
> 
> Per the research I have done, I believe this must mean that 
> the root certificate from Equifax must be installed in my 
> local Keystore, in order to trust and decipher this 
> certificate.  But attempts so far 
> 
> 
> to import this into the keystore and obtain successful 
> connection again have all failed.  
> 
> Does anyone know what is going on? Am I on the right path?  
> Does anyone know what I am doing wrong?  
> 
>  
> 
> Thanks.
> 
> Neal
> 


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



RE: 4.1.31: RemoteAddrValve and custom 403 page

2005-10-25 Thread Mark Thomas
The valve intercepts the request before it gets to any web applications so the
settings in conf/web.xml or in an applications individual WEB-INF/web.xml will
not get used.

You have a couple of options:
- Write you own valve (copy, paste, add a few lines and you should be done)
- Write a servlet filter (a bit more work but portable and you can apply it at
the web app level)

Mark 

> -Original Message-
> From: Robert Baruch [mailto:[EMAIL PROTECTED] 
> Sent: Monday, October 24, 2005 6:09 PM
> To: users@tomcat.apache.org
> Subject: 4.1.31: RemoteAddrValve and custom 403 page
> 
> Hi all,
> 
> I have a default install of 4.1.31 on Windows. I have two problems.
> 
> First problem is, I want to have a custom 403 Forbidden page and a  
> 404 Page Not Found. So, in conf/web.xml, I added this after the  
> welcome-file-list block:
> 
> 
>403
>/file_not_found.jsp
> 
> 
> 
>404
>/file_not_found.jsp
> 
> 
> 
> I have also put file_not_found.jsp into webbaps/ROOT. It just looks  
> like this:
> 
> <% response.setStatus(200); %>
> 
> 
> There was a problem with your request, please try again
> 
> 
> 
> 
> Before anyone gets excited, my company's security policy requires  
> that error pages be sent using a 200 status code. Don't even get me  
> started :(
> 
> 
> Anyway, it works great if I try to access a page which 
> doesn't exist,  
> I get my custom page.
> 
> Now, I need to restrict Tomcat to respond only to requests that come  
> internally from the same machine. Thus, in server.xml I put this  
> inside the standalone engine config:
> 
> (existing)
> (existing)
> (added) className="org.apache.catalina.valves.RemoteAddrValve"  
> allow="127.0.0.1"/>
> 
> 
> Problem #1: Tomcat properly rejects any access from outside the  
> machine, but Tomcat is only sending a blank page with a 403 
> status. I  
> would have expected my error-page block to intercept 403's and turn  
> them into whatever I wanted.
> 
> Problem #2: How can I get it so that any 30x, 40x, or 50x error that  
> I chose will result in my custom error page, regardless of where  
> those errors come from?
> 
> Thanks,
> 
> --Rob
> 
> 
> 
> -
> 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]



How to measure queueing time: from tomcat recieving request to axis web service

2005-10-25 Thread Pim W.
Hi,

I want to measure the queueing time starting from when Tomcat recieve the
request from a client until the request reach my process.
I am writing a web service application hosted under axis engine.
I want to
- Get the time stamp when the request arrive at Tomcat

And I then want to find the distance between the timestamp when Tomcat
recieves the request and the time stamp when my web service starts working.
But I dont know where or how should I modify tomcat to get the time stamp
when the request comes.
I tried to read the architecture of Tomcat but I dont really understand
where the request arrives.

I'm not sure if I should post this in user mailing list or developer mailing
list.
Can somebody please point me the way?


RE: Undeploy problem

2005-10-25 Thread Mark Thomas
Running on Windows? Try using antiJARLocking or antiResourceLocking. See
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

Mark 

> -Original Message-
> From: Jan Pernica [mailto:[EMAIL PROTECTED] 
> Sent: Monday, October 24, 2005 10:42 AM
> To: users@tomcat.apache.org
> Subject: Undeploy problem
> 
> Hi everybody
> 
> We have got a problem with undeploying the application. If we 
> undeploy 
> an application tomcat does not delete the unpacked war folder. The 
> folder contains the WEB-INF/lib/tomahawk.jar library and 
> ehcache.jar. If 
> in lib there is a mail.jar then it hangs too.
> 
> If we try to delete it. We get message the file is used by 
> another process.
> 
> We are running Tomcat 5.5.9 on Win XP with JDK 1.4.2_09
> 
> Thank you for your help.
> 
> Jan Pernica
> 
> -
> 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: Securing Manager Role

2005-10-25 Thread Mark Thomas
This is not supported because there is simply no point.

If someone can read the tomcat-users.xml file then they almost certainly own the
server and you have bigger problems than someone having access to the manager
app.

Consider if the password was encrypted, where is the decryption key stored?
There is no point putting it in the Tomcat code since it is open source (and
even if it wasn't it would still be bad security). You could put it in a
separate file, but if an attacker can read tomcat-users.xml, there is no reason
to suppose they won't be able to read the file with the key.

Mark

> -Original Message-
> From: Nehal Sangoi [mailto:[EMAIL PROTECTED] 
> Sent: Monday, October 24, 2005 10:05 AM
> To: 'Tomcat Users List'
> Subject: Securing Manager Role
> 
> 
> Hi,
> 
> How can i encrypt the manager user's password in 
> tomcat-users.xml file? I
> need to keep manager-deployer thing be secured in my environment.
> 
> Thanks & Regards,
> Nehal
> 
> 


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



Re: Can not access www.company.com/index.jsp but can with www.company.com:8080/index.jsp

2005-10-25 Thread Leon Rosenberg


 wrote:
> Hi,
>
> Thank you in advance for your help. I have a web application in
> the ROOT web dirctory.   I failed to access the ROOT/index.jsp file with 
> xx.xxx.xxx.xx/index.jsp, but I was able to access it with 
> xx.xxx.xxx.xx:8080/index.jsp Can someone tell me why. I used Struts in this 
> web application and declared something like the following
> in the ROOT/WEB-INF/web.xml file;
>
>  
>
>
>
>
>  
>config
>
>  
>  
>debug
>3
>  
>  
>detail
>3
>  
>  1
>
>
>
>
>  *.do
>
>   
>
> The HTTP Connector listed in the server.xml file is listed below.
>
> 
>
> port="8080" minProcessors="5" maxProcessors="75"
>enableLookups="true" redirectPort="8443"
>acceptCount="100" debug="0" connectionTimeout="2"
>useURIValidationHack="false" disableUploadTimeout="true" />
>
>
>
> Kam Lung Leung
>
> -
> 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: Tracking

2005-10-25 Thread Larry Meadors
Man, this feels like telling someone how to shoot their foot off, but this
would be shorter:

new Exception().printStackTrace();

Larry


On 10/25/05, Steve Stearns <[EMAIL PROTECTED]> wrote:
>
> Charles P. Killmer wrote:
>
> >I have a bunch of JSP files that all instantiate a single class file.
> >Is there a way for the class file to log which file called it and
> >ideally from which line the call was made?
> >
> There might be a better way to do this but off the top of my head I
> should think this would work if you added it to your JSP pages:
>
> <%
> try {
> throw new RuntimeException("Log call");
> }
> catch (RuntimeException e) {
> e.printStackTrace();
> }
> %>
>
> ---Steve
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Tracking

2005-10-25 Thread Steve Stearns

Charles P. Killmer wrote:


I have a bunch of JSP files that all instantiate a single class file.
Is there a way for the class file to log which file called it and
ideally from which line the call was made?

There might be a better way to do this but off the top of my head I 
should think this would work if you added it to your JSP pages:


<%
try {
   throw new RuntimeException("Log call");
}
catch (RuntimeException e) {
   e.printStackTrace();
}
%>

---Steve

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



Tracking

2005-10-25 Thread Charles P. Killmer
I have a bunch of JSP files that all instantiate a single class file.
Is there a way for the class file to log which file called it and
ideally from which line the call was made?

 

My bigger problem is that I am using Connection pooling.  And if I don't
close every connection when I am down with it, the server stops
responding.  Restart Tomcat and everything is back to normal.  Is there
a setting to have Tomcat close all connections for me when a request
finishes?

 

Thank you for any thoughts.

Charles

 

 



Re: how to empty tomcat cache ?

2005-10-25 Thread Frederic D
The problem is that i had to change the wsdl of a web
services (the code don't change but the wsdl is
generated dynamicaly) and when i change the wsdl or
redeploy the web services with the new wsdl without
restarting tomcat, it's always the old wsdl that is
show by tomcat. I would like to know if it's possible
to empty the tomcat cache to have the new wsdl taking
in account.


--- andy gordon <[EMAIL PROTECTED]> a écrit :

> Which cache are you referring to?
> 
> Frederic D <[EMAIL PROTECTED]> wrote:Hi !
> 
> Is it possible to empty tomcat cache without
> restarting tomcat ?
> 
> Thanks.
> Frederic
> 
> 
> 
> 
> 
> 
>
___
> 
> Appel audio GRATUIT partout dans le monde avec le
> nouveau Yahoo! Messenger 
> Téléchargez cette version sur
> http://fr.messenger.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> 
>   
> -
>  Yahoo! FareChase - Search multiple travel sites in
> one click.  







___ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com

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



SSL Handshake Error!

2005-10-25 Thread Neal Cabage

Help!!!

I use a secure (https) XML feed and it appears the provider recently switched 
SSL certificate providers and is now using an Equifax certificate.  Since that 
switch occured,
my code is now throwing the following exceptions:

 

javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: 
Could not find trusted certificate 

 

Per the research I have done, I believe this must mean that the root 
certificate from Equifax must be installed in my local Keystore, in order to 
trust and decipher this certificate.  But attempts so far 


to import this into the keystore and obtain successful connection again have 
all failed.  

Does anyone know what is going on? Am I on the right path?  Does anyone know 
what I am doing wrong?  

 

Thanks.

Neal


Re: how to empty tomcat cache ?

2005-10-25 Thread andy gordon
Which cache are you referring to?

Frederic D <[EMAIL PROTECTED]> wrote:Hi !

Is it possible to empty tomcat cache without
restarting tomcat ?

Thanks.
Frederic






___ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com

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




-
 Yahoo! FareChase - Search multiple travel sites in one click.  

RE: URGENT: Running Tomcat 5.0 as a Windows service using a specific user

2005-10-25 Thread Jan Andersson
Wow, that made it!

Wonder why it didn't work with Tomcat's "Configure Tomcat" application? 
Never mind, now it works.

Thank's to all!

/JA




"Peter Crowther" <[EMAIL PROTECTED]> 
2005-10-25 18:30
Please respond to
"Tomcat Users List"


To
"Tomcat Users List" 
cc

Subject
RE: URGENT: Running Tomcat 5.0 as a Windows service using a specific user






> From: Jan Andersson [mailto:[EMAIL PROTECTED] 
> I'll try again: How do I do to run Tomcat 5.0 as a Windows 
> service using a 
> specific user? I've tried using the Configure Tomcat 
> application, tab Log 
> On, but Tomcat is anyway started with "SYSTEM" as user. 

Jan, have you tried using the standard Administrative Tools>Services
console, and changing the service's login there?

 - Peter

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




DB2 and Tomcat 5.5 Issue

2005-10-25 Thread Jon Christensen
Has anyone been able to connect to a DB2 8.1 datasource using Tomcat  5.5? 
 I have been trying for a few days now and can only get one error message: 


org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver 
of class 'COM.ibm.db2.jdbc.app.DB2Driver' for connect URL 
'jdbc:DB2:bfstst' at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSourc­e.java:780)
 

at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.j­ava:540)
 


Caused by: java.sql.SQLException: No suitable driver  at 
java.sql.DriverManager.getDriver(DriverManager.java:243) 
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSourc­e.java:773)
 

... 23 more 


I've got the db2java.jar (renamed from db2java.zip) in 
tomcat_home\common\lib and also in my web apps's lib directory. 

We are trying to switch from using WSAD 5.x to using Eclipse and Tomcat 
5.5 running under XP but this has been holding me up for quite some 
time now.  Any help would be greatly appreciated. 


Thanks, 


Jon 


 
The information contained in this e-mail and any accompanying documents may 
contain information that is confidential or otherwise protected from 
disclosure. If you are not the intended recipient of this message, or if this 
message has been addressed to you in error, please immediately alert the sender 
by reply e-mail and then delete this message, including any attachments. Any 
dissemination, distribution or other use of the contents of this message by 
anyone other than the intended recipient is strictly prohibited.



JK.Log Rotation In Windows

2005-10-25 Thread Jon Chau
Hello,

I cannot figure out a way to rotate my jklogfile.  I tried searching
the archives, but could not find an answer specific to windows, but I
did find something by adding some java to the tomcat server.xml file,
but that does not apply to me.  Here's why:

Apache 2.0.54 Win32 + mod_jk 1.2.14 + openssl v.0.9.8 on Windows 2003 [DMZ]
Tomcat 5.0.28 on Windows 2000 [Internal Server]

Apache and the mod_jk/jk.log is on a seperate server than Tomcat. 
Does anyone have any suggestions on how to accomplish log rotation in
windows on my apache server for the jk.log?  I tried using apache
methods (rotatelogs) and was unsuccesful.

Thanks In Advance,

Jon Chau

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



Again Please Help!!! SimpleTCPCluster, No session state received time out 60s during start up

2005-10-25 Thread michelle wang
-- Forwarded message --
From: michelle wang <[EMAIL PROTECTED]>
Date: Oct 24, 2005 8:49 PM
Subject: Please Help!!! No session state received, time out 60s during
tomcat start up
To: users@tomcat.apache.org

I'm running 2 tomcat (5.0.18) instances with Simple TCP Clustering on the
same Solaris 9 server, there are multiple web applications need to be
clustered. When starting up the secondary tomcat, there is only one webapp
receives the session state while all others wait 60 seconds and time out.
The strange thing is which web app can successfully receive the session
state seems to be random, I have seen different web app reports receiving
session state, but never more than one of them at one time . Once tomcat is
started, the session replication just works fine even for those application
reports time out during startup. I can always kill the tomcat which is
serving the user session, the other tomcat takes control without losing any
user input. It's very annoying that because each instance time out 60s the
secondary tomcat always takes a few minutes to start up. I have been looking
into this for a whole week without any clue :( Any help is appreciated
 All web app needs to be clustered has  in their web.xml
Here's the cluster configuration in server.xml

http://228.0.0.8/>" ##same mcastAddr on the other
tomcat
mcastPort="45565" ##same mcastPort on the other tomcat
mcastFrequency="500"
mcastDropTime="3000"
tcpThreadCount="6"
tcpListenAddress="auto"
tcpListenPort="4001" ##Using port 4002 on the other tomcat since both
instance on the same server
tcpSelectorTimeout="100"
printToScreen="false"
expireSessionsOnShutdown="false"
useDirtyFlag="true"
replicationMode="pooled"
/>
 The following is the start up log from catalina.out
... ( following seems telling multicast works fine, tomcat joins the cluster
member ship )
INFO: Cluster is about to start
Oct 24, 2005 5:01:57 PM org.apache.catalina.cluster.tcp.SimpleTcpClusterstart
INFO: Sleeping for 2000 secs to establish cluster membership
Oct 24, 2005 5:01:57 PM
org.apache.catalina.cluster.tcp.SimpleTcpClustermemberAdded
INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember
[tcp://206.47.63.195:4001,206.47.63.195,4001, alive=38841]

 ( following is a webapp /comstg which fails to receive session state in
60s)
INFO: Processing Context configuration file URL
file:/app/ufs2/UfsServer/tomcat/conf/Catalina/localhost/comstg.xml
Oct 24, 2005 5:02:09 PM org.apache.catalina.cluster.session.DeltaManagerstart
INFO: Starting clustering manager...:/comstg
Oct 24, 2005 5:02:09 PM
org.apache.catalina.cluster.tcp.SimpleTcpClustermessageDataReceived
WARNING: Context manager doesn't exist:/comqa
Oct 24, 2005 5:02:09 PM org.apache.catalina.cluster.session.DeltaManagerstart
WARNING: Manager[/comstg], requesting session state from
org.apache.catalina.cluster.mcast.McastMember[
tcp://206.47.63.195:4001,206.47.63.195,4001, alive=38841]. This operation
will timeout if no session state has been received within 60 seconds
Oct 24, 2005 5:03:10 PM org.apache.catalina.cluster.session.DeltaManagerstart
SEVERE: Manager[/comstg], No session state received, timing out.
 ... ( following is a webapp /comqa which successfully receives session
state in 106ms)
INFO: Processing Context configuration file URL
file:/app/ufs2/UfsServer/tomcat/conf/Catalina/localhost/comqa.xml
Oct 24, 2005 5:03:17 PM org.apache.catalina.cluster.session.DeltaManagerstart
INFO: Starting clustering manager...:/comqa
Oct 24, 2005 5:03:17 PM org.apache.catalina.cluster.session.DeltaManagerstart
WARNING: Manager[/comqa], requesting session state from
org.apache.catalina.cluster.mcast.McastMember[tcp://206.47.63.195:4001,206.47.63.195,4001,
alive=38841]. This operation will timeout if no session state has been
received within 60 seconds
Oct 24, 2005 5:03:17 PM org.apache.catalina.cluster.session.DeltaManagerstart
INFO: Manager[/comqa], session state received in 106 ms.


Can not access www.company.com/index.jsp but can with www.company.com:8080/index.jsp

2005-10-25 Thread Kam Lung Leung
Hi,
   
Thank you in advance for your help. I have a web application in
the ROOT web dirctory.   I failed to access the ROOT/index.jsp file with 
xx.xxx.xxx.xx/index.jsp, but I was able to access it with 
xx.xxx.xxx.xx:8080/index.jsp Can someone tell me why. I used Struts in this web 
application and declared something like the following
in the ROOT/WEB-INF/web.xml file;

 
   
   


 
   config

 
 
   debug
   3
 
 
   detail
   3
 
 1
   
   
   

 *.do
   
  

The HTTP Connector listed in the server.xml file is listed below.
   






Kam Lung Leung

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



RE: Can not access www.company.com but can with www.company.com:8080

2005-10-25 Thread Robert Harper
Try setting the connector port to 80 in the server.xml file. I believe it is
probably set to 8080. This will set the port your app listens to. When you
don't specify a port, it will default to 80 when using HTTP. HTTPS will
default to 443.

Robert S. Harper
Information Access Technology, Inc.

-Original Message-
From: Kam Lung Leung [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 25, 2005 11:03 AM
To: Tomcat User List
Subject: Can not access www.company.com but can with www.company.com:8080
Importance: High

Hi,
   
 Thank you in advance for your help. I have a web application in
the ROOT web dirctory.   I failed to access the index.jsp
:8080. Can someone tell me why. I used Struts in this web
application and declared something like the following
in the ROOT/WEB-INF/web.xml file;
   
  
   
   


     
   config

     
     
   debug
   3
     
     
   detail
   3
     
     1
   
   
   

     *.do
   
  
 The HTTP Connector listed below.
   
      




    useURIValidationHack="false" disableUploadTimeout="true"
/>
 
 Sincerely yours,
 
 
 
 
 Kam Lung Leung
 President
 Advanced Voice Technologies, Inc.
 www.advoicetech.com
 Office: 303.539.2950
 Fax: 303.539.2951
 Our business is to bring your clients to you by personalized
voice messaging.
  



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



Re: LDAP connections pool

2005-10-25 Thread sudip shrestha
It is possible to do this in a number of ways
- Container Managed Realm:
- http://tomcat.apache.org/tomcat-5.0-doc/realm-howto.html#JNDIRealm
- But does not support ldaps:// . ldap via SSL
- if you want SSL with ldap, use mozilla-java-ldap-sdk: here are good
resources:
- http://www.mozilla.org/directory/javasdk.html
- http://www.dahbura.com
- Mozilla's API has a built in class
netscape.ldap.util.ConnectionPoolwhich you can use in many different
ways...
- This API has complete support for all the required LDAP functions and very
simple to use compared to JNDI API.


On 10/25/05, Jess Holle <[EMAIL PROTECTED]> wrote:
>
> It's quite possible via Apache...
>
> If it is not possible via Tomcat than this would be one of those reasons
> to use Apache as a web server.
>
> Javier wrote:
>
> >Con fecha Tuesday, October 25, 2005, 3:16:43 PM, escribió:
> >
> >
> >>If you mean pooling with JNDIRealm - there is no pooling available with
> that
> >>realm.
> >>
> >>
> >Tim
> >
> >Thanks for your reply.
> >
> >I've an LDAP directory and my application will validate users. As far
> >as I know there will be a lot of connection operations I'm looking for
> >a method to have a number of opened connections that could use to
> >validate users.
> >
> >Something similar to a DB pool.
> >
> >Is this possible ?
> >
> >Thanks in advance
> >
> >Javier
> >
> >
>
>


Can not access www.company.com but can with www.company.com:8080

2005-10-25 Thread Kam Lung Leung
Hi,
   
 Thank you in advance for your help. I have a web application in
the ROOT web dirctory.   I failed to access the index.jsp
:8080. Can someone tell me why. I used Struts in this web
application and declared something like the following
in the ROOT/WEB-INF/web.xml file;
   
  
   
   


     
   config

     
     
   debug
   3
     
     
   detail
   3
     
     1
   
   
   

     *.do
   
  
 The HTTP Connector listed below.
   
      




    useURIValidationHack="false" disableUploadTimeout="true"
/>
 
 Sincerely yours,
 
 
 
 
 Kam Lung Leung
 President
 Advanced Voice Technologies, Inc.
 www.advoicetech.com
 Office: 303.539.2950
 Fax: 303.539.2951
 Our business is to bring your clients to you by personalized
voice messaging.
  

RE: URGENT: Running Tomcat 5.0 as a Windows service using a specific user

2005-10-25 Thread Longson, Robert
Jan,

You seem to be doing it right. Set the user in the log on pane to the user you 
want then click OK (alternatively you can do the same via Control 
Panel->Services) then start the tomcat service and it will run as that user. 
Control panel indicates which user the service runs as as does task manager if 
the service is running.

I'm not really sure what the problem is given your explanation.

Best regards

Robert.

-Original Message-
From: Jan Andersson [mailto:[EMAIL PROTECTED]
Sent: 25 October 2005 17:25
To: Tomcat Users List
Subject: URGENT: Running Tomcat 5.0 as a Windows service using a
specific user


I'll try again: How do I do to run Tomcat 5.0 as a Windows service using a 
specific user? I've tried using the Configure Tomcat application, tab Log 
On, but Tomcat is anyway started with "SYSTEM" as user. 

Am I doing something wrong?
What is SYSTEM for kind of a user?

Plase, any help very much appreciated! I'm totally lost on these 
things and need to get this working by Friday!

Jan Andersson
Senior Software Engineering Specialist
IBM Rational Brand Services
+46 (0)70-793 23 02
Oddegatan 5
164 92 Stockholm 
  

 
The information contained in this message is intended only for the recipient, 
and may be a confidential attorney-client communication or may otherwise be 
privileged and confidential and protected from disclosure. If the reader of 
this message is not the intended recipient, or an employee or agent responsible 
for delivering this message to the intended recipient, please be aware that any 
dissemination or copying of this communication is strictly prohibited. If you 
have received this communication in error, please immediately notify us by 
replying to the message and deleting it from your computer. 

 

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



Re: LDAP connections pool

2005-10-25 Thread Jess Holle

It's quite possible via Apache...

If it is not possible via Tomcat than this would be one of those reasons 
to use Apache as a web server.


Javier wrote:


Con fecha Tuesday, October 25, 2005, 3:16:43 PM, escribió:
 


If you mean pooling with JNDIRealm - there is no pooling available with that
realm.
   


Tim

Thanks for your reply.

I've an LDAP directory and my application will validate users. As far
as I know there will be a lot of connection operations I'm looking for
a method to have a number of opened connections that could use to
validate users.

Something similar to a DB pool.

Is this possible ?

Thanks in advance

Javier
 



RE: URGENT: Running Tomcat 5.0 as a Windows service using a specific user

2005-10-25 Thread Peter Crowther
> From: Jan Andersson [mailto:[EMAIL PROTECTED] 
> I'll try again: How do I do to run Tomcat 5.0 as a Windows 
> service using a 
> specific user? I've tried using the Configure Tomcat 
> application, tab Log 
> On, but Tomcat is anyway started with "SYSTEM" as user. 

Jan, have you tried using the standard Administrative Tools>Services
console, and changing the service's login there?

- Peter

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



URGENT: Running Tomcat 5.0 as a Windows service using a specific user

2005-10-25 Thread Jan Andersson
I'll try again: How do I do to run Tomcat 5.0 as a Windows service using a 
specific user? I've tried using the Configure Tomcat application, tab Log 
On, but Tomcat is anyway started with "SYSTEM" as user. 

Am I doing something wrong?
What is SYSTEM for kind of a user?

Plase, any help very much appreciated! I'm totally lost on these 
things and need to get this working by Friday!

Jan Andersson
Senior Software Engineering Specialist
IBM Rational Brand Services
+46 (0)70-793 23 02
Oddegatan 5
164 92 Stockholm


how to empty tomcat cache ?

2005-10-25 Thread Frederic D
Hi !

Is it possible to empty tomcat cache without
restarting tomcat ?

Thanks.
Frederic






___ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com

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



RE: help in using a custom API

2005-10-25 Thread Davies, Joshua
I'd avoid calling a third-party API from a JSP at all.  Instead, I'd
recommend using an MVC-style approach
(http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc.html),
like this:

public class ApiCallingServlet extends HttpServlet
{
public void doGet( HttpServletRequest req, HttpServletResponse
resp )
throws ServletException, IOException
{
try
{
ApiResults results = api.call( req.getParameter(
"apiParam1" ),

req.getParameter( "apiParam2" ) );

req.setAttribute( "meaningfulParameter1",
results.getMeaningfulParameter1( ) );
req.setAttribute( "meaningfulParameter2",
results.getMeaningfulParameter2( ) );

ServletContext sc = getServletContext( );
RequestDispatcher rd = sc.getRequestDispatcher(
"/jsp/api/ApiUser.jsp" );
rd.forward( req, res );
}
catch ( ApiGeneratedException e )
{
throw new ServletException( e );
}
}
} 

/jsp/api/ApiUser.jsp:


...
The API gave meaningful result 1 of <%= request.getAttribute(
"meaningfulParameter1" ) %>
The API gave meaningful result 2 of <%= request.getAttribute(
"meaningfulParameter2" ) %>
...
 

This way the example code can be pretty much copied directly into the
servlet's doGet or doPost method and modified from there.

-Original Message-
From: Jayel Villamin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 24, 2005 11:15 PM
To: users@tomcat.apache.org
Subject: help in using a custom API

Hi. We have bought an IT customer management system to management the 
helpdesk. It came with a JAVA API.

Here are is thin POS guide and some examples. The problem with the 
examples is that is uses plain Java (Java run from the commandline). 
But I need to use it from within a browser. Since my Java is at a 
beginner's level, I have been reading some online books were my work 
has accessed to (like O'rielly's JavaServer Pages, 3rd Edition). I 
have put the API jar file in /shared/lib but I cannot find a way on 
how to access it from a jsp page.

If anyone can point me to the right direction on how to use this API 
from within a JSP. I would really appreciate it.

Thank you.

Jayel Villamin, Web Programmer, Information Technology Services Division
+ Deakin University Geelong Victoria 3217 Australia.
( 03 5227 8688 International: +61 3 5227 8688
( 03 5227 8866 International: +61 3 5227 8866
+ [EMAIL PROTECTED]
: http://www.deakin.edu.au
Deakin University CRICOS Provider Code 00113B

#
Important Notice: The contents of this email transmission, including 
any attachments, are intended solely for the named addressee and are 
confidential; any unauthorized use, reproduction or storage of the 
contents and any attachments is expressly prohibited. If you have 
received this transmission in error, please delete it and any 
attachments from your system immediately and advise the sender by 
return email or telephone. Deakin University does not warrant that 
this email and any attachments are error or virus free.


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



AW: Why tomcat has a wrapped dbcp?

2005-10-25 Thread Peter . Zoche
One change I have found is that when printing out a prepared statement (e.g.
for debugging),
you do not get the statement you have created, but only a reference I think.


-Ursprüngliche Nachricht-
Von: David Smith [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 25. Oktober 2005 17:40
An: Tomcat Users List
Betreff: Re: Why tomcat has a wrapped dbcp?


To avoid classloader collisions with webapps that directly use DBCP
independant of Tomcat.

AFAIK it's purely refactored to a separate package with no functional
changes.

--David

Sam Lee wrote:

>Why tomcat has a wrapped dbcp? Is there any difference?
>
>
>-
>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]



Re: tomcat 5 combined http and https, same session

2005-10-25 Thread Maurice Yarrow

Hassan

Thanks:

Ah, I see, you are using a sendRedirect(...).
Yes, this certainly lets you forward without
having to get the formal context of the target
but it does put the URL on the browser line
if I remember correctly.  This will work for
some of what I am doing but not in the case
where I require that the target remain anonymous.

Thanks again

Maurice


Hassan Schroeder wrote:

Maurice Yarrow wrote:



I'm also interested in this issue of http(s) switching.
Could you possibly put up an example of this filter?



Sure:



And, of course, this should be the *first* Filter in your chain...

FWIW!




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



Re: Why tomcat has a wrapped dbcp?

2005-10-25 Thread David Smith
To avoid classloader collisions with webapps that directly use DBCP
independant of Tomcat.

AFAIK it's purely refactored to a separate package with no functional
changes.

--David

Sam Lee wrote:

>Why tomcat has a wrapped dbcp? Is there any difference?
>
>
>-
>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[2]: LDAP connections pool

2005-10-25 Thread Javier
Con fecha Tuesday, October 25, 2005, 3:16:43 PM, escribió:

> If you mean pooling with JNDIRealm - there is no pooling available with that
> realm.


Tim

Thanks for your reply.

I've an LDAP directory and my application will validate users. As far
as I know there will be a lot of connection operations I'm looking for
a method to have a number of opened connections that could use to
validate users.

Something similar to a DB pool.

Is this possible ?

Thanks in advance

Javier



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



Re: tomcat 5 combined http and https, same session

2005-10-25 Thread Mark Sutton
If you are using Struts, then the following can help you perform the switching:

http://sourceforge.net/projects/sslext

Mark

On 25/10/05, Rob <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> I looked through the mail archives as well - past two years.  There's some
> interesting info, but nothing that seems to address the issue.  My goal is
> to run https for some pages in my webapp, and http for other pages, using
> the same session.  It's working where I can redirect from http to https (see
> the web.xml security constraint block below), but then I'm in https for all
> web pages, and if I type http at the URL, the session goes away.  What I'm
> aiming for is a webapp where account info is secure and general web pages
> are http, and the session is preserved.
>
> Any thoughts, ideas, comments, quotes, anything?  I've searched pretty well,
> I think, and I don't see any responses to this problem.  Is that strange?  I
> thought a lot of people would use tomcat for a e-commerce or retail webapp,
> where some pages were https and some http using the same session.
>
> help!
>
> thanks,
>
> Rob
>
> 
>Secure Access
>
>   LoginServlet
>   AdminServlet
>   /login
>   /my-account/*
>   /acct
>   /admin
>   /zadmin/*
>
>
>   CONFIDENTIAL
>
>  
>
> -Original Message-
> From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
> Sent: Sunday, October 23, 2005 4:19 PM
> To: Tomcat Users List
> Subject: RE: tomcat 5 http/https config
>
>
> > From: Rob [mailto:[EMAIL PROTECTED]
> > Subject: tomcat 5 http/https config
> >
> > The problem we're having is switching back to http (and the session
> > dropping).
>
> As I recall, a session can be switched to https from http, but not back
> - that is considered to be a security hole.  You might want to check the
> mail archives, since I believe it has been discussed a couple of times
> in the last few months.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> -
> 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]



Why tomcat has a wrapped dbcp?

2005-10-25 Thread Sam Lee
Why tomcat has a wrapped dbcp? Is there any difference?


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



RE: content length on response

2005-10-25 Thread George Sexton
One small tip on content length. If you use UTF-8 encoding, the content
length of the page is not necessarily the number of characters in a string
or string buffer. You have to write the data to something like a byte array
output stream and then get the number of bytes.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

> -Original Message-
> From: Enrique Rodriguez Lasterra [mailto:[EMAIL PROTECTED] 
> Sent: Monday, October 24, 2005 2:44 PM
> To: Tomcat Users List
> Subject: Re: content length on response
> 
> Yes, the problem was on my servlets. they don't use  setContentLength
> method on the response.
> 
> If this is tomcat default behaviour I suppose that it's 
> better not using
> it, but, in some circunstances, some clients need this http header
> variable for reading response.
> 
> Regards, Enrique.
> 
> 
> 
> El lun, 24-10-2005 a las 10:55 -0700, Hassan Schroeder escribió:
> > Enrique Rodriguez wrote:
> > > I have 9-8 tomcat with version 4.1.23 or 5.5.9. They never put
> > > content-length http header variable on responses.
> > 
> > I just grabbed a JSP page from a 5.5.9 install with LiveHTTPHeaders
> > running and it shows a Content-Length header; maybe you can provide
> > more detail about the circumstances where you're seeing a problem...
> > 
> > -- from LiveHTTPHeaders ---
> > HTTP/1.x 200 OK
> > Server: Apache-Coyote/1.1
> > Set-Cookie: JSESSIONID=239B66FD15DE288F747E131C098425E1; Path=/
> > Content-Type: text/html;charset=UTF-8
> > Content-Length: 313
> > Date: Mon, 24 Oct 2005 17:49:04 GMT
> > 
> > 
> -- 
> ___
> Enrique Rodriguez Lasterra
> lasterra AT javahispano DOT org
> http://www.javahispano.org
> 
> 
> -
> 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: tomcat 5 combined http and https, same session

2005-10-25 Thread Hassan Schroeder
Maurice Yarrow wrote:

> I'm also interested in this issue of http(s) switching.
> Could you possibly put up an example of this filter?

Sure:



And, of course, this should be the *first* Filter in your chain...

FWIW!
-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

  dream.  code.



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



AW: AW: AW: apache 2.0.54 + mod_jk 1.2.14 - sticky sessions not working

2005-10-25 Thread Doehler, Thomas
The system i'm currently testing with is only a little test system,
it is not inteded to go productive in that configuration ;-)
But thanks for the tip you anyway. The jk.log has no error messages,
and here is the log grepped for "found best worker":

[Tue Oct 25 15:52:23 2005] [28304:49172] [debug] 
get_most_suitable_worker::jk_lb_worker.c (539): found best worker (debi1) using 
by request method
[Tue Oct 25 15:52:23 2005] [28315:16410] [debug] 
get_most_suitable_worker::jk_lb_worker.c (539): found best worker (debi2) using 
by request method
[Tue Oct 25 15:52:23 2005] [28311:49176] [debug] 
get_most_suitable_worker::jk_lb_worker.c (539): found best worker (debi1) using 
by request method
[Tue Oct 25 15:52:23 2005] [28307:0021] [debug] 
get_most_suitable_worker::jk_lb_worker.c (539): found best worker (debi2) using 
by request method
[Tue Oct 25 15:52:23 2005] [28269:32771] [debug] 
get_most_suitable_worker::jk_lb_worker.c (539): found best worker (debi1) using 
by request method
[Tue Oct 25 15:52:25 2005] [28302:32787] [debug] 
get_most_suitable_worker::jk_lb_worker.c (539): found best worker (debi2) using 
by request method
[Tue Oct 25 15:52:28 2005] [28312:0025] [debug] 
get_most_suitable_worker::jk_lb_worker.c (539): found best worker (debi1) using 
by request method
[Tue Oct 25 15:52:32 2005] [28308:16406] [debug] 
get_most_suitable_worker::jk_lb_worker.c (539): found best worker (debi2) using 
by request method
[Tue Oct 25 15:52:38 2005] [28317:32795] [debug] 
get_most_suitable_worker::jk_lb_worker.c (539): found best worker (debi1) using 
by request method


I don't know how the mod_jk wants to figure out which parameters it should use
to identify requests belonging to one session. Do you have an idea? I'm not 
a c expert, but I think I will taje a look at the sources, maybe I find 
something
about that.

bye Tom


> IMO having 10 connections limit is way too low for any serious usage.
> I would suggest that you rise maxProcessor to at least 100.
>
> Also do you observe any error messages in mod_jk.log?
>
> Regards,
> Mladen.

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



Re: AW: AW: apache 2.0.54 + mod_jk 1.2.14 - sticky sessions not working

2005-10-25 Thread Mladen Turk

Doehler, Thomas wrote:
Hi, 


   
   


IMO having 10 connections limit is way too low for any serious usage.
I would suggest that you rise maxProcessor to at least 100.

Also do you observe any error messages in mod_jk.log?

Regards,
Mladen.

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



Re: LDAP connections pool

2005-10-25 Thread Tim Funk
If you mean pooling with JNDIRealm - there is no pooling available with that 
realm.


-Tim

Javier Leyba wrote:


Hi All

I want to make an LDAP connection pool in my Tomcat
5028 server. Is this possible ? Could someone show an
example ?



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



AW: AW: apache 2.0.54 + mod_jk 1.2.14 - sticky sessions not working

2005-10-25 Thread Doehler, Thomas
Hi, 

here the requested files:

workers properties:
---
#
# wokers.properties - configuration for mod_jk
#

# configure path separator
ps=/

# list of workers by name
worker.list=loadbalancer

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=debi1, debi2
worker.loadbalancer.sticky_sessions=1

#
# first application server: debi1
#
worker.debi1.port=8009
worker.debi1.host=debi1.mydomain.org
worker.debi1.type=ajp13

#
# second worker
#
worker.debi2.port=8009
worker.debi2.host=debi2.mydomain.org
worker.debi2.type=ajp13 


And the server.xml (this is a snippet from jboss-service.xml, since i use 
tomcat embedded into jboss):

  
 

   
   

  
  

  
  

   





   
   
 
  
 
Thanks in advance,
bye Tom

> Right, but it would be good that you send your server.xml and 
> workers.properties, just in case.
>
> Regards,
> Mladen.

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



Re: AW: apache 2.0.54 + mod_jk 1.2.14 - sticky sessions not working

2005-10-25 Thread Mladen Turk

Doehler, Thomas wrote:

Hi,

thanks for the quick response, jvmRoute is configured on both instances.
We do not use the standard tomcat url rewriting (which is 
http://...;jsessionid=...?x=y),
we use simply a standard http paramter and do our own url rewriting.



Right, but it would be good that you send your server.xml and
workers.properties, just in case.

Regards,
Mladen.

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



LDAP connections pool

2005-10-25 Thread Javier Leyba
Hi All

I want to make an LDAP connection pool in my Tomcat
5028 server. Is this possible ? Could someone show an
example ?


Thanks in advance

J








___ 
1GB gratis, Antivirus y Antispam 
Correo Yahoo!, el mejor correo web del mundo 
http://correo.yahoo.com.ar 


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



AW: apache 2.0.54 + mod_jk 1.2.14 - sticky sessions not working

2005-10-25 Thread Doehler, Thomas
Hi,

thanks for the quick response, jvmRoute is configured on both instances.
We do not use the standard tomcat url rewriting (which is 
http://...;jsessionid=...?x=y),
we use simply a standard http paramter and do our own url rewriting.

Regards,
Tom

> Did you set the jvmRoute="your worker name" in the Tomcat's server.xml?
> This is probably the cause of your problem.
>
> Regards,
> Mladen.



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



Re: apache 2.0.54 + mod_jk 1.2.14 - sticky sessions not working

2005-10-25 Thread Mladen Turk

Doehler, Thomas wrote:

Hi list,

I'm using apache 2.0.54 + mod_jk 1.2.14 on a debian 3.1 server.
I have 2 tomcat workers running on different machines.

Although I configured the load balancing worker with sticky_session=1, all 
requests get spread over the tomcat workers in round robin.

My question is, how does mod_jk recognize the session id?
Is there a way to configure which request parameter is the session id?



Did you set the jvmRoute="your worker name" in the Tomcat's server.xml?
This is probably the cause of your problem.

Regards,
Mladen.

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



Re: Has Anyone Achieved Mutal Authentication on 5.5.12 or 5.5.9???

2005-10-25 Thread Mark
Is Apache part of your setup?

On 10/24/05, Daniel <[EMAIL PROTECTED]> wrote:
>
> If so, whats the magic to the certs and keystores?
> - Daniel
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


apache 2.0.54 + mod_jk 1.2.14 - sticky sessions not working

2005-10-25 Thread Doehler, Thomas
Hi list,

I'm using apache 2.0.54 + mod_jk 1.2.14 on a debian 3.1 server.
I have 2 tomcat workers running on different machines.

Although I configured the load balancing worker with sticky_session=1, all 
requests get spread over the tomcat workers in round robin.

My question is, how does mod_jk recognize the session id?
Is there a way to configure which request parameter is the session id?

Regards,
Tom

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



RE: ASKING AGAIN: problem in getting database connection from rem ote machine using JNDI

2005-10-25 Thread rahul
Yes I did that through my database creation script using GRANT command:

GRANT SELECT,INSERT,UPDATE,DELETE ON myDB.*  TO user@'%' IDENTIFIED BY
'password';


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 25, 2005 3:07 PM
> To: users@tomcat.apache.org
> Subject: RE: ASKING AGAIN: problem in getting database connection from
> rem ote machine using JNDI
>
>
> Inspired by the last mail: Have you configured your remote database to
> listen
> to the ip-adress of your client. Does your databse accept connections from
> there?
> And is there a user installed on your remote database that has rights to
> access it?
>
>
>
> -Ursprüngliche Nachricht-
> Von: Andoni [mailto:[EMAIL PROTECTED]
> Gesendet: Dienstag, 25. Oktober 2005 11:32
> An: Tomcat Users List
> Betreff: Re: ASKING AGAIN: problem in getting database connection from
> rem ote machine using JNDI
>
>
> Hello,
>
> I am looking at this error message you are getting:
> Cannot create PoolableConnectionFactory (Unknown database 'myDB')
> and thinking it isn't any thing to do with resource tags.
> Specially if it is
> working locally. To me it seems to be something wrong with your DB
> installation. Does the remote DB have a schema called myDB?
>
> Andoni.
>
> - Original Message -
> From: rahul
> Newsgroups: gmane.comp.jakarta.tomcat.user
> Sent: Tuesday, October 25, 2005 10:08 AM
> Subject: RE: ASKING AGAIN: problem in getting database connection from rem
> ote machine using JNDI
>
>
> Thanks for help Jan,
>
> But how to define jdbc/global in the Data Sources of the tomcat Server?
> can you explain further
>
>  -RahulJoshi
>
> > -Original Message-
> > From: Jan Pernica [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, October 25, 2005 2:29 PM
> > To: Tomcat Users List
> > Subject: Re: ASKING AGAIN: problem in getting database connection from
> > rem ote machine using JNDI
> >
> >
> > In your deploy XML you should have somethink like this:
> >
> >> type="javax.xml.DataSource"/>
> >
> > Where jdbc/global is defined in the Data Sources of the tomcat server.
> >
> > Jan
> >
> > rahul wrote:
> >
> > >I am still not been able to use remote database,
> > >even after including  in my web.xml
> > >
> > >
> > >
> > >
> > >
> > >>-Original Message-
> > >>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > >>Sent: Tuesday, October 25, 2005 1:48 PM
> > >>To: users@tomcat.apache.org
> > >>Subject: RE: ASKING AGAIN: problem in getting database connection from
> > >>rem ote machine using JNDI
> > >>
> > >>
> > >>I dont know if it is required, but do you have a resource-ref
> > >>entry in your web.xml, something like this?
> > >>
> > >>
> > >>  mySQL Datasource
> > >>  jdbc/myAPP
> > >>  javax.sql.DataSource
> > >>  Container
> > >>
> > >>
> > >>where res-ref-name has to be the same as in context.xml.
> > >>
> > >>And perhaps your look-up-name might not be correct, but I am
> > >>not sure because I am using PostrgreSQL databse.
> > >>
> > >>http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-h
> > >>owto.html
> > >>might help you out.
> > >>
> > >>-Ursprüngliche Nachricht-
> > >>Von: rahul [mailto:[EMAIL PROTECTED]
> > >>Gesendet: Dienstag, 25. Oktober 2005 06:33
> > >>An: Tomcat Users List
> > >>Betreff: ASKING AGAIN: problem in getting database connection from
> > >>remote machine using JNDI
> > >>
> > >>
> > >>
> > >>Is there anything else that is required for remote database?
> > >>
> > >>
> > >>
> > >>
> > >>>-Original Message-
> > >>>From: rahul [mailto:[EMAIL PROTECTED]
> > >>>Sent: Monday, October 24, 2005 7:56 PM
> > >>>To: Tomcat Users List
> > >>>Subject: problem in getting database connection from remote machine
> > >>>using JNDI
> > >>>
> > >>>
> > >>>Hi all,
> > >>>
> > >>>I am using tomcat JNDI for getting databse connection in my
> application
> > >>>
> > >>>For this I have created a context.xml file in myAPP/META-INF
> > >>>which looks like this:
> > >>>
> > >>>
> > >>> > >>> privileged="true" crossContext="true">
> > >>>  > >>>  type="javax.sql.DataSource" maxActive="30" maxIdle="10"
> > maxWait="6000"
> > >>>  username="user" password="password"
> > >>>  driverClassName="com.mysql.jdbc.Driver"
> > >>>  url="jdbc:mysql://localhost:3306/myDB" removeAbandoned="true"
> > >>>  autoReconnect="true"
> > >>>  validationQuery="select now()"
> > >>>  factory="org.apache.commons.dbcp.BasicDataSourceFactory"/>
> > >>>
> > >>>
> > >>>
> > >>>This works absolutely fine. But when I try to connect to a
> > >>>
> > >>>
> > >>remote database
> > >>
> > >>
> > >>>by changing url in above
> > >>>file to "jdbc:mysql://192.168.5.65:3306/myDB" my application fails
> > >>>It creates following exception while retrieving a connection:
> > >>>org.apache.tomcat.dbcp.dbcp.SQLNestedException:
> > >>>Cannot create PoolableConnectionFactory (Unknown database 'myDB')
> > >>>
> > >>>
> > >>>code I have written for fetching connection is:
> > >>>
> > >>>
> > >>>   Context ct

RE: ASKING AGAIN: problem in getting database connection from rem ote machine using JNDI

2005-10-25 Thread Peter . Zoche
Inspired by the last mail: Have you configured your remote database to
listen
to the ip-adress of your client. Does your databse accept connections from
there?
And is there a user installed on your remote database that has rights to
access it?



-Ursprüngliche Nachricht-
Von: Andoni [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 25. Oktober 2005 11:32
An: Tomcat Users List
Betreff: Re: ASKING AGAIN: problem in getting database connection from
rem ote machine using JNDI


Hello,

I am looking at this error message you are getting:
Cannot create PoolableConnectionFactory (Unknown database 'myDB')
and thinking it isn't any thing to do with resource tags. Specially if it is
working locally. To me it seems to be something wrong with your DB
installation. Does the remote DB have a schema called myDB?

Andoni.

- Original Message - 
From: rahul
Newsgroups: gmane.comp.jakarta.tomcat.user
Sent: Tuesday, October 25, 2005 10:08 AM
Subject: RE: ASKING AGAIN: problem in getting database connection from rem
ote machine using JNDI


Thanks for help Jan,

But how to define jdbc/global in the Data Sources of the tomcat Server?
can you explain further

 -RahulJoshi

> -Original Message-
> From: Jan Pernica [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 25, 2005 2:29 PM
> To: Tomcat Users List
> Subject: Re: ASKING AGAIN: problem in getting database connection from
> rem ote machine using JNDI
>
>
> In your deploy XML you should have somethink like this:
>
>type="javax.xml.DataSource"/>
>
> Where jdbc/global is defined in the Data Sources of the tomcat server.
>
> Jan
>
> rahul wrote:
>
> >I am still not been able to use remote database,
> >even after including  in my web.xml
> >
> >
> >
> >
> >
> >>-Original Message-
> >>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >>Sent: Tuesday, October 25, 2005 1:48 PM
> >>To: users@tomcat.apache.org
> >>Subject: RE: ASKING AGAIN: problem in getting database connection from
> >>rem ote machine using JNDI
> >>
> >>
> >>I dont know if it is required, but do you have a resource-ref
> >>entry in your web.xml, something like this?
> >>
> >>
> >>  mySQL Datasource
> >>  jdbc/myAPP
> >>  javax.sql.DataSource
> >>  Container
> >>
> >>
> >>where res-ref-name has to be the same as in context.xml.
> >>
> >>And perhaps your look-up-name might not be correct, but I am
> >>not sure because I am using PostrgreSQL databse.
> >>
> >>http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-h
> >>owto.html
> >>might help you out.
> >>
> >>-Ursprüngliche Nachricht-
> >>Von: rahul [mailto:[EMAIL PROTECTED]
> >>Gesendet: Dienstag, 25. Oktober 2005 06:33
> >>An: Tomcat Users List
> >>Betreff: ASKING AGAIN: problem in getting database connection from
> >>remote machine using JNDI
> >>
> >>
> >>
> >>Is there anything else that is required for remote database?
> >>
> >>
> >>
> >>
> >>>-Original Message-
> >>>From: rahul [mailto:[EMAIL PROTECTED]
> >>>Sent: Monday, October 24, 2005 7:56 PM
> >>>To: Tomcat Users List
> >>>Subject: problem in getting database connection from remote machine
> >>>using JNDI
> >>>
> >>>
> >>>Hi all,
> >>>
> >>>I am using tomcat JNDI for getting databse connection in my application
> >>>
> >>>For this I have created a context.xml file in myAPP/META-INF
> >>>which looks like this:
> >>>
> >>>
> >>> >>> privileged="true" crossContext="true">
> >>>  >>>  type="javax.sql.DataSource" maxActive="30" maxIdle="10"
> maxWait="6000"
> >>>  username="user" password="password"
> >>>  driverClassName="com.mysql.jdbc.Driver"
> >>>  url="jdbc:mysql://localhost:3306/myDB" removeAbandoned="true"
> >>>  autoReconnect="true"
> >>>  validationQuery="select now()"
> >>>  factory="org.apache.commons.dbcp.BasicDataSourceFactory"/>
> >>>
> >>>
> >>>
> >>>This works absolutely fine. But when I try to connect to a
> >>>
> >>>
> >>remote database
> >>
> >>
> >>>by changing url in above
> >>>file to "jdbc:mysql://192.168.5.65:3306/myDB" my application fails
> >>>It creates following exception while retrieving a connection:
> >>>org.apache.tomcat.dbcp.dbcp.SQLNestedException:
> >>>Cannot create PoolableConnectionFactory (Unknown database 'myDB')
> >>>
> >>>
> >>>code I have written for fetching connection is:
> >>>
> >>>
> >>>   Context ctx = (Context) new InitialContext()
> >>> .lookup("java:comp/env");
> >>>   if (ctx == null)
> >>>   {
> >>>throw new Exception("No context available");
> >>>   } else
> >>>   {
> >>>dataSource = (DataSource) ctx.lookup("jdbc/icontact");
> >>>Connection connection = dataSource.getConnection();
> >>>   }
> >>>
> >>>
> >>>can anybody help?
> >>>
> >>>
> >>>thanks in advance
> >>>--RahulJoshi
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>-
> >>To unsubscri

RE: ASKING AGAIN: problem in getting database connection from rem ote machine using JNDI

2005-10-25 Thread rahul
I am seeing the database myDB is present in remote machine
Also I am using same version(4.1.14-nt-max) of mysql on both machine.


> -Original Message-
> From: Andoni [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 25, 2005 3:02 PM
> To: Tomcat Users List
> Subject: Re: ASKING AGAIN: problem in getting database connection from
> rem ote machine using JNDI
>
>
> Hello,
>
> I am looking at this error message you are getting:
> Cannot create PoolableConnectionFactory (Unknown database 'myDB')
> and thinking it isn't any thing to do with resource tags.
> Specially if it is
> working locally. To me it seems to be something wrong with your DB
> installation. Does the remote DB have a schema called myDB?
>
> Andoni.
>
> - Original Message -
> From: rahul
> Newsgroups: gmane.comp.jakarta.tomcat.user
> Sent: Tuesday, October 25, 2005 10:08 AM
> Subject: RE: ASKING AGAIN: problem in getting database connection from rem
> ote machine using JNDI
>
>
> Thanks for help Jan,
>
> But how to define jdbc/global in the Data Sources of the tomcat Server?
> can you explain further
>
>  -RahulJoshi
>
> > -Original Message-
> > From: Jan Pernica [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, October 25, 2005 2:29 PM
> > To: Tomcat Users List
> > Subject: Re: ASKING AGAIN: problem in getting database connection from
> > rem ote machine using JNDI
> >
> >
> > In your deploy XML you should have somethink like this:
> >
> >> type="javax.xml.DataSource"/>
> >
> > Where jdbc/global is defined in the Data Sources of the tomcat server.
> >
> > Jan
> >
> > rahul wrote:
> >
> > >I am still not been able to use remote database,
> > >even after including  in my web.xml
> > >
> > >
> > >
> > >
> > >
> > >>-Original Message-
> > >>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > >>Sent: Tuesday, October 25, 2005 1:48 PM
> > >>To: users@tomcat.apache.org
> > >>Subject: RE: ASKING AGAIN: problem in getting database connection from
> > >>rem ote machine using JNDI
> > >>
> > >>
> > >>I dont know if it is required, but do you have a resource-ref
> > >>entry in your web.xml, something like this?
> > >>
> > >>
> > >>  mySQL Datasource
> > >>  jdbc/myAPP
> > >>  javax.sql.DataSource
> > >>  Container
> > >>
> > >>
> > >>where res-ref-name has to be the same as in context.xml.
> > >>
> > >>And perhaps your look-up-name might not be correct, but I am
> > >>not sure because I am using PostrgreSQL databse.
> > >>
> > >>http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-h
> > >>owto.html
> > >>might help you out.
> > >>
> > >>-Ursprüngliche Nachricht-
> > >>Von: rahul [mailto:[EMAIL PROTECTED]
> > >>Gesendet: Dienstag, 25. Oktober 2005 06:33
> > >>An: Tomcat Users List
> > >>Betreff: ASKING AGAIN: problem in getting database connection from
> > >>remote machine using JNDI
> > >>
> > >>
> > >>
> > >>Is there anything else that is required for remote database?
> > >>
> > >>
> > >>
> > >>
> > >>>-Original Message-
> > >>>From: rahul [mailto:[EMAIL PROTECTED]
> > >>>Sent: Monday, October 24, 2005 7:56 PM
> > >>>To: Tomcat Users List
> > >>>Subject: problem in getting database connection from remote machine
> > >>>using JNDI
> > >>>
> > >>>
> > >>>Hi all,
> > >>>
> > >>>I am using tomcat JNDI for getting databse connection in my
> application
> > >>>
> > >>>For this I have created a context.xml file in myAPP/META-INF
> > >>>which looks like this:
> > >>>
> > >>>
> > >>> > >>> privileged="true" crossContext="true">
> > >>>  > >>>  type="javax.sql.DataSource" maxActive="30" maxIdle="10"
> > maxWait="6000"
> > >>>  username="user" password="password"
> > >>>  driverClassName="com.mysql.jdbc.Driver"
> > >>>  url="jdbc:mysql://localhost:3306/myDB" removeAbandoned="true"
> > >>>  autoReconnect="true"
> > >>>  validationQuery="select now()"
> > >>>  factory="org.apache.commons.dbcp.BasicDataSourceFactory"/>
> > >>>
> > >>>
> > >>>
> > >>>This works absolutely fine. But when I try to connect to a
> > >>>
> > >>>
> > >>remote database
> > >>
> > >>
> > >>>by changing url in above
> > >>>file to "jdbc:mysql://192.168.5.65:3306/myDB" my application fails
> > >>>It creates following exception while retrieving a connection:
> > >>>org.apache.tomcat.dbcp.dbcp.SQLNestedException:
> > >>>Cannot create PoolableConnectionFactory (Unknown database 'myDB')
> > >>>
> > >>>
> > >>>code I have written for fetching connection is:
> > >>>
> > >>>
> > >>>   Context ctx = (Context) new InitialContext()
> > >>> .lookup("java:comp/env");
> > >>>   if (ctx == null)
> > >>>   {
> > >>>throw new Exception("No context available");
> > >>>   } else
> > >>>   {
> > >>>dataSource = (DataSource) ctx.lookup("jdbc/icontact");
> > >>>Connection connection = dataSource.getConnection();
> > >>>   }
> > >>>
> > >>>
> > >>>can anybody help?
> > >>>
> > >>>
> > >>>thanks in advance
> > >>>--RahulJoshi
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>
> > >>

Re: ASKING AGAIN: problem in getting database connection from rem ote machine using JNDI

2005-10-25 Thread Andoni
Hello,

I am looking at this error message you are getting:
Cannot create PoolableConnectionFactory (Unknown database 'myDB')
and thinking it isn't any thing to do with resource tags. Specially if it is
working locally. To me it seems to be something wrong with your DB
installation. Does the remote DB have a schema called myDB?

Andoni.

- Original Message - 
From: rahul
Newsgroups: gmane.comp.jakarta.tomcat.user
Sent: Tuesday, October 25, 2005 10:08 AM
Subject: RE: ASKING AGAIN: problem in getting database connection from rem
ote machine using JNDI


Thanks for help Jan,

But how to define jdbc/global in the Data Sources of the tomcat Server?
can you explain further

 -RahulJoshi

> -Original Message-
> From: Jan Pernica [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 25, 2005 2:29 PM
> To: Tomcat Users List
> Subject: Re: ASKING AGAIN: problem in getting database connection from
> rem ote machine using JNDI
>
>
> In your deploy XML you should have somethink like this:
>
>type="javax.xml.DataSource"/>
>
> Where jdbc/global is defined in the Data Sources of the tomcat server.
>
> Jan
>
> rahul wrote:
>
> >I am still not been able to use remote database,
> >even after including  in my web.xml
> >
> >
> >
> >
> >
> >>-Original Message-
> >>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >>Sent: Tuesday, October 25, 2005 1:48 PM
> >>To: users@tomcat.apache.org
> >>Subject: RE: ASKING AGAIN: problem in getting database connection from
> >>rem ote machine using JNDI
> >>
> >>
> >>I dont know if it is required, but do you have a resource-ref
> >>entry in your web.xml, something like this?
> >>
> >>
> >>  mySQL Datasource
> >>  jdbc/myAPP
> >>  javax.sql.DataSource
> >>  Container
> >>
> >>
> >>where res-ref-name has to be the same as in context.xml.
> >>
> >>And perhaps your look-up-name might not be correct, but I am
> >>not sure because I am using PostrgreSQL databse.
> >>
> >>http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-h
> >>owto.html
> >>might help you out.
> >>
> >>-Ursprüngliche Nachricht-
> >>Von: rahul [mailto:[EMAIL PROTECTED]
> >>Gesendet: Dienstag, 25. Oktober 2005 06:33
> >>An: Tomcat Users List
> >>Betreff: ASKING AGAIN: problem in getting database connection from
> >>remote machine using JNDI
> >>
> >>
> >>
> >>Is there anything else that is required for remote database?
> >>
> >>
> >>
> >>
> >>>-Original Message-
> >>>From: rahul [mailto:[EMAIL PROTECTED]
> >>>Sent: Monday, October 24, 2005 7:56 PM
> >>>To: Tomcat Users List
> >>>Subject: problem in getting database connection from remote machine
> >>>using JNDI
> >>>
> >>>
> >>>Hi all,
> >>>
> >>>I am using tomcat JNDI for getting databse connection in my application
> >>>
> >>>For this I have created a context.xml file in myAPP/META-INF
> >>>which looks like this:
> >>>
> >>>
> >>> >>> privileged="true" crossContext="true">
> >>>  >>>  type="javax.sql.DataSource" maxActive="30" maxIdle="10"
> maxWait="6000"
> >>>  username="user" password="password"
> >>>  driverClassName="com.mysql.jdbc.Driver"
> >>>  url="jdbc:mysql://localhost:3306/myDB" removeAbandoned="true"
> >>>  autoReconnect="true"
> >>>  validationQuery="select now()"
> >>>  factory="org.apache.commons.dbcp.BasicDataSourceFactory"/>
> >>>
> >>>
> >>>
> >>>This works absolutely fine. But when I try to connect to a
> >>>
> >>>
> >>remote database
> >>
> >>
> >>>by changing url in above
> >>>file to "jdbc:mysql://192.168.5.65:3306/myDB" my application fails
> >>>It creates following exception while retrieving a connection:
> >>>org.apache.tomcat.dbcp.dbcp.SQLNestedException:
> >>>Cannot create PoolableConnectionFactory (Unknown database 'myDB')
> >>>
> >>>
> >>>code I have written for fetching connection is:
> >>>
> >>>
> >>>   Context ctx = (Context) new InitialContext()
> >>> .lookup("java:comp/env");
> >>>   if (ctx == null)
> >>>   {
> >>>throw new Exception("No context available");
> >>>   } else
> >>>   {
> >>>dataSource = (DataSource) ctx.lookup("jdbc/icontact");
> >>>Connection connection = dataSource.getConnection();
> >>>   }
> >>>
> >>>
> >>>can anybody help?
> >>>
> >>>
> >>>thanks in advance
> >>>--RahulJoshi
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >>-
> >>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]
> >
> >
> >
> >
> >
> >
>
>



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


RE: ASKING AGAIN: problem in getting database connection from rem ote machine using JNDI

2005-10-25 Thread rahul
Thanks for help Jan,

But how to define jdbc/global in the Data Sources of the tomcat Server?
can you explain further

 -RahulJoshi

> -Original Message-
> From: Jan Pernica [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 25, 2005 2:29 PM
> To: Tomcat Users List
> Subject: Re: ASKING AGAIN: problem in getting database connection from
> rem ote machine using JNDI
>
>
> In your deploy XML you should have somethink like this:
>
>type="javax.xml.DataSource"/>
>
> Where jdbc/global is defined in the Data Sources of the tomcat server.
>
> Jan
>
> rahul wrote:
>
> >I am still not been able to use remote database,
> >even after including  in my web.xml
> >
> >
> >
> >
> >
> >>-Original Message-
> >>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >>Sent: Tuesday, October 25, 2005 1:48 PM
> >>To: users@tomcat.apache.org
> >>Subject: RE: ASKING AGAIN: problem in getting database connection from
> >>rem ote machine using JNDI
> >>
> >>
> >>I dont know if it is required, but do you have a resource-ref
> >>entry in your web.xml, something like this?
> >>
> >>
> >>  mySQL Datasource
> >>  jdbc/myAPP
> >>  javax.sql.DataSource
> >>  Container
> >>
> >>
> >>where res-ref-name has to be the same as in context.xml.
> >>
> >>And perhaps your look-up-name might not be correct, but I am
> >>not sure because I am using PostrgreSQL databse.
> >>
> >>http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-h
> >>owto.html
> >>might help you out.
> >>
> >>-Ursprüngliche Nachricht-
> >>Von: rahul [mailto:[EMAIL PROTECTED]
> >>Gesendet: Dienstag, 25. Oktober 2005 06:33
> >>An: Tomcat Users List
> >>Betreff: ASKING AGAIN: problem in getting database connection from
> >>remote machine using JNDI
> >>
> >>
> >>
> >>Is there anything else that is required for remote database?
> >>
> >>
> >>
> >>
> >>>-Original Message-
> >>>From: rahul [mailto:[EMAIL PROTECTED]
> >>>Sent: Monday, October 24, 2005 7:56 PM
> >>>To: Tomcat Users List
> >>>Subject: problem in getting database connection from remote machine
> >>>using JNDI
> >>>
> >>>
> >>>Hi all,
> >>>
> >>>I am using tomcat JNDI for getting databse connection in my application
> >>>
> >>>For this I have created a context.xml file in myAPP/META-INF
> >>>which looks like this:
> >>>
> >>>
> >>> >>> privileged="true" crossContext="true">
> >>>  >>>  type="javax.sql.DataSource" maxActive="30" maxIdle="10"
> maxWait="6000"
> >>>  username="user" password="password"
> >>>  driverClassName="com.mysql.jdbc.Driver"
> >>>  url="jdbc:mysql://localhost:3306/myDB" removeAbandoned="true"
> >>>  autoReconnect="true"
> >>>  validationQuery="select now()"
> >>>  factory="org.apache.commons.dbcp.BasicDataSourceFactory"/>
> >>>
> >>>
> >>>
> >>>This works absolutely fine. But when I try to connect to a
> >>>
> >>>
> >>remote database
> >>
> >>
> >>>by changing url in above
> >>>file to "jdbc:mysql://192.168.5.65:3306/myDB" my application fails
> >>>It creates following exception while retrieving a connection:
> >>>org.apache.tomcat.dbcp.dbcp.SQLNestedException:
> >>>Cannot create PoolableConnectionFactory (Unknown database 'myDB')
> >>>
> >>>
> >>>code I have written for fetching connection is:
> >>>
> >>>
> >>>   Context ctx = (Context) new InitialContext()
> >>> .lookup("java:comp/env");
> >>>   if (ctx == null)
> >>>   {
> >>>throw new Exception("No context available");
> >>>   } else
> >>>   {
> >>>dataSource = (DataSource) ctx.lookup("jdbc/icontact");
> >>>Connection connection = dataSource.getConnection();
> >>>   }
> >>>
> >>>
> >>>can anybody help?
> >>>
> >>>
> >>>thanks in advance
> >>>--RahulJoshi
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >>-
> >>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]
> >
> >
> >
> >
> >
> >
>
>



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



Re: ASKING AGAIN: problem in getting database connection from rem ote machine using JNDI

2005-10-25 Thread Jan Pernica

In your deploy XML you should have somethink like this:

 type="javax.xml.DataSource"/>


Where jdbc/global is defined in the Data Sources of the tomcat server.

Jan

rahul wrote:


I am still not been able to use remote database,
even after including  in my web.xml



 


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 25, 2005 1:48 PM
To: users@tomcat.apache.org
Subject: RE: ASKING AGAIN: problem in getting database connection from
rem ote machine using JNDI


I dont know if it is required, but do you have a resource-ref
entry in your web.xml, something like this?


 mySQL Datasource
 jdbc/myAPP
 javax.sql.DataSource
 Container


where res-ref-name has to be the same as in context.xml.

And perhaps your look-up-name might not be correct, but I am
not sure because I am using PostrgreSQL databse.

http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-h
owto.html
might help you out.

-Ursprüngliche Nachricht-
Von: rahul [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 25. Oktober 2005 06:33
An: Tomcat Users List
Betreff: ASKING AGAIN: problem in getting database connection from
remote machine using JNDI



Is there anything else that is required for remote database?


   


-Original Message-
From: rahul [mailto:[EMAIL PROTECTED]
Sent: Monday, October 24, 2005 7:56 PM
To: Tomcat Users List
Subject: problem in getting database connection from remote machine
using JNDI


Hi all,

I am using tomcat JNDI for getting databse connection in my application

For this I have created a context.xml file in myAPP/META-INF
which looks like this:







This works absolutely fine. But when I try to connect to a
 


remote database
   


by changing url in above
file to "jdbc:mysql://192.168.5.65:3306/myDB" my application fails
It creates following exception while retrieving a connection:
org.apache.tomcat.dbcp.dbcp.SQLNestedException:
Cannot create PoolableConnectionFactory (Unknown database 'myDB')


code I have written for fetching connection is:


  Context ctx = (Context) new InitialContext()
.lookup("java:comp/env");
  if (ctx == null)
  {
   throw new Exception("No context available");
  } else
  {
   dataSource = (DataSource) ctx.lookup("jdbc/icontact");
   Connection connection = dataSource.getConnection();
  }


can anybody help?


thanks in advance
--RahulJoshi




 



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




 





RE: ASKING AGAIN: problem in getting database connection from rem ote machine using JNDI

2005-10-25 Thread rahul
I am still not been able to use remote database,
even after including  in my web.xml



> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 25, 2005 1:48 PM
> To: users@tomcat.apache.org
> Subject: RE: ASKING AGAIN: problem in getting database connection from
> rem ote machine using JNDI
>
>
> I dont know if it is required, but do you have a resource-ref
> entry in your web.xml, something like this?
>
> 
>   mySQL Datasource
>   jdbc/myAPP
>   javax.sql.DataSource
>   Container
> 
>
> where res-ref-name has to be the same as in context.xml.
>
> And perhaps your look-up-name might not be correct, but I am
> not sure because I am using PostrgreSQL databse.
>
> http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-h
> owto.html
> might help you out.
>
> -Ursprüngliche Nachricht-
> Von: rahul [mailto:[EMAIL PROTECTED]
> Gesendet: Dienstag, 25. Oktober 2005 06:33
> An: Tomcat Users List
> Betreff: ASKING AGAIN: problem in getting database connection from
> remote machine using JNDI
>
>
>
> Is there anything else that is required for remote database?
>
>
> > -Original Message-
> > From: rahul [mailto:[EMAIL PROTECTED]
> > Sent: Monday, October 24, 2005 7:56 PM
> > To: Tomcat Users List
> > Subject: problem in getting database connection from remote machine
> > using JNDI
> >
> >
> > Hi all,
> >
> > I am using tomcat JNDI for getting databse connection in my application
> >
> > For this I have created a context.xml file in myAPP/META-INF
> > which looks like this:
> >
> > 
> >  >  privileged="true" crossContext="true">
> >   >   type="javax.sql.DataSource" maxActive="30" maxIdle="10" maxWait="6000"
> >   username="user" password="password"
> >   driverClassName="com.mysql.jdbc.Driver"
> >   url="jdbc:mysql://localhost:3306/myDB" removeAbandoned="true"
> >   autoReconnect="true"
> >   validationQuery="select now()"
> >   factory="org.apache.commons.dbcp.BasicDataSourceFactory"/>
> > 
> >
> >
> > This works absolutely fine. But when I try to connect to a
> remote database
> > by changing url in above
> > file to "jdbc:mysql://192.168.5.65:3306/myDB" my application fails
> > It creates following exception while retrieving a connection:
> > org.apache.tomcat.dbcp.dbcp.SQLNestedException:
> > Cannot create PoolableConnectionFactory (Unknown database 'myDB')
> >
> >
> > code I have written for fetching connection is:
> >
> >
> >Context ctx = (Context) new InitialContext()
> >  .lookup("java:comp/env");
> >if (ctx == null)
> >{
> > throw new Exception("No context available");
> >} else
> >{
> > dataSource = (DataSource) ctx.lookup("jdbc/icontact");
> > Connection connection = dataSource.getConnection();
> >}
> >
> >
> > can anybody help?
> >
> >
> > thanks in advance
> > --RahulJoshi
> >
> >
> >
> >
>
>
>
> -
> 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]



RE: ASKING AGAIN: problem in getting database connection from rem ote machine using JNDI

2005-10-25 Thread Peter . Zoche
I dont know if it is required, but do you have a resource-ref
entry in your web.xml, something like this?


  mySQL Datasource
  jdbc/myAPP 
  javax.sql.DataSource
  Container


where res-ref-name has to be the same as in context.xml.

And perhaps your look-up-name might not be correct, but I am
not sure because I am using PostrgreSQL databse.

http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
might help you out.

-Ursprüngliche Nachricht-
Von: rahul [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 25. Oktober 2005 06:33
An: Tomcat Users List
Betreff: ASKING AGAIN: problem in getting database connection from
remote machine using JNDI



Is there anything else that is required for remote database?


> -Original Message-
> From: rahul [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 24, 2005 7:56 PM
> To: Tomcat Users List
> Subject: problem in getting database connection from remote machine
> using JNDI
>
>
> Hi all,
>
> I am using tomcat JNDI for getting databse connection in my application
>
> For this I have created a context.xml file in myAPP/META-INF
> which looks like this:
>
> 
>   privileged="true" crossContext="true">
> type="javax.sql.DataSource" maxActive="30" maxIdle="10" maxWait="6000"
>   username="user" password="password"
>   driverClassName="com.mysql.jdbc.Driver"
>   url="jdbc:mysql://localhost:3306/myDB" removeAbandoned="true"
>   autoReconnect="true"
>   validationQuery="select now()"
>   factory="org.apache.commons.dbcp.BasicDataSourceFactory"/>
> 
>
>
> This works absolutely fine. But when I try to connect to a remote database
> by changing url in above
> file to "jdbc:mysql://192.168.5.65:3306/myDB" my application fails
> It creates following exception while retrieving a connection:
> org.apache.tomcat.dbcp.dbcp.SQLNestedException:
> Cannot create PoolableConnectionFactory (Unknown database 'myDB')
>
>
> code I have written for fetching connection is:
>
>
>Context ctx = (Context) new InitialContext()
>  .lookup("java:comp/env");
>if (ctx == null)
>{
> throw new Exception("No context available");
>} else
>{
> dataSource = (DataSource) ctx.lookup("jdbc/icontact");
> Connection connection = dataSource.getConnection();
>}
>
>
> can anybody help?
>
>
> thanks in advance
> --RahulJoshi
>
>
>
>



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