Hi Farrukh,
The hibernate-spatial-postgis provider doesn't seem to have been
loaded. Normally Hibernate outputs a lot of log information. Could
you send me the log?
Can you also verify that you have declared a spatial dialect in the
Hibernate configuration file? Could you also try with Hibernate 3.2.
I haven't tested with Hibernate 3.3 yet, and it could be they changed
the way UserTypes are initialised.
Regards,
Karel Maesen
On 08 Aug 2008, at 20:12, Mirza Farrukh wrote:
> Hi all,
>
> I am using PostgreSQL 8.3.3, postgis 1.3.3, java 6, uDig, hibernate
> 3.3, hibernatespatial-1.0-M1 with following jar files
>
> hibernate-spatial-1.0-M1.jar
> hibernate-spatial-postgis-1.0-M1.jar
> postgis_1.4.0.jar
> postgresql-8.3-603.jdbc4.jar (Since using jdk6, as per postgresql
> instructions)
> jdk1.6
>
> I have followed the hibernate spatial tutorial and the problem i am
> facing here is that i am getting a null pointer exception from
> GeometryUserType.java at line 214 in method sqlTypes() when my
> application connects with Postgresql/Postgis database and tries to
> create tables.
>
>
> If I do not specify the GeometryUserType column then the tables are
> created perfectly.
>
> Hope to get a reply soon.
>
> Regards,
>
> Farrukh.
>
>
> P.S.> Selected Stack trace is below:
>
>
> java.lang.NullPointerException
>
> at org.hibernatespatial.GeometryUserType.sqlTypes
> (GeometryUserType.java:214)
>
> at org.hibernate.type.CustomType.<init>(CustomType.java:54)
>
> at org.hibernate.type.TypeFactory.heuristicType(TypeFactory.java:183)
>
> at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:214)
>
> at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:207)
>
> at org.hibernate.mapping.Property.isValid(Property.java:174)
>
> at org.hibernate.mapping.PersistentClass.validate
> (PersistentClass.java:308)
>
> at org.hibernate.mapping.RootClass.validate(RootClass.java:186)
>
> at org.hibernate.cfg.Configuration.validate(Configuration.java:814)
> at org.hibernate.cfg.Configuration.buildSessionFactory
> (Configuration.java:1037)
> ....
>
>
>
> _______________________________________________
> 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