title: Yui compressor StringIndexOutOfBoundsException on jboss
body: <p>When minimising yui with 2.4.6, I get this problem:</p>
  
  <p>java.lang.StringIndexOutOfBoundsException: String index out of range: 232</p>
  
  <pre><code>at java.lang.String.substring(String.java:1934)
  at com.yahoo.platform.yui.compressor.JavaScriptCompressor.printSourceString(JavaScriptCompressor.java:267)
  at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:330)
  at com.yahoo.platform.yui.compressor.JavaScriptCompressor.&lt;init&gt;(JavaScriptCompressor.java:533)
  </code></pre>
  
  <p>It works when started through my IDE but when deployed to jboss it doesn't. This place: <a href="http://yuilibrary.com/forum/viewtopic.php?p=20086">http://yuilibrary.com/forum/viewtopic.php?p=20086</a> has some discussion of the same problem.</p>
  
  <p>Apparently the issue is around org/mozilla/javascript/Parser being in the two jars that are pulled in from my maven config:</p>
  
  <pre><code>&lt;dependency&gt;
  &lt;groupId&gt;com.yahoo.platform.yui&lt;/groupId&gt;
  &lt;artifactId&gt;yuicompressor&lt;/artifactId&gt;
  &lt;version&gt;2.4.6&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Is there any way I can solve this using maven exclusions etc. or by upgrading my version of YUI. It seems daft that it just doesn't work and I don't want to have to write a custom classloader.</p>
  
  <p>Please help!</p>