Tomcat build fails: junit

2005-06-03 Thread Marco Fister
Hi everybody!

While trying to build tomcat using the jakarta-tomcat-5.5.9-src tarball
build fails while trying to get junit.

The used link

http://unc.dl.sourceforge.net/sourceforge/junit/junit3.8.1.zip

is temporary not available.

The received file contains the sourceforge error message, not the
zip-compressed junit3.8.1 sources.


OUTPUT:

downloadzip:
  [get] Getting:
http://unc.dl.sourceforge.net/sourceforge/junit/junit3.8.1.zip
  [get] To: /usr/share/java/file.zip
[unzip] Expanding: /usr/share/java/file.zip into /usr/share/java
BUILD FAILED
/root/jakarta-tomcat-5.5.9-src/build.xml:49: The following error
occurred while executing this line:
/root/jakarta-tomcat-5.5.9-src/jakarta-tomcat-5/build.xml:1811: The
following error occurred while executing this line:
/root/jakarta-tomcat-5.5.9-src/jakarta-tomcat-5/build.xml:1911: Error
while expanding /usr/share/java/file.zip


greetz, marfis:)

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



DO NOT REPLY [Bug 35214] New: - Javadoc for Embedded class references 'main' method that does not exist

2005-06-03 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35214

   Summary: Javadoc for Embedded class references 'main' method that
does not exist
   Product: Tomcat 5
   Version: 5.0.28
  Platform: All
   URL: http://jakarta.apache.org/tomcat/tomcat-5.0-
doc/catalina/docs/api/org/apache/catalina/startup/Embedd
ed.html
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]


The Javadoc for org.apache.catalina.startup.Embedded states:

  NOTE: The main() method of this class is a simple example that exercizes the
  features of dynamically starting and stopping various components. You can 
  execute this by executing the following steps (on a Unix platform):

 cd $CATALINA_HOME
 ./bin/catalina.sh embedded

However, there is no main method in this class. The an example main method
should added, or the javadoc should be changed to reference an example of how to
use the Embedded class.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



Re: WebappLoader and Auto-Detection of Class Changes

2005-06-03 Thread Bill Barker

- Original Message -
From: "Scott Dudley" <[EMAIL PROTECTED]>
To: 
Sent: Friday, June 03, 2005 12:46 PM
Subject: WebappLoader and Auto-Detection of Class Changes


>
> I extended WebappLoader.java to create a custom classloader to allow me
> to append an alternate set of class folders.  The loader works as
> intended but I noted that it doesn't detect any changes to these
> resources and call Context.reload() as is the case with WEB-INF/classes,
> lib, and any  entries.  What am I missing.  Looking at
> WebappLoader.java and I fail to notice the mechanism which provides said
> functionality.
>
> Can someone point me in the right direction?
>

Look at WebappLoader.modified.  That determines if the app should be
reloaded.

> Many thanks.
>
> --
>
> Regards,
>
> Scott Dudley
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



This message is intended only for the use of the person(s) listed above as the 
intended recipient(s), and may contain information that is PRIVILEGED and 
CONFIDENTIAL.  If you are not an intended recipient, you may not read, copy, or 
distribute this message or any attachment. If you received this communication 
in error, please notify us immediately by e-mail and then delete all copies of 
this message and any attachments.

In addition you should be aware that ordinary (unencrypted) e-mail sent through 
the Internet is not secure. Do not send confidential or sensitive information, 
such as social security numbers, account numbers, personal identification 
numbers and passwords, to us via ordinary (unencrypted) e-mail.


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

help for ClassNotFoundException

2005-06-03 Thread MEHMOOD, QAISER
Hi ,

 

 

 

   Under tomcat I am integrating the uPortal and running one portlet
application in a web context.

 

   I put my own classes under the WEB-INF/classes directory and also put
jar files in 

 

   WEB-INF/lib directory , but I am getting the error :

 

   ClassNotFoundException ,

 

   When I put these jar files in tomcat/common/lib directory , its
working fine. Can anyone tell me

 

   That how and where I can specify for a web application under one
context that where are the jar

 

And class files.

 

Qaiser Mehmood



DO NOT REPLY [Bug 34765] - [dbcp] NullPointerException thrown by PoolableConnectionFactory

2005-06-03 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34765


