Re: Jakarta Mail JNDI configuration

2024-11-26 Thread Ricardo Almeida
:00, Mark Thomas wrote: > On 26/11/2024 08:42, Ricardo Almeida wrote: > > Hi, > > > > I'm trying to configure Jakarta Mail using JNDI but it seems there's > > some issue setting up the parameters Tomcat should pass on to Jakarta &g

Re: Jakarta Mail JNDI configuration

2024-11-26 Thread Mark Thomas
On 26/11/2024 08:42, Ricardo Almeida wrote: Hi, I'm trying to configure Jakarta Mail using JNDI but it seems there's some issue setting up the parameters Tomcat should pass on to Jakarta Mail. I configured it using: Support for ResourceParams was removed just over 20

Re: Jakarta Mail JNDI configuration

2024-11-26 Thread Ricardo Almeida
gt; Regards, > Zdenek Henek > > On Tue, Nov 26, 2024 at 8:43 AM Ricardo Almeida > wrote: > > > Hi, > > > > I'm trying to configure Jakarta Mail using JNDI but it seems there's > > some issue setting up the parameters Tomcat should pass on to

Re: Jakarta Mail JNDI configuration

2024-11-26 Thread Zdeněk Henek
27;m trying to configure Jakarta Mail using JNDI but it seems there's > some issue setting up the parameters Tomcat should pass on to Jakarta > Mail. > > I configured it using: > > global="mail/Session" > name="mail/Session" >

Jakarta Mail JNDI configuration

2024-11-26 Thread Ricardo Almeida
Hi, I'm trying to configure Jakarta Mail using JNDI but it seems there's some issue setting up the parameters Tomcat should pass on to Jakarta Mail. I configured it using: mail.smtp.starttls.enabletrue mail.smtp.hostsmt

Re: JNDI connection pool in Tomcat 10.1

2024-09-05 Thread Mark Thomas
auth="Container" type="javax.sql.DataSource" /> When I deploy my Spring MVC 6 app I get the following in the Tomcat logs Enable debug logging for the JNDI lookup with: org.apache.naming.level = ALL in $CATALINA_BASE/conf/logging.propert

RE: JNDI connection pool in Tomcat 10.1

2024-09-04 Thread charliedidonato
Hello Tomcat 10.1, Java 17, MySQL Connector 9.0 Not sure if this is a Tomcat Config issue or Spring MVC 6 issue I am converting from Spring MVC 4 to 6 and have the following set up in Tomcat 10.1 Context.xml Server.xml ResourceLink name="j

JNDI connection pool in Tomcat 10.1

2024-09-04 Thread charliedidonato
Hello Tomcat 10.1, Java 17, MySQL Connector 9.0 Not sure if this is a Tomcat Config issue or Spring MVC 6 issue I am converting from Spring MVC 4 to 6 and have the following set up in Tomcat 10.1 Context.xml Server.xml ResourceLink name="j

RE: Tomcat MySQL Connection Pooling JNDI lookup

2024-06-19 Thread Daniel Schwartz
g wrong with these files? Dan -Original Message- From: Christopher Schultz Sent: Wednesday, June 19, 2024 5:10 PM To: users@tomcat.apache.org Subject: Re: Tomcat MySQL Connection Pooling JNDI lookup Daniel, On 6/19/24 16:37, Daniel Schwartz wrote: > I followed you instruction to mo

Re: Tomcat MySQL Connection Pooling JNDI lookup

2024-06-19 Thread Christopher Schultz
ish. Web-based configuration tools are somewhat dangerous in our opinion. Yes, we have some (e.g. manager and host-manager) but they don't generally mess with configuration files. JNDI connection pooling requires both the container and the application to be configured properly, and appl

RE: Tomcat MySQL Connection Pooling JNDI lookup

2024-06-19 Thread Daniel Schwartz
To: users@tomcat.apache.org Subject: Re: Tomcat MySQL Connection Pooling JNDI lookup Daniel, On 6/19/24 11:40, Daniel Schwartz wrote: > Dear Felix, > > Thank you for your reply. The connector jar file is at > > C:\Program > Files\apache-tomcat-10.1.24\lib\mysql-connector-j-8.4.0.

Re: Tomcat MySQL Connection Pooling JNDI lookup

2024-06-19 Thread Terence M. Bandoian
On 6/19/2024 1:02 PM, Chuck Caldarale wrote: On Jun 19, 2024, at 10:09, Daniel Schwartz wrote: Dear Thomas, Your email came with no content. Please try again. Thomas’ message looked fine here as well. Check your e-mail client. - Chuck I saw the quoted message Mark was responding to bu

