Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 69086 invoked from network); 13 Mar 2006 19:49:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Mar 2006 19:49:23 -0000 Received: (qmail 78290 invoked by uid 500); 13 Mar 2006 19:49:22 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 78245 invoked by uid 500); 13 Mar 2006 19:49:22 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 78234 invoked by uid 99); 13 Mar 2006 19:49:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Mar 2006 11:49:22 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Mar 2006 11:49:21 -0800 Received: from ajax (localhost.localdomain [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 47D3ED49FA for ; Mon, 13 Mar 2006 19:49:00 +0000 (GMT) Message-ID: <773197267.1142279339988.JavaMail.jira@ajax> Date: Mon, 13 Mar 2006 19:48:59 +0000 (GMT) From: "Endi S. Dewata (JIRA)" To: dev@directory.apache.org Subject: [jira] Commented: (DIRSERVER-599) Can't compile long schema In-Reply-To: <1410079701.1142276959362.JavaMail.jira@ajax> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ 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