[EMAIL PROTECTED] changed:

   What|Removed |Added

 AssignedTo|tomcat- |commons-
   |[EMAIL PROTECTED]  |[EMAIL PROTECTED]
Summary|NullPointerException thrown |[dbcp] NullPointerException
   |by  |thrown by
   |org.apache.commons.dbcp.Pool|PoolableConnectionFactory
   |ableConnectionFactory   |




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



WebappLoader and Auto-Detection of Class Changes

2005-06-03 Thread Scott Dudley


I extended WebappLoader.java to create a custom classloader to allow me 
to append an alternate set of class folders.  The loader works as 
intended but I noted that it doesn't detect any changes to these 
resources and call Context.reload() as is the case with WEB-INF/classes, 
lib, and any  entries.  What am I missing.  Looking at 
WebappLoader.java and I fail to notice the mechanism which provides said 
functionality.


Can someone point me in the right direction?

Many thanks.

--

Regards,

Scott Dudley


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



Re: Summer of code

2005-06-03 Thread Peter Rossbach

Hey Tim,

Have you see this fine mod_rewrite filter at http://tuckey.org/urlrewrite/.
What you mean, can we use the common httpclient for backend proxy 
implementation?

   It has a stable pooling with keepalive handling and http/https support.

Peter

Tim Funk schrieb:


Here is more detail of what I was pondering with the reverse proxy.

Topic - Extend the balancer webapp to allow for reverse proxy

Description
-
Write a 2.4 compliant Servlet Filter which will allow tomcat (or any 
other compliant engine) to act as a reverse proxy.



Constraints
---
- Use no tomcat internal specific api's
- Allow for other filters to wrap this so caching would be allowed
- Allow for pluggable proxy rules much like the balancer is implemented


Rules to create
---
- simple match rule which is one-to-one mapping back to a single 
server based on a URL prefix



Nice to haves
-
- Use a pool of connections to take advantage of keep-alive capabilitites
- A partner caching filter which can cache to memory/disk/???
- A partner filter which can provide rudimentary content rewriting for 
hosts which return an incorrect hostname
- cluster rule - So tomcat fronts a cluster of servers for the 
following scenarios 1) round robin 2) random 3) sticky





Remy Maucherat wrote:



I think there should be proposals, like this one which seems good, 
then have a vote on all these.


Please be quick for the proposals as there's a deadline, apparently, 
so I'd say this needs to be wrapped up and the wiki edited by the end 
of next week.




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



DO NOT REPLY [Bug 34993] - Missing Class-Path entries are ignored, spec violation

2005-06-03 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34993





--- Additional Comments From [EMAIL PROTECTED]  2005-06-03 19:34 ---
Thanks.  I confused

http://java.sun.com/j2se/1.4.2/docs/guide/extensions/spec.html#bundled

with

http://java.sun.com/j2se/1.4.2/docs/guide/extensions/versioning.html

Now I get the errors I expected:

INFO: Deploying web application archive test-cp.war
Jun 3, 2005 10:31:22 AM org.apache.catalina.util.ExtensionValidator
validateManifestResources
INFO: ExtensionValidator[/test-cp][Web Application Manifest]: Required extension
"com.example.testcp" not found.
Jun 3, 2005 10:31:22 AM org.apache.catalina.util.ExtensionValidator
validateManifestResources
INFO: ExtensionValidator[/test-cp]: Failure to find 1 required extension(s).

Thanks again!

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



Re: Summer of code

2005-06-03 Thread Tim Funk

Here is more detail of what I was pondering with the reverse proxy.

Topic - Extend the balancer webapp to allow for reverse proxy

Description
-
Write a 2.4 compliant Servlet Filter which will allow tomcat (or any other 
compliant engine) to act as a reverse proxy.



Constraints
---
- Use no tomcat internal specific api's
- Allow for other filters to wrap this so caching would be allowed
- Allow for pluggable proxy rules much like the balancer is implemented


Rules to create
---
- simple match rule which is one-to-one mapping back to a single server based 
on a URL prefix



Nice to haves
-
- Use a pool of connections to take advantage of keep-alive capabilitites
- A partner caching filter which can cache to memory/disk/???
- A partner filter which can provide rudimentary content rewriting for hosts 
which return an incorrect hostname
- cluster rule - So tomcat fronts a cluster of servers for the following 
scenarios 1) round robin 2) random 3) sticky





Remy Maucherat wrote:


