Hi

I managed to solve it. The  column: profile_id 

Is a primary key in a table, and my datastorage defintion was like this:
 <sourceDataStores>
                <DataStore>
                        <id>datastore</id>
                        <parameters>
                       
<Parameter><name>dbtype</name><value>postgisng</value></Parameter>
                       <REMOVED>
                        </parameters>
                </DataStore>
        </sourceDataStores>

The expose primary key was missing and therefore the default was:false 
(no profile_id ) therefore the strConcat couldnt work without the input
column


So:
<Parameter><name>Expose primary keys</name><value>true</value></Parameter>


J.
On 28-10-15 09:56, Jorge Samuel Mendes de Jesus wrote:
> Hi to all
>
>
> I am trying to set a WFS with complex Features, I am running the
> app-schema on a postgis 9.3 using geoverser 2.7.3
> (postgresql-8.4-701.jdbc3.jar)
>
> I am accessing a table and want to use a concatenate string function
> to generate the gmlD example:
>
>  <FeatureTypeMapping>
>                         <sourceDataStore>datastore</sourceDataStore>
>                         <sourceType>soil</sourceType>
>                         <targetElement>soil:SO_Soil</targetElement>
>                         <attributeMappings>
>                                 <AttributeMapping>
>                                        
> <targetAttribute>soil:SO_Soil</targetAttribute>
>                                         <idExpression>
>                                       *     <OCQL>strConcat('so_' ,
> profile_id)</OCQL>*
>                                         </idExpression>
>                                 </AttributeMapping>
>                         </attributeMappings>
>                 </FeatureTypeMapping>
>
> And I get the following error:
>
> java.lang.IllegalArgumentException: Filter Function problem for
> function strConcat argument #1 - expected type String
> Filter Function problem for function strConcat argument #1 - expected
> type String
>
> 0) profile_id is the column name in table soil
> 1) I saw some examples with strCon*C*at instead of strCon*c*at, but it
> seems that there is no difference
> 2) OK, the profile_id needs to be a string, I have change the column
> datatype in the DB from integer to text, and had the same error, and
> now to character varying(10) and stll the same error
> 3) Have you tried to turn geoserver/postgis off and on??? Yes I have
> done it
>
>
> Any suggestion of what might be wrong? Do I need to cast profile_id to
> string type ???
>
> Thank you
>
>
>  
> -- 
> ISRIC - World Soil Information 
> Post: PO box 353, 6700 AJ, Wageningen,
> The Netherlands Visiting Address: Droevendaalsesteeg 3, 6708 PB
> Wageningen (Bdg. 101), 
> Office: C.013 
> Office Phone: +31 (0) 317 4 83715
> Mobile Phone: +31 (0) 613 9 06950
> Skype: jorge.de.jesus (Jorge Samuel Mendes de Jesus) 
> OpenPGPKey: 0xA3D0065A

-- 
ISRIC - World Soil Information 
Post: PO box 353, 6700 AJ, Wageningen,
The Netherlands Visiting Address: Droevendaalsesteeg 3, 6708 PB
Wageningen (Bdg. 101), 
Office: C.013 
Office Phone: +31 (0) 317 4 83715
Mobile Phone: +31 (0) 613 9 06950
Skype: jorge.de.jesus (Jorge Samuel Mendes de Jesus) 
OpenPGPKey: 0xA3D0065A

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to