Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[no subject]

=20

It seems that this file extends AbstractDataStoreServiceExtension and
AbstractDataStoreServiceExtension has a static method
getFactory(),PostgisServiceExtension2 overrides this static function.
However, when  PostgisServiceExtension2 calls
super.reasonForFailure(Map<String, Serializable> params ) that function
calls a protected method getDataStoreFactory() all this method does is
call the static method getFactory() however since getDataStoreFactory()
is not overridden by PostgisServiceExtension2,
AbstractDataStoreServiceExtension's getFactory() gets called instead of
PostgisServiceExtension2s.

=20

I would recommend that
AbstractDataStoreServiceExtension.getDataStoreFactory() be made abstract
to force this method to be overridden. This would of course require
changes to the db2, mysql, and oracle plug-ins. Or to lose the static
modifier on getFactory()  which would also require changing those
plug-ins.

=20

I would be willing to make either change.=20

=20

Please forgive me if this has already been addressed and I just missed
it.

=20

=20

Justin Lynch

=20

-------

The information contained in this message may be company sensitive and
is for the intended addressee only. Any unauthorized use, dissemination
of the information, or copying of this message is prohibited. If you are
not the intended addressee, please notify the sender immediately and
delete this message.

--------

=20

=20


------_=_NextPart_001_01C8E2BE.28A59060
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml"; =
xmlns=3D"http://www.w3.org/TR/REC-html40";>

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal>Hello everyone. I have been working with udig trunk =
and
recently noticed that trunk could not import from a PostGIS database. I =
have
tracked down the problem to net.refractions.udig.catalog.postgis/src/ =
net/refractions/udig/catalog/PostgisServiceExtension2.java
<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>Long story short add:<o:p></o:p></p>

<p class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp; </span><span
style=3D'font-size:10.0pt;font-family:"Courier =
New";color:#646464'>@Override</span><span
style=3D'font-size:10.0pt;font-family:"Courier New";color:black'> =
</span><b><span
style=3D'font-size:10.0pt;font-family:"Courier =
New";color:#7F0055'>protected</span></b><span
style=3D'font-size:10.0pt;font-family:"Courier New";color:black'>
DataStoreFactorySpi getDataStoreFactory() {</span><span =
style=3D'font-size:10.0pt;
font-family:"Courier New"'><o:p></o:p></span></p>

<p class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;
font-family:"Courier =
New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><span style=3D'font-size:10.0pt;font-family:"Courier =
New";color:#7F0055'>return</span></b><span
style=3D'font-size:10.0pt;font-family:"Courier New";color:black'> =
<i>getFactory</i>();</span><span
style=3D'font-size:10.0pt;font-family:"Courier =
New"'><o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp; };</span> <o:p></o:p></p>

<p class=3DMsoNormal>To PostgisServiceExtension2.java and it will be =
fixed, well
the PostGIS db will show up in the Catalog and it will list all of the =
tables.
When dragged on to the map it threw exceptions but it still rendered. =
&nbsp;Those
exceptions did not seem to be related to this change.<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>The long story:<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>It seems that this file extends =
AbstractDataStoreServiceExtension
and AbstractDataStoreServiceExtension has a static method =
getFactory(),PostgisServiceExtension2
overrides this static function. However, when =
&nbsp;PostgisServiceExtension2
calls super.reasonForFailure(Map&lt;String, Serializable&gt; params ) =
that
function calls a protected method getDataStoreFactory() all this method =
does is
call the static method getFactory() however since getDataStoreFactory() =
is not overridden
by PostgisServiceExtension2, AbstractDataStoreServiceExtension&#8217;s
getFactory() gets called instead of =
PostgisServiceExtension2s.<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>I would recommend that =
AbstractDataStoreServiceExtension.getDataStoreFactory()
be made abstract to force this method to be overridden. This would of =
course
require changes to the db2, mysql, and oracle plug-ins. Or to lose the =
static
modifier on getFactory() &nbsp;which would also require changing those =
plug-ins.<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>I would be willing to make either change. =
<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>Please forgive me if this has already been =
addressed and I
just missed it.<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>Justin Lynch<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><span
style=3D'font-family:"Arial","sans-serif"'>-------<o:p></o:p></span></p>

<p class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><span
style=3D'font-size:8.0pt;font-family:"Arial","sans-serif";color:black'>Th=
e information
contained in this message may be company sensitive and is for the =
intended
addressee only. Any unauthorized use, dissemination of the information, =
or
copying of this message is prohibited. If you are not the intended =
addressee,
please notify the sender immediately and delete this =
message.<o:p></o:p></span></p>

<p class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><span
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>-=
-------<o:p></o:p></span></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>

------_=_NextPart_001_01C8E2BE.28A59060--


Back to the top