Too low setting for -Xss and illegal cyclic inheritance dependencies

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Too low setting for -Xss and illegal cyclic inheritance dependencies

faisal-2

Hi there,

 

I am facing a problem in deploying multiple war file on a server on tomcat.

 

I tried multiple war files on windows machine on tomcat 8 & 9 versions, which works fine. But when it does deploy to Linux (ubuntu) server it does not deploy all of the war files on the server. I tried it on both tomcat versions 8 & 9.

 

I searched for a solution and tried to keep increasing the memory with the following command in the environment file but the problem still persists.

 

CATALINA_OPTS=-server -Xms2048m -Xmx2048m -XX:PermSize=1024m -XX:MaxPermSize=2048m

 

It does compile some war files but raised an error on some or all of the war files, with random behavior.

 

Full detail of error is below:

 

08-Jan-2019 14:13:38.834 SEVERE [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/home/ubuntu/apache-tomcat-9.0.14/webapps/Stage.war]

java.lang.IllegalStateException: Error starting child

                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:716)

                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)

                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)

                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)

                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1850)

                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

                at java.util.concurrent.FutureTask.run(FutureTask.java:266)

                at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

                at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)

                at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:773)

                at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)

                at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1621)

                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:305)

                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)

                at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1149)

                at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1351)

                at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1355)

                at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1333)

                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

                at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)

                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)

                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

                at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

                at java.lang.Thread.run(Thread.java:748)

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Stage]]

                at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441)

                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)

                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)

                ... 25 more

Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/Stage] due to a StackOverflowError. Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies. The class hierarchy being processed was [org.bouncycastle.asn1.ASN1EncodableVector->org.bouncycastle.asn1.DEREncodableVector->org.bouncycastle.asn1.ASN1EncodableVector]

                at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2174)

                at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2112)

                at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:2058)

                at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:2028)

                at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1981)

                at org.apache.catalina.startup.ContextConfig.processClasses(ContextConfig.java:1237)

                at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1136)

                at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:768)

                at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:301)

                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)

                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5029)

                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

 

Regards,

Best Regards | Bien Cordialement | تحياتي

Faisal Zaidi
Application Architect


Bester Capital Investments Group | Proud Sponsor Of Moto3

     

M: +92 345 4077557
E: [hidden email]
    www.bestercapitalmedia.com

UAE | ITALY | PK | SWITZERLAND

 

Reply | Threaded
Open this post in threaded view
|

Re: Too low setting for -Xss and illegal cyclic inheritance dependencies

markt
On 09/01/2019 13:21, [hidden email] wrote:
> It does compile some war files but raised an error on some or all of the> war files, with random behavior.

You have a corrupt JAR or conflicting dependencies or similar.

> Caused by: java.lang.IllegalStateException: Unable to complete the scan
> for annotations for web application [/Stage] due to a
> StackOverflowError. Possible root causes include a too low setting for
> -Xss and illegal cyclic inheritance dependencies. The class hierarchy
> being processed was
> [org.bouncycastle.asn1.ASN1EncodableVector->org.bouncycastle.asn1.DEREncodableVector->org.bouncycastle.asn1.ASN1EncodableVector]

That is telling you that:
org.bouncycastle.asn1.ASN1EncodableVector
inherits from
org.bouncycastle.asn1.DEREncodableVector
which inherits from
org.bouncycastle.asn1.ASN1EncodableVector

You cannot have circular inheritance in Java. You need to look at the
JAR(s) in your web application that provide those classes.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Too low setting for -Xss and illegal cyclic inheritance dependencies

faisal-2
Hi Mark,

We are running 4 war build copies of same source code with different
environments.
It does run fine on a Windows machine, but when we deploy it to Ubuntu
server it give the error mentioned.

We did not directly include these dependencies, these might be some
dependency we used that will be dependent on the bouncycastle. Any way to
find out that dependency.

Regards,
Faisal Zaidi

-----Original Message-----
From: Mark Thomas [mailto:[hidden email]]
Sent: Wednesday, January 9, 2019 7:28 PM
To: Tomcat Users List
Subject: Re: Too low setting for -Xss and illegal cyclic inheritance
dependencies

On 09/01/2019 13:21, [hidden email] wrote:
> It does compile some war files but raised an error on some or all of the>
war files, with random behavior.

You have a corrupt JAR or conflicting dependencies or similar.

> Caused by: java.lang.IllegalStateException: Unable to complete the
> scan for annotations for web application [/Stage] due to a
> StackOverflowError. Possible root causes include a too low setting for
> -Xss and illegal cyclic inheritance dependencies. The class hierarchy
> being processed was
> [org.bouncycastle.asn1.ASN1EncodableVector->org.bouncycastle.asn1.DERE
> ncodableVector->org.bouncycastle.asn1.ASN1EncodableVector]

That is telling you that:
org.bouncycastle.asn1.ASN1EncodableVector
inherits from
org.bouncycastle.asn1.DEREncodableVector
which inherits from
org.bouncycastle.asn1.ASN1EncodableVector

You cannot have circular inheritance in Java. You need to look at the
JAR(s) in your web application that provide those classes.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]