[postgis-users] RE: RE: PostGIS - hibernate - EJB3
coster
christian.osterrieder at salzburgresearch.at
Mon Sep 4 22:49:33 PDT 2006
hi,
I have the same problem with JBoss and EJB3.
The column is type "oid" instead of "geometry".
I would be very grateful for a solution - here are my postgis-ds.xml and my
persistence.xml:
<datasources>
<local-tx-datasource>
<jndi-name>PostgisDS</jndi-name>
<connection-url>jdbc:postgresql://xxx:5432/tourguide</connection-url>
<driver-class>org.postgis.DriverWrapper</driver-class>
<user-name>xxx</user-name>
<password>xxx</password>
<new-connection-sql>select 1</new-connection-sql>
<check-valid-connection-sql>select 1</check-valid-connection-sql>
<metadata>
<type-mapping>PostgreSQL 8.1</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="tourguide">
<jta-data-source>java:/PostgisDS</jta-data-source>
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.PostgreSQLDialect"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.show_sql" value="true"/>
</properties>
</persistence-unit>
</persistence>
Thanks!
Christian.
Norman Barker-3 wrote:
>
>
>
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
> croisfert
> Sent: Monday, August 21, 2006 2:54 AM
> To: postgis-users at postgis.refractions.net
> Subject: [postgis-users] RE: PostGIS - hibernate - EJB3
>
>
> hi, I am trying to use custom UserType, but it work fine in a pure
> Hibernate
> implementation , but not in JBOSS EJB3, the generated geometry column in
> postgres is of type "oid" instead of "geometry" You have any
> suggestion,
> i am using jboss-EJB-3.0_RC8-FD and postgis 1.1.3 (on postgres 8.1.4)
>
>
> thanks.
> --
>
>
> Make sure that the usertype is available on your classpath, I have only
> tested it with the Geometry Column type (as the name implies!!), I also
> set up postgis as a datasource within JBoss - postgis-ds.xml, and
> configured the persistence.xml. I am writing up a doc for this shortly;
> just don't have too much time this week.
>
> Norman
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
--
View this message in context: http://www.nabble.com/PostGIS---hibernate---EJB3-tf2064211.html#a6146402
Sent from the PostGIS - User forum at Nabble.com.
More information about the postgis-users
mailing list