CMDBuild Forum

Error loading Shark with CMDBuild 2.5.0

I'm running:

    Fedora Linux 23 (client).
    CentOS 7.3 (server).
    Firefox 50.1.0 (but the fail occurs yet with Google Chrome 55.0).
    CMDBuild 2.5
    Tomcat 8.0.47
    Java 1.8.0_101
    PostgreSQL 9.5.9

When i was running CMDBuild 2.4.3, the integration with Shark was fine. But when i've installed CMDBuild 2.5.0 with cmdbuild-shark-server-2.5.0.war package, Shark app doesn't load and Tomcat shows:

 

09-Feb-2018 11:22:44.283 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /opt/tomcat/8.0.47/webapps/shark.war
09-Feb-2018 11:22:48.387 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
 org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/shark]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:976)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1853)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/shark] 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:2108)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2054)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1999)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1969)
    at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1923)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1166)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:783)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:307)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5213)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    ... 10 more

09-Feb-2018 11:22:48.388 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive /opt/tomcat/8.0.47/webapps/shark.war
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/shark]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:757)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:976)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1853)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

09-Feb-2018 11:22:48.389 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /opt/tomcat/8.0.47/webapps/shark.war has finished in 4,106 ms

 

But when I simply return cmdbuild-shark-server-2.4.3.war, Shark loads normaly:

++++++++++++++++++++++++++++++++++++++ init - start
Shark will be configured from file /opt/tomcat/8.0.47/webapps/shark/conf/Shark.conf
environmentType= tomcat
    t= org.objectweb.jotm.Current@78b56390
    pre configure . . . . . .

Together Workflow Server 4.4-1

SharkEngineManager -> Shark engine is being initialized …
Shark -> shark engine initialization is finished, it lasted 1 [s]
Shark -> Shark ready and waiting …
pre getConnection . . . . . .
pre commit . . . . . .
++++++++++++++++++++++++++++++++++++++ init - end

 

Only to clarify:

  • cmdbuild-2.4.3.war + cmdbuild-shark-server-2.4.3.war - OK
  • cmdbuild-2.5.0.war + cmdbuild-shark-server-2.4.3.war - OK
  • cmdbuild-2.5.0.war + cmdbuild-shark-server-2.5.0.war - ERROR (shown above)

Thanks for the report, our technicians will make some checks.
However, it is not a general problem because the instances updated by our technicians
(for example the online demo) work regularly.
CMDBuild Team

Hi,

this is actually a known bug, that affects 2.5.0. There is an easy fix, and will be resolved with the next release, 2.5.1.
Meanwhile you can patch it manually by removing the file WEB-INF/lib/bcprov-jdk15-1.45.jar within cmdbuild-shark-server-2.5.0.war; this file is causing a jar/classpath conflict that is the root cause of the error message you're seeing.
regards
CMDBuild Team