1 Reply Latest reply: Mar 25, 2009 2:46 AM by 843804 RSS

    application meet exception StackOverflowError after migrate to jre1.6

    843804
      Hi,
      I have a small test appilcation using axis but meet following problem:
      If the java option -Xss is set to -Xss128k
      -- if the application is compiled and run on java version "1.5.0_12", it can run successfully.
      -- if the application is compiled and run on java version "1.6.0_11", it always runs failed with runtime exception java.lang.StackOverflowError at "Service service = new Service(); "
      If the java option -Xss is set to -Xss256k
      the application compiled and run on both java version can run successfully.

      It is quite strange, seems some behavior changed in java 1.6, is there anyone has some ideas about this problem?

      The application is very very simple as following:
      import javax.xml.namespace.QName;
      import org.apache.axis.client.Call;
      import org.apache.axis.client.Service;
      
      public class TestPro {
      
           public static void main(String[] args) 
           {
                try
                {
                     System.out.println("Before Service");
                     Service service = new Service();   //This part always throw exception in jre1.6 when Xss is set to 128k
                     System.out.println("After Service");
                     Call call = null;
                     System.out.println("Before Call");
                     call = (Call)service.createCall();
                     System.out.println("After Call");
                     ...
                }
                catch (Exception e)
                {
                     System.out.println("Exception");
                     e.printStackTrace();
                }
           }     
      }
      Thanks!

      //Zoe
        • 1. Re: application meet exception StackOverflowError after migrate to jre1.6
          843804
          The exception info is as following:

          Exception in thread "main" java.lang.StackOverflowError
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
          at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
          at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
          at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
          at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
          at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
          at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
          at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
          at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
          at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:418)
          at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:378)
          at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45)
          at java.security.AccessController.doPrivileged(Native Method)
          at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41)
          at org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:33)
          at org.apache.axis.handlers.BasicHandler.<clinit>(BasicHandler.java:43)
          at org.apache.axis.client.Service.getAxisClient(Service.java:104)
          at org.apache.axis.client.Service.<init>(Service.java:113)
          at TestPro.main(Unknown Source)