<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Thanks a lot for your help.<br><br>Regards<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Norman Barker <nbarker@ittvis.com><br>To: PostGIS Users Discussion <postgis-users@postgis.refractions.net><br>Sent: Friday, April 13, 2007 7:02:58 PM<br>Subject: RE: [postgis-users] RE: RE: RE: PostGIS - hibernate (new postgis.jar)<br><br><div>Hi,<br><br>Yes you should change the dialect type in persistence.xml to<br>PostGISDialect and include the java class in your archive.<br><br>It should then be possible to make spatial object queries e.g.<br><br>Query intersects = entityManager.createQuery("Select<br>spatial.Intersects(p.location, person.location) from
 PersonEntity p,<br>PersonEntity as person where person = :person");<br><br>intersects.setParameter("person", p);<br><br>then executing this query will return populated people objects who are<br>within the same area.<br><br>Norman<br><br><br>-----Original Message-----<br>From: postgis-users-bounces@postgis.refractions.net<br>[mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of<br>rabbiaqaswar<br>Sent: 13 April 2007 02:36<br>To: postgis-users@postgis.refractions.net<br>Subject: [postgis-users] RE: RE: RE: PostGIS - hibernate (new<br>postgis.jar)<br><br><br>Thanks a lot for your help. Earlier i just had the postgresql jdbc<br>driver &<br>postgis.jar in my class path. In my entity bean POJO i did what was<br>mentioned in the ejb3spatial.pdf and included the package containing<br>your<br>GeometryType.java (user type) in my project. In the persistence.xml file<br>i<br>set the hibernate.dialect as org.hibernate.dialect.PostgreSQLDialect and<br>my<br>program was
 able to retrieve the data from the tables containing<br>geographical information.<br><br>So far things are good :) now should i add PostGISDialect in my<br>persistence.xml instead of org.hibernate.dialect.PostgreSQLDialect and<br>do i<br>have to include its java file with the GeometryType in my project? I am<br>a<br>complete newbie with geographical information related work so please<br>don't<br>mind my questions.<br><br>Many Thanks<br><br><br>Norman Barker-3 wrote:<br>> <br>> Hi,<br>> <br>> I appreciate your confusion it took me a while to work out what was<br>> going on (I don't have commit access :-( )<br>> <br>> The dialect has been put in its own folder called hibernate at <br>> <a target="_blank" href="http://svn.refractions.net/postgis/trunk/java/">http://svn.refractions.net/postgis/trunk/java/</a><br>> <br>> you will also need the user type from the ejb3 folder.  Really they<br>> should be together, my fault I should have
 communicated this better to<br>> Markus.<br>> <br>> Let me know I can be of help.<br>> <br>> Thanks,<br>> <br>> Norman<br>> <br>> -----Original Message-----<br>> From: postgis-users-bounces@postgis.refractions.net<br>> [mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of<br>> rabbiaqaswar<br>> Sent: 11 April 2007 23:38<br>> To: postgis-users@postgis.refractions.net<br>> Subject: [postgis-users] RE: RE: PostGIS - hibernate (new postgis.jar)<br>> <br>> <br>> Hello<br>> <br>> Thanks for your reply. I found this <br>> <a target="_blank" href="http://svn.refractions.net/postgis/trunk/java/ejb3/">http://svn.refractions.net/postgis/trunk/java/ejb3/</a> svn link  from<br>your<br>> earlier posts in this topic, which has that ejb3spatial.pdf file. Can<br>> you<br>> please tell me which svn link has the latest information.<br>> <br>> Many Thanks<br>> <br>> <br>> <br>>
 Norman Barker-3 wrote:<br>>> <br>>> Hi,<br>>> <br>>> There has been a lot of activity with the hibernate postgis driver,<br>> just<br>>> everyone thinks it isn't of interest to the list and mail me<br>> directly!!<br>>> (I have no problem with this). <br>>> <br>>> The major update is the spatial dialect for ejb3 (hibernate) allowing<br>>> you to make spatial queries in object space, e.g. select obj from<br>>> mytable where spatial.within(obj.box, ...) <br>>> <br>>> The code is in SVN, but I don't believe it is in postgis.jar, it is<br>>> heavily dependent on the JDBC driver and hibernate for its<br>>> functionality.<br>>> <br>>> Thanks,<br>>> <br>>> Norman<br>>> <br>>> -----Original Message-----<br>>> From: postgis-users-bounces@postgis.refractions.net<br>>> [mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of<br>>>
 rabbiaqaswar<br>>> Sent: 10 April 2007 13:29<br>>> To: postgis-users@postgis.refractions.net<br>>> Subject: [postgis-users] RE: PostGIS - hibernate (new postgis.jar)<br>>> <br>>> <br>>> Thankyou all for the support.<br>>> <br>>> I  am using EJB3 with PostgreSQL & JBoss. Read through the tutorial<br>on<br>>> svn<br>>> by Norman Barker. I compiled the GeometryType java file in<br>>> org.postgis.hibernate and included the org.postgis.hibernate package<br>> in<br>>> my<br>>> classpath and the whole thing worked.<br>>> <br>>> Since the last post on this forum was in November 2006, i wanted to<br>> know<br>>> that is there any change in the method to handle gis data from<br>>> postgresql<br>>> tables using ejb3 architecture? Is the GeometryType class by Norman<br>>> included<br>>> in the latest release of postgis.jar or should it be
 included<br>> seperately<br>>> like i mentioned above?<br>>> <br>>> Thanks again<br>>> <br>>> <br>>> Norman Barker-3 wrote:<br>>>> <br>>>> <br>>>> I think I missed the start of this thread (and I can't find it in<br>the<br>>>> archives), can you summarize the problem, and the server you are<br>>> using?<br>>>> <br>>>> <br>>>> The GeometryUserType class doesn't do very much but call out to the<br>>>> utility functions provided in the postgis jar, so it does sound like<br>> a<br>>>> classpath issue.<br>>>> <br>>>> If you can send me a summary I will try to recreate the problem.  (I<br>>>> have both tomcat and jboss set up here).<br>>>> <br>>>> If the attachment is large please send it to<br>>> norman.barker<at>gmail.com<br>>>> <br>>>> Thanks,<br>>>>
 <br>>>> Norman<br>>>> <br>>>> -----Original Message-----<br>>>> From: postgis-users-bounces@postgis.refractions.net<br>>>> [mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of<br>>> Jan<br>>>> Syryn<br>>>> Sent: 27 November 2006 16:39<br>>>> To: 'PostGIS Users Discussion'<br>>>> Subject: RE: [postgis-users] PostGIS - hibernate (new postgis.jar)<br>>>> <br>>>> ***********************<br>>>> Warning: Your file, postgis2.jar, contains more than 32 files after<br>>>> decompression and cannot be scanned.<br>>>> ***********-***********<br>>>> <br>>>> <br>>>> Hi Markus,<br>>>> <br>>>> The thing I did to be able to continue is I have created a<br>>>> postgis_addon.jar<br>>>> lib that contained only new stuff like BinaryWriter.class and<br>>>>
 GeometryUserType.<br>>>> And that works. It does not solve the problem, though I can use the<br>>>> latest<br>>>> version of postgis.<br>>>> <br>>>> I tried to use the tip I found in my previous posting by changing<br>the<br>>>> name<br>>>> of the postgresql-jdbc.jar drvier to pg-jdbc.jar driver with my new<br>>>> build<br>>>> postgis2.jar (version 1.1.5)<br>>>> I did not help.  <br>>>> If I remove the 2 stub files (PGConnection and Connection) from<br>>>> postgis2.jar<br>>>> : same result.<br>>>> It stucks again on "No suitable driver".<br>>>> If I replace the postgis2.jar by postgis.jar(1.1.0) and<br>>>> postgis_addon.jar by<br>>>> changing the settings on the classpath, everything works again.<br>>>> <br>>>> So, I assume there is a thing in postgis2.jar.<br>>>> And to create my
 postgis2.jar, I made a separate project in Eclipse,<br>>>> created<br>>>> a jar file of almost all java files(exl examples). This should do<br>it,<br>>> no<br>>>> ?<br>>>> <br>>>> Anyway, I included my postgis2.jar so maybe one can replace his one<br>>> with<br>>>> mine and see what that does.<br>>>> Or maybe one sees what I am doing wrong elsewhere...<br>>>> <br>>>> TIA,<br>>>> Jan<br>>>> <br>>>> -----Original Message-----<br>>>> From: postgis-users-bounces@postgis.refractions.net<br>>>> [mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of<br>>>> Markus<br>>>> Schaber<br>>>> Sent: samedi 25 novembre 2006 10:16<br>>>> To: PostGIS Users Discussion<br>>>> Subject: Re: [postgis-users] RE: RE: RE: PostGIS - hibernate - EJB3<br>>>> <br>>>> Hi,<br>>>>
 <br>>>> Norman Barker wrote:<br>>>> <br>>>>> 2. In the thread here, people are using:<br>>>>> <driver-class>org.postgis.DriverWrapper</driver-class><br>>>>> When I do the same, I get a "No suitable driver" exception.<br>>>> <br>>>> [...]<br>>>>> 3. I wanted to use the GeometryType that is packed in PostGIS<br>1.1.5.<br>>>>> After generating the new JAR and replacing the old one by this one,<br>> I<br>>> <br>>>>> start getting new exceptions:<br>>>>> The class org.postgis.PGbox3d does not implement <br>>>>> org.postgresql.util.PGobject.<br>>>> <br>>>> Those 2 things look like a classpath/classloader problem.<br>>>> <br>>>> You have to make sure that the postgis.jar and the<br>> postgresql-jdbc.jar<br>>>> are<br>>>> available via the same classloader (and that you
 don't have two<br>>>> incarnations<br>>>> of them in your classpath)<br>>>> <br>>>> <br>>>> HTH,<br>>>> Markus<br>>>> <br>>>> <br>>>> --<br>>>> Markus Schaber | Logical Tracking&Tracing International AG<br>>>> Dipl. Inf.     | Software Development GIS<br>>>> <br>>>> Fight against software patents in Europe! <a target="_blank" href="http://www.ffii.org">www.ffii.org</a><br>>>> <a target="_blank" href="http://www.nosoftwarepatents.org">www.nosoftwarepatents.org</a><br>>>> _______________________________________________<br>>>> postgis-users mailing list<br>>>> postgis-users@postgis.refractions.net<br>>>> <a target="_blank" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>>>> <br>>>>
 _______________________________________________<br>>>> postgis-users mailing list<br>>>> postgis-users@postgis.refractions.net<br>>>> <a target="_blank" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>>>> <br>>>> <br>>> <br>>> -- <br>>> View this message in context:<br>>><br>><br><a target="_blank" href="http://www.nabble.com/PostGIS---hibernate---EJB3-tf2064211.html#a9926716">http://www.nabble.com/PostGIS---hibernate---EJB3-tf2064211.html#a9926716</a><br>>> Sent from the PostGIS - User mailing list archive at Nabble.com.<br>>> <br>>> _______________________________________________<br>>> postgis-users mailing list<br>>> postgis-users@postgis.refractions.net<br>>> <a target="_blank"
 href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>>> _______________________________________________<br>>> postgis-users mailing list<br>>> postgis-users@postgis.refractions.net<br>>> <a target="_blank" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>>> <br>>> <br>> <br>> -- <br>> View this message in context:<br>><br><a target="_blank" href="http://www.nabble.com/PostGIS---hibernate---EJB3-tf2064211.html#a9953356">http://www.nabble.com/PostGIS---hibernate---EJB3-tf2064211.html#a9953356</a><br>> Sent from the PostGIS - User mailing list archive at Nabble.com.<br>> <br>> _______________________________________________<br>> postgis-users mailing list<br>> postgis-users@postgis.refractions.net<br>> <a target="_blank"
 href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>> _______________________________________________<br>> postgis-users mailing list<br>> postgis-users@postgis.refractions.net<br>> <a target="_blank" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>> <br>> <br><br>-- <br>View this message in context:<br><a target="_blank" href="http://www.nabble.com/PostGIS---hibernate---EJB3-tf2064211.html#a9974998">http://www.nabble.com/PostGIS---hibernate---EJB3-tf2064211.html#a9974998</a><br>Sent from the PostGIS - User mailing list archive at Nabble.com.<br><br>_______________________________________________<br>postgis-users mailing list<br>postgis-users@postgis.refractions.net<br><a target="_blank"
 href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>_______________________________________________<br>postgis-users mailing list<br>postgis-users@postgis.refractions.net<br><a target="_blank" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br></div></div><br></div></div><br>



      <hr size=1>Ahhh...imagining that irresistible "new car" smell?<br> Check out
<a href="http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM-">new cars at Yahoo! Autos.</a>
</body></html>