bytea type instead of geometry

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

bytea type instead of geometry

Jaime Lop
Hi everyone,

I'm using hibernatespatial with a postGIS database. I have a java attribute of type com.vividsolutions.jts.geom.Point that I want to persist

<property column="geo_point" generated="never" lazy="false"
   name="geoPoint" type="org.hibernatespatial.postgis.PGGeometryUserType">

When I look the database the column 'geo_point' has been created but the type is bytea. Is this the expected behaviour? Io would have expected to have a geometry type. Did I miss something?

KR,
Jaime

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: bytea type instead of geometry

Samuel Gendler
I suspect that your problem is using PGGeometryUserType instead of org.hibernatespatial.GeometryUserType. Or, at least, that's the difference between your code and mine - and mine creates a column with type geometry.

    @Column(name = "location")
    @Type(type = "org.hibernatespatial.GeometryUserType")
    private Point location;

and from the hibernatespatial tutorial page:

        <property name="location" type="org.hibernatespatial.GeometryUserType"  column="LOC"/>


On Tue, Apr 26, 2011 at 1:08 AM, Jaime Lop <[hidden email]> wrote:
Hi everyone,

I'm using hibernatespatial with a postGIS database. I have a java attribute of type com.vividsolutions.jts.geom.Point that I want to persist

<property column="geo_point" generated="never" lazy="false"
   name="geoPoint" type="org.hibernatespatial.postgis.PGGeometryUserType">

When I look the database the column 'geo_point' has been created but the type is bytea. Is this the expected behaviour? Io would have expected to have a geometry type. Did I miss something?

KR,
Jaime

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users



_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: bytea type instead of geometry

Jaime Lop
Hi Samuel,

I've tried both org.hibernatespatial.GeometryUserType and org.hibernatespatial.postgis.PGGeometryUserType with the same result.

On Tue, Apr 26, 2011 at 10:19 AM, Samuel Gendler <[hidden email]> wrote:
I suspect that your problem is using PGGeometryUserType instead of org.hibernatespatial.GeometryUserType. Or, at least, that's the difference between your code and mine - and mine creates a column with type geometry.

    @Column(name = "location")
    @Type(type = "org.hibernatespatial.GeometryUserType")
    private Point location;

and from the hibernatespatial tutorial page:

        <property name="location" type="org.hibernatespatial.GeometryUserType"  column="LOC"/>


On Tue, Apr 26, 2011 at 1:08 AM, Jaime Lop <[hidden email]> wrote:
Hi everyone,

I'm using hibernatespatial with a postGIS database. I have a java attribute of type com.vividsolutions.jts.geom.Point that I want to persist

<property column="geo_point" generated="never" lazy="false"
   name="geoPoint" type="org.hibernatespatial.postgis.PGGeometryUserType">

When I look the database the column 'geo_point' has been created but the type is bytea. Is this the expected behaviour? Io would have expected to have a geometry type. Did I miss something?

KR,
Jaime

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users



_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users



_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: bytea type instead of geometry

Samuel Gendler
On Tue, Apr 26, 2011 at 1:30 AM, Jaime Lop <[hidden email]> wrote:
Hi Samuel,

I've tried both org.hibernatespatial.GeometryUserType and org.hibernatespatial.postgis.PGGeometryUserType with the same result.


I'm afraid I'm not much help beyond my initial suggestion.  I've only just started using hibernatespatial and everything has worked as expected for me so far - though i really haven't done much with it yet.

--sam

 

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: bytea type instead of geometry

Jan Boonen
In reply to this post by Jaime Lop
Hi Jaime,

Are Hibernate Spatial and Hibernate Spatial PostGIS on your classpath?
Do you have Hibernate Spatial configured as a dialect
(hibernate.dialect=org.hibernatespatial.postgis.PostgisDialect) in your
Hibernate configuration?

 From the type bytea it seems that Hibernate does not recognize your
mapping as a spatial type. Therefore it automatically creates a blob field.

Cheers,

Jan

On 26-4-2011 10:30, Jaime Lop wrote:

