Did you have Eclipse installed and did you take a look at the Java code? Most of the time Eclipse already gives you a clue what is wrong. If you see nothing wrong publish the Java code so we can help if we can.
Regards,
Ronald
[EDIT] Check out the community commons module. There you have some examples on how to execute microflows from Java. It could be that you are missing some parameters.