简体   繁体   English

DataNucleus Enhancer可以处理类路径中jar中的类吗?

[英]Can DataNucleus Enhancer process classes that are in jar on a classpath?

There is Google App Engine Java project "A" that is based on a large portion of the classes from another Google App Engine Java "B" but not all of them. Google App Engine Java项目“ A”基于另一个Google App Engine Java“ B”中的大部分类,但并非全部。

For this all those classes from Project "B" are exported as Jar with source code that is included on class path of the project "A" among them few @Entity classes. 为此,所有来自项目“ B”的类都将作为具有源代码的Jar导出为Jar,该源代码包含在项目“ A”的类路径中,其中包括几个@Entity类。

When running project "A" in local debug mode I get 在本地调试模式下运行项目“ A”时,我得到

java.lang.RuntimeException: Class UserAccount for query has not been resolved. Check the query and any imports specification
    at biz.daich.gwt.common.app.server.domain.services.UserAccountService.findOrCreateUserAccountByPrimaryEmail(UserAccountService.java:123)
    at biz.daich.gwt.common.app.server.domain.services.UserAccountService.getCurrentLogIn(UserAccountService.java:312)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)......

This is makes sense as class UserAccount was not enhanced by the DataNucleus Enhancer as it is not in the list of files for enhancement. 这是有道理的,因为DataNucleus Enhancer没有增强UserAccount类,因为它不在增强文件列表中。

How can I configure the Google Plugin/Google App Engine/DataNucleus Enhancer to do the bytecode enhancement on those classes as it does with classes that I select by pattern in the Eclipse Project Properties -> Google -> App Engine -> ORM ? 我如何配置Google Plugin / Google App Engine / DataNucleus Enhancer来对这些类进行字节码增强,就像我在Eclipse Project Properties-> Google-> App Engine-> ORM中按模式选择的类所做的那样?

Can it be done this way? 可以这样做吗?

    If YES: How to define a pattern?

    If NO: How can I link few classes from another project, not even a whole package, in to the source tree of this project that will do the trick?

No way to update classes that are in a jar with new bytecode; 无法用新的字节码更新jar中的类; apart from unjarring them, enhancing them, and rejarring them. 除了解除他们的烦恼,增强他们并重新引起他们的注意。

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

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