Micho,
side note, if you are using the Jetty we ship with GeoServer, please don't.
We ship that for prototyping and testing purposes, in production I would
recommend having a full fledged installation of either Tomcat or Jetty or
whatever application server you are confident with.

Regards,
Simone Giannecchini
==
Professional Support for GeoNode, GeoServer and MapStore from the experts!
Visit https://www.geosolutionsgroup.com/enterprise-support-services for
more information.
==
Ing. Simone Giannecchini
@simogeo
Founder/Director GeoSolutions Italy
President GeoSolutions USA

phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39  333 8128928
US: +1 (845) 547-7905

http://www.geosolutionsgroup.com
http://twitter.com/geosolutions_it

-------------------------------------------------------
This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential or
otherwise protected from disclosure. We remind that - as provided by
European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
e-mail or the information herein by anyone other than the intended
recipient is prohibited. If you have received this email by mistake, please
notify us immediately by telephone or e-mail.


On Wed, Sep 7, 2022 at 4:47 PM Micho García <micho.gar...@geomatico.es>
wrote:

> Hi everybody,
>
> I'm Micho from geomatico.es 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'
> 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'
>
> 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
> 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";>
> <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
> </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</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
>
> *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 <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.*
> _______________________________________________
> 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
>
_______________________________________________
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

Reply via email to