http://www.intellij.net/tracker/idea/viewSCR?publicId=28792
The error says:
"There should be only one component at the top level".
For this case the message should be probably changed to: "The form must contain one top-level component" or something like this. Otherwise it takes some time to figure out what's wrong