Friday, July 9, 2010

If you're seeing StringIndexOutOfBoundsException in ...

... then, as explicitly noted on JDeveloper 11g PS2 Release Notes, what you're seeing is a JDK regression bug, namely, 6875866. To workaround it you need to use the -XX:-UseSS42Intrinsics option on two places:

1. Project Properties -> Run/Debug/Profile -> Default (or whatever is your Run Configuration name) -> Edit... -> Java Options -> enter -XX:-UseSSE42Intrinsics in the text box.
2. Edit to your <JDEV_HOME>/jdev/bin/jdev.conf  and add this line:  AddVMOption -XX:-UseSS42Intrinsics

Note that the Release Notes only talk about adding the option to WLS's runtime settings, but you also need it for design time as ADF Faces is being called behind the scenes to render the JSPX files in the IDE. I also recommend to turn on the "Show Design Time Messages in Log" option so you can see any error messages being raised by the JSP/HTML Visual Editor. Go to Preferences -> JSP and HTML Visual Editor panel to turn it on.