Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-3380

MiniAccumuloCluster does not work with long classpath under Windows.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Auto Closed
    • 1.6.0, 1.6.1
    • None
    • mini
    • None
    • MS Windows

    Description

      When I run the MiniAccumuloCluster in a bigger test environment (lots of dependencies to other librarys), it happens, that the classpath gets very long, in my example about 30,000 bytes.
      When the MiniAccumuloCluster starts other processes (Zookeeper..), it gets the classpath in the getClasspath() function of MiniAccumuloClusterImpl .
      It basically takes the classpath of the running process, and adds the temp directory and hands it to the new process with the -cp option in line 249 (1.6.0) :

          argList.addAll(Arrays.asList(javaBin, "-Dproc=" + clazz.getSimpleName(), "-cp", classpath));
      

      In my example, adding the tmp-directory just enlarges the length of the classpath over the 32,768-limit for the java commandline. My test ends with the error

      java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.7.0_67\jre\bin\java": CreateProcess error=206, The filename or extension is too long
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
      at org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl._exec(MiniAccumuloClusterImpl.java:277)
      at org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl._exec(MiniAccumuloClusterImpl.java:300)
      at org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl.start(MiniAccumuloClusterImpl.java:442)
      at org.apache.accumulo.minicluster.MiniAccumuloCluster.start(MiniAccumuloCluster.java:72)
      

      I recommend to change the implementation to putting the classpath into the variable CLASSPATH, as described in

      http://unserializableone.blogspot.de/2007/10/solution-to-classpath-too-long-aka.html

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jsbaue Johannes Bauer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: