You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@groovy.apache.org by Blake McBride <bl...@gmail.com> on 2018/03/21 11:01:37 UTC

Upgrade Groovy jar - can't start tomcat

Greetings,

I have been a happy user of groovy-2.3.7 for several years now on my tomcat
webapp under Java 8.  I just updated groovy-2.3.7.jar to groovy-2.4.14.jar
and now I am getting the following error:

[...]
Mar 21, 2018 5:47:07 AM org.apache.catalina.startup.ContextConfig
processAnnotationsJar
SEVERE: Unable to process Jar entry [module-info.class] from Jar
[jar:file:/.../build/web/WEB-INF/lib/groovy-2.4.14.jar!/] for annotations
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte
tag in constant pool: 19
[...]


jar tvf groovy-2.4.14.jar    gives the expected list with no errors.  (I
think the jar file is fine.)

Sure appreciate any help!

Thanks!

Blake

Re: Upgrade Groovy jar - can't start tomcat

Posted by "Daniel.Sun" <su...@apache.org>.
Nice



--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: Upgrade Groovy jar - can't start tomcat

Posted by Blake McBride <bl...@gmail.com>.
I fixed the problem - upgraded tomcat.

Thanks!

Blake


On Wed, Mar 21, 2018 at 6:01 AM, Blake McBride <bl...@gmail.com> wrote:

> Greetings,
>
> I have been a happy user of groovy-2.3.7 for several years now on my
> tomcat webapp under Java 8.  I just updated groovy-2.3.7.jar to
> groovy-2.4.14.jar and now I am getting the following error:
>
> [...]
> Mar 21, 2018 5:47:07 AM org.apache.catalina.startup.ContextConfig
> processAnnotationsJar
> SEVERE: Unable to process Jar entry [module-info.class] from Jar
> [jar:file:/.../build/web/WEB-INF/lib/groovy-2.4.14.jar!/] for annotations
> org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte
> tag in constant pool: 19
> [...]
>
>
> jar tvf groovy-2.4.14.jar    gives the expected list with no errors.  (I
> think the jar file is fine.)
>
> Sure appreciate any help!
>
> Thanks!
>
> Blake
>
>

Re: Upgrade Groovy jar - can't start tomcat

Posted by Jochen Theodorou <bl...@gmx.org>.

Am 21.03.2018 um 14:39 schrieb Cédric Champeau:
> Thanks for the explanation, Paul, it makes sense. Long story short: do 
> not upgrade major libraries in bugfix releases ;)

then you will not be able to call Stream.of

bye Jochen

Re: Upgrade Groovy jar - can't start tomcat

Posted by Cédric Champeau <ce...@gmail.com>.
Thanks for the explanation, Paul, it makes sense. Long story short: do not
upgrade major libraries in bugfix releases ;)

2018-03-21 14:38 GMT+01:00 Paul King <pa...@asert.com.au>:

> The ASM 6 jar has a module-info.class file that gets incorporated into our
> jar via jarjar. We obviously should exclude that in our build and we do. We
> originally only had that build fix for 2_5_X and above builds because we
> didn't want to bump ASM version in a point release - but that change was
> later made without the accompanying build fix and that caused the
> module-info.class problem to resurface in 2.4.14 as well as cause several
> other bugs. The ASM change has been reverted for now, until we see whether
> the other issues can also be fixed. I'll do a 2.4.15 release after
> 2.5.0-rc1 so we have a more JDK9 friendly 2_4_X release.
>
> Cheers, Paul.
>
> On Wed, Mar 21, 2018 at 10:48 PM, Cédric Champeau <
> cedric.champeau@gmail.com> wrote:
>
>> The question is why do we have a `module-info.class` file in groovy.jar.
>> I thought we had fixed that. Or maybe in 2.4.15?
>>
>> 2018-03-21 13:46 GMT+01:00 Jochen Theodorou <bl...@gmx.org>:
>>
>>>
>>>
>>> Am 21.03.2018 um 12:34 schrieb Blake McBride:
>>>
>>>> Thanks!  Turns out, this is a known problem with older versions of
>>>> tomcat.  I don't think any changes in groovy are necessary.
>>>>
>>>
>>> just in case you are somebody else wants to know more
>>>
>>> Unable to process Jar entry [module-info.class] from Jar
>>> [jar:file:/.../build/web/WEB-INF/lib/groovy-2.4.14.jar!/] for
>>> annotations
>>> org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid
>>> byte tag in constant pool: 19
>>>
>>>
>>> module-info.class is for Java9 and requires a special flag available
>>> only in Java9 and later (constant pool entry with id 19). Thus for Tomcat
>>> under Java 8 the only solution is to ignore that or use a newer version of
>>> bcel that supports java9 and then ignore it. Because you cannot load it.
>>>
>>> bye Jochen
>>>
>>
>>
>

Re: Upgrade Groovy jar - can't start tomcat

