Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

I get this error:

java.lang.InternalError: name is too long to represent
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:338)
        at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:291)
        at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:259)

Which seems related to some debug functionality (in fact removing -Xdebug command line option the error disappears). I've also found some information in ASF Bugzilla. Is there a way to solve this?

Possible solutions I can think of are to change the JVM (using JRockit which should't have this issue), but I do not really know if this can solve the issue and if it can break something else.

like image 652
Paolo Avatar asked Nov 21 '11 09:11

Paolo


2 Answers

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.
like image 124
Guus Avatar answered Oct 13 '22 16:10

Guus


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>
like image 24
sumit dugar Avatar answered Oct 13 '22 17:10

sumit dugar