Hi Ben,

Thanks! Geoserver starts without a hitch now. Unfortunately it seems this
was not the root cause of my problem. I am getting two errors, seemingly
without cause:

Error creating app-schema data store for 'geo:RadioInterference', caused
by: No top level element found in schemas:
{urn:xml-gov-au:icsm:egeodesy:0.4}RadioInterference

Duplicate mappingName or targetElement across FeatureTypeMapping instances
detected.
I have been getting these errors since I first starting working with App
Schema and early on I presumed I had an error that I didn't understand and
fixed upon rewriting my mapping files. Now I'm not as sure. I say that they
happen "without cause" because without changing my mapping files in any
way, these errors usually go away after some combination of reloading the
feature types, restarting Geoserver, and recreating the app schema data
store (I emphasize that I recreate the data store with the *same* mapping
files!). I believe that if the error were simply suppressed, everything
would work because I know my mapping files are fine. They have worked
before!

I found a possibly relevant bug here:
https://osgeo-org.atlassian.net/browse/GEOT-4196

I'm happy to provide my mapping files but they are quite complex and
require the ability to connect to my local development database.

Let me know what you think.

On Mon, Aug 14, 2017 at 3:10 PM, Ben Caradoc-Davies <b...@transient.nz>
wrote:

> Gavin,
>
> you should not have to download anything, just move the postgresql jar
> included with GeoServer (in your case for 2.11.2 it is
> WEB-INF/lib/postgresql-9.4.1211.jar) to your Tomcat lib directory.
> GeoServer does not use the postgis jar from postgis.org. Leave everything
> else. The goal is to ensure that there is only one postgresql jar on your
> classpath. Tomcat does not need anything else because it only manages the
> connection and does not need to understand the content. Everything else
> stays in the GeoServer WEB-INF/lib.
> http://docs.geoserver.org/stable/en/user/tutorials/tomcat-
> jndi/tomcat-jndi.html#configuring-a-postgresql-connection-pool
>
> The latest version of the postgresql driver should also work; if you want
> to use it in your Tomcat lib, just remove WEB-INF/lib/postgresql-9.4.121
> 1.jar.
>
> Kind regards,
> Ben.
>
>
>
> On 15/08/17 04:45, Gavin Medley wrote:
>
>> Hi Ben,
>>
>> I'm finally getting to this but I think there must be missing information
>> in the Geoserver documentation on this topic, especially in the context of
>> App Schemas. I'm following the Postgres example here:
>> http://docs.geoserver.org/stable/en/user/tutorials/tomcat-
>> jndi/tomcat-jndi.html
>> but
>> have no luck. Geoserver won't start afterwards. I can revert to my
>> previous
>> configuration and everything is fine.
>>
>> Specifically, I'm not sure which .jar files to move to where. I am using a
>> PostGIS backend so I downloaded both the postgres and the postgis JDBC
>> drivers:
>>
>> postgis-jdbc-2.1.7.2.jar
>> postgresql-42.1.4.jar
>>
>> I understand that these (or possibly just one?) should go into
>> /Library/Tomcat/lib and that I should remove the duplicates (?) from
>> /Library/Tomcat/webapps/geoserver/WEB-INF/lib but I don't see any
>> duplicates in that directory. I have the following from ls *jdbc* :
>>
>> gs-sec-jdbc-2.11.2.jar
>> gt-jdbc-mysql-17.2.jar
>> spring-jdbc-4.2.5.RELEASE.jar
>> gs-web-sec-jdbc-2.11.2.jar
>> gt-jdbc-postgis-17.2.jar
>> gt-jdbc-17.2.jar
>> gwc-diskquota-jdbc-1.11.1.jar
>>
>> After these are in the right place with the correct duplicates are
>> removed,
>> I think my context.xml file should look like the following. Have I missed
>> replacing any placeholder values in any of these fields?
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <Context>
>>      <Resource name="jdbc/postgres"
>>        auth="Container"
>>        type="javax.sql.DataSource"
>>        driverClassName="org.postgresql.Driver"
>>        url="jdbc:postgresql://localhost:5432/slm"
>>        username="ecelt-07" password=""
>>        maxActive="100"
>>        initialSize="0"
>>        minIdle="0"
>>        maxIdle="8"
>>        maxWait="10000"
>>        timeBetweenEvictionRunsMillis="30000"
>>        minEvictableIdleTimeMillis="60000"
>>        testWhileIdle="true"
>>        validationQuery="SELECT 1"
>>        maxAge="600000"
>>        rollbackOnReturn="true"
>>      />
>>      <!-- Default set of monitored resources. If one of these changes, the
>>   -->
>>      <!-- web application will be reloaded.
>>    -->
>>      <WatchedResource>WEB-INF/web.xml</WatchedResource>
>>      <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
>> </Context>
>>
>>
>>
>> Thanks for all your help!
>>
>>
>> On Fri, Aug 11, 2017 at 3:40 PM, Ben Caradoc-Davies <b...@transient.nz>
>> wrote:
>>
>> Gavin,
>>>
>>> every source feature has its own connection pool. Use the same JNDI
>>> source
>>> for all source features to have them use a single pool that you can make
>>> as
>>> large as you like.
>>>
>>> The new functionality is in 2.11.2 and master so you should have it.
>>>
>>> Kind regards,
>>> Ben.
>>>
>>>
>>> On 12/08/17 06:37, Gavin Medley wrote:
>>>
>>> Hi Ben,
>>>>
>>>> How does App Schema use the connections pool? Does it create a new
>>>> connection for each mapping file?
>>>>
>>>> I am running 2.11.2. Is the new development in the nightly build?
>>>>
>>>> On Thu, Aug 10, 2017 at 5:29 PM, Ben Caradoc-Davies <b...@transient.nz>
>>>> wrote:
>>>>
>>>> Gavin,
>>>>
>>>>>
>>>>> there is no limit in app-schema, but you might be hitting a limit in
>>>>> the
>>>>> size of the JDBC connection pool. You can increase this by using JNDI
>>>>> and
>>>>> configuring a larger number of connections.
>>>>>
>>>>> Very recent changes should improve app-schema connection usage:
>>>>>
>>>>> [GEOT-5748] Improve App-Schema connection usage
>>>>> https://osgeo-org.atlassian.net/browse/GEOT-5748
>>>>>
>>>>> What GeoServer version are you using?
>>>>>
>>>>> Kind regards,
>>>>> Ben.
>>>>>
>>>>> On 11/08/17 10:58, Gavin Medley wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>>>
>>>>>> Is there a limit to the number of feature chained elements possible
>>>>>> in a
>>>>>> single feature? I have 10 mapping files, performing feature chaining
>>>>>> and
>>>>>> each file maps between 4 and 10 elements. I've noticed that I don't
>>>>>> seem
>>>>>> to
>>>>>> be able to go further. If I comment out a single <AttributeMapping> it
>>>>>> works but if I add one I get
>>>>>>
>>>>>> Duplicate mappingName or targetElement across FeatureTypeMapping
>>>>>> instances
>>>>>> detected.
>>>>>>
>>>>>> It doesn't seem to matter which <AttributeMappings> I change. It only
>>>>>> seems
>>>>>> to matter that there are too many. Is this possible?
>>>>>>
>>>>>> Cheers,
>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------
>>>>>> ------------------
>>>>>> Check out the vibrant tech community on one of the world's most
>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>>>
>>>>>> Geoserver-users@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>> Ben Caradoc-Davies <b...@transient.nz>
>>>>> Director
>>>>> Transient Software Limited <http://transient.nz/>
>>>>> New Zealand
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>> Ben Caradoc-Davies <b...@transient.nz>
>>> Director
>>> Transient Software Limited <http://transient.nz/>
>>> New Zealand
>>>
>>>
>>
>>
>>
> --
> Ben Caradoc-Davies <b...@transient.nz>
> Director
> Transient Software Limited <http://transient.nz/>
> New Zealand
>



-- 
Gavin Medley
Software Engineer I
*UNAVCO*
6350 Nautilus Drive
Boulder, CO 80301-5394
med...@unavco.org
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to