Re: correct usage of properties to supply database port

2022-03-12 Thread Rob Sargent



> On Mar 12, 2022, at 9:59 AM, Christopher Schultz 
>  wrote:
> 
> Rob,
> 
Chris, 
Yes I see that. Wasn’t really worried about context at the time of that post. I 
would argue though that the message is a tad obtuse. 

I’ll clean up the code generating that context.xml. Luckily it only breaks 
logging so far. With a proper jdbc url I get a functioning tomcat (again).
Thanks to all
rjs
> It's right here, from your original message:
> 
>   Mar 10, 2022 8:34:32 AM org.apache.tomcat.util.digester.Digester
>   endElement
>   WARNING: No rules found matching [Context/Context/Valve]
>   Mar 10, 2022 8:34:32 AM org.apache.tomcat.util.digester.Digester
>   endElement
>   WARNING: No rules found matching [Context/Context]
> 
> -chris
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: correct usage of properties to supply database port

2022-03-12 Thread Christopher Schultz

Rob,

On 3/11/22 9:13 AM, Rob Sargent wrote:




On Mar 11, 2022, at 6:50 AM, Mark H. Wood  wrote:

On Thu, Mar 10, 2022 at 09:40:48AM -0700, Rob Sargent wrote:

About context/context/value:  I have this context.xml. Is the value
correctly inside the outer Context?



   

   
 
 
   



I don't think you can nest s that way, and I'm not sure what
it would mean.  I would remove the inner  pair.

--
Mark H. Wood
Lead Technology Analyst


Thanks. I’ll take a look at that. I don’t see any related error messages but 
I’ll check my logging.


It's right here, from your original message:

   Mar 10, 2022 8:34:32 AM org.apache.tomcat.util.digester.Digester
   endElement
   WARNING: No rules found matching [Context/Context/Valve]
   Mar 10, 2022 8:34:32 AM org.apache.tomcat.util.digester.Digester
   endElement
   WARNING: No rules found matching [Context/Context]

-chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: correct usage of properties to supply database port

2022-03-11 Thread Rob Sargent



> On Mar 11, 2022, at 8:17 AM, Thomas Hoffmann (Speed4Trade GmbH) 
>  wrote:
> 
> 
> 
>> -Ursprüngliche Nachricht-
>> Von: Rob Sargent 
>> Gesendet: Freitag, 11. März 2022 15:14
>> An: Tomcat Users List 
>> Betreff: Re: correct usage of properties to supply database port
>> 
>> 
>> 
>>>> On Mar 11, 2022, at 6:50 AM, Mark H. Wood  wrote:
>>> 
>>> On Thu, Mar 10, 2022 at 09:40:48AM -0700, Rob Sargent wrote:
>>>> About context/context/value:  I have this context.xml. Is the value
>>>> correctly inside the outer Context?
>>>> 
>>>>   
>>>> 
>>>>  >>>  name="jdbc/sgsdb/tbar"
>>>>  url="jdbc:postgresql://localhost:5432:/tbar"
>>>>  driverClassName="org.postgresql.Driver"
>>>>  type="javax.sql.DataSource"
>>>>  factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
>>>>  testWhileIdle="false"
>>>>  testOnBorrow="true"
>>>>  testOnReturn="false"
>>>>  validationInterval="3"
>>>>  validationQuery="select 1"
>>>>  timeBetweenEvictionRunsMillis="3"
>>>>  maxActive="50"
>>>>  initialSize="3"
>>>>  maxWait="1"
>>>>  removeAbandonedTimeout="3600"
>>>>  removeAbandoned="true"
>>>>  minEvictableIdleTimeMillis="3"
>>>>  minIdle="1"
>>>>  maxIdle="5"
>>>>  logAbandoned="true"
>>>>  username="shoc"
>>>>  password="password"
>>>>  />
>>>> 
>>>>  
>>>>>>>className="org.apache.catalina.valves.AccessLogValve"
>>>>prefix="sgs_access"
>>>>directory="${SGSSRVR_AccessLogDir}"
>>>>maxDays="7">
>>>>
>>>>  
>>>>   
>>> 
>>> I don't think you can nest s that way, and I'm not sure what
>>> it would mean.  I would remove the inner  pair.
>>> 
>>> --
>>> Mark H. Wood
>>> Lead Technology Analyst
>> 
>> Thanks. I’ll take a look at that. I don’t see any related error messages but 
>> I’ll
>> check my logging.
>> Thanks
>> 
>> 
> Nesting of Context is not allowed as far as I know.
> The documentation tells, which parent nodes/Elements are allowed , e.g. valve:
> https://tomcat.apache.org/tomcat-10.0-doc/config/valve.html
> only allowed in host, Context or Engine Element.
> 
> 
Ok. Thanks for digging in to that. I am not able to investigate (or correct) at 
the moment 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: correct usage of properties to supply database port

