Gavin,
at the top of your log I see:
2017-08-15 09:49:47,580 WARN [data.complex] - No top level element found
in schemas: {urn:xml-gov-au:icsm:egeodesy:0.4}RadioInterference
2017-08-15 09:49:47,583 WARN [complex.config] - 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
2017-08-15 09:49:47,584 WARN [geoserver.catalog] - Error while getting
feature type, flushing cache and retrying:
java.util.NoSuchElementException: No top level element found in schemas:
{urn:xml-gov-au:icsm:egeodesy:0.4}RadioInterference
I do not think that the schema that specifies RadioInterference is ever
included:
https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/geodesyml/0.4/localInterferences.xsd
This likely causes Case 2.
I am not sure about Case 1. Is the log file for Case 1 or 2?
Also, the schemUri links do not work; you are likely running off a local
app-schema-cache. I looked at the schemas through the main GitHub page
(example link above).
Kind regards,
Ben.
On 16/08/17 05:46, Gavin Medley wrote:
Hi again,
I've been trying to nail down exactly when the "Duplicate mappingName or
targetElement..." error occurs. I have two very specific cases, neither of
which make sense to me (I don't see any reason to think that they should be
invalid). I have attached three files here that I will reference; they are
part of a larger app schema mapping structure. SLMSiteLog_Mapping.xml is
the primary mapping file and includes many others under the <includedTypes>
block including SLMSurveyedLocalTies_Mapping.xml and
SLMRadioInterferences_Mapping.xml. The attached versions of these files are
functional and don't raise errors but the following modifications both
cause the above error. Case 1 and Case 2 occur independently.
*Case 1:*
Uncomment the following block in SLMSurveyedLocalTies_Mapping.xml. These
AttributeMappings are all valid XPaths in the GeodesyML schema according to
their documentation here
<https://geoscienceaustralia.github.io/GeodesyML-Github-Pages/> and
regardless, the error doesn't indicated any problem with the XPaths being
valid. Moreover this block does not even contain a targetElement tag nor a
mappingName tag at all. Any one of these three AttributeMapping blocks will
independently cause the error if they are not commented out.
<AttributeMapping>
<targetElement>geo:localSiteTiesAccuracy</targetElement>
<sourceExpression>
<OCQL>accuracym</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetElement>geo:surveyMethod</targetElement>
<sourceExpression>
<OCQL>surveymethod</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetElement>geo:dateMeasured/gml:timePosition</targetElement>
<sourceExpression>
<OCQL>datemeasured</OCQL>
</sourceExpression>
</AttributeMapping>
*Case 2:*
Include the SLMRadioInterferences_Mapping.xml file in the feature chain.
Doing this also produces the error, regardless of which AttributeMapping
elements are used in the SLMRadioInterferences_Mapping.xml. This means
uncommenting the following two pieces in SLMSiteLog_Mapping.xml:
<Include>SLMRadioInterferences_Mapping.xml</Include>
AND
<AttributeMapping>
<targetAttribute>geo:radioInterference</targetAttribute>
<sourceExpression>
<OCQL>fourid</OCQL>
<linkElement>geo:RadioInterference</linkElement>
<linkField>FEATURE_LINK[10]</linkField>
</sourceExpression>
<isMultiple>true</isMultiple>
</AttributeMapping>
Can you explain this behavior?
On Mon, Aug 14, 2017 at 4:37 PM, Gavin Medley <med...@unavco.org> wrote:
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-jn
di/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-jn
di/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
--
Ben Caradoc-Davies <b...@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
------------------------------------------------------------------------------
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