Release 1.1 is out now

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

Release 1.1 is out now

Karel Maesen
Administrator
Hello all,

I'm happy to announce the 1.1 release of Hibernate Spatial.

The major improvements are:
- support for Hibernate 3.6.x
- Added Dwithin() and transform() HQL-functions
- added dwithin() and havingSRID() methods to SpatialRestrictions
- Added a SpatialDialect for MySQL InnoDB
... and many more minor improvements and bugfixes.

More information can be found at: http://www.hibernatespatial.org/release_notes.html

An interface change in Hibernate 3.6 broke Hibernate Spatial 1.0. This release fixes that but has the consequence that it is compatible only with Hibernate 3.6.x. If you must use a Hibernate version between 3.2.x and  3.5.x, you are limited to using Hibernate Spatial 1.0.

The GeoDB (H2) provider is not yet ready, but will follow shortly (probably before end of June).

The next release will focus on integrating Hibernate Spatial more closely with Hibernate 4.0 Core. Since Hibernate 4 will be very different from Hibernate 3 and introduce many breaking changes, I will take the opportunity to re-engineer some aspects of Hibernate Spatial. Watch this space for more information.

Regards,

Karel Maesen
Geovise BVBA
_______________________________________________
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: [Hibernatespatial-dev] Release 1.1 is out now

Juan Marín Otero
Congratulations on this release Karel.

I'll take the opportunity to introduce a shameless plug here, hope the list does not mind. For those of you wondering how Hibernate Spatial behaves in production systems, this is the software behind the geospatial RESTful APIs that the Federal Communications Commission (FCC) has been making available available at http://fcc.gov/developer and http://www.broadbandmap.gov/developer

If anyone is interested in knowing more about these, please drop me a note, I designed those APIs and wrote all the geospatial ones

Keep up the good work!!

--
Juan Marín Otero
GIS Consultant

-------Visita mi blog en---------------------
http://guachintoneando.blogspot.com
---------------------------------------------------




On Thu, May 26, 2011 at 4:25 PM, Karel Maesen <[hidden email]> wrote:
Hello all,

I'm happy to announce the 1.1 release of Hibernate Spatial.

The major improvements are:
- support for Hibernate 3.6.x
- Added Dwithin() and transform() HQL-functions
- added dwithin() and havingSRID() methods to SpatialRestrictions
- Added a SpatialDialect for MySQL InnoDB
... and many more minor improvements and bugfixes.

More information can be found at: http://www.hibernatespatial.org/release_notes.html

An interface change in Hibernate 3.6 broke Hibernate Spatial 1.0. This release fixes that but has the consequence that it is compatible only with Hibernate 3.6.x. If you must use a Hibernate version between 3.2.x and  3.5.x, you are limited to using Hibernate Spatial 1.0.

The GeoDB (H2) provider is not yet ready, but will follow shortly (probably before end of June).

The next release will focus on integrating Hibernate Spatial more closely with Hibernate 4.0 Core. Since Hibernate 4 will be very different from Hibernate 3 and introduce many breaking changes, I will take the opportunity to re-engineer some aspects of Hibernate Spatial. Watch this space for more information.

Regards,

Karel Maesen
Geovise BVBA
_______________________________________________
Hibernatespatial-dev mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-dev





_______________________________________________
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: Release 1.1 is out now

Boni Gopalan (BioImagene)
In reply to this post by Karel Maesen
Thanks Karel.  Will start using 1.1 later this week.

Regards
Boni

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On
Behalf Of Karel Maesen
Sent: Friday, May 27, 2011 1:56 AM
To: Hibernate Spatial Users Discussion;
[hidden email]; Discussions
related to the development of Hibernate Spatial
Subject: [hibernatespatial-users] Release 1.1 is out now

Hello all,

I'm happy to announce the 1.1 release of Hibernate Spatial.

The major improvements are:
- support for Hibernate 3.6.x
- Added Dwithin() and transform() HQL-functions
- added dwithin() and havingSRID() methods to SpatialRestrictions
- Added a SpatialDialect for MySQL InnoDB
... and many more minor improvements and bugfixes.

More information can be found at:
http://www.hibernatespatial.org/release_notes.html

An interface change in Hibernate 3.6 broke Hibernate Spatial 1.0. This
release fixes that but has the consequence that it is compatible only
with Hibernate 3.6.x. If you must use a Hibernate version between 3.2.x
and  3.5.x, you are limited to using Hibernate Spatial 1.0.

The GeoDB (H2) provider is not yet ready, but will follow shortly
(probably before end of June).

The next release will focus on integrating Hibernate Spatial more
closely with Hibernate 4.0 Core. Since Hibernate 4 will be very
different from Hibernate 3 and introduce many breaking changes, I will
take the opportunity to re-engineer some aspects of Hibernate Spatial.
Watch this space for more information.

Regards,

Karel Maesen
Geovise BVBA
_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatia
l-users
 

