[jira] Commented: (DIRSERVER-599) Can't compile long schema
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Directory Project > [jira] Commented: (DIRSERVER-599) Can't compile long schema




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    [jira] Commented: (DIRSERVER-599) Can't compile long schema  
Endi S. Dewata (JIRA)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-13-06 10:45 PM

[ http://issues.apache.org/jira/brows...237
0228 ]

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

Hi Alex, I don't think this is a Velocity issue because at this point the Ja
va files have been successfully generated by Velocity. The error happens dur
ing compilation, it seems javac can't compile a method with more than 11k li
nes of code. One possible s
olution is by changing the template to split the produce() method after cert
ain number of attribute types or object classes. Another way is by storing t
he parsed schema data somewhere else and use a loop to read it. A better way
 might be the schema parsin
g 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 g
ets too long the Java file can't be compiled. Some applications might use a huge sch
ema, for instance the default Active Directory schema contains more than 1000 attrib
ute
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\cl
asses
> [INFO] ---------------------------------------------------------------
-------------
> [ERROR] BUILD FAILURE
> [INFO] ---------------------------------------------------------------
-------------
> [INFO] Compilation failure
> c:\svn.apache.org\apacheds-1.0\core\target\generated-sources\org\apache\di
rectory\server\core\schema
>  \bootstrap\ActiveDirectoryAttributeTypeP
roducer.java:[52,16] code too 
large
> A workaround is that the schema can be split into several smaller schemas, this wi
ll produce smaller Java files which can be compiled just fine. From experiments it s
eems that the compiler will hit the limit when compiling 622 attribute types. This w
ill
produce more than 11k lines of  code in the produce() method in the generate
d 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/secur...nistrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:41 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register