I got it working by doing two things:
- Changed call to:
sudo -u tomcat6 jstack -J-d64 -m pid - Replaced OpenJDK with Sun’s original sun-6-jdk and sun-6-jre packages
Explanation for part 1: I switched to 64-bit mode, used sudo and run the command as Tomcat user.
Note: Part 2 might not be necessary. For some users it seems like part 1 is enough. In fact, try to add just the sudo command first. It might already do the trick.