Re: Tomcat MySQL Connection Pooling JNDI lookup

2024-06-19 Thread Chuck Caldarale
> On Jun 19, 2024, at 10:09, Daniel Schwartz wrote: > > Dear Thomas, > > Your email came with no content. Please try again. Thomas’ message looked fine here as well. Check your e-mail client. - Chuck - To unsubscribe,

Re: Tomcat MySQL Connection Pooling JNDI lookup

2024-06-19 Thread Christopher Schultz
days"); in a file called DataSourceSingleton.java, which is invoked by the getJsonCountries method. The method is supposed to extract a list of countries from the database, but the list is returned as null since the JNDI lookup fails. I identified this failure by putting print statements immediately be

Re: Tomcat MySQL Connection Pooling JNDI lookup

2024-06-19 Thread Christopher Schultz
Daniel, On 6/19/24 11:09, Daniel Schwartz wrote: Dear Thomas, Your email came with no content. Please try again. His reply email looks fine to me. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org

RE: Tomcat MySQL Connection Pooling JNDI lookup

2024-06-19 Thread Daniel Schwartz
voked by the getJsonCountries method. The method is supposed to extract a list of countries from the database, but the list is returned as null since the JNDI lookup fails. I identified this failure by putting print statements immediately before and after this line. The statement before the line

RE: Tomcat MySQL Connection Pooling JNDI lookup

2024-06-19 Thread Daniel Schwartz
Dear Thomas, Your email came with no content. Please try again. Dan Schwartz From: Thomas Hoffmann (Speed4Trade GmbH) Sent: Wednesday, June 19, 2024 2:05 AM To: Tomcat Users List Subject: AW: Tomcat MySQL Connection Pooling JNDI lookup

AW: Tomcat MySQL Connection Pooling JNDI lookup

2024-06-18 Thread Thomas Hoffmann (Speed4Trade GmbH)
user name > >"root" and password "rootpwd". I've tried to follow the examples at > >https://tomcat.apache.org/tomcat-9.0-doc/jndi-datasource-examples-howto > >.html > >#MySQL_DBCP_2_Example. > > > > > > > >Attached are my files co

Re: Tomcat MySQL Connection Pooling JNDI lookup

2024-06-18 Thread Felix Schumacher
otpwd". I've tried to follow the examples at >https://tomcat.apache.org/tomcat-9.0-doc/jndi-datasource-examples-howto.html >#MySQL_DBCP_2_Example. > > > >Attached are my files context.xml, which I put in the Tomcat conf directory, >and web.xml, which I put in my pro

FW: Tomcat MySQL Connection Pooling JNDI lookup

2024-06-18 Thread Daniel Schwartz
users@tomcat.apache.org Subject: Tomcat MySQL Connection Pooling JNDI lookup Hello, I'm trying to set up MySQL 8.0.11 database connection pooling in Tomcat 10.1.24 on Windows 10. The MySQL database is "holidays" with user name "root" and password "rootpwd". I&

Tomcat MySQL Connection Pooling JNDI lookup

2024-06-17 Thread Daniel Schwartz
Hello, I'm trying to set up MySQL 8.0.11 database connection pooling in Tomcat 10.1.24 on Windows 10. The MySQL database is "holidays" with user name "root" and password "rootpwd". I've tried to follow the examples at https://tomcat.apache.org

Re: apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-13 Thread Rob Sargent
On 12/13/22 22:25, dineshk wrote: Hi Mark, I guess you are right , I tried with simple web application and JNDI look up fails in both tomcat 7.x and 9.x if the current thread context class loader is changed but strangely when we deploy our application which uses hibernate (4.3.11) , it

Re: apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-13 Thread dineshk
Hi Mark, I guess you are right , I tried with simple web application and JNDI look up fails in both tomcat 7.x and 9.x if the current thread context class loader is changed but strangely when we deploy our application which uses hibernate (4.3.11) , it does work in tomcat 7.x  but not in 9.x

Re: apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-13 Thread Rémy Maucherat
On Tue, Dec 13, 2022 at 9:36 AM dineshk wrote: > > > Hi Mark, > I guess you are right , I tried with simple web application and JNDI look up > fails in both tomcat 7.x and 9.x if the current thread context class loader > is changed but strangely when we deploy our appl

Re: apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-13 Thread dineshk
Hi Mark, I guess you are right , I tried with simple web application and JNDI look up fails in both tomcat 7.x and 9.x if the current thread context class loader is changed but strangely when we deploy our application which uses hibernate (4.3.11) , it does work in tomcat 7.x  but not in 9.x

