You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2015/02/20 00:16:11 UTC
[Bug 57608] New: Java version check in bin/jmeter script in 2.12
fails on Solaris 10
https://bz.apache.org/bugzilla/show_bug.cgi?id=57608
Bug ID: 57608
Summary: Java version check in bin/jmeter script in 2.12 fails
on Solaris 10
Product: JMeter
Version: 2.12
Hardware: Sun
OS: Solaris
Status: NEW
Severity: normal
Priority: P5
Component: Main
Assignee: issues@jmeter.apache.org
Reporter: michael.strasser@team.telstra.com
The Java version check code in bin/jmeter script in 2.12 fails when run on
Solaris 10.
Example failure output:
-bash-3.2$ /opt/apache-jmeter-2.12/bin/jmeter
/opt/apache-jmeter-2.12/bin/jmeter: syntax error at line 32:
`CURRENT_VERSION=$' unexpected
Line 32 contains:
CURRENT_VERSION=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')
This syntax is not accepted by the standard shell /bin/sh.
More about the system:
-bash-3.2$ uname -a
SunOS ssessdevbuild 5.10 Generic_147147-26 sun4v sparc sun4v
JMeter 2.11 does not have the Java version check and works on Solaris 10.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 57608] Java version check in bin/jmeter script in 2.12 fails on
Solaris 10
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57608
--- Comment #1 from Rainer Jung <ra...@kippdata.de> ---
Could you please check, whether
CURRENT_VERSION=`"$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}'`
works for you? It should be compatible with any shel.
Any other problems with the script?
Thanks,
Rainer
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 57608] Java version check in bin/jmeter script in 2.12 fails on
Solaris 10
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57608
Rainer Jung <ra...@kippdata.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #4 from Rainer Jung <ra...@kippdata.de> ---
Date: Fri Feb 20 05:15:13 2015
New Revision: 1661060
URL: http://svn.apache.org/r1661060
Log:
Bug 57608 - Java version check in bin/jmeter script
in 2.12 fails on Solaris 10
Bugzilla Id: 57608
Modified:
jmeter/trunk/bin/jmeter
jmeter/trunk/bin/jmeter.sh
jmeter/trunk/xdocs/changes.xml
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 57608] Java version check in bin/jmeter script in 2.12 fails on
Solaris 10
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57608
--- Comment #3 from Rainer Jung <ra...@kippdata.de> ---
I also fixed the $(uname) and applied the change to both, bin/jmeter.sh and
bin/jmeter which in trunk both had the problematic lines. No other JMeter shell
scripts seem to use the sub shell notation $(...).
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 57608] Java version check in bin/jmeter script in 2.12 fails on
Solaris 10
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57608
--- Comment #2 from Michael Strasser <mi...@team.telstra.com> ---
Hi Rainer, thanks for your quick response.
Replacing $( ... ) with ` ... ` works in this Solaris shell.
There was also a problem with the awk command in the same line. The version of
awk on Solaris 10 cannot have a space between the -F option and the field
separator (gawk allows one).
Here is a diff between the original and the version that works on Solaris:
-bash-3.2$ diff jmeter.orig jmeter
32,34c32,34
< CURRENT_VERSION=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')
< minimal_version=$(echo $MINIMAL_VERSION | awk -F'.' '{ print $2 }')
< current_version=$(echo $CURRENT_VERSION | awk -F'.' '{ print $2 }')
---
> CURRENT_VERSION=`"$_java" -version 2>&1 | awk -F'"' '/version/ {print $2}'`
> minimal_version=`echo $MINIMAL_VERSION | awk -F'.' '{ print $2 }'`
> current_version=`echo $CURRENT_VERSION | awk -F'.' '{ print $2 }'`
46c46
< case $(uname) in
---
> case `uname` in
--
You are receiving this mail because:
You are the assignee for the bug.