4

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.
Joey
  • 344,408
  • 85
  • 689
  • 683
user1077002
  • 41
  • 1
  • 2

2 Answers2

14

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.

0

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.

WebComer
  • 1,131
  • 2
  • 19
  • 31