__________ Information from ESET NOD32 Antivirus, version of virus
signature database 6156 (20110526) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
 

__________ Information from ESET NOD32 Antivirus, version of virus
signature database 6156 (20110526) __________

The message was checked by ESET NOD32 Antivirus.

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

ClassCastException: org.hibernatespatial.GeometryUserType cannot be cast to com.vividsolutions.jts.geom.Geometry

Farrukh Najmi
In reply to this post by Karel Maesen
Hi Karel,

Thank you for another high quality hibernate-spatial release. I am very
grateful for some of the issues addressed in it.

I am starting to migrate to it now which requires migrating from
hibernate-core 3.5.x to 3.6.x as stated in your message below.

In my JPA application I had some code to set a named parameter of type
com.vividsolutions.jts.geom.Geometry on a org.hibernate.Query (based on
your help a while back
http://hibernate-spatial.1140993.n2.nabble.com/Spatial-queries-using-JPA-td1141168.html 
). Here is what the old code looked like:

                         String paramName = ...;
                         com.vividsolutions.jts.geom.Geometry geometry =
...;
                         org.hibernate.Query hibernateQuery =
((org.hibernate.ejb.QueryImpl)query).getHibernateQuery();
                         org.hibernate.type.Type geometryType = new
CustomType(GeometryUserType.class, (Properties)null);
                         hibernateQuery.setParameter(paramName,
geometry, geometryType);

Due to API changes in hibernate-core 3.6.x I changed above code to:

                         String paramName = ...;
                         com.vividsolutions.jts.geom.Geometry geometry =
...;
                         org.hibernate.Query hibernateQuery =
((org.hibernate.ejb.QueryImpl)query).getHibernateQuery();
                         GeometryUserType gut = new GeometryUserType();
                         gut.assemble(geometry, (Object)null);
                         hibernateQuery.setParameter(paramName, gut);

Now my code built OK.

However, at runtime when I do a query that uses above code to set the
geometry named parameter I get:

java.lang.ClassCastException: org.hibernatespatial.GeometryUserType
cannot be cast to com.vividsolutions.jts.geom.Geometry
         at
org.hibernatespatial.AbstractDBGeometryType.nullSafeSet(AbstractDBGeometryType.java:152)
         at
org.hibernatespatial.GeometryUserType.nullSafeSet(GeometryUserType.java:201)
         at org.hibernate.type.CustomType.nullSafeSet(CustomType.java:146)
         at
org.hibernate.param.NamedParameterSpecification.bind(NamedParameterSpecification.java:67)
         at
org.hibernate.loader.hql.QueryLoader.bindParameterValues(QueryLoader.java:571)
         at
org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1716)
         at org.hibernate.loader.Loader.doQuery(Loader.java:801)
         at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
         at org.hibernate.loader.Loader.doList(Loader.java:2533)
         at
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
         at org.hibernate.loader.Loader.list(Loader.java:2271)
         at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:452)
         at
org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
         at
org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
         at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
         at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
         at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:246)

What am I doing wrong?


On 05/26/2011 04:25 PM, Karel Maesen wrote:

> Hello all,
>
> I'm happy to announce the 1.1 release of Hibernate Spatial.
>
> The major improvements are:
> - support for Hibernate 3.6.x
> - Added Dwithin() and transform() HQL-functions
> - added dwithin() and havingSRID() methods to SpatialRestrictions
> - Added a SpatialDialect for MySQL InnoDB
> ... and many more minor improvements and bugfixes.
>
> More information can be found at: http://www.hibernatespatial.org/release_notes.html
>
> An interface change in Hibernate 3.6 broke Hibernate Spatial 1.0. This release fixes that but has the consequence that it is compatible only with Hibernate 3.6.x. If you must use a Hibernate version between 3.2.x and  3.5.x, you are limited to using Hibernate Spatial 1.0.
>
> The GeoDB (H2) provider is not yet ready, but will follow shortly (probably before end of June).
>
> The next release will focus on integrating Hibernate Spatial more closely with Hibernate 4.0 Core. Since Hibernate 4 will be very different from Hibernate 3 and introduce many breaking changes, I will take the opportunity to re-engineer some aspects of Hibernate Spatial. Watch this space for more information.
>
> Regards,
>
> Karel Maesen
> Geovise BVBA
> _______________________________________________
> hibernatespatial-users mailing list
> [hidden email]
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
>


--
Regards,
Farrukh Najmi

Web: http://www.wellfleetsoftware.com


_______________________________________________
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: ClassCastException: org.hibernatespatial.GeometryUserType cannot be cast to com.vividsolutions.jts.geom.Geometry

Farrukh Najmi

I think I have figured out my mistake. Please see inline below for the
fixed code fragment if any one cares.

On a related note, it may be helpful to provide some info in the javadoc
for GeometryUserType on how to use a JTS Geometry in a hibernate query
named parameter and how to use casting when using JPA.

Thanks again.

On 05/27/2011 12:53 PM, Farrukh Najmi wrote:

