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

杀马特。学长 韩版系。学妹 提交于 2019-11-28 04:52:21

问题


I am getting this error

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:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/8353855/the-command-line-is-too-long-standard-error-from-the-datanucleus-tool

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