java.lang.InternalError: name is too long to represent

update The bug mentioned in the original answer below has now been closed!


As noted in the article that you reference, this is a bug in the Sun/Oracle JVM implementation. At the time of writing, it is unresolved.

I can think of three ways to work around the issue:

  1. Don't generate SMAP files at all (eg: don't run with -Xdebug or use suppressSmap-like settings)
  2. Try to make sure that the size of the debug information is small (eg: reduce the size of your code)
  3. Use a different virtual machine implementation.

If you can determine the class that is causing the problem you should be able to use Stripper to remove the debug extension information from that one class and still be able to debug the rest.


One work around that worked for me is adding the following entry in the tomcat/conf/web.xml:

<init-param> 
   <param-name>suppressSmap</param-name> 
   <param-value>true</param-value> 
</init-param>