[Geoserver-devel] conenction params update -> fixed

Okay so I have an "answer" as it were:

Instrumenting the DataStore Form and Action gives me this...

form connection params { user="postgis_ro", passwd="postgis_ro", host="feathers.leeds.ac.uk", port=5432, database="postgis_test", dbtype="postgis"}
temporary datastore:org.geotools.data.postgis.PostgisDataStore@anonymised.com
typeNames : ("esridata_country", "river", "road", "testset")

So I am convinced that out params as specified actually work.

When I instrument - DataConfig.getFeatureTypeIdentifiers I find the real problem:

Could not use postgis datastore was unavailable!
java.lang.NullPointerException
    at org.vfny.geoserver.config.DataConfig.getFeatureTypeIdentifiers(DataConfig.java:680)
    at org.vfny.geoserver.form.data.DataFeatureTypesNewForm.getNewFeatureTypes(DataFeatureTypesNewForm.java:35)

So the DataConfig we created cannot create a DataStore...

public DataStore findDataStore(ServletContext sc) throws IOException {
       return DataStoreUtils.aquireDataStore(connectionParams,sc);

where aquireDataStore fixes url entries to be relative - so we don't trip up on shapefiles

So we can go back to DataDataStoresEditorAction where:
    config.setConnectionParams(paramTexts);

And change it to save the real connectionParams (with real URL/Integer values rather than Strings) and mask the problem.

But lets dig further.

This should not really be needed as the Params are supposed to have enough smarts to up convert text representations to the appropriate values.
So this could be a lack on the postgis datastore part ....

And there we have it -
the postgis can process is the param map directly ...

if (!(((value = params.get(arrayParameters[i].key)) != null)
                        && (arrayParameters[i].type.isInstance(value)))) {
                    if (arrayParameters[i].required) {
                        return (false);
                    }
                }

Where the actuall create statement uses lookUp which does the up convert thing.

String host = (String) HOST.lookUp(params);
      String user = (String) USER.lookUp(params);
        String passwd = (String) PASSWD.lookUp(params);
        Integer port = (Integer) PORT.lookUp(params);
        String database = (String) DATABASE.lookUp(params);
        String namespace = (String) NAMESPACE.lookUp(params);

From MAILER-DAEMON Fri Jun 18 23:12:46 2004
From: MAILER-DAEMON@anonymised.com
To: geoserver-devel@lists.sourceforge.net
Message-ID: <E1BbZ5p-0000lt-E0@anonymised.com>
X-Spam-Score: 0.8 (/)
X-Spam-Report: Spam Filtering performed by sourceforge.net.
  See Apache SpamAssassin: Welcome for more details.
  Report problems to SourceForge.net Legacy Resources download | SourceForge.net
  0.3 NO_REAL_NAME From: does not include a real name
  0.0 SF_CHICKENPOX_SLASH BODY: Text interparsed with /
  0.0 SF_CHICKENPOX_MINUS BODY: Text interparsed with -
  0.0 SF_CHICKENPOX_AT BODY: Text interparsed with @
  0.0 SF_CHICKENPOX_PARATHESES_OPEN BODY: Text interparsed with (
  0.0 SF_CHICKENPOX_PERIOD BODY: Text interparsed with .
  0.0 SF_CHICKENPOX_UNDERSCORE BODY: Text interparsed with _
  0.0 SF_CHICKENPOX_PLUS BODY: Text interparsed with +
  0.5 FORGED_YAHOO_RCVD 'From' yahoo.com does not match 'Received' headers
Subject: [Geoserver-devel] failure delivery
Sender: geoserver-devel-admin@lists.sourceforge.net
Errors-To: geoserver-devel-admin@lists.sourceforge.net
X-BeenThere: geoserver-devel@lists.sourceforge.net
X-Mailman-Version: 2.0.9-sf.net
Precedence: bulk
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/geoserver-devel&gt;,
  <mailto:geoserver-devel-request@lists.sourceforge.net?subject=unsubscribe>
List-Id: Geoserver Developers' List <geoserver-devel.lists.sourceforge.net>
List-Post: <mailto:geoserver-devel@lists.sourceforge.net>
List-Help: <mailto:geoserver-devel-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/geoserver-devel&gt;,
  <mailto:geoserver-devel-request@lists.sourceforge.net?subject=subscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum=geoserver-devel&gt;
Date: Fri Jun 18 23:13:08 2004
X-Original-Date: 19 Jun 2004 06:12:39 -0000
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Message from yahoo.com.
Unable to deliver message to the following address(es).

<yahoomail-support@anonymised.com>:
216.145.48.33 failed after I sent the message.
Remote host said: 554 5.6.1 Certain attachments are not allowed for security reasons.Your message has been rejected.

--- Original message follows.

Return-Path: <geoserver-devel@lists.sourceforge.net>

The original message is over 5k. Message truncated to 1K.

Delivered-To: yahoo.com-mailbot@anonymised.com
X-Rocket-Spam: 61.0.35.150
X-YahooFilteredBulk: 61.0.35.150
X-Rocket-Track: 232268: 20 ; SERVER=216.155.197.132
X-Originating-IP: [61.0.35.150]
Return-Path: <geoserver-devel@lists.sourceforge.net>
Received: from 61.0.35.150 (EHLO yahoo.com) (61.0.35.150)
  by mta148.mail.dcn.yahoo.com with SMTP; Fri, 18 Jun 2004 23:12:14 -0700
From: geoserver-devel@lists.sourceforge.net
To: mailbot@anonymised.com
Subject: Re: Your text
Date: Fri, 20 Jun 2014 12:10:14 +0530
MIME-Version: 1.0
Content-Type: multipart/mixed;
  boundary="----=_NextPart_000_0011_00006D09.0000129F"
X-Priority: 3
X-MSMail-Priority: Normal

This is a multi-part message in MIME format.

------=_NextPart_000_0011_00006D09.0000129F
Content-Type: text/plain;
  charset="Windows-1252"
Content-Transfer-Encoding: 7bit

Here is the file.

------=_NextPart_000_0011_00006D09.0000129F
Content-Type: application/octet-stream;
  name="your_text.pif"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
  filename="your_text.pif"

TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAuAAAAKvnXsbvhjCV74Ywle+GMJVsmj6V44Yw
*** MESSAGE TRUNCATED ***