I've found this vulnerability (http://www.metasploit.com/modules/exploit/multi/http/jboss_invoke_deploy) but can't seem to set proper values for exploit to work , payload shown on site gives me worn payload error.Thanks
You have not provided the exact error message but I believe you might be using the wrong payload. For example, executing a payload designed for Windows on a Linux setup is surely going to fail. If you are not sure what environment the JBOSS is operating in, use the Java meterpreter payload. It will execute on all the supported platforms. The page you have referred provides an example of using windows/meterpreter/reverse_tcp payload. There is a meterpreter payload for Linux as well as java.
Linux payload is unix/meterpreter/reverse_tcp Java payload is java/meterpreter/reverse_tcp