[jira] Created: (JANINO-133) Janino failed compiling with ClassCastException when the source code's size is too large

View: New views
7 Messages — Rating Filter:   Alert me  

[jira] Created: (JANINO-133) Janino failed compiling with ClassCastException when the source code's size is too large

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Janino failed compiling with ClassCastException when the source code's size is too large
----------------------------------------------------------------------------------------

                 Key: JANINO-133
                 URL: http://jira.codehaus.org/browse/JANINO-133
             Project: Janino
          Issue Type: Bug
    Affects Versions: 2.5.15
            Reporter: sherry xu
            Assignee: Arno Unkrig
             Fix For: 2.5.15


The janino engine failed compiling a java class whose size was 9256 kb (about 140000 lines). A classCastException was thrown as shown in the stacktrace below. Similar errors were received when the source code was downsized to about 95000 lines. The java file compiled with success when it was shrunk to below 60000 lines.

Caused by: java.lang.ClassCastException: org.codehaus.janino.util.ClassFile$ConstantUtf8Info
        at org.codehaus.janino.CodeContext.determineArgumentsSize(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
        at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
        at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java)
        at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
        at org.codehaus.janino.UnitCompiler$3.visitPackageMemberClassDeclaration(UnitCompiler.java)
        at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java)
        at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
        at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java)
        at org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompiler.java)
        at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java)
        at org.codehaus.janino.Cookable.cook(Cookable.java)
        at org.codehaus.janino.Cookable.cook(Cookable.java)
        at com.adminserver.utl.engine.janino.JaninoCompilerHelperUtl.compileClass(JaninoCompilerHelperUtl.java:87)


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

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Commented: (JANINO-133) Janino failed compiling with ClassCastException when the source code's size is too large

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/JANINO-133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=181166#action_181166 ]

Matt Fowles commented on JANINO-133:
------------------------------------

Can you attach one of the offending files?

> Janino failed compiling with ClassCastException when the source code's size is too large
> ----------------------------------------------------------------------------------------
>
>                 Key: JANINO-133
>                 URL: http://jira.codehaus.org/browse/JANINO-133
>             Project: Janino
>          Issue Type: Bug
>    Affects Versions: 2.5.15
>            Reporter: sherry xu
>            Assignee: Arno Unkrig
>             Fix For: 2.5.15
>
>
> The janino engine failed compiling a java class whose size was 9256 kb (about 140000 lines). A classCastException was thrown as shown in the stacktrace below. Similar errors were received when the source code was downsized to about 95000 lines. The java file compiled with success when it was shrunk to below 60000 lines.
> Caused by: java.lang.ClassCastException: org.codehaus.janino.util.ClassFile$ConstantUtf8Info
>         at org.codehaus.janino.CodeContext.determineArgumentsSize(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler$3.visitPackageMemberClassDeclaration(UnitCompiler.java)
>         at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java)
>         at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java)
>         at org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompiler.java)
>         at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java)
>         at org.codehaus.janino.Cookable.cook(Cookable.java)
>         at org.codehaus.janino.Cookable.cook(Cookable.java)
>         at com.adminserver.utl.engine.janino.JaninoCompilerHelperUtl.compileClass(JaninoCompilerHelperUtl.java:87)

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

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Updated: (JANINO-133) Janino failed compiling with ClassCastException when the source code's size is too large

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.codehaus.org/browse/JANINO-133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew Bulmer updated JANINO-133:
----------------------------------

    Attachment: Source.zip

> Janino failed compiling with ClassCastException when the source code's size is too large
> ----------------------------------------------------------------------------------------
>
>                 Key: JANINO-133
>                 URL: http://jira.codehaus.org/browse/JANINO-133
>             Project: Janino
>          Issue Type: Bug
>    Affects Versions: 2.5.15
>            Reporter: sherry xu
>            Assignee: Arno Unkrig
>             Fix For: 2.5.15
>
>         Attachments: Source.zip
>
>
> The janino engine failed compiling a java class whose size was 9256 kb (about 140000 lines). A classCastException was thrown as shown in the stacktrace below. Similar errors were received when the source code was downsized to about 95000 lines. The java file compiled with success when it was shrunk to below 60000 lines.
> Caused by: java.lang.ClassCastException: org.codehaus.janino.util.ClassFile$ConstantUtf8Info
>         at org.codehaus.janino.CodeContext.determineArgumentsSize(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler$3.visitPackageMemberClassDeclaration(UnitCompiler.java)
>         at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java)
>         at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java)
>         at org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompiler.java)
>         at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java)
>         at org.codehaus.janino.Cookable.cook(Cookable.java)
>         at org.codehaus.janino.Cookable.cook(Cookable.java)
>         at com.adminserver.utl.engine.janino.JaninoCompilerHelperUtl.compileClass(JaninoCompilerHelperUtl.java:87)

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

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Commented: (JANINO-133) Janino failed compiling with ClassCastException when the source code's size is too large

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/JANINO-133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183303#action_183303 ]

