If you create an application with <application> <classDef><name> as "
CivilStatus" it will work fine, 
but if you use it to create a relationship with other application it will not compile. Use "
Civilstatus"
For example. "CivilStatus" works fine:
 1        <application>
 2            <classDef>
 3                <name>CivilStatus</name>
 4                <title>Estado Civil</title>
 5                <restrictBy>
 6                        <userId>false</userId>
 7                </restrictBy>
 8            </classDef>
 9            <fileDef>
10                <name>civilstatus</name>
11                <fields>
12                    <field>
13                        <name>civilStatusId</name>
14                        <title>CivilStatus PK Id</title>
15                        <type>
16                            <long>
17                                <length>5</length>
18                                <signed>false</signed>
19                                <nullable>false</nullable>
20                            </long>
21                        </type>
22                        <showFieldInView>false</showFieldInView>
23                    </field>                  
24                    <field>
25                        <name>cstDesc</name>
26                        <title>Description</title>
27                        <type>
28                            <varchar>
29                                <length>50</length>
30                                <order>true</order>
31                                <filter>true</filter>
32                            </varchar>
33                        </type>
34                        <showFieldInView>true</showFieldInView>
35                        <required>true</required>
36                    </field>
37                </fields>
38            </fileDef>
39        </application>
but, if you connect "CivilStatus" with other application XMLPortletFactory generates a code that doesn't compile:
 1
 2        <application>
 3            <classDef>
 4                <name>Person</name>
 5                <title>Person</title>
 6                <restrictBy>
 7                        <userId>false</userId>
 8                </restrictBy>
 9            </classDef>
10            <fileDef>
11                <name>person</name>
12                  <fields>
13                     [ .... ]
14
15                    <field>
16                        <name>civilStatusId</name>
17                        <title>Estado Civil</title>
18                        <type>
19                            <long>
20                                <length>5</length>
21                                <signed>false</signed>
22                                <nullable>true</nullable>
23                            </long>
24                        </type>
25                        <showFieldInView>true</showFieldInView>
26                        <required>false</required>
27                        <validation>
28                <className>[b]CivilStatus[/b]</className>
29                <fieldName>civilStatusIdId</fieldName>
30                <orderByField>cstDesc</orderByField>
31                        </validation>
32                    </field>
33                    
34                </fields>
35            </fileDef>
36        </application>
Remember: 
 wrong : CivilStatus
 correct: Civilstatus
Plus:
 You need a "double Id" here:
 <validation>
 <className>CivilStatus</className>
 <fieldName>
civilStatusIdId</fieldName>
 <orderByField>cstDesc</orderByField>
 </validation>
were the field name was 
civilStatusId