> Hi Karel,
>
> Thank you for another high quality hibernate-spatial release. I am
> very grateful for some of the issues addressed in it.
>
> I am starting to migrate to it now which requires migrating from
> hibernate-core 3.5.x to 3.6.x as stated in your message below.
>
> In my JPA application I had some code to set a named parameter of type
> com.vividsolutions.jts.geom.Geometry on a org.hibernate.Query (based
> on your help a while back
> http://hibernate-spatial.1140993.n2.nabble.com/Spatial-queries-using-JPA-td1141168.html 
> ). Here is what the old code looked like:
>
>                         String paramName = ...;
>                         com.vividsolutions.jts.geom.Geometry geometry
> = ...;
>                         org.hibernate.Query hibernateQuery =
> ((org.hibernate.ejb.QueryImpl)query).getHibernateQuery();
>                         org.hibernate.type.Type geometryType = new
> CustomType(GeometryUserType.class, (Properties)null);
>                         hibernateQuery.setParameter(paramName,
> geometry, geometryType);
>
> Due to API changes in hibernate-core 3.6.x I changed above code to:
>
>                         String paramName = ...;
>                         com.vividsolutions.jts.geom.Geometry geometry
> = ...;
>                         org.hibernate.Query hibernateQuery =
> ((org.hibernate.ejb.QueryImpl)query).getHibernateQuery();
>                         GeometryUserType gut = new GeometryUserType();
>                         gut.assemble(geometry, (Object)null);
>                         hibernateQuery.setParameter(paramName, gut);

Changes made in the last 3 lines below made the code work as before....

                         String paramName = ...;
                         com.vividsolutions.jts.geom.Geometry geometry =
...;
                         org.hibernate.Query hibernateQuery =
((org.hibernate.ejb.QueryImpl)query).getHibernateQuery();
                         GeometryUserType gut = new GeometryUserType();
                         gut.assemble(geometry, (Object)value);
                         org.hibernate.type.Type geometryType = new
CustomType(gut);
                         hibernateQuery.setParameter((String)key,
geometry, geometryType);



>
> Now my code built OK.
>
> However, at runtime when I do a query that uses above code to set the
> geometry named parameter I get:
>
> java.lang.ClassCastException: org.hibernatespatial.GeometryUserType
> cannot be cast to com.vividsolutions.jts.geom.Geometry
>         at
> org.hibernatespatial.AbstractDBGeometryType.nullSafeSet(AbstractDBGeometryType.java:152)
>         at
> org.hibernatespatial.GeometryUserType.nullSafeSet(GeometryUserType.java:201)
>         at org.hibernate.type.CustomType.nullSafeSet(CustomType.java:146)
>         at
> org.hibernate.param.NamedParameterSpecification.bind(NamedParameterSpecification.java:67)
>         at
> org.hibernate.loader.hql.QueryLoader.bindParameterValues(QueryLoader.java:571)
>         at
> org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1716)
>         at org.hibernate.loader.Loader.doQuery(Loader.java:801)
>         at
> org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
>         at org.hibernate.loader.Loader.doList(Loader.java:2533)
>         at
> org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
>         at org.hibernate.loader.Loader.list(Loader.java:2271)
>         at
> org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:452)
>         at
> org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
>         at
> org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
>         at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
>         at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
>         at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:246)
>
> What am I doing wrong?
>
>
> On 05/26/2011 04:25 PM, Karel Maesen wrote:
>> Hello all,
>>
>> I'm happy to announce the 1.1 release of Hibernate Spatial.
>>
>> The major improvements are:
>> - support for Hibernate 3.6.x
>> - Added Dwithin() and transform() HQL-functions
>> - added dwithin() and havingSRID() methods to SpatialRestrictions
>> - Added a SpatialDialect for MySQL InnoDB
>> ... and many more minor improvements and bugfixes.
>>
>> More information can be found at:
>> http://www.hibernatespatial.org/release_notes.html
>>
>> An interface change in Hibernate 3.6 broke Hibernate Spatial 1.0.
>> This release fixes that but has the consequence that it is compatible
>> only with Hibernate 3.6.x. If you must use a Hibernate version
>> between 3.2.x and  3.5.x, you are limited to using Hibernate Spatial
>> 1.0.
>>
>> The GeoDB (H2) provider is not yet ready, but will follow shortly
>> (probably before end of June).
>>
>> The next release will focus on integrating Hibernate Spatial more
>> closely with Hibernate 4.0 Core. Since Hibernate 4 will be very
>> different from Hibernate 3 and introduce many breaking changes, I
>> will take the opportunity to re-engineer some aspects of Hibernate
>> Spatial. Watch this space for more information.
>>
>> Regards,
>>
>> Karel Maesen
>> Geovise BVBA
>> _______________________________________________
>> hibernatespatial-users mailing list
>> [hidden email]
>> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users 
>>
>>
>
>


--
Regards,
Farrukh Najmi

Web: http://www.wellfleetsoftware.com


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