I think there should be proposals, like this one which seems good, then 
have a vote on all these.


Please be quick for the proposals as there's a deadline, apparently, so 
I'd say this needs to be wrapped up and the wiki edited by the end of 
next week.



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



RE: DeployTask gives "MalformedURLException: unknown protocol: c"

2005-06-03 Thread Bertrand Fontaine
Hi Diogo. I rewrote the ANT script from scratch and it is now working just 
fine. No idea for now about what was going wrong however. Thanks for your 
help,


Bertrand


From: "Diogo Quintela (EF)" <[EMAIL PROTECTED]>
Reply-To: "Tomcat Developers List" 
To: "'Tomcat Developers List'" 
Subject: RE: DeployTask gives "MalformedURLException: unknown protocol: c"
Date: Fri, 3 Jun 2005 15:00:29 +0100

You have to use two slahes.
-->localWar="file://C:/Training/training.war"

Cumps
Diogo


-Original Message-
From: Bertrand Fontaine [mailto:[EMAIL PROTECTED]
Sent: sexta-feira, 3 de Junho de 2005 13:42
To: tomcat-dev@jakarta.apache.org
Subject: DeployTask gives "MalformedURLException: unknown protocol: c"

Hello,

I have a problem with the ANT Deploy task. The error message is
"java.net.MalformedURLException: unknown protocol: c". I have found in the
archives that some people identified a bug that was giving the exact same
message. The problem has been fixed at that time in catalina-ant.jar.
However, I am running the latest versions of all libraries ... Here are the
details:

Tomcat: installed from jakarta-tomcat-5.5.9.exe
Ant: version 1.6.4
Java: SUN'JVM "1.5.0_03"
OS:Windows XP

Ant script extract:





In order to valide the syntax of the localWar argument, I wrote the
following program:

import ...

public class Test {

public static void main(String args[]) {
URL url = Test.class.getResource("/training.war");
System.out.println(url);

DeployTask deployTask = new DeployTask();
deployTask.setLocalWar(url.toString());
deployTask.setUsername(...);
deployTask.setPassword(...);
deployTask.setUrl(...);
deployTask.setPath(...);
deployTask.execute();
return;
   }
}

I don't have the error message and the web app is indeed deployed. However,
when I copy-paste the result of url.toString() in the XML version of the 
ANT


script (cf. extract), I have the error message.

Any idea ?

Bertrand

_
Free blogging with MSN Spaces  http://spaces.msn.com/?mkt=nl-be


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



_
Free blogging with MSN Spaces  http://spaces.msn.com/?mkt=nl-be


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



RE: DeployTask gives "MalformedURLException: unknown protocol: c"

2005-06-03 Thread Bertrand Fontaine

You have to use two slahes.
-->localWar="file://C:/Training/training.war"


Thanks Diogo, but I have the same problem.

Bertrand



-Original Message-
From: Bertrand Fontaine [mailto:[EMAIL PROTECTED]
Sent: sexta-feira, 3 de Junho de 2005 13:42
To: tomcat-dev@jakarta.apache.org
Subject: DeployTask gives "MalformedURLException: unknown protocol: c"

Hello,

I have a problem with the ANT Deploy task. The error message is
"java.net.MalformedURLException: unknown protocol: c". I have found in the
archives that some people identified a bug that was giving the exact same
message. The problem has been fixed at that time in catalina-ant.jar.
However, I am running the latest versions of all libraries ... Here are the
details:

Tomcat: installed from jakarta-tomcat-5.5.9.exe
Ant: version 1.6.4
Java: SUN'JVM "1.5.0_03"
OS:Windows XP

Ant script extract:





In order to valide the syntax of the localWar argument, I wrote the
following program:

import ...

public class Test {

public static void main(String args[]) {
URL url = Test.class.getResource("/training.war");
System.out.println(url);

DeployTask deployTask = new DeployTask();
deployTask.setLocalWar(url.toString());
deployTask.setUsername(...);
deployTask.setPassword(...);
deployTask.setUrl(...);
deployTask.setPath(...);
deployTask.execute();
return;
   }
}

I don't have the error message and the web app is indeed deployed. However,
when I copy-paste the result of url.toString() in the XML version of the 
ANT


script (cf. extract), I have the error message.

Any idea ?

Bertrand

_
Free blogging with MSN Spaces  http://spaces.msn.com/?mkt=nl-be


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



_
Free blogging with MSN Spaces  http://spaces.msn.com/?mkt=nl-be


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



RE: DeployTask gives "MalformedURLException: unknown protocol: c"

2005-06-03 Thread Diogo Quintela \(EF\)
You have to use two slahes. 
-->localWar="file://C:/Training/training.war"

Cumps
Diogo


-Original Message-
From: Bertrand Fontaine [mailto:[EMAIL PROTECTED] 
Sent: sexta-feira, 3 de Junho de 2005 13:42
To: tomcat-dev@jakarta.apache.org
Subject: DeployTask gives "MalformedURLException: unknown protocol: c"

Hello,

I have a problem with the ANT Deploy task. The error message is 
"java.net.MalformedURLException: unknown protocol: c". I have found in the 
archives that some people identified a bug that was giving the exact same 
message. The problem has been fixed at that time in catalina-ant.jar. 
However, I am running the latest versions of all libraries ... Here are the 
details:

Tomcat: installed from jakarta-tomcat-5.5.9.exe
Ant: version 1.6.4
Java: SUN'JVM "1.5.0_03"
OS:Windows XP

Ant script extract:





In order to valide the syntax of the localWar argument, I wrote the 
following program:

import ...

public class Test {

public static void main(String args[]) {
URL url = Test.class.getResource("/training.war");
System.out.println(url);

DeployTask deployTask = new DeployTask();
deployTask.setLocalWar(url.toString());
deployTask.setUsername(...);
deployTask.setPassword(...);
deployTask.setUrl(...);
deployTask.setPath(...);
deployTask.execute();
return;
   }
}

I don't have the error message and the web app is indeed deployed. However, 
when I copy-paste the result of url.toString() in the XML version of the ANT

script (cf. extract), I have the error message.

Any idea ?

Bertrand

_
Free blogging with MSN Spaces  http://spaces.msn.com/?mkt=nl-be


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



DO NOT REPLY [Bug 33911] - Request for security role mapping (role-to-group/user)

2005-06-03 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33911


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|ASSIGNED|NEW




--- Additional Comments From [EMAIL PROTECTED]  2005-06-03 15:19 ---
Please use tomcat-dev for communicating rather than bug reports. We started a
thread on possible summer of code projects.

I do not think it is a good idea to change how security is done in Tomcat 5.5.x,
and that any change in any upcoming Tomcat should be done once we know a little
bit more about the upcoming specification. Conclusion: this is likely not a good
summer of code project, due to timing issues.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DeployTask gives "MalformedURLException: unknown protocol: c"

2005-06-03 Thread Bertrand Fontaine

Hello,

I have a problem with the ANT Deploy task. The error message is 
"java.net.MalformedURLException: unknown protocol: c". I have found in the 
archives that some people identified a bug that was giving the exact same 
message. The problem has been fixed at that time in catalina-ant.jar. 
However, I am running the latest versions of all libraries ... Here are the 
details:


Tomcat: installed from jakarta-tomcat-5.5.9.exe
Ant: version 1.6.4
Java: SUN'JVM "1.5.0_03"
OS:Windows XP

Ant script extract:


   


In order to valide the syntax of the localWar argument, I wrote the 
following program:


import ...

public class Test {

   public static void main(String args[]) {
   URL url = Test.class.getResource("/training.war");
   System.out.println(url);

   DeployTask deployTask = new DeployTask();
   deployTask.setLocalWar(url.toString());
   deployTask.setUsername(...);
   deployTask.setPassword(...);
   deployTask.setUrl(...);
   deployTask.setPath(...);
   deployTask.execute();
   return;
  }
}

I don't have the error message and the web app is indeed deployed. However, 
when I copy-paste the result of url.toString() in the XML version of the ANT 
script (cf. extract), I have the error message.


Any idea ?

Bertrand

_
Free blogging with MSN Spaces  http://spaces.msn.com/?mkt=nl-be


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



DO NOT REPLY [Bug 33911] - Request for security role mapping (role-to-group/user)

2005-06-03 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33911





--- Additional Comments From [EMAIL PROTECTED]  2005-06-03 13:40 ---
(In reply to comment #2)
> Hi I saw this thread from google's summer of codes site. I've been using 
> Tomcat
> for 5-6 years and am new to JAAS. I would like to learn more about this issue
> and maybe I can contribute some codes. Could anyone point me to some
> documentations?  Thanks
> 
> -Lou

I saw this thread from google's summer of codes site too. I've been using Tomcat
since 2001 and I know JAAS. I have a good understanding of it and more than 2
years of development with jboss app server. May be we can do it together?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 35200] New: - Tomcat connection pooling fault with MySql derived tables

2005-06-03 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35200

   Summary: Tomcat connection pooling fault with MySql derived
tables
   Product: Tomcat 5
   Version: 5.5.7
  Platform: Other
OS/Version: Windows 2000
Status: NEW
  Severity: blocker
  Priority: P2
 Component: Unknown
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


When using Tomcats connection pooling a query using derived tables seems to 
loop infinately with a jumble of the first records of result set. When same 
query run stand-alone using JDBC, works fine.

eg:

SELECT a.col1, b.col2
   FROM table1 a, (SELECT col1 FROM table2) b
   WHERE a.col1=b.col1;


servlet.xml



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



cvs commit: jakarta-tomcat-connectors/jni/native BUILDING

2005-06-03 Thread jfclere
jfclere 2005/06/03 01:43:38

  Modified:jni/native BUILDING
  Log:
  Add about ssl and correct setup to setenv.
  
  Revision  ChangesPath
  1.3   +9 -3  jakarta-tomcat-connectors/jni/native/BUILDING
  
  Index: BUILDING
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/BUILDING,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BUILDING  18 Apr 2005 13:52:49 -  1.2
  +++ BUILDING  3 Jun 2005 08:43:38 -   1.3
  @@ -1,6 +1,6 @@
 Building from the cvs tree:
 sh buildconf --with-apr=apr_source_location.
  -  configure --with-apr=apr_install_location.
  +  configure --with-apr=apr_install_location 
--with-ssl=openssl_install_location
 make
   
 Testing the build:
  @@ -14,7 +14,13 @@
 Using it in Tomcat:
 1 - In  use of conf/server.xml:
   protocol="org.apache.coyote.http11.Http11AprProtocol"
  -  2 - In bin/setup.sh add the following:
  +  2 - In bin/setenv.sh add the following:
   CATALINA_OPTS="$CATALINA_OPTS -Djava.library.path=tclib_location"
   In my machine I am using:
  -/home/jfclere/jakarta-tomcat-connectors/jni/native/.libs for 
tclib_location 
  +/home/jfclere/jakarta-tomcat-connectors/jni/native/.libs for 
tclib_location
  +
  +NOTES:
  +  - configure --without-ssl : Configure without ssl support.
  +  - To use it in Tomcat you may have to add in bin/setenv.sh:
  +LD_LIBRARY_PATH=openssl_install_location/lib; export LD_LIBRARY_PATH
  +(use ldd ./.libs/libtcnative-1.so to check it).
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jni/native/include ssl_private.h

2005-06-03 Thread mturk
mturk   2005/06/03 01:16:24

  Modified:jni/native/include ssl_private.h
  Log:
  Change promp_password proto by using size_t.
  
  Revision  ChangesPath
  1.12  +2 -2  
jakarta-tomcat-connectors/jni/native/include/ssl_private.h
  
  Index: ssl_private.h
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jni/native/include/ssl_private.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ssl_private.h 2 Jun 2005 11:07:06 -   1.11
  +++ ssl_private.h 3 Jun 2005 08:16:24 -   1.12
  @@ -167,7 +167,7 @@
   voidSSL_init_app_data2_idx(void);
   void   *SSL_get_app_data2(SSL *);
   voidSSL_set_app_data2(SSL *, void *);
  -int SSL_password_prompt(tcn_ssl_ctxt_t *, char *, int);
  +int SSL_password_prompt(tcn_ssl_ctxt_t *, char *, size_t);
   voidSSL_BIO_close(BIO *);
   voidSSL_BIO_doref(BIO *);
   DH *SSL_dh_get_tmp_param(int);
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jni/native/src sslutils.c

2005-06-03 Thread mturk
mturk   2005/06/03 01:14:46

  Modified:jni/native/src sslutils.c
  Log:
  Fix default password prompting. On non WIN platform curses library is used.
  
  Revision  ChangesPath
  1.11  +45 -35jakarta-tomcat-connectors/jni/native/src/sslutils.c
  
  Index: sslutils.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/sslutils.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- sslutils.c2 Jun 2005 11:07:07 -   1.10
  +++ sslutils.c3 Jun 2005 08:14:46 -   1.11
  @@ -32,6 +32,14 @@
   #ifdef HAVE_OPENSSL
   #include "ssl_private.h"
   
  +#ifdef WIN32
  +#include   /* getch() */
  +#else
  +#include  /* getch() */
  +#endif
  +
  +
  +
   extern apr_hash_t  *tcn_private_keys;
   extern apr_hash_t  *tcn_public_certs;
   
  @@ -105,51 +113,53 @@
   return APR_SUCCESS;
   }
   
  +static void password_prompt(const char *prompt, char *buf, size_t len)
  +{
  +size_t i;
  +int ch;
  +
  +fputs(prompt, stderr);
  +for (i = 0; i < (len - 1); i++) {
  +ch = getch();
  +if (ch == '\n')
  +break;
  +else if (ch == '\b') {
  +i--;
  +if (i > 0)
  +i--;
  +}
  +else
  +buf[i] = ch;
  +}
  +buf[i] = '\0';
  +}
  +
  +#define PROMPT_STRING "Enter password: "
   /* Simple echo password prompting */
  -int SSL_password_prompt(tcn_ssl_ctxt_t *c, char *buf, int len)
  +int SSL_password_prompt(tcn_ssl_ctxt_t *c, char *buf, size_t len)
   {
   int rv = 0;
   *buf = '\0';
   if (c->bio_is) {
   if (c->bio_is->flags & SSL_BIO_FLAG_RDONLY) {
   /* Use error BIO in case of stdin */
  -BIO_printf(c->bio_os, "Enter password: ");
  +BIO_printf(c->bio_os, PROMPT_STRING);
   }
   rv = BIO_gets(c->bio_is, buf, len);
  -if (rv > 0) {
  -/* Remove LF chars */
  -char *r = strchr(buf, '\n');
  -if (r) {
  -*r = '\0';
  -rv--;
  -}
  -/* Remove CR chars */
  -r = strchr(buf, '\r');
  -if (r) {
  -*r = '\0';
  -rv--;
  -}
  -}
   }
   else {
  -#ifdef WIN32
  -#include 
  -int ch;
  -BIO_printf(c->bio_os, "Enter password: ");
  -do {
  -ch = getch();
  -if (ch == '\r')
  -break;
  -fputc('*', stdout);
  -buf[rv++] = ch;
  -if (rv + 1 > len)
  -continue;
  -} while (ch != '\n');
  -buf[rv] = '\0';
  -fputc('\n', stdout);
  -fflush(stdout);
  -#endif
  -
  +password_prompt(PROMPT_STRING, buf, len);
  +fputc('\n', stderr);
  +fflush(stderr);
  +rv = strlen(buf);
  +}
  +if (rv > 0) {
  +/* Remove LF char if present */
  +char *r = strchr(buf, '\n');
  +if (r) {
  +*r = '\0';
  +rv--;
  +}
   }
   return rv;
   }
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jni/native/src error.c

2005-06-03 Thread mturk
mturk   2005/06/03 00:44:10

  Modified:jni/native/src error.c
  Log:
  Remove extra static function by merge it to the ThrowException.
  
  Revision  ChangesPath
  1.9   +6 -13 jakarta-tomcat-connectors/jni/native/src/error.c
  
  Index: error.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/error.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- error.c   3 Jun 2005 07:35:07 -   1.8
  +++ error.c   3 Jun 2005 07:44:10 -   1.9
  @@ -28,27 +28,20 @@
*/
   #define TCN_STATUS_IS_ETIMEDOUT(x) (APR_STATUS_IS_ETIMEDOUT((x)) || ((x) == 
APR_TIMEUP))
   /*
  - * Convenience function to help throw an Exception.
  + * Convenience function to help throw an java.lang.Exception.
*/
  -static void do_throw(JNIEnv *env, const char *cname, const char *msg)
  +void tcn_ThrowException(JNIEnv *env, const char *msg)
   {
   jclass javaExceptionClass;
   
  -javaExceptionClass = (*env)->FindClass(env, cname);
  +javaExceptionClass = (*env)->FindClass(env, "java/lang/Exception");
   if (javaExceptionClass == NULL) {
  -fprintf(stderr, "Cannot find %s class\n", cname);
  +fprintf(stderr, "Cannot find java/lang/Exception class\n");
   return;
   }
   (*env)->ThrowNew(env, javaExceptionClass, msg);
   (*env)->DeleteLocalRef(env, javaExceptionClass);
  -}
   
  -/*
  - * Convenience function to help throw an java.lang.Exception.
  - */
  -void tcn_ThrowException(JNIEnv *env, const char *msg)
  -{
  -do_throw(env, "java/lang/Exception", msg);
   }
   
   void tcn_Throw(JNIEnv *env, const char *fmt, ...)
  @@ -58,7 +51,7 @@
   
   va_start(ap, fmt);
   apr_vsnprintf(msg, TCN_BUFFER_SZ, fmt, ap);
  -do_throw(env, "java/lang/Exception", msg);
  +tcn_ThrowException(env, msg);
   va_end(ap);
   free(msg);
   }
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jni/native/src error.c

