You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Jim Hopper <ho...@gmail.com> on 2022/11/21 21:07:47 UTC

method code too large

Hi,

what is the best strategy to fix the following error during hive-exec
shading?

[INFO] --- maven-shade-plugin:3.1.1:shade (build-exec-bundle) @ hive-exec
---
...

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-shade-plugin:3.1.1:shade (build-exec-bundle)
on project hive-exec: Error creating shaded jar: Problem shading JAR
/home/jh/.m2/repository/org/apache/hive/hive-parser/4.0.0-alpha-2/hive-parser-4.0.0-alpha-2.jar
entry org/apache/hadoop/hive/ql/parse/HiveParser.class:
java.lang.RuntimeException: Method code too large! -> [Help 1]

thanks!

Re: method code too large

Posted by Chris Nauroth <cn...@apache.org>.
I'm not aware of any shading options that can help with this. My
understanding is that this is based on a fundamental constraint as defined
in the Java Virtual Machine Specification [1]. (See documentation of the
code_length attribute.) I do know that Spark once had a similar issue [2],
also driven by a combination of Antlr and the shade plugin. In that case,
they had to resolve it by refactoring the grammar into smaller files [3].
We could explore something similar, but I'm confused that we don't have a
consistent reproduction. Multiple people tested and voted on the release
candidate and did not see this issue.

[1]
https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.3
[2] https://issues.apache.org/jira/browse/SPARK-13431
[3] https://github.com/apache/spark/pull/11331

Chris Nauroth


On Mon, Nov 28, 2022 at 3:51 PM Naveen Gangam <ng...@cloudera.com.invalid>
wrote:

> HiveParser.java is a generated source from the hive
> grammer definitions, HiveParser.g. It is possible that some of the methods
> are XL with several case statements. It may be hard to change this source.
>
> Wondering if there is an option in this shading plugin to configure larger
> size for method frames?
>
>
>
> On Mon, Nov 28, 2022 at 2:56 PM Chris Nauroth <cn...@apache.org> wrote:
>
> > Hello Jim,
> >
> > Can you please share the full mvn command that you are running? I don't
> > recall anyone else reporting this when we were testing the 4.0.0-alpha-2
> > release candidate.
> >
> > Chris Nauroth
> >
> >
> > On Mon, Nov 21, 2022 at 1:08 PM Jim Hopper <ho...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > what is the best strategy to fix the following error during hive-exec
> > > shading?
> > >
> > > [INFO] --- maven-shade-plugin:3.1.1:shade (build-exec-bundle) @
> hive-exec
> > > ---
> > > ...
> > >
> > > [ERROR] Failed to execute goal
> > > org.apache.maven.plugins:maven-shade-plugin:3.1.1:shade
> > (build-exec-bundle)
> > > on project hive-exec: Error creating shaded jar: Problem shading JAR
> > >
> > >
> >
> /home/jh/.m2/repository/org/apache/hive/hive-parser/4.0.0-alpha-2/hive-parser-4.0.0-alpha-2.jar
> > > entry org/apache/hadoop/hive/ql/parse/HiveParser.class:
> > > java.lang.RuntimeException: Method code too large! -> [Help 1]
> > >
> > > thanks!
> > >
> >
>

Re: method code too large

Posted by Naveen Gangam <ng...@cloudera.com.INVALID>.
HiveParser.java is a generated source from the hive
grammer definitions, HiveParser.g. It is possible that some of the methods
are XL with several case statements. It may be hard to change this source.

Wondering if there is an option in this shading plugin to configure larger
size for method frames?



On Mon, Nov 28, 2022 at 2:56 PM Chris Nauroth <cn...@apache.org> wrote:

> Hello Jim,
>
> Can you please share the full mvn command that you are running? I don't
> recall anyone else reporting this when we were testing the 4.0.0-alpha-2
> release candidate.
>
> Chris Nauroth
>
>
> On Mon, Nov 21, 2022 at 1:08 PM Jim Hopper <ho...@gmail.com> wrote:
>
> > Hi,
> >
> > what is the best strategy to fix the following error during hive-exec
> > shading?
> >
> > [INFO] --- maven-shade-plugin:3.1.1:shade (build-exec-bundle) @ hive-exec
> > ---
> > ...
> >
> > [ERROR] Failed to execute goal
> > org.apache.maven.plugins:maven-shade-plugin:3.1.1:shade
> (build-exec-bundle)
> > on project hive-exec: Error creating shaded jar: Problem shading JAR
> >
> >
> /home/jh/.m2/repository/org/apache/hive/hive-parser/4.0.0-alpha-2/hive-parser-4.0.0-alpha-2.jar
> > entry org/apache/hadoop/hive/ql/parse/HiveParser.class:
> > java.lang.RuntimeException: Method code too large! -> [Help 1]
> >
> > thanks!
> >
>

Re: method code too large

Posted by Chris Nauroth <cn...@apache.org>.
Hello Jim,

Can you please share the full mvn command that you are running? I don't
recall anyone else reporting this when we were testing the 4.0.0-alpha-2
release candidate.

Chris Nauroth


On Mon, Nov 21, 2022 at 1:08 PM Jim Hopper <ho...@gmail.com> wrote:

> Hi,
>
> what is the best strategy to fix the following error during hive-exec
> shading?
>
> [INFO] --- maven-shade-plugin:3.1.1:shade (build-exec-bundle) @ hive-exec
> ---
> ...
>
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-shade-plugin:3.1.1:shade (build-exec-bundle)
> on project hive-exec: Error creating shaded jar: Problem shading JAR
>
> /home/jh/.m2/repository/org/apache/hive/hive-parser/4.0.0-alpha-2/hive-parser-4.0.0-alpha-2.jar
> entry org/apache/hadoop/hive/ql/parse/HiveParser.class:
> java.lang.RuntimeException: Method code too large! -> [Help 1]
>
> thanks!
>