> Hi Samuel,
>
> I've tried both org.hibernatespatial.GeometryUserType and
> org.hibernatespatial.postgis.PGGeometryUserType with the same result.
>
> On Tue, Apr 26, 2011 at 10:19 AM, Samuel Gendler
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     I suspect that your problem is using PGGeometryUserType instead of
>     org.hibernatespatial.GeometryUserType. Or, at least, that's the
>     difference between your code and mine - and mine creates a column
>     with type geometry.
>
>         @Column(name = "location")
>         @Type(type = "org.hibernatespatial.GeometryUserType")
>         private Point location;
>
>     and from the hibernatespatial tutorial page:
>
>              <property name="location" type="org.hibernatespatial.GeometryUserType"  column="LOC"/>
>
>
>
>     On Tue, Apr 26, 2011 at 1:08 AM, Jaime Lop <[hidden email]
>     <mailto:[hidden email]>> wrote:
>
>         Hi everyone,
>
>         I'm using hibernatespatial with a postGIS database. I have a
>         java attribute of type com.vividsolutions.jts.geom.Point that
>         I want to persist
>
>         <property column="geo_point" generated="never" lazy="false"
>            name="geoPoint"
>         type="org.hibernatespatial.postgis.PGGeometryUserType">
>
>         When I look the database the column 'geo_point' has been
>         created but the type is bytea. Is this the expected behaviour?
>         Io would have expected to have a geometry type. Did I miss
>         something?
>
>         KR,
>         Jaime
>
>         _______________________________________________
>         hibernatespatial-users mailing list
>         [hidden email]
>         <mailto:[hidden email]>
>         http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
>
>
>
>     _______________________________________________
>     hibernatespatial-users mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
>
>
>
> _______________________________________________
> hibernatespatial-users mailing list
> [hidden email]
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: bytea type instead of geometry

Jaime Lop
Yes I have both dependencies on the classpath and the dialect set to PostgisDialect.

I've tried using JPA annotations and I get this exception:

