Re: troubled by "SEVERE: Cannot register null bean"

2021-01-10 Thread Rob Sargent
Honest I had corrected as Mark suggested, but I was first forgetting to match up the web.xml and then missing an error condition ("Must set the ConnectionPoolDataSource through setDataSourceName or setConnectionPoolDataSource before calling getConnection").  I've seen this and can confirm my

Re: troubled by "SEVERE: Cannot register null bean"

2021-01-10 Thread Phil Steitz
The problem is what Mark pointed out above.  In the type attribute you use the commons package name, but then specify the tomcat factory.  Try changing the type attribute to type="org.apache.tomcat.dbcp.dbcp2.datasources.PerUserPoolPoolDataSource" Phil On 1/10/21 8:41 AM, Rob Sargent wrote:

Re: troubled by "SEVERE: Cannot register null bean"

2021-01-10 Thread Rob Sargent
I've abandon PerUserPoolDataSource and retreated to org.apache.tomcat.jdbc.pool.DataSourceand multiple resource entries in context.xml (probably even if I could make PerUser work). I'm clearly missing a crucial piece.  Here's my current full context.xml   My apologies for the

Re: troubled by "SEVERE: Cannot register null bean"

2021-01-09 Thread Rob Sargent
After many loops through this, I'm pretty certain my datasource factory is simply never added to the context as per the SEVERE message. Any other combinations of lookups generates a NamingException. This verbose approach demonstrates that the key is in the map and it is mapped to null.    

Re: troubled by "SEVERE: Cannot register null bean"

2021-01-08 Thread Rob Sargent
Nice catch. Unfortunately that doesn't clear up the 'Cannot register null bean' problem. rjs On 1/8/21 12:18 PM, Mark Thomas wrote: On 08/01/2021 16:11, Rob Sargent wrote: classname="org.apache.tomcat.dbcp.dbcp.datasources.PerUserPoolDataSource"

Re: troubled by "SEVERE: Cannot register null bean"

2021-01-08 Thread Mark Thomas
On 08/01/2021 16:11, Rob Sargent wrote: > classname="org.apache.tomcat.dbcp.dbcp.datasources.PerUserPoolDataSource" > factory="org.apache.commons.dbcp2.datasources.PerUserPoolDataSourceFactory" You are mixing Commons DBCP 2 and Apache Tomcat's internal fork of DBCP 2. They use different

troubled by "SEVERE: Cannot register null bean"

2021-01-08 Thread Rob Sargent
I'm getting the following error message during startup SEVERE: Cannot register null bean for [Tomcat:type=DataSource,host=localhost,context=/sgs,class=javax.sql.DataSource,name="jdbc/sgsdb"] with sgs/META-INF/context.xml as   and sgs/WEB-INF/web.xml as