Title: Error: Exception in thread "main" java.lang.StackOverflowError
This is caused by the JVM. The JVM can only handle calling about 75 methods deep (ie. methods called from other methods) per thread. This is becoming a seious issue with all of these frameworks building on top of each other. If you look through the stack trace, you can see that it takes 5 invoke methods before a Web Service client actually gets near the service. Then you have the commons.discovery package also using 11 methods just to find an object.
 
The solution is to spawn another thread at some point and keep going through your method invokations from there. However, in this situation that may not be feasible. The only thing I can think of is if your services or handlers can use a thread to do their work (you would have to make the normal main thread wait for that thread), I know it seems like a waste, but is becomes necessary until they alter the JVM to allow you to specify the stack size. You could look into alternative implementations of the JVM to see if others allow you to do this.
 


--
Steven Smith <[EMAIL PROTECTED]>
Software Developer / Analyst
Telephone 03 6223 1999
Facsimile 03 6223 1988
Web www.geometryit.com
Address 31 Salamanca Square, Battery Point, TAS 7004, Australia
Postal PO Box 844, Sandy Bay, TAS 7006, Australia
 


From: Corvino Fabio [mailto:[EMAIL PROTECTED]
Sent: Monday, 11 July 2005 8:03 PM
To: '[email protected]'
Subject: Error: Exception in thread "main" java.lang.StackOverflowError

Hi,

I have a client that invoke a web server and all good works but when I
insert a handler on the client that it recalls an other ws comes given
the following error to me:


Exception in thread "main" java.lang.StackOverflowError
        at java.util.zip.ZipFile.getEntry(ZipFile.java:253)
        at java.util.jar.JarFile.getEntry(JarFile.java:197)
        at java.util.jar.JarFile.getJarEntry(JarFile.java:180)
        at
sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:674)
        at
sun.misc.URLClassPath$JarLoader.findResource(URLClassPath.java:663)
        at sun.misc.URLClassPath.findResource(URLClassPath.java:142)
        at java.net.URLClassLoader$2.run(URLClassLoader.java:362)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findResource(URLClassLoader.java:359)

        at java.lang.ClassLoader.getResource(ClassLoader.java:977)
        at java.lang.ClassLoader.getResource(ClassLoader.java:972)
        at
org.apache.commons.discovery.jdk.JDK12Hooks.getResources(JDK12Hooks.java
:149)
        at
org.apache.commons.discovery.resource.DiscoverResources$1.getNextResourc
es(DiscoverResources.java:153)
        at
org.apache.commons.discovery.resource.DiscoverResources$1.getNextResourc
e(DiscoverResources.java:129)
        at
org.apache.commons.discovery.resource.DiscoverResources$1.hasNext(Discov
erResources.java:116)
        at
org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNex
tClassNames(DiscoverNamesInFile.java:186)

        at
org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNex
tClassName(DiscoverNamesInFile.java:170)

        at
org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.hasNex
t(DiscoverNamesInFile.java:157)
        at
org.apache.commons.discovery.resource.names.NameDiscoverers$1.getNextIte
rator(NameDiscoverers.java:143)
        at
org.apache.commons.discovery.resource.names.NameDiscoverers$1.hasNext(Na
meDiscoverers.java:126)
        at
org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$
1.getNextResource(ResourceClassDiscoverImpl.java:159)

        at
org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$
1.hasNext(ResourceClassDiscoverImpl.java:147)

        at
org.apache.axis.configuration.EngineConfigurationFactoryFinder$1.run(Eng
ineConfigurationFactoryFinder.java:120)

        at java.security.AccessController.doPrivileged(Native Method)
        at
org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactor
y(EngineConfigurationFactoryFinder.java:113)

        at
org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactor
y(EngineConfigurationFactoryFinder.java:160)

        at
org.apache.axis.client.Service.getEngineConfiguration(Service.java:812)
        at
org.apache.axis.client.Service.getAxisClient(Service.java:103)
        at org.apache.axis.client.Service.<init>(Service.java:112)
        at
com.atosorigin.serviceware.RsaSha1EncRandom.client.RsaSha1EncRandomServi
ceLocator.<init>(Unknown Source)
        at