14:13:23 ERROR (TestContextManager.java:324) Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@433333] to prepare test instance [TextNOTAMGenerationTests.ModelTestPersistenceDME@1d67b41]
java.lang.IllegalStateException: Failed to load ApplicationContext
    at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:308)
    ...
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [META-INF/spring/applicationContext.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [META-INF/spring/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.hibernate.type.CustomType.<init>(Ljava/lang/Class;Ljava/util/Properties;)V
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
   ...
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined
...
Caused by: java.lang.NoSuchMethodError: org.hibernate.type.CustomType.<init>(Ljava/lang/Class;Ljava/util/Properties;)V
    at org.hibernatespatial.GeometryUserType.<clinit>(GeometryUserType.java:61)
    ...

I suspect incompatibility of dependencies. This is an excerpt from my pom. Anything wrong with it?

    <dependencies>
         ...
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>3.6.0.Final</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>3.6.0.Final</version>
        </dependency>
        <dependency>
            <groupId>net.sf.ehcache</groupId>
            <artifactId>ehcache-core</artifactId>
            <version>2.2.0</version>
        </dependency>
        <dependency>
            <groupId>org.hibernatespatial</groupId>
            <artifactId>hibernate-spatial-postgis</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>c3p0</groupId>
            <artifactId>c3p0</artifactId>
            <version>0.9.1.2</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.atomikos</groupId>
            <artifactId>transactions-hibernate3</artifactId>
            <version>3.6.4</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>javax.persistence</groupId>
            <artifactId>persistence-api</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>com.vividsolutions</groupId>
            <artifactId>jts</artifactId>
            <version>1.11</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
    </dependencies>


On Tue, Apr 26, 2011 at 12:12 PM, Jan Boonen <[hidden email]> wrote:
Hi Jaime,

Are Hibernate Spatial and Hibernate Spatial PostGIS on your classpath? Do you have Hibernate Spatial configured as a dialect (hibernate.dialect=org.hibernatespatial.postgis.PostgisDialect) in your Hibernate configuration?

From the type bytea it seems that Hibernate does not recognize your mapping as a spatial type. Therefore it automatically creates a blob field.

Cheers,

Jan


On 26-4-2011 10:30, Jaime Lop wrote:
Hi Samuel,

I've tried both org.hibernatespatial.GeometryUserType and org.hibernatespatial.postgis.PGGeometryUserType with the same result.

On Tue, Apr 26, 2011 at 10:19 AM, Samuel Gendler <[hidden email] <mailto:[hidden email]>> wrote:

   I suspect that your problem is using PGGeometryUserType instead of
   org.hibernatespatial.GeometryUserType. Or, at least, that's the
   difference between your code and mine - and mine creates a column
   with type geometry.

       @Column(name = "location")
       @Type(type = "org.hibernatespatial.GeometryUserType")
       private Point location;

   and from the hibernatespatial tutorial page:

            <property name="location" type="org.hibernatespatial.GeometryUserType"  column="LOC"/>



   On Tue, Apr 26, 2011 at 1:08 AM, Jaime Lop <[hidden email]
   <mailto:[hidden email]>> wrote:

       Hi everyone,

       I'm using hibernatespatial with a postGIS database. I have a
       java attribute of type com.vividsolutions.jts.geom.Point that
       I want to persist

       <property column="geo_point" generated="never" lazy="false"
          name="geoPoint"
       type="org.hibernatespatial.postgis.PGGeometryUserType">

       When I look the database the column 'geo_point' has been
       created but the type is bytea. Is this the expected behaviour?
       Io would have expected to have a geometry type. Did I miss
       something?

       KR,
       Jaime

       _______________________________________________
       hibernatespatial-users mailing list
       [hidden email]
       <mailto:[hidden email]>

       http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users



   _______________________________________________
   hibernatespatial-users mailing list
   [hidden email]
   <mailto:[hidden email]>

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users


_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: bytea type instead of geometry

Jan Boonen
Hi Jaime,

I believe that Hibernate Spatial is not compatible with Hibernate 3.6. I
currently use Hibernate 3.5.6. Otherwise, your POM looks fine.

Cheers,

Jan


On 26-4-2011 14:22, Jaime Lop wrote:

> Yes I have both dependencies on the classpath and the dialect set to
> PostgisDialect.
>
> I've tried using JPA annotations and I get this exception:
>
> 14:13:23 ERROR (TestContextManager.java:324) Caught exception while
> allowing TestExecutionListener
> [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@433333]
> to prepare test instance
> [TextNOTAMGenerationTests.ModelTestPersistenceDME@1d67b41]
> java.lang.IllegalStateException: Failed to load ApplicationContext
>     at
> org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:308)
>     ...
> Caused by: org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'transactionManager' defined in class
> path resource [META-INF/spring/applicationContext.xml]: Cannot resolve
> reference to bean 'entityManagerFactory' while setting bean property
> 'entityManagerFactory'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'entityManagerFactory' defined in class path
> resource [META-INF/spring/applicationContext.xml]: Invocation of init
> method failed; nested exception is java.lang.NoSuchMethodError:
> org.hibernate.type.CustomType.<init>(Ljava/lang/Class;Ljava/util/Properties;)V
>     at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
>    ...
> Caused by: org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'entityManagerFactory' defined
> ...
> Caused by: java.lang.NoSuchMethodError:
> org.hibernate.type.CustomType.<init>(Ljava/lang/Class;Ljava/util/Properties;)V
>     at
> org.hibernatespatial.GeometryUserType.<clinit>(GeometryUserType.java:61)
>     ...
>
> I suspect incompatibility of dependencies. This is an excerpt from my
> pom. Anything wrong with it?
>
> <dependencies>
>          ...
> <dependency>
> <groupId>org.hibernate</groupId>
> <artifactId>hibernate-core</artifactId>
> <version>3.6.0.Final</version>
> </dependency>
> <dependency>
> <groupId>org.hibernate</groupId>
> <artifactId>hibernate-entitymanager</artifactId>
> <version>3.6.0.Final</version>
> </dependency>
> <dependency>
> <groupId>net.sf.ehcache</groupId>
> <artifactId>ehcache-core</artifactId>
> <version>2.2.0</version>
> </dependency>
> <dependency>
> <groupId>org.hibernatespatial</groupId>
> <artifactId>hibernate-spatial-postgis</artifactId>
> <version>1.0</version>
> </dependency>
> <dependency>
> <groupId>c3p0</groupId>
> <artifactId>c3p0</artifactId>
> <version>0.9.1.2</version>
> <type>jar</type>
> </dependency>
> <dependency>
> <groupId>com.atomikos</groupId>
> <artifactId>transactions-hibernate3</artifactId>
> <version>3.6.4</version>
> <type>jar</type>
> <scope>compile</scope>
> </dependency>
> <dependency>
> <groupId>javax.persistence</groupId>
> <artifactId>persistence-api</artifactId>
> <version>1.0</version>
> </dependency>
> <dependency>
> <groupId>com.vividsolutions</groupId>
> <artifactId>jts</artifactId>
> <version>1.11</version>
> <type>jar</type>
> <scope>compile</scope>
> </dependency>
> </dependencies>
>
>
> On Tue, Apr 26, 2011 at 12:12 PM, Jan Boonen <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi Jaime,
>
>     Are Hibernate Spatial and Hibernate Spatial PostGIS on your
>     classpath? Do you have Hibernate Spatial configured as a dialect
>     (hibernate.dialect=org.hibernatespatial.postgis.PostgisDialect) in
>     your Hibernate configuration?
>
>     From the type bytea it seems that Hibernate does not recognize
>     your mapping as a spatial type. Therefore it automatically creates
>     a blob field.
>
>     Cheers,
>
>     Jan
>
>
>     On 26-4-2011 10:30, Jaime Lop wrote:
>
>         Hi Samuel,
>
>         I've tried both org.hibernatespatial.GeometryUserType and
>         org.hibernatespatial.postgis.PGGeometryUserType with the same
>         result.
>
>         On Tue, Apr 26, 2011 at 10:19 AM, Samuel Gendler
>         <[hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>> wrote:
>
>            I suspect that your problem is using PGGeometryUserType
>         instead of
>            org.hibernatespatial.GeometryUserType. Or, at least, that's the
>            difference between your code and mine - and mine creates a
>         column
>            with type geometry.
>
>                @Column(name = "location")
>                @Type(type = "org.hibernatespatial.GeometryUserType")
>                private Point location;
>
>            and from the hibernatespatial tutorial page:
>
>         <property name="location"
>         type="org.hibernatespatial.GeometryUserType"  column="LOC"/>
>
>
>
>            On Tue, Apr 26, 2011 at 1:08 AM, Jaime Lop
>         <[hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email] <mailto:[hidden email]>>> wrote:
>
>                Hi everyone,
>
>                I'm using hibernatespatial with a postGIS database. I
>         have a
>                java attribute of type
>         com.vividsolutions.jts.geom.Point that
>                I want to persist
>
>         <property column="geo_point" generated="never" lazy="false"
>                   name="geoPoint"
>                type="org.hibernatespatial.postgis.PGGeometryUserType">
>
>                When I look the database the column 'geo_point' has been
>                created but the type is bytea. Is this the expected
>         behaviour?
>                Io would have expected to have a geometry type. Did I miss
>                something?
>
>                KR,
>                Jaime
>
>                _______________________________________________
>                hibernatespatial-users mailing list
>         [hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>
>
>         http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
>
>
>
>            _______________________________________________
>            hibernatespatial-users mailing list
>         [hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>
>
>         http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
>
>
>
>         _______________________________________________
>         hibernatespatial-users mailing list
>         [hidden email]
>         <mailto:[hidden email]>
>         http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
>
>
>     _______________________________________________
>     hibernatespatial-users mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
>
>
>
> _______________________________________________
> hibernatespatial-users mailing list
> [hidden email]
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: bytea type instead of geometry

Samuel Gendler
In reply to this post by Jaime Lop


On Tue, Apr 26, 2011 at 5:22 AM, Jaime Lop <[hidden email]> wrote:

...
Caused by: java.lang.NoSuchMethodError: org.hibernate.type.CustomType.<init>(Ljava/lang/Class;Ljava/util/Properties;)V
    at org.hibernatespatial.GeometryUserType.<clinit>(GeometryUserType.java:61)
    ...



I had this one.  There was an incompatibility that I had to resolve by using hibernatespatial trunk.  The released code is not hibernate 3.6 compatible.  Trunk is.  I had to make minor changes to the pom.xml for hibernatespatial in trunk in order to not have to build oracle and myself.  Build instructions were also a bit spare (non-existent, that I could find).  You get some number of directories, but build all of them by running mvn in the hibernate-spatial-maven subdirectory.  I commented out the modules I didn't want compiled in the pom.xml in hibernate-spatial-maven/pom.xml.

--- hibernate-spatial-maven/pom.xml (revision 300)
+++ hibernate-spatial-maven/pom.xml (working copy)
@@ -22,10 +22,10 @@
         <module>../hibernate-spatial</module>
         <module>../test-suite</module>
         <module>../hibernate-spatial-postgis</module>
-        <module>../hibernate-spatial-oracle</module>
+        <module>../hibernate-spatial-h2-geodb</module>
+        <!--module>../hibernate-spatial-oracle</module>
         <module>../hibernate-spatial-mysql</module>
-        <module>../hibernate-spatial-sqlserver</module>
-        <module>../hibernate-spatial-h2-geodb</module>
+        <module>../hibernate-spatial-sqlserver</module-->
     </modules>

Additionally, the jts library from vividsolutions had a dependency on xerces added to it which was totally incompatible with the rest of spring.  I didn't feel like trying to figure out how to make everything work with an old version of xerces, so I downgraded the hibernatespatial dependency on jts to version 1.10, which seems not to have been officially released yet, anyway - the website only seems to go to 1.8, though 1.10 and 1.11 are available from maven.  Again, little to no documentation on that.  But I made the following change to the pom.xml of hibernate-spatial and everything runs fine and has no explicit dependency on xerces

@@ -172,7 +172,7 @@
         <dependency>
             <groupId>com.vividsolutions</groupId>
             <artifactId>jts</artifactId>
-            <version>1.11</version>
+            <version>1.10</version>
         </dependency>


I was also unable to find postgis-jdbc 1.3.5 anywhere in any maven repository.  The best I could find was 1.3.3. I wound up pulling the postgis source to 1.5.2 and building it myself.  Of course, the postgis source code wouldn't compile because the build.xml file was a mess. I made the following minor changes to the build.xml in postgis-1.5.2/java/jdbc/build.xml before using ant to build the jar file.  I also had to do a manual mvn install to copy the build into my local maven repository.

37c37
<   <property name="pgdefaultjar" value="/usr/share/java/postgresql.jar"/>
---
>   <property name="pgdefaultjar" value="/Users/sgendler/src/springsource/tc-server-developer-2.1.1.RELEASE/spring-insight-instance/wtpwebapps/portal/WEB-INF/lib/postgresql-8.4-701.jdbc3.jar"/>
50c50
<     <pathelement path="${pgdefaultjar}"/>
---
>     <pathelement location="${pgdefaultjar}"/>
56c56
<     <pathelement path="${pgdefaultjar}"/>
---
>     <pathelement location="${pgdefaultjar}"/>
58a59
>     <pathelement path="${build}"/>
140c141
<     <java classname="examples.TestBoxes" fork="true" output="${regresslog}" error="${regresslog}.err" append="true">
---
>     <java classname="examples.TestBoxes" fork="true" output="${regresslog}" error="${regresslog}.err" append="true" >
184c185
<     <javadoc sourcepath="${src}" destdir="${javadocbuild}">
---
>     <javadoc sourcepath="${src}" destdir="${javadocbuild}" classpathref="buildclasspath">


I have to say, none of this process gave me particularly warm and fuzzy feelings about using hibernatespatial, but I don't have a choice if I want to have hibernate ORM.  Everything did run smoothly once I had updated hibernate-spatial and postgis-jdbc 1.5.2 installed in my maven repository and the dependencies in my project updated to utilize them.  My project pom.xml has the following entries:

    <dependency>
            <groupId>org.hibernatespatial</groupId>
            <artifactId>hibernate-spatial-postgis</artifactId>
            <version>1.1-SNAPSHOT</version>
        </dependency>
    <dependency>
            <groupId>org.postgis</groupId>
            <artifactId>postgis-jdbc</artifactId>
            <version>1.5.2</version>
        </dependency>
    </dependencies>

I looked through the changelog since the last release of hibernatespatial and it would appear, upon casual inspection, that there haven't been significant changes to the source singe the release other than changes to support hibernate 3.6, so it looks like it should be safe to use.  But it was a pretty casual inspection.  Basic store, load, and update are working in my project.  I haven't actually written any HQL or criteria queries to see how that goes.

Do keep the list updated if you find and fix any problems in the codebase if you continue with hibernate 3.6

--sam



_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: bytea type instead of geometry

Samuel Gendler


On Tue, Apr 26, 2011 at 8:39 AM, Samuel Gendler <[hidden email]> wrote:


I was also unable to find postgis-jdbc 1.3.5 anywhere in any maven repository.  The best I could find was 1.3.3. I wound up pulling the postgis source to 1.5.2 and building it myself.  Of course, the postgis source code wouldn't compile because the build.xml file was a mess. I made the following minor changes to the build.xml in postgis-1.5.2/java/jdbc/build.xml before using ant to build the jar file.  I also had to do a manual mvn install to copy the build into my local maven repository.

37c37
<   <property name="pgdefaultjar" value="/usr/share/java/postgresql.jar"/>
---
>   <property name="pgdefaultjar" value="/Users/sgendler/src/springsource/tc-server-developer-2.1.1.RELEASE/spring-insight-instance/wtpwebapps/portal/WEB-INF/lib/postgresql-8.4-701.jdbc3.jar"/>

Note: that path just needs to be a path to your postgresql driver jar.  

I've attached a tarball of the relevant content of my local maven repository.  Technically, you could rsync this into ~/.m2/repository and just make the pom.xml changes in your own project and everything should work.  I'm not a maven user and have no idea how to go about setting things up correctly, but everything seems to work.  If someone wants to host the jar files in a real maven repository and update the hibernate spatial documentation, I'm all for that.

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users

repository.tgz (494K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: bytea type instead of geometry

Jaime Lop
I cannot find the hibernate 3.5.6 release on maven. When I browse the https://repository.jboss.org/nexus/content/groups/public-jboss repository it is there but for some reason maven won't find it. Any clue about this?

On Tue, Apr 26, 2011 at 5:48 PM, Samuel Gendler <[hidden email]> wrote:


On Tue, Apr 26, 2011 at 8:39 AM, Samuel Gendler <[hidden email]> wrote:


I was also unable to find postgis-jdbc 1.3.5 anywhere in any maven repository.  The best I could find was 1.3.3. I wound up pulling the postgis source to 1.5.2 and building it myself.  Of course, the postgis source code wouldn't compile because the build.xml file was a mess. I made the following minor changes to the build.xml in postgis-1.5.2/java/jdbc/build.xml before using ant to build the jar file.  I also had to do a manual mvn install to copy the build into my local maven repository.

37c37
<   <property name="pgdefaultjar" value="/usr/share/java/postgresql.jar"/>
---
>   <property name="pgdefaultjar" value="/Users/sgendler/src/springsource/tc-server-developer-2.1.1.RELEASE/spring-insight-instance/wtpwebapps/portal/WEB-INF/lib/postgresql-8.4-701.jdbc3.jar"/>

Note: that path just needs to be a path to your postgresql driver jar.  

I've attached a tarball of the relevant content of my local maven repository.  Technically, you could rsync this into ~/.m2/repository and just make the pom.xml changes in your own project and everything should work.  I'm not a maven user and have no idea how to go about setting things up correctly, but everything seems to work.  If someone wants to host the jar files in a real maven repository and update the hibernate spatial documentation, I'm all for that.

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users



_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: bytea type instead of geometry

Jan Boonen
Hi Jaime,

Use this snippet in your POM:

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.5.6-Final</version>
</dependency>

and this repo:
https://repository.jboss.org/nexus/content/repositories/releases/

Cheers,

Jan


On 28-4-2011 11:30, Jaime Lop wrote:

> I cannot find the hibernate 3.5.6 release on maven. When I browse the
> https://repository.jboss.org/nexus/content/groups/public-jboss 
> repository it is there but for some reason maven won't find it. Any
> clue about this?
>
> On Tue, Apr 26, 2011 at 5:48 PM, Samuel Gendler
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>
>
>     On Tue, Apr 26, 2011 at 8:39 AM, Samuel Gendler
>     <[hidden email] <mailto:[hidden email]>> wrote:
>
>
>
>         I was also unable to find postgis-jdbc 1.3.5 anywhere in any
>         maven repository.  The best I could find was 1.3.3. I wound up
>         pulling the postgis source to 1.5.2 and building it myself.
>          Of course, the postgis source code wouldn't compile because
>         the build.xml file was a mess. I made the following minor
>         changes to the build.xml in postgis-1.5.2/java/jdbc/build.xml
>         before using ant to build the jar file.  I also had to do a
>         manual mvn install to copy the build into my local maven
>         repository.
>
>         37c37
>         < <property name="pgdefaultjar"
>         value="/usr/share/java/postgresql.jar"/>
>         ---
>         > <property name="pgdefaultjar"
>         value="/Users/sgendler/src/springsource/tc-server-developer-2.1.1.RELEASE/spring-insight-instance/wtpwebapps/portal/WEB-INF/lib/postgresql-8.4-701.jdbc3.jar"/>
>
>
>     Note: that path just needs to be a path to your postgresql driver
>     jar.
>
>     I've attached a tarball of the relevant content of my local maven
>     repository.  Technically, you could rsync this into
>     ~/.m2/repository and just make the pom.xml changes in your own
>     project and everything should work.  I'm not a maven user and have
>     no idea how to go about setting things up correctly, but
>     everything seems to work.  If someone wants to host the jar files
>     in a real maven repository and update the hibernate spatial
>     documentation, I'm all for that.
>
>     _______________________________________________
>     hibernatespatial-users mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
>
>
>
> _______________________________________________
> hibernatespatial-users mailing list
> [hidden email]
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: bytea type instead of geometry

Jaime Lop
now I get this maven error;
[FATAL] Non-readable POM D:\NoScan\.m2\repository\org\hibernate\hibernate-core\3.5.6.Final\hibernate-core-3.5.6.Final.pom: input contained no data @

I'm new to maven, I'm sorry if I'm missing something obvious. Does anyone have a basic minimal pom where I can start playing with hibernatespatial?

On Thu, Apr 28, 2011 at 11:39 AM, Jan Boonen <[hidden email]> wrote:
Hi Jaime,

Use this snippet in your POM:


<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.5.6-Final</version>
</dependency>

and this repo: https://repository.jboss.org/nexus/content/repositories/releases/

Cheers,

Jan



On 28-4-2011 11:30, Jaime Lop wrote:
I cannot find the hibernate 3.5.6 release on maven. When I browse the https://repository.jboss.org/nexus/content/groups/public-jboss repository it is there but for some reason maven won't find it. Any clue about this?

On Tue, Apr 26, 2011 at 5:48 PM, Samuel Gendler <[hidden email] <mailto:[hidden email]>> wrote:



   On Tue, Apr 26, 2011 at 8:39 AM, Samuel Gendler
   <[hidden email] <mailto:[hidden email]>> wrote:



       I was also unable to find postgis-jdbc 1.3.5 anywhere in any
       maven repository.  The best I could find was 1.3.3. I wound up
       pulling the postgis source to 1.5.2 and building it myself.
        Of course, the postgis source code wouldn't compile because
       the build.xml file was a mess. I made the following minor
       changes to the build.xml in postgis-1.5.2/java/jdbc/build.xml
       before using ant to build the jar file.  I also had to do a
       manual mvn install to copy the build into my local maven
       repository.

       37c37
       < <property name="pgdefaultjar"
       value="/usr/share/java/postgresql.jar"/>
       ---
       > <property name="pgdefaultjar"
       value="/Users/sgendler/src/springsource/tc-server-developer-2.1.1.RELEASE/spring-insight-instance/wtpwebapps/portal/WEB-INF/lib/postgresql-8.4-701.jdbc3.jar"/>


   Note: that path just needs to be a path to your postgresql driver
   jar.

   I've attached a tarball of the relevant content of my local maven
   repository.  Technically, you could rsync this into
   ~/.m2/repository and just make the pom.xml changes in your own
   project and everything should work.  I'm not a maven user and have
   no idea how to go about setting things up correctly, but
   everything seems to work.  If someone wants to host the jar files
   in a real maven repository and update the hibernate spatial
   documentation, I'm all for that.

   _______________________________________________
   hibernatespatial-users mailing list
   [hidden email]
   <mailto:[hidden email]>

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users


_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: bytea type instead of geometry

Jan Boonen
Try deleting the directoy D:\NoScan\.m2\repository\org\hibernate and run
maven again for your hibernate project.

On 28-4-2011 13:55, Jaime Lop wrote:

> now I get this maven error;
> [FATAL] Non-readable POM
> D:\NoScan\.m2\repository\org\hibernate\hibernate-core\3.5.6.Final\hibernate-core-3.5.6.Final.pom:
> input contained no data @
>
> I'm new to maven, I'm sorry if I'm missing something obvious. Does
> anyone have a basic minimal pom where I can start playing with
> hibernatespatial?
>
> On Thu, Apr 28, 2011 at 11:39 AM, Jan Boonen <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi Jaime,
>
>     Use this snippet in your POM:
>
>
>     <dependency>
>     <groupId>org.hibernate</groupId>
>     <artifactId>hibernate-core</artifactId>
>     <version>3.5.6-Final</version>
>     </dependency>
>
>     and this repo:
>     https://repository.jboss.org/nexus/content/repositories/releases/
>
>     Cheers,
>
>     Jan
>
>
>
>     On 28-4-2011 11:30, Jaime Lop wrote:
>
>         I cannot find the hibernate 3.5.6 release on maven. When I
>         browse the
>         https://repository.jboss.org/nexus/content/groups/public-jboss
>         repository it is there but for some reason maven won't find
>         it. Any clue about this?
>
>         On Tue, Apr 26, 2011 at 5:48 PM, Samuel Gendler
>         <[hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>> wrote:
>
>
>
>            On Tue, Apr 26, 2011 at 8:39 AM, Samuel Gendler
>         <[hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>> wrote:
>
>
>
>                I was also unable to find postgis-jdbc 1.3.5 anywhere
>         in any
>                maven repository.  The best I could find was 1.3.3. I
>         wound up
>                pulling the postgis source to 1.5.2 and building it myself.
>                 Of course, the postgis source code wouldn't compile
>         because
>                the build.xml file was a mess. I made the following minor
>                changes to the build.xml in
>         postgis-1.5.2/java/jdbc/build.xml
>                before using ant to build the jar file.  I also had to do a
>                manual mvn install to copy the build into my local maven
>                repository.
>
>                37c37
>         < <property name="pgdefaultjar"
>                value="/usr/share/java/postgresql.jar"/>
>                ---
>         > <property name="pgdefaultjar"
>              
>          value="/Users/sgendler/src/springsource/tc-server-developer-2.1.1.RELEASE/spring-insight-instance/wtpwebapps/portal/WEB-INF/lib/postgresql-8.4-701.jdbc3.jar"/>
>
>
>            Note: that path just needs to be a path to your postgresql
>         driver
>            jar.
>
>            I've attached a tarball of the relevant content of my local
>         maven
>            repository.  Technically, you could rsync this into
>            ~/.m2/repository and just make the pom.xml changes in your own
>            project and everything should work.  I'm not a maven user
>         and have
>            no idea how to go about setting things up correctly, but
>            everything seems to work.  If someone wants to host the jar
>         files
>            in a real maven repository and update the hibernate spatial
>            documentation, I'm all for that.
>
>            _______________________________________________
>            hibernatespatial-users mailing list
>         [hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>
>
>         http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
>
>
>
>         _______________________________________________
>         hibernatespatial-users mailing list
>         [hidden email]
>         <mailto:[hidden email]>
>         http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
>
>
>     _______________________________________________
>     hibernatespatial-users mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
>
>
>
> _______________________________________________
> hibernatespatial-users mailing list
> [hidden email]
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users