Matt Fowles commented on JANINO-133:
------------------------------------

The problem is that the classes you are generating have too many constants (over 65536).  You will see a similar behavior if your try to compiler the files with javac (or eclipse).

I definitely think it is a bug that there isn't a better error message (which I will try and fix shortly), but the core problem being able to handle >65536 constants cannot be fixed in Janino, it is a JVM limitation.

In the compiler at StreamBase we generate classes to share constants explicitly, so multiple files can share the same constants and we can automatically split to a new class when the last one gets full.

> Janino failed compiling with ClassCastException when the source code's size is too large
> ----------------------------------------------------------------------------------------
>
>                 Key: JANINO-133
>                 URL: http://jira.codehaus.org/browse/JANINO-133
>             Project: Janino
>          Issue Type: Bug
>    Affects Versions: 2.5.15
>            Reporter: sherry xu
>            Assignee: Arno Unkrig
>             Fix For: 2.5.15
>
>         Attachments: Source.zip
>
>
> The janino engine failed compiling a java class whose size was 9256 kb (about 140000 lines). A classCastException was thrown as shown in the stacktrace below. Similar errors were received when the source code was downsized to about 95000 lines. The java file compiled with success when it was shrunk to below 60000 lines.
> Caused by: java.lang.ClassCastException: org.codehaus.janino.util.ClassFile$ConstantUtf8Info
>         at org.codehaus.janino.CodeContext.determineArgumentsSize(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler$3.visitPackageMemberClassDeclaration(UnitCompiler.java)
>         at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java)
>         at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java)
>         at org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompiler.java)
>         at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java)
>         at org.codehaus.janino.Cookable.cook(Cookable.java)
>         at org.codehaus.janino.Cookable.cook(Cookable.java)
>         at com.adminserver.utl.engine.janino.JaninoCompilerHelperUtl.compileClass(JaninoCompilerHelperUtl.java:87)

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

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Updated: (JANINO-133) Janino failed compiling with ClassCastException when the source code's size is too large

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.codehaus.org/browse/JANINO-133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Fowles updated JANINO-133:
-------------------------------

    Attachment: janino-133.patch
                cleaned.zip

clean.zip - cleans up the provided files so they are free of dependencies while still displaying the problem.
janino-133.patch - puts in better error checking so that the problem is caught earlier (and with a better error message).

This bug was already fixed on http://code.google.com/p/janino-streambase/

Sherry, I would suggest you switch your company to using a janino jar built from that as it has quite a few bug fixes in it.

> Janino failed compiling with ClassCastException when the source code's size is too large
> ----------------------------------------------------------------------------------------
>
>                 Key: JANINO-133
>                 URL: http://jira.codehaus.org/browse/JANINO-133
>             Project: Janino
>          Issue Type: Bug
>    Affects Versions: 2.5.15
>            Reporter: sherry xu
>            Assignee: Arno Unkrig
>             Fix For: 2.5.15
>
>         Attachments: cleaned.zip, janino-133.patch, Source.zip
>
>
> The janino engine failed compiling a java class whose size was 9256 kb (about 140000 lines). A classCastException was thrown as shown in the stacktrace below. Similar errors were received when the source code was downsized to about 95000 lines. The java file compiled with success when it was shrunk to below 60000 lines.
> Caused by: java.lang.ClassCastException: org.codehaus.janino.util.ClassFile$ConstantUtf8Info
>         at org.codehaus.janino.CodeContext.determineArgumentsSize(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler$3.visitPackageMemberClassDeclaration(UnitCompiler.java)
>         at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java)
>         at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java)
>         at org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompiler.java)
>         at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java)
>         at org.codehaus.janino.Cookable.cook(Cookable.java)
>         at org.codehaus.janino.Cookable.cook(Cookable.java)
>         at com.adminserver.utl.engine.janino.JaninoCompilerHelperUtl.compileClass(JaninoCompilerHelperUtl.java:87)

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

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Commented: (JANINO-133) Janino failed compiling with ClassCastException when the source code's size is too large

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/JANINO-133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183847#action_183847 ]