2005-06-03 Thread mturk
mturk   2005/06/03 00:35:07

  Modified:jni/native/include tcn.h
   jni/native/src error.c
  Log:
  Add generic throw for printf style arguments.
  
  Revision  ChangesPath
  1.11  +2 -2  jakarta-tomcat-connectors/jni/native/include/tcn.h
  
  Index: tcn.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/include/tcn.h,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- tcn.h 1 Jun 2005 06:38:09 -   1.10
  +++ tcn.h 3 Jun 2005 07:35:07 -   1.11
  @@ -56,7 +56,7 @@
   JNIEXPORT RT JNICALL Java_org_apache_tomcat_jni_##CL##_##FN
   
   /* Private helper functions */
  -void tcn_Throw(JNIEnv *env, const char *cname, const char *msg);
  +void tcn_Throw(JNIEnv *env, const char *fmt, ...);
   void tcn_ThrowException(JNIEnv *env, const char *msg);
   void tcn_ThrowAPRException(JNIEnv *env, apr_status_t err);
   jstring tcn_new_string(JNIEnv *env, const char *str, int l);
  
  
  
  1.8   +17 -4 jakarta-tomcat-connectors/jni/native/src/error.c
  
  Index: error.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/error.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- error.c   24 May 2005 09:24:40 -  1.7
  +++ error.c   3 Jun 2005 07:35:07 -   1.8
  @@ -18,9 +18,10 @@
