The command line is too long Standard error from the DataNucleus tool

本秂侑毒 提交于 2019-11-29 11:38:22

If you is using datanucleus-maven-plugin in windows simply set fork property as false in configuration of plugin as follow:

 <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>

See the datanucleus enhancer page for more datails.

You may look at http://www.datanucleus.org/products/accessplatform/troubleshooting.html. and here: http://code.google.com/p/vosao/issues/detail?id=47.

==============QUOTE==============

Problem

CreateProcess error=87 when running DataNucleus tools under Microsoft Windows OS.

Windows has a command line length limitation, between 8K and 64K characters depending on the Windows version, that may be triggered when running tools such as the Enhancer or the SchemaTool with too many arguments.

Solution

When running such tools from Maven or Ant, disable the fork mechanism by setting the option fork="false". ==============END==============

pom.xml file needs to be adjusted as follows:

==============WAS==============

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

==============END WAS==============

==============SHOULD BE==============

<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>

==============SHOULD BE==============

My suggested change to pom.xml also specifies limiting scope of Enhancer work area.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!