Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.0-RC1
-
None
Description
Currently the schema plugin converts a schema into Java files, and if the schema gets too long the Java file can't be compiled. Some applications might use a huge schema, for instance the default Active Directory schema contains more than 1000 attribute types. Compiling such schema will produce the following error:
[INFO] Generating activeDirectory schema.
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
Compiling 14 source files to c:\svn.apache.org\apacheds-1.0\core\target\classes
[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ----------------------------------------------------------------------------
[INFO] Compilation failure
c:\svn.apache.org\apacheds-1.0\core\target\generated-sources\org\apache\directory\server\core\schema
\bootstrap\ActiveDirectoryAttributeTypeProducer.java:[52,16] code too large
A workaround is that the schema can be split into several smaller schemas, this will produce smaller Java files which can be compiled just fine. From experiments it seems that the compiler will hit the limit when compiling 622 attribute types. This will produce more than 11k lines of code in the produce() method in the generated Java file. A similar limit may also affect the max number of object class definitions.