Re: apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-12 Thread Mark Thomas
On 12/12/2022 16:07, dineshk wrote: Hi Mark, We could reproduce this issue very easily with simple java program as well. Just before doing the JNDI look up , set  any custom class loader in the current thread as context class loader , this will fail the JNDI look up where as if we don'

Re: apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-12 Thread dineshk
Hi Mark, We could reproduce this issue very easily with simple java program as well. Just before doing the JNDI look up , set  any custom class loader in the current thread as context class loader , this will fail the JNDI look up where as if we don't set any custom class loader , it

Re: apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-12 Thread Christopher Schultz
omcat 9? -chris On Monday, December 12, 2022 at 06:33:56 PM GMT+5:30, Mark Thomas wrote: The JNDI binding code is unchanged (apart from the removal of some deprecated methods) between 7.0.x and 9.0.x (and beyond that range). I think you'll need to do some debugging to figure o

Re: apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-12 Thread dineshk
hence required. It works in Tomcat 7.X as well but when we moved to 8.x or 9.x in both it failed. RegardsDinesh On Monday, December 12, 2022 at 06:33:56 PM GMT+5:30, Mark Thomas wrote: The JNDI binding code is unchanged (apart from the removal of some deprecated methods) between 7.0.x and

Re: apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-12 Thread Mark Thomas
The JNDI binding code is unchanged (apart from the removal of some deprecated methods) between 7.0.x and 9.0.x (and beyond that range). I think you'll need to do some debugging to figure out exactly why this isn't working but I suspect the custom class loader is at least a part of

apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-12 Thread dineshk
read Context Class Loader "  fails the JNDI look up for data source done by hibernate.  if the "Current Thread Context Class Loader "  is not changed than JNDI look up works. We have also deployed the same application with the same configurations on  apache-tomcat-7.0.57 and it works

Re: JNDI resourse name value

2022-11-08 Thread Christopher Schultz
Some other application servers (usually the "enterprise" ones) are super strict about where things go in the JNDI space. It's very common to see JDBC connections placed into java:comp/env/jdbc/[connection-name] but I think technically you could put them just about anywhere. If yo

Re: JNDI resourse name value

2022-11-07 Thread Rob Sargent
y the "enterprise" ones) are super strict about where things go in the JNDI space. It's very common to see JDBC connections placed into java:comp/env/jdbc/[connection-name] but I think technically you could put them just about anywhere. If you put them somewhere else, someone's

Re: JNDI resourse name value

2022-11-07 Thread Christopher Schultz
ut where things go in the JNDI space. It's very common to see JDBC connections placed into java:comp/env/jdbc/[connection-name] but I think technically you could put them just about anywhere. If you put them somewhere else, someone's gonna say "hey, what the heck are you

JNDI resourse name value

2022-11-07 Thread Rob Sargent
Are there any semantics to Resourse name attributes? Or is no more or less valid than - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org

JNDI bind in embedded Tomcat for "java:app"

2022-01-26 Thread Thomas Rohde
Hello Tomcat users! I'm using an embedded Tomcat (9.0.54) with Spring Boot. I have to execute some legacy code of an Java EE application which uses local EJBs an makes JNDI look for "java:app/foo/bar". Now I want to create an instance as Spring Bean an register it in the JN

AW: How do I disable JNDI logging

2021-10-19 Thread Thomas Hoffmann (Speed4Trade GmbH)
check the logging configuration. Greetings, Thomas -Ursprüngliche Nachricht- Von: Salomon Mateo Gesendet: Dienstag, 19. Oktober 2021 18:55 An: users@tomcat.apache.org Betreff: How do I disable JNDI logging Hello, I hope that someone here can shine some light. Recently upgraded to

How do I disable JNDI logging

2021-10-19 Thread Salomon Mateo
DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [java:comp/env/LOGGING.exception-conversion-word] 11:48:55.621 [localhost-startStop-1] DEBUG org.springframework.jndi.JndiLocatorDelegate - Converted JNDI name [java:comp/env/LOGGING.exception-conversion-word] not found - trying original

AW: Tomcat Unable to Read JNDI xml file

2021-09-16 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hello Alan, could you try the following header: Also check whether the file was saved in UTF-8 format. Greetings, Thomas -Ursprüngliche Nachricht- Von: Alan Tham Gesendet: Donnerstag, 16. September 2021 10:31 An: users@tomcat.apache.org Betreff: Tomcat Unable to Read JNDI xml

Tomcat Unable to Read JNDI xml file

2021-09-16 Thread Alan Tham
I have just created a JNDI file for the spring boot application to read in the db info But I have this error during startup: java.util.InvalidPropertiesFormatException: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 53; Document root element "Context", must matc

