According to some documentation I found (https://help.percussion.com/rhythmyx/implementation/jetty/jetty-file-structure.html) you should place database drivers here: jetty/base/lib/jdbc
From: Micho García <micho.gar...@geomatico.es> Sent: Wednesday, 7 September 2022 11:38 PM To: GeoServer Mailing List List <geoserver-users@lists.sourceforge.net> Subject: [Geoserver-users] Connecting Jetty to Postgis using JNDI Hi everybody, I'm Micho from geomatico.es<https://aus01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgeomatico.es%2F&data=05%7C01%7Cgraham.humphries%40stategrowth.tas.gov.au%7C27986e1c2b874ae2da7008da90daa943%7C64ebab8accf44b5ca2d32b4e972d96b2%7C0%7C0%7C637981567866547011%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=Fxl80ru%2Bvr041noKWm3nt%2FP6NwvU1Jm13IahHSV5zyA%3D&reserved=0> and I'm having some problems connecting geoserver's Jetty with Postgis using JNDI. I've read the documentation and I've configured a settings.xml with my JNDI configuration (attached). I need to understand why geoserver is trying to delete my whole indexes' database, but when I tried to publish an imagemosaic I receive this error: 07 Sep 15:13:59 ERROR [gce.imagemosaic] - Unable to obtain connection: Cannot create JDBC driver of class 'org.postgresql.Driver' for connect URL 'jdbc:postgres://172.20.0.11:5432/satagro_indexes<https://aus01.safelinks.protection.outlook.com/?url=http%3A%2F%2F172.20.0.11%3A5432%2Fsatagro_indexes&data=05%7C01%7Cgraham.humphries%40stategrowth.tas.gov.au%7C27986e1c2b874ae2da7008da90daa943%7C64ebab8accf44b5ca2d32b4e972d96b2%7C0%7C0%7C637981567866547011%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=IjQiYe33%2Fz%2FxQv8pGCGoAGYrdTn%2FbCsS%2BNao6lAHYws%3D&reserved=0>' java.lang.RuntimeException: Unable to obtain connection: Cannot create JDBC driver of class 'org.postgresql.Driver' for connect URL 'jdbc:postgres://172.20.0.11:5432/satagro_indexes<https://aus01.safelinks.protection.outlook.com/?url=http%3A%2F%2F172.20.0.11%3A5432%2Fsatagro_indexes&data=05%7C01%7Cgraham.humphries%40stategrowth.tas.gov.au%7C27986e1c2b874ae2da7008da90daa943%7C64ebab8accf44b5ca2d32b4e972d96b2%7C0%7C0%7C637981567866547011%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=IjQiYe33%2Fz%2FxQv8pGCGoAGYrdTn%2FbCsS%2BNao6lAHYws%3D&reserved=0>' I was investigating and I am almost sure that the Jetty is unable to get the Driver but my problem is that I don't know where I should place the postgresql-42.5.0.jar. I've placed into the $JETTY_HOME (in my case /home/michogarcia/geomati.co/SATAGRO/dev/geoserver/src/release/jetty/)in<https://aus01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgeomati.co%2FSATAGRO%2Fdev%2Fgeoserver%2Fsrc%2Frelease%2Fjetty%2F)in&data=05%7C01%7Cgraham.humphries%40stategrowth.tas.gov.au%7C27986e1c2b874ae2da7008da90daa943%7C64ebab8accf44b5ca2d32b4e972d96b2%7C0%7C0%7C637981567866547011%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=9VuQb9ppID0hAc4C%2BpWbHe7TxVJnadkEl6PPH8upGS0%3D&reserved=0> the $JETTY_HOME/resources and in several more places, but always with the same result. Where I should place the .jar to be used by Jetty?. Thanks a lot. Best. settings.xml: <?xml version="1.0"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd<https://aus01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fjetty.mortbay.org%2Fconfigure.dtd&data=05%7C01%7Cgraham.humphries%40stategrowth.tas.gov.au%7C27986e1c2b874ae2da7008da90daa943%7C64ebab8accf44b5ca2d32b4e972d96b2%7C0%7C0%7C637981567866547011%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=SiGnggSBvlC9hKbYMGKAROqs2efVh1OcUuGHKJT7eag%3D&reserved=0>"> <Configure class="org.eclipse.jetty.server.Server"> <New class="org.eclipse.jetty.plus.jndi.Resource"> <Arg>java:comp/env/jdbc/postgres</Arg> <Arg> <New class="org.apache.commons.dbcp.BasicDataSource"> <Set name="driverClassName">org.postgresql.Driver</Set> <Set name="url">jdbc:postgres://172.20.0.11:5432/satagro<https://aus01.safelinks.protection.outlook.com/?url=http%3A%2F%2F172.20.0.11%3A5432%2Fsatagro&data=05%7C01%7Cgraham.humphries%40stategrowth.tas.gov.au%7C27986e1c2b874ae2da7008da90daa943%7C64ebab8accf44b5ca2d32b4e972d96b2%7C0%7C0%7C637981567866547011%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=dF0wSkBD0r9PbL19q89%2FUM2WMe%2FnvFupNSbwJc91JRo%3D&reserved=0></Set> <Set name="username">satagro</Set> <Set name="password"></Set> <Set name="maxActive">200</Set> <Set name="maxIdle">8</Set> <Set name="minIdle">0</Set> <Set name="maxWait">10000</Set> <Set name="minEvictableIdleTimeMillis">60000</Set> <Set name="timeBetweenEvictionRunsMillis">30000</Set> <Set name="numTestsPerEvictionRun">20</Set> <Set name="poolPreparedStatements">true</Set> <Set name="maxOpenPreparedStatements">100</Set> <Set name="testOnBorrow">true</Set> <Set name="validationQuery">SELECT SYSDATE FROM DUAL</Set> <Set name="accessToUnderlyingConnectionAllowed">true</Set> </New> </Arg> </New> <New class="org.eclipse.jetty.plus.jndi.Resource"> <Arg>java:comp/env/jdbc/indexes</Arg> <Arg> <New class="org.apache.commons.dbcp.BasicDataSource"> <Set name="driverClassName">org.postgresql.Driver</Set> <Set name="url">jdbc:postgres://172.20.0.11:5432/satagro_indexes<https://aus01.safelinks.protection.outlook.com/?url=http%3A%2F%2F172.20.0.11%3A5432%2Fsatagro_indexes&data=05%7C01%7Cgraham.humphries%40stategrowth.tas.gov.au%7C27986e1c2b874ae2da7008da90daa943%7C64ebab8accf44b5ca2d32b4e972d96b2%7C0%7C0%7C637981567866547011%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=IjQiYe33%2Fz%2FxQv8pGCGoAGYrdTn%2FbCsS%2BNao6lAHYws%3D&reserved=0></Set> <Set name="username">satagro</Set> <Set name="password"></Set> <Set name="maxActive">200</Set> <Set name="maxIdle">8</Set> <Set name="minIdle">0</Set> <Set name="maxWait">10000</Set> <Set name="minEvictableIdleTimeMillis">60000</Set> <Set name="timeBetweenEvictionRunsMillis">30000</Set> <Set name="numTestsPerEvictionRun">20</Set> <Set name="poolPreparedStatements">true</Set> <Set name="maxOpenPreparedStatements">100</Set> <Set name="testOnBorrow">true</Set> <Set name="validationQuery">SELECT SYSDATE FROM DUAL</Set> <Set name="accessToUnderlyingConnectionAllowed">true</Set> </New> </Arg> </New> </Configure> -- Micho Garcia geomatico.es<https://aus01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgeomatico.es%2F&data=05%7C01%7Cgraham.humphries%40stategrowth.tas.gov.au%7C27986e1c2b874ae2da7008da90daa943%7C64ebab8accf44b5ca2d32b4e972d96b2%7C0%7C0%7C637981567866547011%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=Fxl80ru%2Bvr041noKWm3nt%2FP6NwvU1Jm13IahHSV5zyA%3D&reserved=0> Política de Protección de Datos de Carácter Personal Responsable: GEOMATICO, S. COOP. GALEGA CIF: F-27875327 Teléfono de contacto: 623 066 080 Correo electrónico: i...@geomatico.es<mailto:i...@geomatico.es> Dirección postal: C/ Pi y Margall, 60, entlo. ofic-2, 6202, Vigo, Pontevedra. Los datos de carácter personal contenidos en el presente y futuros correos electrónicos quedarán incorporados en nuestro Registro interno de actividades de tratamiento, con la finalidad de poder llevar a cabo una adecuada gestión de las comunicaciones (envíos, respuestas y reenvíos), así como para mantenerle informado de mis novedades comerciales y distintas ofertas promocionales. Los datos proporcionados se conservarán mientras se mantenga la relación comercial. Asimismo, los datos no serán cedidos a terceros salvo en aquellos casos en que exista una obligación legal. Tiene derecho a conocer en mayor detalle nuestra política de privacidad, acceder a sus datos personales, rectificar los datos inexactos, solicitar su supresión, limitar alguno de los tratamientos u oponerse a algún uso (por ej. oponerse posteriormente al envío de publicidad, si fuera el caso), vía e-mail, personalmente o mediante correo postal. ________________________________ CONFIDENTIALITY NOTICE AND DISCLAIMER The information in this transmission may be confidential and/or protected by legal professional privilege, and is intended only for the person or persons to whom it is addressed. If you are not such a person, you are warned that any disclosure, copying or dissemination of the information is unauthorised. If you have received the transmission in error, please immediately contact this office by telephone, fax or email, to inform us of the error and to enable arrangements to be made for the destruction of the transmission, or its return at our cost. No liability is accepted for any unauthorised use of the information contained in this transmission.
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users