gpt4 book ai didi

java - Maven GAE/Datanucleus 不确定性

转载 作者:行者123 更新时间:2023-12-04 06:12:25 40 4
gpt4 key购买 nike

我今天花了一些时间,试图制作我的第一个 maven 管理的 Google 应用引擎 1.5.4 + GWT 2.4.0 构建。

我终于进入了所有内容都可以编译并且 gae:run 目标起作用的阶段。这是我想象中的更多工作,但是嘿,这一切都很有趣。

无论如何,我现在的问题是,即使一切正常,当 datanucleus 增强器运行时,我也会收到以下错误。

[ERROR] --------------------
[ERROR] Standard error from the DataNucleus tool + org.datanucleus.enhancer.DataNucleusEnhancer :
[ERROR] --------------------
[ERROR] Oct 02, 2011 11:04:39 PM org.datanucleus.enhancer.DataNucleusEnhancer <init>
INFO: DataNucleus Enhancer : Using ClassEnhancer "ASM" for API "JDO"
Oct 02, 2011 11:04:39 PM org.datanucleus.plugin.NonManagedPluginRegistry resolveConstraints
INFO: Bundle "org.datanucleus" has an optional dependency to "org.eclipse.equinox.registry" but it cannot be resolved
Oct 02, 2011 11:04:39 PM org.datanucleus.plugin.NonManagedPluginRegistry resolveConstraints
INFO: Bundle "org.datanucleus" has an optional dependency to "org.eclipse.core.runtime" but it cannot be resolved
Oct 02, 2011 11:04:39 PM org.datanucleus.enhancer.DataNucleusEnhancer main
INFO: DataNucleus Enhancer (version 1.1.4) : Validation of enhancement state
Oct 02, 2011 11:04:40 PM org.datanucleus.jdo.metadata.JDOAnnotationReader processClassAnnotations
INFO: Class "net.kindleit.gae.example.model.Message" has been specified with JDO annotations so using those.
Oct 02, 2011 11:04:40 PM org.datanucleus.metadata.MetaDataManager loadClasses
INFO: Class "net.kindleit.gae.example.model.Messages" has no MetaData or annotations.
Oct 02, 2011 11:04:40 PM org.datanucleus.enhancer.DataNucleusEnhancer addMessage
INFO: ENHANCED (PersistenceCapable) : net.kindleit.gae.example.model.Message
Oct 02, 2011 11:04:40 PM org.datanucleus.enhancer.DataNucleusEnhancer addMessage
INFO: DataNucleus Enhancer completed with success for 1 classes. Timings : input=78 ms, enhance=15 ms, total=93 ms. Consult the log for full details
[ERROR] --------------------

那里发生什么事了? [ERROR] 块是怎么回事?似乎根本没有任何错误?

此外,我收到以下警告,我不完全理解
[WARNING] Could not transfer metadata asm:asm/maven-metadata.xml from/to local.repository (file:../../local.repository/trunk): No connector available to access repository local.repository (file:../../local.repository/trunk) of type legacy using the available factories WagonRepositoryConnectorFactory

最后,如何将所有依赖项添加到 datanucleus enchancer 类路径中?
来自 datanucleus 增强器的 [INFO] 消息列出了其类路径中的所有 jar,它似乎包含所有内容,这是怎么回事?我会认为那里只需要 JDO 和持久性相关的库?

最佳答案

我和你有同样的错误。然后我将版本更改为最新版本。错误消失了。

<properties>
<datanucleus.version>3.0.1</datanucleus.version>
<maven-datanucleus-plugin>3.0.0-release</maven-datanucleus-plugin>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<!--datanucleus related dependencies-->
<dependency>
<groupId>com.google.appengine.orm</groupId>
<artifactId>datanucleus-appengine</artifactId>
<version>1.0.10</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-core</artifactId>
<version>${datanucleus.version}</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>transaction-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--jdo related dependencies-->
<dependency>
<groupId>javax.jdo</groupId>
<artifactId>jdo2-api</artifactId>
<version>2.3-ec</version>
<exclusions>
<!--
exclude the legacy javax.transaction:transaction-api and replace it
with javax.transaction:jta (it appears to be the same thing)
-->
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>transaction-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>


<build>
<plugins>
..........
<plugin>
<groupId>org.datanucleus</groupId>
<artifactId>maven-datanucleus-plugin</artifactId>
<version>${maven-datanucleus-plugin}</version>
<configuration>
<!--
Make sure this path contains your persistent classes!
-->
<mappingIncludes>**/db/*.class</mappingIncludes>
<verbose>true</verbose>
<enhancerName>ASM</enhancerName>
<api>JDO</api>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>enhance</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-core</artifactId>
<version>${datanucleus.version}</version>
<exclusions>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>transaction-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-rdbms</artifactId>
<version>${datanucleus.version}</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-enhancer</artifactId>
<version>${datanucleus.version}</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-api-jdo</artifactId>
<version>${datanucleus.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

关于java - Maven GAE/Datanucleus 不确定性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7629698/

40 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com