Springs Element 'beans' cannot have character [children], because the type's content type is element-only
I had the same problem. I looked at it for hours. I could not find any problem. Then I decided, sometimes you see something different if you use a different editor. I closed Netbeans and opened the file in emacs. I immediately saw, there were some kind of non-breaking space characters, or tabs, or some type of whitespace that wasn't whitespace. I don't know which character it was but it showed up in red in emacs, but was whitespace in Netban
Unfortunately mine was a simple mistake I type a '.' character in the middle.
Solved by just removing the '.' - so will get this type of error if any unused and unknown character is present in the configuration file.
Follow the below steps outlined and you should be able to resolve it :
- Try to open the xml in Internet Explorer or any xml view tool and see whether the xml is rendered properly.
- Or you can do a ctrl + shift + F to format the xml file and see if xml is well formed or not.
- With the above step you should be able to find the exact location where you need to make changes to make the xml well formed.
- In my case I had to just remove the extra "<" closing tag to resolve the issue.