accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johannes Bauer (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ACCUMULO-3380) MiniAccumuloCluster does not work with long classpath under Windows.
Date Thu, 04 Dec 2014 12:16:12 GMT

     [ https://issues.apache.org/jira/browse/ACCUMULO-3380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Johannes Bauer updated ACCUMULO-3380:
-------------------------------------
    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, 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) : 
{code}
    argList.addAll(Arrays.asList(javaBin, "-Dproc=" + clazz.getSimpleName(), "-cp", classpath));
{code}
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
{code}
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)
{code}

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


  was:
When I run the MiniAccumuloCluster in a bigger test environment, it happens, that the classpath
gets very long, in my example about 30,000 bytes. 
When the MiniAccumuloCluster starts other processes, 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) : 
{code}
    argList.addAll(Arrays.asList(javaBin, "-Dproc=" + clazz.getSimpleName(), "-cp", classpath));
{code}
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
{code}
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)
{code}

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



> MiniAccumuloCluster does not work with long classpath under Windows. 
> ---------------------------------------------------------------------
>
>                 Key: ACCUMULO-3380
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3380
>             Project: Accumulo
>          Issue Type: Bug
>          Components: mini
>    Affects Versions: 1.6.0, 1.6.1
>         Environment: MS Windows
>            Reporter: Johannes Bauer
>
> 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, 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) : 
> {code}
>     argList.addAll(Arrays.asList(javaBin, "-Dproc=" + clazz.getSimpleName(), "-cp", classpath));
> {code}
> 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
> {code}
> 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)
> {code}
> 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message