com.atosorigin.serviceware.RsaSha1EncRandom.client.RsaSha1EncRandomServi
ceTestCase.test1RsaSha1EncRandomGetRandom(Unknown Source)

        at
com.atosorigin.serviceware.strong.authentication.client.Client.initAuthn
(Unknown Source)
        at client.esempio.HandlerX.invoke(HandlerX.java:17)
        at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j
ava:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:127)

        at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
        at org.apache.axis.client.Call.invoke(Call.java:2748)
        at org.apache.axis.client.Call.invoke(Call.java:2424)
        at org.apache.axis.client.Call.invoke(Call.java:2347)
        at org.apache.axis.client.Call.invoke(Call.java:1804)
        at
com.atosorigin.serviceware.RsaSha1EncRandom.client.RsaSha1EncRandomSoapB
indingStub.getRandom(Unknown Source)
        at
com.atosorigin.serviceware.RsaSha1EncRandom.client.RsaSha1EncRandomServi
ceTestCase.test1RsaSha1EncRandomGetRandom(Unknown Source)

        at
com.atosorigin.serviceware.strong.authentication.client.Client.initAuthn
(Unknown Source)
        at client.esempio.HandlerX.invoke(HandlerX.java:17)
        at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j
ava:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:127)

        at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
        at org.apache.axis.client.Call.invoke(Call.java:2748)
        at org.apache.axis.client.Call.invoke(Call.java:2424)
        at org.apache.axis.client.Call.invoke(Call.java:2347)
        at org.apache.axis.client.Call.invoke(Call.java:1804)
        at
com.atosorigin.serviceware.RsaSha1EncRandom.client.RsaSha1EncRandomSoapB
indingStub.getRandom(Unknown Source)
        at
com.atosorigin.serviceware.RsaSha1EncRandom.client.RsaSha1EncRandomServi
ceTestCase.test1RsaSha1EncRandomGetRandom(Unknown Source)

        at
com.atosorigin.serviceware.strong.authentication.client.Client.initAuthn
(Unknown Source)
        at client.esempio.HandlerX.invoke(HandlerX.java:17)
        at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j
ava:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:127)

        at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
        at org.apache.axis.client.Call.invoke(Call.java:2748)
        at org.apache.axis.client.Call.invoke(Call.java:2424)
        at org.apache.axis.client.Call.invoke(Call.java:2347)
        at org.apache.axis.client.Call.invoke(Call.java:1804)
        at
com.atosorigin.serviceware.RsaSha1EncRandom.client.RsaSha1EncRandomSoapB
indingStub.getRandom(Unknown Source)
        at
com.atosorigin.serviceware.RsaSha1EncRandom.client.RsaSha1EncRandomServi
ceTestCase.test1RsaSha1EncRandomGetRandom(Unknown Source)

        at
com.atosorigin.serviceware.strong.authentication.client.Client.initAuthn
(Unknown Source)
        at client.esempio.HandlerX.invoke(HandlerX.java:17)
        at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j
ava:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:127)

        at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
        at org.apache.axis.client.Call.invoke(Call.java:2748)
        at org.apache.axis.client.Call.invoke(Call.java:2424)
        at org.apache.axis.client.Call.invoke(Call.java:2347)
        at org.apache.axis.client.Call.invoke(Call.java:1804)
        at
com.atosorigin.serviceware.RsaSha1EncRandom.client.RsaSha1EncRandomSoapB
indingStub.getRandom(Unknown Source)
        at
com.atosorigin.serviceware.RsaSha1EncRandom.client.RsaSha1EncRandomServi
ceTestCase.test1RsaSha1EncRandomGetRandom(Unknown Source)

        at
com.atosorigin.serviceware.strong.authentication.client.Client.initAuthn
(Unknown Source)
        at client.esempio.HandlerX.invoke(HandlerX.java:17)
       


Please help me!

Thanks




Fabio Corvino
Software Engineer

Atos Origin
via Antiniana, 2A - 80078 Pozzuoli (NA) -
Italy

Tel:  +39.081.6103511
E-mail: [EMAIL PROTECTED]
Web site: www.atosorigin.it

Reply via email to