2022-03-11 Thread Rob Sargent



> On Mar 11, 2022, at 6:50 AM, Mark H. Wood  wrote:
> 
> On Thu, Mar 10, 2022 at 09:40:48AM -0700, Rob Sargent wrote:
>> About context/context/value:  I have this context.xml. Is the value 
>> correctly inside the outer Context?
>> 
>>
>> 
>>   >   name="jdbc/sgsdb/tbar"
>>   url="jdbc:postgresql://localhost:5432:/tbar"
>>   driverClassName="org.postgresql.Driver"
>>   type="javax.sql.DataSource"
>>   factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
>>   testWhileIdle="false"
>>   testOnBorrow="true"
>>   testOnReturn="false"
>>   validationInterval="3"
>>   validationQuery="select 1"
>>   timeBetweenEvictionRunsMillis="3"
>>   maxActive="50"
>>   initialSize="3"
>>   maxWait="1"
>>   removeAbandonedTimeout="3600"
>>   removeAbandoned="true"
>>   minEvictableIdleTimeMillis="3"
>>   minIdle="1"
>>   maxIdle="5"
>>   logAbandoned="true"
>>   username="shoc"
>>   password="password"
>>   />
>> 
>>   
>> > className="org.apache.catalina.valves.AccessLogValve"
>> prefix="sgs_access"
>> directory="${SGSSRVR_AccessLogDir}"
>> maxDays="7">
>> 
>>   
>>
> 
> I don't think you can nest s that way, and I'm not sure what
> it would mean.  I would remove the inner  pair.
> 
> -- 
> Mark H. Wood
> Lead Technology Analyst

Thanks. I’ll take a look at that. I don’t see any related error messages but 
I’ll check my logging. 
Thanks 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: correct usage of properties to supply database port

2022-03-11 Thread Mark H. Wood
On Thu, Mar 10, 2022 at 09:40:48AM -0700, Rob Sargent wrote:
> About context/context/value:  I have this context.xml. Is the value 
> correctly inside the outer Context?
> 
> 
> 
>        name="jdbc/sgsdb/tbar"
>    url="jdbc:postgresql://localhost:5432:/tbar"
>    driverClassName="org.postgresql.Driver"
>    type="javax.sql.DataSource"
>    factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
>    testWhileIdle="false"
>    testOnBorrow="true"
>    testOnReturn="false"
>    validationInterval="3"
>    validationQuery="select 1"
>    timeBetweenEvictionRunsMillis="3"
>    maxActive="50"
>    initialSize="3"
>    maxWait="1"
>    removeAbandonedTimeout="3600"
>    removeAbandoned="true"
>    minEvictableIdleTimeMillis="3"
>    minIdle="1"
>    maxIdle="5"
>    logAbandoned="true"
>    username="shoc"
>    password="password"
>    />
> 
>    
>            className="org.apache.catalina.valves.AccessLogValve"
>      prefix="sgs_access"
>      directory="${SGSSRVR_AccessLogDir}"
>      maxDays="7">
>      
>    
> 

I don't think you can nest s that way, and I'm not sure what
it would mean.  I would remove the inner  pair.

-- 
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu


signature.asc
Description: PGP signature


Re: correct usage of properties to supply database port

2022-03-10 Thread Rob Sargent
I think I see the problem:  and extra colon has snuck in to the url - 
localhost:5432*":"*/tbar


Sorry for the noise.

On 3/10/22 09:40, Rob Sargent wrote:
Using tomcat 9.0.58 I have a propertiesfile supplied to my embedded 
tomcat which includes


SGSSRVR_databasePort     = 5432
SGSSRVR_databaseHost        = localhost