命令行过长 DataNucleus工具的标准错误

4

我遇到了这个错误

The command line is too long.

mvn install

Standard error from the DataNucleus tool  org.datanucleus.enhancer.DataNucleusEnhancer 

The command line is too long.

1
这个网址 http://www.datanucleus.org/servlet/forum/viewthread_thread,5590 对你有帮助吗? - Raghuram
2个回答

14

如果您在Windows中使用datanucleus-maven-plugin,只需按照以下方式在插件的配置中将fork属性设置为false

 <plugins>
  ...
    <plugin>
        <groupId>org.datanucleus</groupId>
        <artifactId>datanucleus-maven-plugin</artifactId>
        <version>3.3.0-release</version>
        <configuration>
            <verbose>true</verbose>
            <fork>false</fork>   <!-- Solve windows line too long error -->
        </configuration>
    </plugin>
  ...
  </plugins>

查看datanucleus增强器页面获取更多详情。


0

您可以查看http://www.datanucleus.org/products/accessplatform/troubleshooting.htmlhttp://code.google.com/p/vosao/issues/detail?id=47

==============引用==============

问题

在Microsoft Windows操作系统下运行DataNucleus工具时出现CreateProcess error=87错误。

Windows有一个命令行长度限制,取决于Windows版本,介于8K和64K字符之间,当运行Enhancer或SchemaTool等工具时,可能会触发该限制,因为参数过多。

解决方案

从Maven或Ant运行此类工具时,请通过设置选项fork="false"来禁用分叉机制。

pom.xml文件需要进行以下调整:

==============结束==============

<plugin>
    <groupId>org.datanucleus</groupId>
    ....
    <configuration>
        <mappingIncludes>**/*.class</mappingIncludes>
        <verbose>true</verbose>
        <enhancerName>ASM</enhancerName>
        <api>JDO</api>
    </configuration>
    ...
</plugin>

==============结束==============

==============应该是==============

<plugin>
    <groupId>org.datanucleus</groupId>
    ....
    <configuration>
        <fork>false</fork>
        <mappingIncludes>org/vosao/entity/*.class</mappingIncludes>
        <verbose>true</verbose>
        <enhancerName>ASM</enhancerName>
        <api>JDO</api>
    </configuration>
    ...
</plugin>

==============应该是==============

我建议的pom.xml更改还指定了限制Enhancer工作区域的范围。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接