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

Reply via email to