4 Replies Latest reply: Mar 12, 2013 5:10 AM by 996230 RSS

    Root cause of ServletException. java.lang.InternalError: name is too long

    996230
      HI I have created the Struts web application on Spring Tool Suite(STS) and am able to run the application perfectly in RUN Mode with WEB LOGIC 12c(12.1.1) server from STS.
      But am not able to run the application in debug mode due to getting below error.

      ]] Root cause of ServletException.
      java.lang.InternalError: name is too long to represent
           at java.lang.ClassLoader.defineClass1(Native Method)
           at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
           at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
           at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
           at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:343)
           Truncated. see log file for complete stacktrace
      >

      My Struts web application Flow:

      First request goes to Servlet Filter( custom Filter) and am bypassing request to Struts1 framework.request is going to filter perfectly in DEBUG mode and getting exception before going to struts action class.

      my web.xml

      <filter>
      <filter-name>SessionExpiryFilter</filter-name>
      <description>Filter to ensure user session is not expired...</description>
      <filter-class>com.test.CustomFilter</filter-class>
      </filter>
      <filter-mapping>
      <filter-name>SessionExpiryFilter</filter-name>
      <url-pattern>*.do</url-pattern>
      </filter-mapping>

      <servlet>
      <servlet-name>action</servlet-name>
      <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
      <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
      <servlet-name>action</servlet-name>
      <url-pattern>*.do</url-pattern>
      </servlet-mapping>


      System OS: MAC 10.8, RAM: 4GB


      Please help on this ..

      Regards
      Raju