You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Endi S. Dewata (JIRA)" <ji...@apache.org> on 2006/03/13 20:09:19 UTC

[jira] Created: (DIRSERVER-599) Can't compile long schema

Can't compile long schema
-------------------------

         Key: DIRSERVER-599
         URL: http://issues.apache.org/jira/browse/DIRSERVER-599
     Project: Directory ApacheDS
        Type: Bug
  Components: schema-plugin  
    Versions: 1.0-RC1    
    Reporter: Endi S. Dewata


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.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRSERVER-599) Can't compile long schema

Posted by "Norbert Reilly (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRSERVER-599?page=comments#action_12371928 ] 

Norbert Reilly commented on DIRSERVER-599:
------------------------------------------

I ran into this issue to for an external schema I imported into the AD build. The problem is the 64k bytecode limit per method:

http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html

As noted on the dev list I use runtime schema conversion when talking to remote live LDAP systems (acting as a proxy) but in this case I only had a .schema file and haven't adapted my code to work off a .schema file rather then LDAP schema search results.

> Can't compile long schema
> -------------------------
>
>          Key: DIRSERVER-599
>          URL: http://issues.apache.org/jira/browse/DIRSERVER-599
>      Project: Directory ApacheDS
>         Type: Bug
>   Components: schema-plugin
>     Versions: 1.0-RC1
>     Reporter: Endi S. Dewata
>  Attachments: activeDirectory.schema
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DIRSERVER-599) Can't compile long schema

Posted by "Alex Karasulu (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRSERVER-599?page=all ]

Alex Karasulu closed DIRSERVER-599.
-----------------------------------

    Fix Version/s: 1.0-RC4
       Resolution: Won't Fix

won't fix: we have a workaround (break up large schemas).  This is fine temporarily until we revamp the schema subsystem in 1.1.

> Can't compile long schema
> -------------------------
>
>                 Key: DIRSERVER-599
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-599
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: schema-plugin
>    Affects Versions: 1.0-RC1
>            Reporter: Endi S. Dewata
>         Assigned To: Alex Karasulu
>             Fix For: 1.0-RC4
>
>         Attachments: activeDirectory.schema
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DIRSERVER-599) Can't compile long schema

Posted by "Endi S. Dewata (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRSERVER-599?page=comments#action_12370228 ] 

Endi S. Dewata commented on DIRSERVER-599:
------------------------------------------

Hi Alex, I don't think this is a Velocity issue because at this point the Java files have been successfully generated by Velocity. The error happens during compilation, it seems javac can't compile a method with more than 11k lines of code. One possible solution is by changing the template to split the produce() method after certain number of attribute types or object classes. Another way is by storing the parsed schema data somewhere else and use a loop to read it. A better way might be the schema parsing should be done in the runtime instead of compile time.

> Can't compile long schema
> -------------------------
>
>          Key: DIRSERVER-599
>          URL: http://issues.apache.org/jira/browse/DIRSERVER-599
>      Project: Directory ApacheDS
>         Type: Bug
>   Components: schema-plugin
>     Versions: 1.0-RC1
>     Reporter: Endi S. Dewata
>  Attachments: activeDirectory.schema
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRSERVER-599) Can't compile long schema

Posted by "Alex Karasulu (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRSERVER-599?page=comments#action_12370221 ] 

Alex Karasulu commented on DIRSERVER-599:
-----------------------------------------

Probably a velocity buffer issue.  Can you take a look at how this can be adjusted and get back to me?  The fix should be easy.

> Can't compile long schema
> -------------------------
>
>          Key: DIRSERVER-599
>          URL: http://issues.apache.org/jira/browse/DIRSERVER-599
>      Project: Directory ApacheDS
>         Type: Bug
>   Components: schema-plugin
>     Versions: 1.0-RC1
>     Reporter: Endi S. Dewata
>  Attachments: activeDirectory.schema
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DIRSERVER-599) Can't compile long schema

Posted by "Endi S. Dewata (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRSERVER-599?page=all ]

Endi S. Dewata updated DIRSERVER-599:
-------------------------------------

    Attachment: activeDirectory.schema

Attached is a schema containing 622 attribute type definitions. 

> Can't compile long schema
> -------------------------
>
>          Key: DIRSERVER-599
>          URL: http://issues.apache.org/jira/browse/DIRSERVER-599
>      Project: Directory ApacheDS
>         Type: Bug
>   Components: schema-plugin
>     Versions: 1.0-RC1
>     Reporter: Endi S. Dewata
>  Attachments: activeDirectory.schema
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (DIRSERVER-599) Can't compile long schema

Posted by "Alex Karasulu (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRSERVER-599?page=all ]

Alex Karasulu reassigned DIRSERVER-599:
---------------------------------------

    Assignee: Alex Karasulu

> Can't compile long schema
> -------------------------
>
>                 Key: DIRSERVER-599
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-599
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: schema-plugin
>    Affects Versions: 1.0-RC1
>            Reporter: Endi S. Dewata
>         Assigned To: Alex Karasulu
>         Attachments: activeDirectory.schema
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira