[Geoserver-users] WMS "Library Mode" request

Hi users.
I'm trying to build a geoserver "library mode" request, using info
from this urls:
http://www.geo-solutions.it/blog/dynamic-wms-styling-with-geoserver-sld-and-library-mode/
and
http://docs.geoserver.org/latest/en/user/styling/sld-working.html#sld-library-mode

I've build an url like this:
http://localhost:8080/geoserver/URBINO/wms?layers=URBINO:VPARTICELLE,URBINO:GTCTFAB&styles=CATPARTICELLE,ruleCATBASEFABBRICATI&bbox=...&width=512&height=512&srs=EPSG:3004&format=image/png&service=wms&version=1.1.1&request=GetMap&SLD_BODY=
...
where SLD_BODY is something like
"<NamedLayer><Name>URBINO:GTCTFAB</Name>
<UserStyle><Name>ruleCATBASEFABBRICATI</Name>..." and it's perfectly
valid "per se" (i've made separate tests.

So basically what I've build is a request that define two layers and two styles.
The first style is defined as a geoserver style
The second style is NOT defined as a geoserver style, but is an
"UserStyle" inside SLD_BODY.
The result of the request is a Service
Exception:"Java.lang.ArrayIndexOutOfBoundsException: 1 1"

Note that I've tried to play with STYLES param, using as example the
string "styles=CATPARTICELLE," (note the last comma) with the same
results.
A request with "styles=CATPARTICELLE," and WITHOUT SLD_BODY works
well, but of course the second layer uses the default style.
A request without SLD_BODY and "styles=CATPARTICELLE" (no comma here)
fails, as I may expect.

Any suggestions?
Thanks for any kind of help.
Diego Guidi