afimb / chouette

chouette is a Java program for validating and exchanging Public Transport datas. Comes with a ruby web app : https://github.com/afimb/chouette2
http://www.chouette.mobi
Other
23 stars 22 forks source link

Wrong mapping for geometry fields in RouteSection #57

Open piotrkot opened 5 years ago

piotrkot commented 5 years ago

I'm on origin/V3_4 branch, Jboss wildfly-8.2.1.Final, openjdk version "1.8.0_212", postgresql-9.5-postgis-2.2. When deploying to Jboss, I get errors:

ERROR [org.hibernate.jpa.internal.metamodel.MetadataContext] (ServerService Thread Pool -- 125) HHH015011: Unable to locate static metamodel field : mobi.chouette.model.RouteSection_#inputGeometry
ERROR [org.hibernate.jpa.internal.metamodel.MetadataContext] (ServerService Thread Pool -- 125) HHH015011: Unable to locate static metamodel field : mobi.chouette.model.RouteSection_#processedGeometry

And when I try to import a GTFS file, I get:

ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EE-ManagedExecutorService-default-Thread-5) Batch entry 0 insert into route_sections (creation_time, creator_id, objectid, object_ver
sion, arrival_id, departure_id, distance, input_geometry, no_processing, processed_geometry, id) values ('2019-07-25 21:28:01.513000 +02:00:00', NULL, 'bbb:RouteSection:100_351209_1021_1015_60', 1, 1302, 
158, '93.61467025934019', '0102000020E610000002000000000000603CA53240000000C0982D4B40000000402FA53240000000607E2D4B40', '0', '0102000020E610000006000000CC35F3BA43A532403FB29A1E982D4B40000000E042A532400000
00A0952D4B40000000C03DA53240000000C08C2D4B40000000E03BA53240000000C08B2D4B40000000403AA53240000000E0882D4B40C491416335A53240CD9AFAB47D2D4B40', 203) was aborted.  Call getNextException to see the cause.
WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EE-ManagedExecutorService-default-Thread-5) SQL Error: 0, SQLState: 42804
ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EE-ManagedExecutorService-default-Thread-5) ERROR: column "input_geometry" is of type shared_extensions.geometry but expression is of
 type character varying
  Hint: You will need to rewrite or cast the expression.
  Position: 209
ERROR [org.hibernate.engine.jdbc.batch.internal.BatchingBatch] (EE-ManagedExecutorService-default-Thread-5) HHH000315: Exception executing batch [could not execute batch]

Am I doing something wrong?

metienne commented 5 years ago

with postgres 9.4 and upper versions , you need to add SET standard_conforming_strings = on; to your postgres configuration

Note : this project is no more maintained, see https://github.com/af83/chouette-core for new chouette project

piotrkot commented 5 years ago

Thanks for feedback. I checked standard_conforming_strings by running SHOW standard_conforming_strings; on chouette2, iev databases. They all are on.

If you recommend to use chouette-core project instead, I will definitely try it out. BTW: I also tried entur fork.

Can you please explain which version/configuration is running on http://appli.chouette.mobi?

metienne commented 5 years ago

as I remember , appli.chouette.mobi is running on wildfly 9.2 with postgres 9.4 as only difference with yours. on my own installation (similar oone) I have in the standalone-full.xml configuration file of wildfly :

`

jdbc:postgresql_postGIS://localhost:5432/chouette_dev
                <driver-class>org.postgis.DriverWrapper</driver-class>
                <connection-property name="stringtype">
                    unspecified
                </connection-property>
                <driver>postgresql</driver>
                <pool>
                    <max-pool-size>30</max-pool-size>
                </pool>
                <security>
                    <user-name>chouette</user-name>
                    <password>chouette</password>
                </security>
            </datasource>`

I remember that the problem you evoked is corrected with the stringtype 'unspecified' option

I don't work anymore with chouette because I changed of company since the beginning of 2019 and I don't follow anymore the evolution of chouette product; just listening on questions on 3.4 version

Best regards

brunto commented 4 years ago

Hi, @piotrkot Did you found a solution about this problem? I'm the same problem, I tried the solution to add <connection-property name="stringtype"> unspecified </connection-property> without results.

piotrkot commented 4 years ago

@brunto Sorry, I couldn't find a solution to this problem. At some point, we played with different versions of chouette and different forks. And we were able to make it work, somehow. But we don't use chouette anymore.

brunto commented 4 years ago

Ok @piotrkot thanks a lot.