Re: Tomcat "JNDI Datasource How-To" documentation & driver managers

2021-08-17 Thread Andrew Tanton
Thank you - very helpful & much appreciated. On Sat, Aug 14, 2021 at 4:24 PM Mark Thomas wrote: > On 14/08/2021 01:51, Andrew Tanton wrote: > > In the Tomcat "JNDI Datasource How-To" documentation page > > < > http://tomcat.apache.org/tomcat-9.0-doc/

Re: Tomcat "JNDI Datasource How-To" documentation & driver managers

2021-08-14 Thread Mark Thomas
On 14/08/2021 01:51, Andrew Tanton wrote: In the Tomcat "JNDI Datasource How-To" documentation page <http://tomcat.apache.org/tomcat-9.0-doc/jndi-datasource-examples-howto.html#comments_section>, there is an unusually opinionated section, which discusses the Java service provider

Tomcat "JNDI Datasource How-To" documentation & driver managers

2021-08-13 Thread Andrew Tanton
In the Tomcat "JNDI Datasource How-To" documentation page <http://tomcat.apache.org/tomcat-9.0-doc/jndi-datasource-examples-howto.html#comments_section>, there is an unusually opinionated section, which discusses the Java service provider (driver manager) mechanism: "*Howeve

[SECURITY] CVE-2021-30640 Apache Tomcat JNDI realm authentication weakness

2021-07-12 Thread Mark Thomas
CVE-2021-30640 JNDI Realm Authentication Weakness Severity: Low Vendor: The Apache Software Foundation Versions Affected: Apache Tomcat 10.0.0-M1 to 10.0.5 Apache Tomcat 9.0.0.M1 to 9.0.45 Apache Tomcat 8.5.0 to 8.5.65 Apache Tomcat 7.0.0 to 7.0.108 Description: Queries made by the JNDI Realm

RE: JNDI ldaps Problem with SSO