sherry xu commented on JANINO-133:
----------------------------------

Thanks, Matt! Actually the source code that we sent you might not be a perfect example. We have java classes that have constants less than 65536 and can be compiled using Eclipse or from the command line, but still give us ClassCastException when being compiled with Janino. We can make the error go away by simply shrinking the size of the generated code (with all the constants kept).

> Janino failed compiling with ClassCastException when the source code's size is too large
> ----------------------------------------------------------------------------------------
>
>                 Key: JANINO-133
>                 URL: http://jira.codehaus.org/browse/JANINO-133
>             Project: Janino
>          Issue Type: Bug
>    Affects Versions: 2.5.15
>            Reporter: sherry xu
>            Assignee: Arno Unkrig
>             Fix For: 2.5.15
>
>         Attachments: cleaned.zip, janino-133.patch, Source.zip
>
>
> The janino engine failed compiling a java class whose size was 9256 kb (about 140000 lines). A classCastException was thrown as shown in the stacktrace below. Similar errors were received when the source code was downsized to about 95000 lines. The java file compiled with success when it was shrunk to below 60000 lines.
> Caused by: java.lang.ClassCastException: org.codehaus.janino.util.ClassFile$ConstantUtf8Info
>         at org.codehaus.janino.CodeContext.determineArgumentsSize(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler$3.visitPackageMemberClassDeclaration(UnitCompiler.java)
>         at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java)
>         at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java)
>         at org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompiler.java)
>         at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java)
>         at org.codehaus.janino.Cookable.cook(Cookable.java)
>         at org.codehaus.janino.Cookable.cook(Cookable.java)
>         at com.adminserver.utl.engine.janino.JaninoCompilerHelperUtl.compileClass(JaninoCompilerHelperUtl.java:87)

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

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Commented: (JANINO-133) Janino failed compiling with ClassCastException when the source code's size is too large

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/JANINO-133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183848#action_183848 ]

Matt Fowles commented on JANINO-133:
------------------------------------

If you can produce an example that compiles with eclipse but not Janino, I would be happy to take a look at it.  I would appreciate it if you can eliminate or stub out the dependencies similar to what I did in clean.zip for your example.

> Janino failed compiling with ClassCastException when the source code's size is too large
> ----------------------------------------------------------------------------------------
>
>                 Key: JANINO-133
>                 URL: http://jira.codehaus.org/browse/JANINO-133
>             Project: Janino
>          Issue Type: Bug
>    Affects Versions: 2.5.15
>            Reporter: sherry xu
>            Assignee: Arno Unkrig
>             Fix For: 2.5.15
>
>         Attachments: cleaned.zip, janino-133.patch, Source.zip
>
>
> The janino engine failed compiling a java class whose size was 9256 kb (about 140000 lines). A classCastException was thrown as shown in the stacktrace below. Similar errors were received when the source code was downsized to about 95000 lines. The java file compiled with success when it was shrunk to below 60000 lines.
> Caused by: java.lang.ClassCastException: org.codehaus.janino.util.ClassFile$ConstantUtf8Info
>         at org.codehaus.janino.CodeContext.determineArgumentsSize(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java)
>         at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler$3.visitPackageMemberClassDeclaration(UnitCompiler.java)
>         at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java)
>         at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
>         at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java)
>         at org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompiler.java)
>         at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java)
>         at org.codehaus.janino.Cookable.cook(Cookable.java)
>         at org.codehaus.janino.Cookable.cook(Cookable.java)
>         at com.adminserver.utl.engine.janino.JaninoCompilerHelperUtl.compileClass(JaninoCompilerHelperUtl.java:87)

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

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email