首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ActiveJDBC和JDK8流

ActiveJDBC和JDK8流
EN

Stack Overflow用户
提问于 2014-12-30 11:14:51
回答 1查看 279关注 0票数 1

当我在模型类中使用JDK8特性(Lamba)时,我遇到了一些问题。它只是悄悄地跳过了那些类。

当我试图打电话:

代码语言:javascript
复制
 CtClass clazz = getClazz("me.factorify.server.person.domain.Person");
 clazz.getModifiers();

我明白这一例外:

代码语言:javascript
复制
 java.lang.RuntimeException: java.io.IOException: invalid constant type: 18 at 14
        at javassist.CtClassType.getClassFile2(CtClassType.java:204)
        at javassist.CtClassType.getModifiers(CtClassType.java:388)
        at me.factorify.server.person.domain.PersonTest.testName(PersonTest.java:19)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
        at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
        at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
        at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
    Caused by: java.io.IOException: invalid constant type: 18 at 14
        at javassist.bytecode.ConstPool.readOne(ConstPool.java:1044)
        at javassist.bytecode.ConstPool.read(ConstPool.java:984)
        at javassist.bytecode.ConstPool.<init>(ConstPool.java:125)
        at javassist.bytecode.ClassFile.read(ClassFile.java:770)
        at javassist.bytecode.ClassFile.<init>(ClassFile.java:114)
        at javassist.CtClassType.getClassFile2(CtClassType.java:191)
        ... 28 more

这是由旧版本的javassist/asm引起的。

你有什么解决办法吗?

编辑:我想我修复了它并创建了这个拉请求https://github.com/javalite/activejdbc/pull/336

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-12-30 20:55:15

@jacub.petr,谢谢你的请求。我们用您的补丁构建并部署了最新的快照。从https://oss.sonatype.org/content/repositories/snapshots/org/javalite/activejdbc/1.4.10-SNAPSHOT/中提取1.4.9版快照,然后再试一次。我们将很快发布1.5版本,您的修复程序将包括在内。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27704423

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档