Posted by Paul King <pa...@asert.com.au>.
The ASM 6 jar has a module-info.class file that gets incorporated into our
jar via jarjar. We obviously should exclude that in our build and we do. We
originally only had that build fix for 2_5_X and above builds because we
didn't want to bump ASM version in a point release - but that change was
later made without the accompanying build fix and that caused the
module-info.class problem to resurface in 2.4.14 as well as cause several
other bugs. The ASM change has been reverted for now, until we see whether
the other issues can also be fixed. I'll do a 2.4.15 release after
2.5.0-rc1 so we have a more JDK9 friendly 2_4_X release.

Cheers, Paul.

On Wed, Mar 21, 2018 at 10:48 PM, Cédric Champeau <cedric.champeau@gmail.com
> wrote:

> The question is why do we have a `module-info.class` file in groovy.jar. I
> thought we had fixed that. Or maybe in 2.4.15?
>
> 2018-03-21 13:46 GMT+01:00 Jochen Theodorou <bl...@gmx.org>:
>
>>
>>
>> Am 21.03.2018 um 12:34 schrieb Blake McBride:
>>
>>> Thanks!  Turns out, this is a known problem with older versions of
>>> tomcat.  I don't think any changes in groovy are necessary.
>>>
>>
>> just in case you are somebody else wants to know more
>>
>> Unable to process Jar entry [module-info.class] from Jar
>> [jar:file:/.../build/web/WEB-INF/lib/groovy-2.4.14.jar!/] for annotations
>> org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte
>> tag in constant pool: 19
>>
>>
>> module-info.class is for Java9 and requires a special flag available only
>> in Java9 and later (constant pool entry with id 19). Thus for Tomcat under
>> Java 8 the only solution is to ignore that or use a newer version of bcel
>> that supports java9 and then ignore it. Because you cannot load it.
>>
>> bye Jochen
>>
>
>

Re: Upgrade Groovy jar - can't start tomcat

Posted by Cédric Champeau <ce...@gmail.com>.
The question is why do we have a `module-info.class` file in groovy.jar. I
thought we had fixed that. Or maybe in 2.4.15?

2018-03-21 13:46 GMT+01:00 Jochen Theodorou <bl...@gmx.org>:

>
>
> Am 21.03.2018 um 12:34 schrieb Blake McBride:
>
>> Thanks!  Turns out, this is a known problem with older versions of
>> tomcat.  I don't think any changes in groovy are necessary.
>>
>
> just in case you are somebody else wants to know more
>
> Unable to process Jar entry [module-info.class] from Jar
> [jar:file:/.../build/web/WEB-INF/lib/groovy-2.4.14.jar!/] for annotations
> org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte
> tag in constant pool: 19
>
>
> module-info.class is for Java9 and requires a special flag available only
> in Java9 and later (constant pool entry with id 19). Thus for Tomcat under
> Java 8 the only solution is to ignore that or use a newer version of bcel
> that supports java9 and then ignore it. Because you cannot load it.
>
> bye Jochen
>

Re: Upgrade Groovy jar - can't start tomcat

Posted by Jochen Theodorou <bl...@gmx.org>.

Am 21.03.2018 um 12:34 schrieb Blake McBride:
> Thanks!  Turns out, this is a known problem with older versions of 
> tomcat.  I don't think any changes in groovy are necessary.

just in case you are somebody else wants to know more

Unable to process Jar entry [module-info.class] from Jar 
[jar:file:/.../build/web/WEB-INF/lib/groovy-2.4.14.jar!/] for annotations
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte 
tag in constant pool: 19


module-info.class is for Java9 and requires a special flag available 
only in Java9 and later (constant pool entry with id 19). Thus for 
Tomcat under Java 8 the only solution is to ignore that or use a newer 
version of bcel that supports java9 and then ignore it. Because you 
cannot load it.

bye Jochen

Re: Upgrade Groovy jar - can't start tomcat

Posted by Blake McBride <bl...@gmail.com>.
Thanks!  Turns out, this is a known problem with older versions of tomcat.
I don't think any changes in groovy are necessary.

Thanks again!

Blake


On Wed, Mar 21, 2018 at 6:31 AM, Daniel.Sun <su...@apache.org> wrote:

> Hi Blake,
>
>        After asm bumped to 6.0 on 2.4 branch, we run into some issues like
> yours. So I have downgraded asm to 5.0.3. Please try the latest version of
> 2.4 branch:
> https://www.jitpack.io/#apache/groovy/GROOVY_2_4_X-SNAPSHOT
>
>          FYI, https://github.com/danielsun1106/try-jitpack
>
> Cheers,
> Daniel.Sun
>
>
>
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html
>

Re: Upgrade Groovy jar - can't start tomcat

Posted by "Daniel.Sun" <su...@apache.org>.
Hi Blake,

       After asm bumped to 6.0 on 2.4 branch, we run into some issues like
yours. So I have downgraded asm to 5.0.3. Please try the latest version of
2.4 branch:
https://www.jitpack.io/#apache/groovy/GROOVY_2_4_X-SNAPSHOT

         FYI, https://github.com/danielsun1106/try-jitpack

Cheers,
Daniel.Sun



--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html