* @author Mladen Turk
* @version $Revision$, $Date$
*/
  - 
  +
   #include "apr.h"
   #include "apr_pools.h"
  +#include "apr_strings.h"
   #include "tcn.h"
   
   /* Merge IS_ETIMEDOUT with APR_TIMEUP
  @@ -29,7 +30,7 @@
   /*
* Convenience function to help throw an Exception.
*/
  -void tcn_Throw(JNIEnv *env, const char *cname, const char *msg)
  +static void do_throw(JNIEnv *env, const char *cname, const char *msg)
   {
   jclass javaExceptionClass;
   
  @@ -47,7 +48,19 @@
*/
   void tcn_ThrowException(JNIEnv *env, const char *msg)
   {
  -tcn_Throw(env, "java/lang/Exception", msg);
  +do_throw(env, "java/lang/Exception", msg);
  +}
  +
  +void tcn_Throw(JNIEnv *env, const char *fmt, ...)
  +{
  +char msg[TCN_BUFFER_SZ] = {'\0'};
  +va_list ap;
  +
  +va_start(ap, fmt);
  +apr_vsnprintf(msg, TCN_BUFFER_SZ, fmt, ap);
  +do_throw(env, "java/lang/Exception", msg);
  +va_end(ap);
  +free(msg);
   }
   
   /*
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jni/native/src sslcontext.c

2005-06-03 Thread mturk
mturk   2005/06/03 00:34:27

  Modified:jni/native/src sslcontext.c
  Log:
  Throw exceptions instead using BIO. When the exception is
  thrown this means that the SSL is unusable.
  
  Revision  ChangesPath
  1.19  +13 -16jakarta-tomcat-connectors/jni/native/src/sslcontext.c
  
  Index: sslcontext.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/sslcontext.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- sslcontext.c  2 Jun 2005 11:07:06 -   1.18
  +++ sslcontext.c  3 Jun 2005 07:34:27 -   1.19
  @@ -359,8 +359,7 @@
   return JNI_FALSE;
   
   if (!SSL_CTX_set_cipher_list(c->ctx, J2S(ciphers))) {
  -BIO_printf(c->bio_os,
  -   "[ERROR] Unable to configure permitted SSL ciphers");
  +tcn_Throw(e, "Unable to configure permitted SSL ciphers");
   rv = JNI_FALSE;
   }
   TCN_FREE_CSTRING(ciphers);
  @@ -459,9 +458,9 @@
   return JNI_TRUE;
   }
   }
  -BIO_printf(c->bio_os, "[ERROR] Only up to %d "
  -   "different certificates per virtual host allowed",
  -   SSL_AIDX_MAX);
  +tcn_Throw(e, "Only up to %d "
  +  "different certificates per virtual host allowed",
  +  SSL_AIDX_MAX);
   return JNI_FALSE;
   }
   
  @@ -481,9 +480,9 @@
   return JNI_TRUE;
   }
   }
  -BIO_printf(c->bio_os, "[ERROR] Only up to %d "
  -   "different private keys per virtual host allowed",
  -   SSL_AIDX_MAX);
  +tcn_Throw(e, "Only up to %d "
  +  "different private keys per virtual host allowed",
  +  SSL_AIDX_MAX);
   return JNI_FALSE;
   }
   
  @@ -568,7 +567,7 @@
   int verify = SSL_VERIFY_NONE;
   STACK_OF(X509_NAME) *ca_list;
   
  -UNREFERENCED_STDARGS;
  +UNREFERENCED(o);
   TCN_ASSERT(ctx != 0);
   c->verify_mode = level;
   
  @@ -592,9 +591,8 @@
   if (!SSL_CTX_load_verify_locations(c->ctx,
c->ca_cert_file,
c->ca_cert_path)) {
  -BIO_printf(c->bio_os, "[ERROR] "
  -   "Unable to configure verify locations "
  -   "for client authentication");
  +tcn_Throw(e, "Unable to configure verify locations "
  +  "for client authentication");
   return JNI_FALSE;
   }
   
  @@ -609,9 +607,8 @@
 c->ca_cert_path);
   }
   if (!ca_list) {
  -BIO_printf(c->bio_os, "[ERROR] "
  -   "Unable to determine list of acceptable "
  -   "CA certificates for client authentication");
  +tcn_Throw(e, "Unable to determine list of acceptable "
  +  "CA certificates for client authentication");
   return JNI_FALSE;
   }
   SSL_CTX_set_client_CA_list(c->ctx, (STACK *)ca_list);
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni SSLContext.java

2005-06-03 Thread mturk
mturk   2005/06/03 00:33:24

  Modified:jni/java/org/apache/tomcat/jni SSLContext.java
  Log:
  Some functions can throw exceptions.
  
  Revision  ChangesPath
  1.12  +9 -5  
jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSLContext.java
  
  Index: SSLContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSLContext.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SSLContext.java   2 Jun 2005 10:19:32 -   1.11
  +++ SSLContext.java   3 Jun 2005 07:33:24 -   1.12
  @@ -132,7 +132,8 @@
* @param ctx Server or Client context to use.
* @param ciphers An SSL cipher specification.
*/
  -public static native boolean setCipherSuite(long ctx, String ciphers);
  +public static native boolean setCipherSuite(long ctx, String ciphers)
  +throws Exception;
   
   /**
* Set Directory of PEM-encoded CA Certificates for Client Auth
  @@ -198,7 +199,8 @@
* @param ctx Server or Client context to use.
* @param file Certificate file.
*/
  -public static native boolean setCertificateFile(long ctx, String file);
  +public static native boolean setCertificateFile(long ctx, String file)
  +throws Exception;
   
   /**
* Set Server Private Key
  @@ -210,7 +212,8 @@
* @param ctx Server or Client context to use.
* @param file Server Private Key file.
*/
  -public static native boolean setCertificateKeyFile(long ctx, String 
file);
  +public static native boolean setCertificateKeyFile(long ctx, String file)
  +throws Exception;
   
   /**
* Set File of concatenated PEM-encoded CA Certificates for Client Auth
  @@ -342,6 +345,7 @@
* @param ctx Server or Client context to use.
* @param level Type of Client Certificate verification.
*/
  -public static native boolean setVerifyClient(long ctx, int level);
  +public static native boolean setVerifyClient(long ctx, int level)
  +throws Exception;
   
   }
  
  
  

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