<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR></HEAD>
<BODY style="FONT-SIZE: 9pt; MARGIN: 0px; FONT-FAMILY: Verdana" bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=718440814-14052007><FONT 
size=2>Shotka,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=718440814-14052007><FONT 
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=718440814-14052007><FONT size=2>Just noticed 
you are doing this</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=718440814-14052007>
<P align=left><FONT size=2>      
Class.forName("org.postgresql.Driver");</FONT></P>
<P align=left><FONT size=2>      String url = 
"jdbc:postgresql://localhost:5432/database"; conn = 
DriverManager.getConnection(url, "postgres", "");  </FONT></P>
<P align=left><FONT 
size=2><STRONG>     ((org.postgresql.jdbc2.Jdbc2Connection)conn).addDataType("Geometry","org.postgis.PGgeometry");<BR>     ((org.postgresql.jdbc2.Jdbc2Connection)conn)..addDataTy 
pe("box3d","org.postgis.PGbox3d");</STRONG></FONT></P>
<P align=left><FONT size=2>     Statement s = 
conn.createStatement();</FONT></P>
<P align=left><FONT size=2></FONT> </P>
<P align=left><SPAN class=718440814-14052007><FONT size=2>and I'm used to seeing 
people do this</FONT></SPAN></P>
<P align=left><SPAN class=718440814-14052007><FONT 
size=2></FONT></SPAN> </P><SPAN class=718440814-14052007>
<P align=left>      
Class.forName("org.postgresql.Driver");</P>
<P align=left>      String url = 
"jdbc:postgresql://localhost:5432/database"; conn = 
DriverManager.getConnection(url, "postgres", "");  </P>
<P 
align=left> <STRONG>    ((org.postgresql.PGConnection)<SPAN 
class=718440814-14052007> </SPAN>conn).addDataType("<SPAN 
class=718440814-14052007>g</SPAN>eometry",org.postgis.PGgeometry<SPAN 
class=718440814-14052007>.class</SPAN>);<BR>     ((org.postgresql.PGConnection)<SPAN 
class=718440814-14052007> </SPAN>conn).addDataTy 
pe("box3d",org.postgis.PGbox3d<SPAN 
class=718440814-14052007>.class</SPAN>);</STRONG></P>
<P align=left><FONT size=2>     Statement s = 
conn.createStatement();</FONT></P>
<P align=left><FONT size=2></FONT> </P>
<P align=left><SPAN class=718440814-14052007><FONT size=2>or 
this</FONT></SPAN></P>
<P align=left><SPAN class=718440814-14052007><FONT 
size=2> <STRONG>    ((org.postgresql.Connection)<SPAN 
class=718440814-14052007> 
</SPAN>conn).addDataType("geometry",org.postgis.PGgeometry<SPAN 
class=718440814-14052007>.class</SPAN>);<BR>     ((org.postgresql.Connection)<SPAN 
class=718440814-14052007> </SPAN>conn).addDataTy 
pe("box3d",org.postgis.PGbox3d<SPAN 
class=718440814-14052007>.class</SPAN>);</STRONG></FONT></SPAN></P>
<P align=left><SPAN class=718440814-14052007><FONT size=2>or this (with or 
without the PGConnection)</FONT></SPAN></P>
<P align=left><SPAN class=718440814-14052007><FONT 
size=2>    <SPAN class=718440814-14052007><FONT 
size=2><STRONG>((org.postgresql.Connection)<SPAN class=718440814-14052007> 
</SPAN>conn).addDataType("geometry","org.postgis.PGgeometry<SPAN 
class=718440814-14052007>"</SPAN>);<BR>     ((org.postgresql.Connection)<SPAN 
class=718440814-14052007> </SPAN>conn).addDataTy 
pe("box3d","org.postgis.PGbox3d<SPAN 
class=718440814-14052007>"</SPAN>);</STRONG></FONT></SPAN></FONT></SPAN></P>
<P align=left><SPAN class=718440814-14052007><FONT size=2>I'm really not sure 
the difference between all of them except I assume it depends on 
the postgresql driver version and maybe your approach is newer or 
older.  Have you tried the other ways?</FONT></SPAN></P>
<P align=left><SPAN class=718440814-14052007><FONT size=2>Also you have the 
geometry case for addType in upper case, where as it is normally written in 
lower case.  I'm not sure what sorts of problems that may or may not 
cause.</FONT></SPAN></P>
<P align=left><SPAN class=718440814-14052007><FONT 
size=2></FONT></SPAN> </P>
<P align=left><SPAN class=718440814-14052007><FONT size=2>Also if you do 
something like</FONT></SPAN></P>
<P align=left><SPAN class=718440814-14052007><FONT 
size=2>out.println(r.getObject(1).getClass().getName());</FONT></SPAN></P>
<P align=left><SPAN class=718440814-14052007><FONT 
size=2></FONT></SPAN> </P>
<P align=left><SPAN class=718440814-14052007><FONT size=2>What do you 
get?</FONT></SPAN></P>
<P align=left><SPAN class=718440814-14052007><FONT size=2>Hope that 
helps,</FONT></SPAN></P>
<P align=left><SPAN class=718440814-14052007><FONT 
size=2>Regina</FONT></SPAN></P></SPAN></SPAN><SPAN 
class=718440814-14052007></DIV></SPAN><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> 
postgis-users-bounces@postgis.refractions.net 
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of 
</B>shojka@web.de<BR><B>Sent:</B> Monday, May 14, 2007 6:14 AM<BR><B>To:</B> 
postgis-users@postgis.refractions.net<BR><B>Subject:</B> [postgis-users] Re: 
Buffering with JDBC<BR></FONT><BR></DIV>
<DIV></DIV>Thank you for your answers. I have POSTGRESQL version 8.1. All 
proposed changes did not work. As a result I get an exception caused 
by unknown type (this should be geometry) regardless if I use buffer 
or any other function. I would be very gateful if someone 
could give me more ideas how to solve this problem. <BR><BR>
<TABLE cellSpacing=0 cellPadding=0 border=0>
  <TBODY>
  <TR>
    <TD bgColor=#000000><IMG height=1 alt="" src="https://img.web.de/p.gif" 
      width=1 border=0 NOSEND="1"></TD></TR>
  <TR>
    <TD style="FONT-SIZE: 12px; LINE-HEIGHT: 17px; FONT-FAMILY: verdana">Der 
      WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu 
      sparen!   <BR><A 
      href="http://smartsurfer.web.de/?mc=100071&distributionid=000000000066"><B>http://smartsurfer.web.de/?mc=100071&d 
      istributionid=000000000066</B></A>  </TD></TR></TBODY></TABLE></BODY></HTML>

<HTML><BODY><P><hr size=1></P>
<P><STRONG>
The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer.
</STRONG></P></BODY></HTML>