2021-05-27 Thread Susan.Wood
Hi Christopher Enclosed is the stacktrace of the tomcat (localhost) 03-Mar-2021 15:57:15.221 SEVERE [http-nio-8080-exec-10] org.apache.catalina.realm.JNDIRealm.authenticate Exception performing authentication javax.naming.NamingException: [LDAP: error code 1 - 04DC: LdapErr: DSID-0C0907E

RE: JNDI ldaps Problem with SSO

2021-05-20 Thread Susan.Wood
> -Original Message- > From: Christopher Schultz > Sent: Donnerstag, 20. Mai 2021 18:37 > To: users@tomcat.apache.org > Subject: Re: JNDI ldaps Problem with SSO > > Susan, > > On 5/18/21 16:58, susan.w...@swisscom.com wrote: > > When we are using plain ldap 3268, a

Re: JNDI ldaps Problem with SSO

2021-05-20 Thread Christopher Schultz
ce and not just the message? -chris -Original Message- From: Christopher Schultz Sent: Dienstag, 18. Mai 2021 18:02 To: users@tomcat.apache.org Subject: Re: JNDI ldaps Problem with SSO Susan, On 5/18/21 09:43, susan.w...@swisscom.com wrote: Hi all apache-tomcat-8.0.36 java ve

RE: JNDI ldaps Problem with SSO

2021-05-18 Thread Susan.Wood
: # extended LDIF # # LDAPv3 # base with scope subtree # filter: (objectclass=*) # requesting: ALL # Organization, Schema, Configuration, bcintra.ch We think, ssl-handshake is fine but bind is failing. Why? Thank you Susan > -Original Message- > From: Christopher Schultz > Sent: Die

Re: JNDI ldaps Problem with SSO

2021-05-18 Thread Christopher Schultz
Susan, On 5/18/21 09:43, susan.w...@swisscom.com wrote: Hi all apache-tomcat-8.0.36 java version "1.8.0_281" Java(TM) SE Runtime Environment (build 1.8.0_281-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.281-b09, mixed mode) We are having a problem with our Single sign On config. When usin

JNDI ldaps Problem with SSO

2021-05-18 Thread Susan.Wood
Hi all apache-tomcat-8.0.36 java version "1.8.0_281" Java(TM) SE Runtime Environment (build 1.8.0_281-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.281-b09, mixed mode) We are having a problem with our Single sign On config. When using ldap - all works well. When switiching to ldaps , the Us

Re: JNDI ldaps Problem with SSO

2021-02-25 Thread Luis Rodríguez Fernández
there maybe another debug Option for the ldap? > > > > Thank you > > > > Susan > > > > > > > > > -Original Message- > > > From: Brian Wolfe > > > Sent: Donnerstag, 25. Februar 2021 17:00 > > > To: Tomcat Users Lis

Re: JNDI ldaps Problem with SSO

2021-02-25 Thread Brian Wolfe
aps with port 3269 fails > > Is there maybe another debug Option for the ldap? > > Thank you > > Susan > > > > > -Original Message- > > From: Brian Wolfe > > Sent: Donnerstag, 25. Februar 2021 17:00 > > To: Tomcat Users List > > Subje

RE: JNDI ldaps Problem with SSO

2021-02-25 Thread Susan.Wood
. So the search itself seems to be fine. Only ldaps with port 3269 fails Is there maybe another debug Option for the ldap? Thank you Susan > -Original Message- > From: Brian Wolfe > Sent: Donnerstag, 25. Februar 2021 17:00 > To: Tomcat Users List > Subject: Re

Re: JNDI ldaps Problem with SSO

2021-02-25 Thread Brian Wolfe
e but shouldn't cause a connection issue if you're using the catalog port. You shouldn't have to configure any additional SSL stuff on the realm. As long as your JNDI url is ldaps it should know to use SSL. Java will negotiate the SSL for you. One thing you can do is turn on SSL d

RE: JNDI ldaps Problem with SSO

2021-02-25 Thread Susan.Wood
ginal Message- > From: Bill Stewart > Sent: Donnerstag, 25. Februar 2021 16:04 > To: Tomcat Users List > Subject: Re: JNDI ldaps Problem with SSO > > On Thu, Feb 25, 2021 at 2:31 AM wrote: > > We are having a problem with our Single sign On config. > > When using ldap -

Re: JNDI ldaps Problem with SSO

2021-02-25 Thread Bill Stewart
On Thu, Feb 25, 2021 at 2:31 AM wrote: We are having a problem with our Single sign On config. > When using ldap - all works well. > > When switiching to ldaps , the User loses to connection all together > (Server not reachable) > > server.xml > > Good: > connection

JNDI ldaps Problem with SSO

2021-02-25 Thread Susan.Wood
Hi all apache-tomcat-8.0.36 java version "1.8.0_281" Java(TM) SE Runtime Environment (build 1.8.0_281-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.281-b09, mixed mode) We are having a problem with our Single sign On config. When using ldap - all works well. When switiching to ldaps , the Us

Re: Problems configuring a JNDI JDBC pool to Postgres

2020-11-28 Thread Mark Thomas
On 27/11/2020 19:56, Hrafn Malmquist wrote: > Great. Thanks. > > Glad it was a simple fix. > > By the way, why would you choose DBCP2 over Tomcat? Intuitively, I would > assume a pool designed specifically for Tomcat would be more efficient than > a more generic Apache library? There is very lit

Re: Problems configuring a JNDI JDBC pool to Postgres

2020-11-27 Thread Hrafn Malmquist
Great. Thanks. Glad it was a simple fix. By the way, why would you choose DBCP2 over Tomcat? Intuitively, I would assume a pool designed specifically for Tomcat would be more efficient than a more generic Apache library? Hrafn On Fri, Nov 27, 2020 at 8:24 AM Mark Thomas wrote: > On 26/11/202

Re: Problems configuring a JNDI JDBC pool to Postgres

2020-11-27 Thread Mark Thomas
On 26/11/2020 22:52, Hrafn Malmquist wrote: > A > > How silly of me. It's right there staring me in the face nested inside the > host in server.xml, right? Right. The changes to GlobalResources look good. You'll probably want to revert the change you made to appBase. > So, best practice is

Re: Problems configuring a JNDI JDBC pool to Postgres

2020-11-26 Thread Hrafn Malmquist
wnloaded postgresql-42.2.18.jar from >> >https://jdbc.postgresql.org/download/postgresql-42.2.18.jar and >> placed >> >it in /home/lib/dspace/apache-tomcat-9.0.12/lib >> >> OK. That looks good. >> >> >2. In /home/lib/dspace/apache-tomcat

Re: Problems configuring a JNDI JDBC pool to Postgres

2020-11-26 Thread Hrafn Malmquist
ername="*" > > password="**" > > driverClassName="org.postgresql.Driver" > > url="jdbc:postgresql://localhost:5432/dspace" > > initialSize="5" > &

Re: Problems configuring a JNDI JDBC pool to Postgres

2020-11-26 Thread Mark Thomas
initialSize="5" > maxTotal="50" > maxIdle="15" > minIdle="5" /> Exactly where in server.xml did you put this? What element was it nested under? >There are a couple of issue

Re: Problems configuring a JNDI JDBC pool to Postgres

2020-11-26 Thread Mark Thomas
uist >> wrote: >> >> Good day fellow Apache Tomcat users >> >> I have recently had reason to set a Postgres DataSource via the Tomcat JNDI >> api. My experiments have been largely unsuccessful, unfortunately I hope >> you are able to help me. I thank you i

Re: Problems configuring a JNDI JDBC pool to Postgres

2020-11-26 Thread Rob Sargent
Looks like you named your resource jdbc/dspaceWeb and dropped the Web in your lookup > On Nov 26, 2020, at 12:58 PM, Hrafn Malmquist > wrote: > > Good day fellow Apache Tomcat users > > I have recently had reason to set a Postgres DataSource via the Tomcat JNDI > api

Problems configuring a JNDI JDBC pool to Postgres

2020-11-26 Thread Hrafn Malmquist
Good day fellow Apache Tomcat users I have recently had reason to set a Postgres DataSource via the Tomcat JNDI api. My experiments have been largely unsuccessful, unfortunately I hope you are able to help me. I thank you in advance for taking the time to read this. I am coming to this problem

Re: NPE while lookup resource in tomcat JNDI

2020-11-10 Thread Arnaud Mergey
your code with some line-numbers so we can match #1 and #2 above. Thanks, -chris On 11/9/20 10:10, Arnaud Mergey wrote: > Hello, > I have a tomcat app that is trying to list available JDBC Datasources it can > find in tomcat JNDI Context > It fails with NPE when there is a Resour

Re: NPE while lookup resource in tomcat JNDI

2020-11-09 Thread Christopher Schultz
and #2 above. Thanks, -chris On 11/9/20 10:10, Arnaud Mergey wrote: Hello, I have a tomcat app that is trying to list available JDBC Datasources it can find in tomcat JNDI Context It fails with NPE when there is a ResourceLink in my app context. It seems to be a bug in

NPE while lookup resource in tomcat JNDI

2020-11-09 Thread Arnaud Mergey
Hello, I have a tomcat app that is trying to list available JDBC Datasources it can find in tomcat JNDI Context It fails with NPE when there is a ResourceLink in my app context. It seems to be a bug in org.apache.naming.NamingContextBindingsEnumeration to me, but I may be wrong. A minimal test

Re: Reloading JNDI

2020-08-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Phil, On 8/3/20 21:43, Phil Steitz wrote: > > > On 7/24/20 10:46 AM, Christopher Schultz wrote: All, > > I have a JNDI which is a JDBC DataSource. It is set to > singleton="true" via defaults (not explicitly set). >

Re: Reloading JNDI

2020-08-03 Thread Phil Steitz
On 7/24/20 10:46 AM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 All, I have a JNDI which is a JDBC DataSource. It is set to singleton="true" via defaults (not explicitly set). The JDBC Connections in this DataSource pool (using dbcp2 as provided

Re: Reloading JNDI

2020-08-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 8/2/20 11:55, Mark Thomas wrote: > On July 24, 2020 5:46:45 PM UTC, Christopher Schultz wrote: > All, > > I have a JNDI which is a JDBC DataSource. It is set to > singleton="true" via defaults (not expl

Re: Reloading JNDI

2020-08-02 Thread Mark Thomas
On July 24, 2020 5:46:45 PM UTC, Christopher Schultz wrote: >-BEGIN PGP SIGNED MESSAGE- >Hash: SHA256 > >All, > >I have a JNDI which is a JDBC DataSource. It is set to >singleton="true" via defaults (not explicitly set). > >The JDBC Connections in

Reloading JNDI

2020-07-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 All, I have a JNDI which is a JDBC DataSource. It is set to singleton="true" via defaults (not explicitly set). The JDBC Connections in this DataSource pool (using dbcp2 as provided by Tomcat) have TLS configuration including client ce

Re: JNDI match of LDAP hashed passwords fail against cleartext

2020-04-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 4/21/20 10:31, Mark H. Wood wrote: > On Mon, Apr 20, 2020 at 12:17:54PM -0400, Christopher Schultz > wrote: >> Hmm. The LDAP stuff I think wasn't me, but I understand it a >> little bit. Brian, is there a standard I can read for this? I'm >

Re: JNDI match of LDAP hashed passwords fail against cleartext

2020-04-21 Thread Mark H. Wood
On Mon, Apr 20, 2020 at 12:17:54PM -0400, Christopher Schultz wrote: > Hmm. The LDAP stuff I think wasn't me, but I understand it a little > bit. Brian, is there a standard I can read for this? I'm familiar with > LDAP servers storing credentials with "{sha}" prefixes but not others. > Honestly, fo

Re: JNDI match of LDAP hashed passwords fail against cleartext

2020-04-20 Thread Mark Thomas
On 19/04/2020 06:59, Brian Burch wrote: > On 17/4/20 10:28 pm, Mark Thomas wrote: >> On 16/04/2020 09:56, Brian Burch wrote: >>> On 15/4/20 6:24 am, Mark Thomas wrote: >> >> >> I'd expect you to see an error message if your server.xml isn't quite right although that is what this looks li

Re: JNDI match of LDAP hashed passwords fail against cleartext

2020-04-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Brian, On 4/17/20 08:28, Mark Thomas wrote: > On 16/04/2020 09:56, Brian Burch wrote: >> On 15/4/20 6:24 am, Mark Thomas wrote: > > > >>> I'd expect you to see an error message if your server.xml isn't >>> quite right although that is what this loo

Re: JNDI match of LDAP hashed passwords fail against cleartext

2020-04-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Brian, On 4/20/20 12:17, Christopher Schultz wrote: > Brian, > > On 4/17/20 08:28, Mark Thomas wrote: >> On 16/04/2020 09:56, Brian Burch wrote: >>> On 15/4/20 6:24 am, Mark Thomas wrote: > >> > I'd expect you to see an error message if your s

Re: JNDI match of LDAP hashed passwords fail against cleartext

2020-04-18 Thread Brian Burch
On 17/4/20 10:28 pm, Mark Thomas wrote: On 16/04/2020 09:56, Brian Burch wrote: On 15/4/20 6:24 am, Mark Thomas wrote: I'd expect you to see an error message if your server.xml isn't quite right although that is what this looks like. There was no error message. I think my xml was syntax-f

Re: JNDI match of LDAP hashed passwords fail against cleartext

2020-04-17 Thread Mark Thomas
On 16/04/2020 09:56, Brian Burch wrote: > On 15/4/20 6:24 am, Mark Thomas wrote: >> I'd expect you to see an error message if your server.xml isn't quite >> right although that is what this looks like. > > There was no error message. I think my xml was syntax-free, but it did > not reflect my i

Re: JNDI match of LDAP hashed passwords fail against cleartext

2020-04-16 Thread Brian Burch
On 15/4/20 6:24 am, Mark Thomas wrote: On 14/04/2020 07:34, Brian Burch wrote: I searched for usages of MessageDigestCredentialHandler.setAlgorithm, but only found it used once - within TestJNDIRealm. I did not find any occurrences within tomcat mainline code, but would not be surprised if th

Re: JNDI match of LDAP hashed passwords fail against cleartext

2020-04-14 Thread Brian Burch
On 14/4/20 8:05 pm, Brian Burch wrote: On 14/4/20 6:53 pm, logo wrote: Brian, see down below Am 2020-04-14 08:34, schrieb Brian Burch: My initial code inspection makes me strongly suspect tomcat does not initialise JNDIRealm and a nested CredentialHandler properly during startup. Howeve

Re: JNDI match of LDAP hashed passwords fail against cleartext

2020-04-14 Thread Mark Thomas
On 14/04/2020 07:34, Brian Burch wrote: > I searched for usages of MessageDigestCredentialHandler.setAlgorithm, > but only found it used once - within TestJNDIRealm. I did not find any > occurrences within tomcat mainline code, but would not be surprised if > the algorithm was intended to be set

Re: JNDI match of LDAP hashed passwords fail against cleartext

2020-04-14 Thread Brian Burch
a nested CredentialHandler element instead." I deleted the algorithm attribute from the tomcat8 JNDIRealm definition, and nested three different versions for different test runs:- It made no difference whether I used "SHA-1" or "SHA-256". Under a netbeans remot

Re: JNDI match of LDAP hashed passwords fail against cleartext

2020-04-14 Thread logo
instead." I deleted the algorithm attribute from the tomcat8 JNDIRealm definition, and nested three different versions for different test runs:- It made no difference whether I used "SHA-1" or "SHA-256". Under a netbeans remote debugging session with the tomcat8 server, I ini

JNDI match of LDAP hashed passwords fail against cleartext

2020-04-13 Thread Brian Burch
algorithm="SHA" /> It made no difference whether I used "SHA-1" or "SHA-256". Under a netbeans remote debugging session with the tomcat8 server, I initially set a breakpoint in FormAuthenticator.doAuthenticate, then instruction stepped to drill down into t

Re: postgresql jndi datasource with certificate authentication?

2019-10-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Felix, On 10/26/19 16:37, Felix Schumacher wrote: > > Am 22.10.19 um 20:07 schrieb Magosányi Árpád: >> Thank you all for the suggestions. >> >> Based on the documentation, my setup should work: The server >> certificate is already processed and ac

Re: postgresql jndi datasource with certificate authentication?

2019-10-26 Thread Felix Schumacher
Am 22.10.19 um 20:07 schrieb Magosányi Árpád: > Thank you all for the suggestions. > > Based on the documentation, my setup should work: The server certificate > is already processed and accepted (I know that because I could not get > it right at the first try). The driver is supposed to work wit

Re: postgresql jndi datasource with certificate authentication?

2019-10-22 Thread Magosányi Árpád
Thank you all for the suggestions. Based on the documentation, my setup should work: The server certificate is already processed and accepted (I know that because I could not get it right at the first try). The driver is supposed to work with a PEM certificate and a pkcs-8 DER encoded key, and tho

Re: postgresql jndi datasource with certificate authentication?

2019-10-22 Thread Christopher Schultz
Arpad, On 10/22/19 12:19, logo wrote: I have the following in context.xml: url="jdbc:postgresql://infra.kodekonveyor.com:5432/users?ssl=true&sslmode=verify-ca" username="market" maxTotal="20" maxIdle="10" maxWaitMillis="-1"/> I have this in ~tomcat/.postgresq

Re: postgresql jndi datasource with certificate authentication?

2019-10-22 Thread logo
Arpad and Chris, Am 2019-10-22 18:07, schrieb Christopher Schultz: Magosányi, On 10/22/19 11:09, Magosányi Árpád wrote: As I understand you are suggesting to use direct connection to the database. The servlet needs a JNDI datasource, and the question is about configuring that datasource in

Re: postgresql jndi datasource with certificate authentication?

2019-10-22 Thread Christopher Schultz
Magosányi, On 10/22/19 11:09, Magosányi Árpád wrote: As I understand you are suggesting to use direct connection to the database. The servlet needs a JNDI datasource, and the question is about configuring that datasource in tomcat. As I can modify the servlet, I could choose to set up hibernate

Re: postgresql jndi datasource with certificate authentication?

2019-10-22 Thread Magosányi Árpád
Peter, As I understand you are suggesting to use direct connection to the database. The servlet needs a JNDI datasource, and the question is about configuring that datasource in tomcat. As I can modify the servlet, I could choose to set up hibernate in other ways, but I would like to separate the

Re: postgresql jndi datasource with certificate authentication?

2019-10-22 Thread logo
this working in mysql... Peter Am 2019-10-22 12:56, schrieb Magosányi Árpád: Hi! Anyone have a postgresql jndi datasource with certificate authentication working? I have the following in context.xml:     I have this in ~tomcat/.postgresql: root@market:/var/lib/tomcat9/.postgr

postgresql jndi datasource with certificate authentication?

2019-10-22 Thread Magosányi Árpád
Hi! Anyone have a postgresql jndi datasource with certificate authentication working? I have the following in context.xml:     I have this in ~tomcat/.postgresql: root@market:/var/lib/tomcat9/.postgresql# ls -lL total 11 -rw-r--r-- 1 root   root 4597 Oct 21 12:49 postgresql.crt -r

Re: Create a JNDI Datasource through JMX

2019-02-04 Thread Arnaud Yahoo
Hello Luis, thanks for your answer. Connection pool exposes an MBean (jmxEnabled is true by default). Using jconsole, I can see pool defined in server configuration or context configuration, but I cannot see neither change properties of existing pool (maxActive for example). Of course I cou

Re: Create a JNDI Datasource through JMX

2019-02-04 Thread Luis Rodríguez Fernández
Hello Arnaud, mmm, nothing stops you from create your custom mbean interface that wraps your datasource. >From Tomcat 8.5 doc "The connection pool object exposes an MBean that can be registered" [1] Perhaps you could start having a look here. Nevertheless may I ask you what is your use case for t

Create a JNDI Datasource through JMX

2019-02-04 Thread Arnaud Yahoo
Hello, I would like to know if it is possible to create/configure a Datasource Ressource in tomcat using JMX. I tried with a tomcat 8.5 and jconsole, I managed to create some resource with type javax.sql.Datasource, but I did not find a way to configure the datasource (jdbc driver, url, max

Re: Tomcat JNDI Authentication - No Login

2018-10-10 Thread Christopher Schultz
assistance or a hefty kick in the right > direction. > > There are 3 files in total that I have attempted to configure; > /conf/server.xml, /webapps/sample/WEB-INF/web.xml & > /conf/tomcat-users.xml > > My JNDI Realm entry in /usr/local/tomcat7/conf/server.xml > c

  1   2   3   4   5   6   7   8   9   10   >