geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Baker (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (GEODE-97) Unit tests using jmock fail due to cglib/asm incompatibility with JDK 8
Date Fri, 08 Jan 2016 04:41:47 GMT

     [ https://issues.apache.org/jira/browse/GEODE-97?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Anthony Baker updated GEODE-97:
-------------------------------
    Fix Version/s: 1.0.0-alpha1

> Unit tests using jmock fail due to cglib/asm incompatibility with JDK 8
> -----------------------------------------------------------------------
>
>                 Key: GEODE-97
>                 URL: https://issues.apache.org/jira/browse/GEODE-97
>             Project: Geode
>          Issue Type: Bug
>            Reporter: Kirk Lund
>            Assignee: Kirk Lund
>             Fix For: 1.0.0-alpha1
>
>
> Several unit tests using jmock/cglib/asm fail when run using JDK 8:
> {code}
> com.gemstone.gemfire.internal.cache.DiskInitFileJUnitTest > testCanonicalIds FAILED
>     java.lang.IllegalArgumentException
>         at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
>         at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
>         at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
>         at net.sf.cglib.proxy.BridgeMethodResolver.resolveAll(BridgeMethodResolver.java:61)
>         at net.sf.cglib.proxy.Enhancer.emitMethods(Enhancer.java:911)
>         at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:498)
>         at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
>         at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
>         at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
>         at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
>         at org.jmock.lib.legacy.ClassImposteriser.proxyClass(ClassImposteriser.java:121)
>         at org.jmock.lib.legacy.ClassImposteriser.imposterise(ClassImposteriser.java:66)
>         at org.jmock.internal.ReturnDefaultValueAction.invoke(ReturnDefaultValueAction.java:82)
>         at org.jmock.internal.InvocationExpectation.invoke(InvocationExpectation.java:165)
>         at org.jmock.internal.InvocationDispatcher.dispatch(InvocationDispatcher.java:81)
>         at org.jmock.Mockery.dispatch(Mockery.java:244)
>         at org.jmock.Mockery.access$100(Mockery.java:29)
>         at org.jmock.Mockery$MockObject.invoke(Mockery.java:284)
>         at org.jmock.internal.InvocationDiverter.invoke(InvocationDiverter.java:27)
>         at org.jmock.internal.FakeObjectMethods.invoke(FakeObjectMethods.java:38)
>         at org.jmock.internal.SingleThreadedPolicy$1.invoke(SingleThreadedPolicy.java:21)
>         at org.jmock.lib.legacy.ClassImposteriser$4.invoke(ClassImposteriser.java:136)
>         at com.gemstone.gemfire.internal.cache.persistence.DiskRegionView$$EnhancerByCGLIB$$dc027cdd.getFlags(<generated>)
>         at com.gemstone.gemfire.internal.cache.DiskInitFile.writeRegionConfig(DiskInitFile.java:1796)
>         at com.gemstone.gemfire.internal.cache.DiskInitFile.createRegion(DiskInitFile.java:2081)
>         at com.gemstone.gemfire.internal.cache.DiskInitFileJUnitTest.testCanonicalIds(DiskInitFileJUnitTest.java:81)
> {code}
> The following dependencies change in gradle seems to fix the problem:
> {code}
> -    testRuntime 'cglib:cglib-nodep:3.1'
> +    testRuntime 'cglib:cglib:3.1'
> {code}
> The cglib-nodep jar has an "asm" package while the cglib jar does not. This causes the
build to use asm 5.0.3 as defined in the dependencies.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message