title: Create Java classes with JaxB
body: <p>I tried to create Java classes with JaXB from this XSD <a href="http://pda.rosreestr.ru/upload/www/files/02_V04_STD_Region_Cadastr_KV.rar" rel="nofollow noreferrer">http://pda.rosreestr.ru/upload/www/files/02_V04_STD_Region_Cadastr_KV.rar</a> but got these errors.</p>
  <pre><code>parsing a schema...
  [WARNING] Simple type &quot;dAllDocuments&quot; was not mapped to Enum due to EnumMemberSizeCap limit. Facets count: 298, current limit: 256. You can use customization attribute &quot;typesafeEnumMaxMembers&quot; to extend the limit.
  line 3 of file:/D:/liferay-develop/workspace/JABX_test/src/02_V04_STD_Region_Cadastr_KV/dAllDocuments.xsd
  
  compiling a schema...
  [ERROR] Two declarations cause a collision in the ObjectFactory class.
  line 1645 of file:/D:/liferay-develop/workspace/JABX_test/src/02_V04_STD_Region_Cadastr_KV/STD_Region_Cadastr_KV.xsd
  
  [ERROR] (Related to above error) This is the other declaration.   
  line 1587 of file:/D:/liferay-develop/workspace/JABX_test/src/02_V04_STD_Region_Cadastr_KV/STD_Region_Cadastr_KV.xsd
  
  Failed to produce code.
  </code></pre>
  <p>When I work with another schemas everything is fine. I am not good in work with XML, can you tell me what these errors mean and how to solve it?</p>
  <p><strong>UPDATE</strong></p>
  <p>I tried to use binding.xml in class generation but got this error.</p>
  <pre><code>C:\Documents and Settings\kliver\Мои документы\Загрузки\jaxb-ri-2.2.6\bin&gt;xjc -d
  out -b binding.xml D:/liferay-develop/workspace/JABX_test/src/02_V04_STD_Region
  _Cadastr_KV/STD_Region_Cadastr_KV.xsd
  parsing a schema...
  [ERROR] &quot;D:/liferay-develop/workspace/JABX_test/src/02_V04_STD_Region_Cadastr_KV
  /STD_Region_Cadastr_KV.xsd&quot; is not a part of this compilation. Is this a mistake
   for &quot;file:/D:/liferay-develop/workspace/JABX_test/src/02_V04_STD_Region_Cadastr
  _KV/STD_Region_Cadastr_KV.xsd&quot;?
   line 6 of file:/C:/Documents%20and%20Settings/kliver/%D0%9C%D0%BE%D0%B8%20%D0%
  B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D1%8B/%D0%97%D0%B0%D0%B3%D1%80%D1%8
  3%D0%B7%D0%BA%D0%B8/jaxb-ri-2.2.6/bin/binding.xml
  
  [WARNING] Simple type &quot;dAllDocuments&quot; was not mapped to Enum due to EnumMemberSi
  zeCap limit. Facets count: 298, current limit: 256. You can use customization at
  tribute &quot;typesafeEnumMaxMembers&quot; to extend the limit.
   line 3 of file:/D:/liferay-develop/workspace/JABX_test/src/02_V04_STD_Region_C
  adastr_KV/dAllDocuments.xsd
  
  Failed to parse a schema.
  </code></pre>
  <p><strong>UPDATE2</strong></p>
  <p>I try this binding:</p>
  <pre><code>&lt;jxb:bindings 
  xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
  xmlns:jxb=&quot;http://java.sun.com/xml/ns/jaxb&quot;
  version=&quot;2.1&quot;&gt;
  
      &lt;!-- Raise theEnumMemberSizeCap limit --&gt;
      &lt;jxb:bindings &gt;
         &lt;jxb:globalBindings typesafeEnumMaxMembers=&quot;2000&quot;/&gt;
     &lt;/jxb:bindings&gt;
  
     &lt;jxb:bindings schemaLocation=&quot;D:\liferay-develop\workspace\JABX_test\src\02_V04_STD_Region_Cadastr_KV\STD_Region_Cadastr_KV.xsd&quot;&gt;
         &lt;jxb:bindings node=&quot;//xs:complexType[@name='tRight_Owner']&quot;&gt;
             &lt;jxb:class name=&quot;tRight_Owner2&quot;/&gt;
         &lt;/jxb:bindings&gt;
     &lt;/jxb:bindings&gt;
  
  &lt;/jxb:bindings&gt;
  </code></pre>
  <p>And this console command:</p>
  <pre><code>C:\Documents and Settings\kliver\Мои документы\Загрузки\jaxb-ri-2.2.6\bin&gt;xjc -d
  out -b binding.xml D:\liferay-develop\workspace\JABX_test\src\02_V04_STD_Region
  _Cadastr_KV\STD_Region_Cadastr_KV.xsd
  </code></pre>