[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: Re: [postgis-users] Postgis 9.0.1 and JDBC problems.
From: Knut Aksnes-NOR <Knut.Aksnes () jeppesen ! com>
Date: 2012-08-20 11:29:34
Message-ID: F59EF7AFE040BA41B4CA5F2EFB10F01A01666AD235 () FRAPXCHMBX01 ! corp ! gds ! jeppesen ! com
[Download RAW message or body]
Playing around with bytea_output doesn't seem to help :-(
-----Original Message-----
From: postgis-users-bounces@postgis.refractions.net \
[mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of \
Knut Aksnes-NOR
Sent: 20. august 2012 11:59
To: PostGIS Users Discussion
Subject: [postgis-users] Postgis 9.0.1 and JDBC problems.
I am trying to use postgis geography thru Eclipselink using postgres-jdbc and have \
had a few problems at least at least one of them is still holding me up.
First problem is that I had to build the driver myself: I have had no luck in finding \
it in any publically available maven repository. Second problem: PGgeometry is \
broken; More specifically it implements Serializable, but contains a nonserializable \
non transient member: BinaryParser bp = new BinaryParser();
This is easily fixed by changing it to:
transient BinaryParser bp = new BinaryParser();
The third problem is that there seems to be something wrong related to endianness as \
I get this message when I try to flush my changes to EclipseLink.
Internal Exception: org.postgresql.util.PSQLException: ERROR: Invalid endian flag \
value encountered.
Some extra information:
I do insert postgis dependencies using this piece of code:
final org.postgresql.PGConnection connection = (PGConnection) ((EntityManagerImpl) \
em)
.unwrap(java.sql.Connection.class);
connection.addDataType("geometry",
Class.forName("org.postgis.PGgeometry"));
connection.addDataType("geography",
Class.forName("org.postgis.PGgeometry"));
connection.addDataType("box3d", Class.forName("org.postgis.PGbox3d"));
The JPA attribute definition is shown here:
@Basic(optional = true, fetch = LAZY)
@Column(columnDefinition = "GEOGRAPHY(MULTIPOLYGON,4326)", insertable = true, \
updatable = true, nullable = true) private PGgeometry coverageArea;
For postgis I am using the postgis 9.0.1 jdbc4 driver Even inserting nulls seems to \
create this endian flag value exception. \
_______________________________________________ postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic