[postgis-users] RE: RE: RE: PostGIS - hibernate - EJB3

Norman Barker nbarker at ittvis.com
Tue Nov 7 05:48:52 PST 2006


-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
Sent: 07 November 2006 10:40
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] RE: RE: RE: PostGIS - hibernate - EJB3

Hi Norman (and others),

I have serveral questions/problems:

1. Can you point me where I can find your manual concerning PostGIS and
use of GeometryType ?

<ncb>Thanks to Markus this is now in SVN -
http://svn.refractions.net/postgis/trunk/java/ejb3/ in particular

2. In the thread here, people are using:
When I do the same, I get a "No suitable driver" exception.

For the moment I am using: 
<driver-class>org.postgresql.Driver</driver-class> and that seems to
for simple tests.

Is this important ? Maybe this is related with the errors I am getting
further the line.

<ncb>You need to use the driverwrapper class or register the geometry
types yourself; the tutorial has more details.  A sample datasource is

3. I wanted to use the GeometryType that is packed in PostGIS 1.1.5.
After generating the new JAR and replacing the old one by this one,
I start getting new exceptions:
The class org.postgis.PGbox3d does not implement

Any Idea what this means ??

<ncb>I don't know on this one, sorry.</ncb>

4. Now I put the old PostGIS back and make a very small JAR that
BinaryWriter and GeometryType, and also add it to the classpath. This is
what he sais now:
org.hibernate.MappingException: Could not determine type for:

My object looks like this:

	@Type(type = "org.postgis.hibernate.GeometryType")
	@Column(name="footprint", columnDefinition="Geometry")
	public Geometry getFootprint() {
		return footprint;
	public void setFootprint(Geometry footprint) {
		this.footprint = footprint;

And if I add 'import org.postgis.hibernate.GeometryType' to the object,
does not complain he does not know that import, so the GeometryType is
added to the project.

<ncb>this just means that it can't find the jar file on the classpath
for this type.  Please go through the tutorial and do contact me if you
have any problems - quite happy to go through the steps required to get
this running.

Watch this space for my catalog tutorial before the end of this month on
PostGIS, hibernate and Lucene!



Is there anyone who sees a light through this strange effects ?

thanks in advance,

Norman Barker-3 wrote:
> Hi,
> I have been a bit busy, but it is my intention to write a simple
> tutorial on EJB3 using the postgis geometry type, the functionality
> be simple but should get you started.  I know I said I would have it
> by last w/end so I will put it top on my priority list.
> Apologies for the delay, posting code with no instructions is bad!
> Norman 

View this message in context:
Sent from the PostGIS - User mailing list archive at Nabble.com.

postgis-users mailing list
postgis-users at postgis.refractions.net

More information about the postgis-users mailing list