简体   繁体   English

引起原因:java.lang.NoSuchFieldError:ruleMemo

[英]Caused by: java.lang.NoSuchFieldError: ruleMemo

I am getting this exception - sadly, i'm trying to enhance a project to use ivy instead of ant, and while normally I do a process of 我遇到了一个例外-可悲的是,我正在尝试增强一个使用常春藤代替蚂蚁的项目,而通常情况下,我会

"add new library file" “添加新的库文件”

"run program" “运行程序”

"check what library file it claims to need when it crashes" “检查崩溃时声称需要的库文件”

this time the program crashes with 这次程序崩溃了

Caused by: java.lang.NoSuchFieldError: ruleMemo

This isn't very useful, naturally, and I don't have a clue where to look. 自然,这不是很有用,而且我不知道在哪里看。 Opening up the stacktrace items yields no whiff of a ruleMemo member... has anybody seen this before and know what class is calling/uses this? 打开stacktrace项不会产生任何ruleMemo成员的想法……以前有人见过这个吗,并且知道正在调用/使用哪个类吗?

What lib file to use would also be useful, but not quite as useful as the class! 使用哪个lib文件也很有用,但不如该类有用!

Whoop - let me put a stacktrace in so somebody doesn't just roll their own class with ruleMemo as a member and tell me i need it! 糟糕-让我放入stacktrace,以便有人不只是将ruleMemo作为成员滚动自己的类,并告诉我我需要它!

Caused by: java.lang.NoSuchFieldError: ruleMemo
at org.drools.lang.DRLLexer.<init>(DRLLexer.java:96)
at org.drools.compiler.DrlParser.getParser(DrlParser.java:207)
at org.drools.compiler.DrlParser.parse(DrlParser.java:60)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:165)
at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)
at org.springframework.beans.factory.config.MethodInvokingFactoryBean.doInvoke(MethodInvokingFactoryBean.java:160)
at org.springframework.beans.factory.config.MethodInvokingFactoryBean.afterPropertiesSet(MethodInvokingFactoryBean.java:150)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 70 more

Root cause analysis 根本原因分析

I suspect you're using version 4.0.1 of the drools compiler jar? 我怀疑您正在使用Drools编译器jar的4.0.1版本吗?

That jar is only compatible with version 3.0.1 of the antlr-runtime jar: 该jar仅与antlr-runtime jar的3.0.1版本兼容:

Recommendation 建议

I recommend two things: 我建议两件事:

Combining ivy with a Maven repository manager will ensure the correct interdependencies are retrieved. 将常春藤与Maven存储库管理器结合使用将确保检索到正确的相互依赖性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM