You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@syncope.apache.org by "Aardema, Hunter T." <Hu...@leidos.com> on 2019/09/27 14:14:07 UTC

Install 2.1.5 Issue, Syncope Core Failing to Deploy

Hello,

I'm trying to install the latest Apache Syncope 2.1.5 using the maven build instructions found here: http://syncope.apache.org/docs/2.1/getting-started.html#maven-project

Maven is our preferred method of installation as we would like to use this product in production. Docker is a potential back up option but we want to exhaust our options with maven first so we can utilize custom java item transformers more easily.

My environment looks as follows:

OS: RHEL 7
Syncope 2.1.5
Maven 3.6.2
Tomcat 9.0.20
MySQL 8.0.17

After generating the syncope-archetype project, building the war files, and deploying the war files to our tomcat server, we see the following error. The syncope.war file is failing to deploy for what looks to be a missing dependency issue. Here is a snippet from the tomcat catalina.log:

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1415)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:700)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:223)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607)
at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:53)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
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: java.lang.NoClassDefFoundError: org/apache/cocoon/pipeline/component/PipelineComponent
                at java.lang.Class.getDeclaredFields0(Native Method)
                at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
                at java.lang.Class.getDeclaredFields(Class.java:1916)
                at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:137)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
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:5048)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                ... 32 more
        Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
                ... 45 more

Resolved this by adding the following to the core/pom.xml, re-compiling and re-deploying the new war file to tomcat:

<dependency>
        <groupId>org.apache.cocoon</groupId>
        <artifactId>cocoon-pipeline-components</artifactId>
        <version>1.0.0</version>
    </dependency>


After re-dploy a new error appeared in our tomcat catalina.log relating to the syncope.war deployment:

SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
                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.start(HostConfig.java:1576)
                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
                at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
                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:134)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
        Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
                at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
                ... 37 more
        Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextException
                at java.lang.Class.getDeclaredFields0(Native Method)
                at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
                at java.lang.Class.getDeclaredFields(Class.java:1916)
                at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
                at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:89)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
                at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
                at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
                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:5048)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                ... 38 more
        Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextException
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)

The missing dependency spring-context is a jar that the syncope-console uses, so I copied that jar from ${SYNCOPE_HOME}/console/target/syncope-console/WEB-INF/lib/spring-context-5.1.9.RELEASE.jar to the ${TOMCAT_HOME}/ webapps/syncope/WEB-INF/lib/ then restarted tomcat.

SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
                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.start(HostConfig.java:1576)
                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
                at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
                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:134)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
        Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
                at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
                ... 37 more
        Caused by: java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapable
                at java.lang.ClassLoader.defineClass1(Native Method)
                at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
                at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2415)
                at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:863)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
                at java.lang.ClassLoader.defineClass1(Native Method)
                at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
                at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2415)
                at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:863)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
                at java.lang.Class.getDeclaredFields0(Native Method)
                at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
                at java.lang.Class.getDeclaredFields(Class.java:1916)
                at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
                at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:89)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
                at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
                at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
                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:5048)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                ... 38 more
        Caused by: java.lang.ClassNotFoundException: org.springframework.core.env.EnvironmentCapable
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
                ... 65 more


This looked like an issue with spring-core even though a spring-core jar is packaged in the war file. So I checked the versions of all the spring related components in the syncope core lib directory and saw the following:

spring-beans-5.1.9.RELEASE.jar
spring-context-5.1.9.RELEASE.jar
spring-core-2.5.1.jar
spring-web-5.1.9.RELEASE.jar

spring core was on an older version than the other spring products so I replaced it with spring-core-5.1.9.RELEASE.jar. I restarted tomcat and now I am back to square one with the syncope.war deployment complaining about PipelineComponent.

SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
                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.start(HostConfig.java:1576)
                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
                at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
                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:134)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
        Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
                at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
                ... 37 more
        Caused by: java.lang.NoClassDefFoundError: org/apache/cocoon/pipeline/component/PipelineComponent
                at java.lang.Class.getDeclaredFields0(Native Method)
                at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
                at java.lang.Class.getDeclaredFields(Class.java:1916)
                at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
                at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:137)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69)
                at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
                at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
                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:5048)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                ... 38 more
        Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
                ... 51 more


I'm not sure if this is an issue with the maven built war files or an environment configuration on my end that needs to be updated. I'm also not sure why the PipelineComponent class not found exception appeared to be resolved and then returned.

I have tried blasting away the maven project on my server and rebuilding from scratch and was able to reproduce the behavior described above.
When I run `mvn dependency:tree -X` on the command line, the only errors I see in the syncope-archetype project are

[WARNING] The POM for org.apache.syncope.core:syncope-core-rest-cxf:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-rest-cxf:2.1.5
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @ org.apache.syncope:syncope-core:2.1.5

[WARNING] The POM for org.apache.syncope.core:syncope-core-workflow-java:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-workflow-java:2.1.5
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @

[WARNING] The POM for org.apache.syncope.core:syncope-core-persistence-jpa:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-persistence-jpa:2.1.5
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @

This error above may be a red herring but I'm adding it just in case.

If anyone has had any experience or luck with getting a maven installation of Apache Syncope running, any help would be greatly appreciated.

Thanks!
Hunter


RE: EXTERNAL: Re: Install 2.1.5 Issue, Syncope Core Failing to Deploy

Posted by "Aardema, Hunter T." <Hu...@leidos.com>.
Hello,

I solved the issue!

I tried your recommendation and cleared out my ~/.m2 repo, re-ran the build, and I still had the issue with the transitive dependencies not being downloaded.

I got the same error in the build logs below.

[WARNING] The POM for org.apache.syncope.core:syncope-core-rest-cxf:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @ org.apache.syncope:syncope-core:2.1.5

Maven seemed to not like that the pom.xml was trying to build war file. When I changed the package type to pom instead of war maven gathered the transitive dependencies and listed them in the core/target/maven-shared-archive-resources/META-INF/DEPENDENCIES file. But then there was no war file to deploy to tomcat.

Looking back at the documentation[1], the install says to use version 3.0.3 or higher and I had been using the latest version of maven - 3.6.2. So I tried using a version of maven closer to that version stated.

I re-ran the install with maven 3.0.4 and 3.0.5 and found that 3.0.4 failed but maven 3.0.5 was able to resolve the dependencies and build as expected! My syncope project is now deployed and running!

Here is the error in the build when using 3.0.4:


[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with message:
Detected Maven Version: 3.0.4 is not in the allowed range 3.0.5.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Syncope sample project ..................... FAILURE [22.162s]
[INFO] Apache Syncope sample project - Common ............ SKIPPED
[INFO] Apache Syncope sample project - Core .............. SKIPPED
[INFO] Apache Syncope sample project - Console ........... SKIPPED
[INFO] Apache Syncope sample project - Enduser ........... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.365s
[INFO] Finished at: Wed Oct 02 14:00:33 UTC 2019
[INFO] Final Memory: 12M/481M
[INFO] ------------------------------------------------------------------------

Thank you for your help in resolving this issue. I’m not sure what range of maven versions will support this build but in case other people run into this issue, maybe this will help.

Thank you again,
Hunter

[1] https://syncope.apache.org/docs/getting-started.html#maven-project

From: Francesco Chicchiriccò <il...@apache.org>
Sent: Wednesday, October 2, 2019 2:24 AM
To: user@syncope.apache.org
Subject: Re: EXTERNAL: Re: Install 2.1.5 Issue, Syncope Core Failing to Deploy

Hi,
it seems that there were some problems when Maven initially downloaded Syncope artifacts; as a result, the dependency resolution is broken and your artifacts are missing transitive dependencies (as Spring and Cocoon, for example).

You can try by removing your ~/.m2 folder and building again.

Regards.

On 01/10/19 16:56, Aardema, Hunter T. wrote:
We installed Tomcat 9.0 by grabbing directly from https://tomcat.apache.org/download-90.cgi.

We deploy the syncope war files by copying them to them to the /apps/apache-tomcat-9.0.20/webapps/ directory and then tomcat automatically deploys them when I start tomcat with /apps/apache-tomcat-9.0.20/bin/startup.sh

When I run the jar tvf syncope.war command on the syncope.war file built from maven (without my manual addition of cocoon in the pom.xml) I see this:

jar -tvf syncope.war
    80 Tue Oct 01 14:18:20 UTC 2019 META-INF/MANIFEST.MF
     0 Tue Oct 01 14:18:20 UTC 2019 META-INF/
     0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/
     0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/
     0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/domains/
     0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/all/
     0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/
     0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/
     0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/audit/
     0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/lib/
  1749 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/web.xml
  5421 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/domains/MasterDomain.xml
  1244 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/domains/Master.properties
  1084 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/all/workflow.properties
83064 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/disruptor-3.4.2.jar
  1722 Wed Sep 25 14:54:52 UTC 2019 WEB-INF/jboss-deployment-structure.xml
  1420 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/all/workflowTestContext.xml
   970 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/all/saml2sp-logic.properties
  1897 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/all/provisioning.properties
  6221 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_mariadb.sql
  7610 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_postgres.sql
  8746 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_oracle.sql
  7869 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_mysql_innodb.sql
  7565 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/indexes.xml
  6558 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/spring-orm-sqlserver.xml
  6562 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/spring-orm-oracle.xml
  2347 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/DEPENDENCIES
   969 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/audit/audit_oracle.sql
  1091 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/audit/audit_sqlserver.sql
   992 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/audit/audit.sql
   997 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/audit/audit_mysql_innodb.sql
  1854 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/provisioning.properties
  6663 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/lib/syncope-common-2.1.5.jar
296223 Fri Sep 20 18:56:00 UTC 2019 WEB-INF/lib/syncope-common-lib-2.1.5.jar
16461 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/jcl-over-slf4j-1.7.28.jar
167915 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/jquery-3.3.1-1.jar
  1396 Wed Sep 25 14:54:52 UTC 2019 WEB-INF/glassfish-web.xml
125678 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/syncope-core-rest-cxf-2.1.5.jar
281154 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/jquery-ui-1.12.1.jar
  1524 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/persistence.properties
21368 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/syncope-core-workflow-java-2.1.5.jar
41117 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/slf4j-api-1.7.28.jar
276771 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/log4j-api-2.12.1.jar
702610 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/highlightjs-9.15.8.jar
  1167 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/mail.properties
1674433 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/log4j-core-2.12.1.jar
  2796 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/coreContext.xml
   841 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/connid.properties
23518 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/log4j-slf4j-impl-2.12.1.jar
  7738 Tue Oct 01 14:13:12 UTC 2019 META-INF/maven/org.apache.syncope/syncope-core/pom.xml
    65 Tue Oct 01 14:18:18 UTC 2019 META-INF/maven/org.apache.syncope/syncope-core/pom.properties
  7190 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/views.xml
14295 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/domains/MasterContent.xml
682437 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/syncope-core-persistence-jpa-2.1.5.jar
  1425 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/security.properties
  6221 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_mysql.sql
  6847 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_h2.sql
10492 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_sqlServer.sql
  8572 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/log4j2.xml
  1302 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/persistence-enhance.xml
  8130 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/spring-orm.xml
   193 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/NOTICE
11358 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/LICENSE
   964 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/logic.properties
414240 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/jstl-1.2.jar

I also ran the following command to check dependencies during the build:

/apps/apache-maven-3.6.2/bin/mvn dependency:tree -X | grep ERROR

[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-common:2.1.5, must be "pom" but is "jar" @ org.apache.syncope:syncope-common:2.1.5
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @ org.apache.syncope:syncope-core:2.1.5
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-common:2.1.5, must be "pom" but is "jar" @

/apps/apache-maven-3.6.2/bin/mvn dependency:tree -X | grep WARNING

[WARNING] The POM for org.apache.syncope.common:syncope-common-lib:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.common:syncope-common-lib:2.1.5
[WARNING] The POM for org.apache.syncope.core:syncope-core-rest-cxf:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-rest-cxf:2.1.5
[WARNING] The POM for org.apache.syncope.core:syncope-core-workflow-java:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-workflow-java:2.1.5
[WARNING] The POM for org.apache.syncope.core:syncope-core-persistence-jpa:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-persistence-jpa:2.1.5
[WARNING] The POM for org.apache.syncope.common:syncope-common-rest-api:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.common:syncope-common-rest-api:2.1.5


From: Francesco Chicchiriccò <il...@apache.org>
Sent: Tuesday, October 1, 2019 9:39 AM
To: user@syncope.apache.org<ma...@syncope.apache.org>
Subject: EXTERNAL: Re: Install 2.1.5 Issue, Syncope Core Failing to Deploy

On 01/10/19 15:33, Aardema, Hunter T. wrote:
Thank you for your reply!

I forgot to mention but yes we are using JDK 1.8.

We have also followed the instructions for section 4.6.1 DBMS MySQL http://syncope.apache.org/docs/reference-guide.html#mysql, 4.6.2 Database Connection Pool  http://syncope.apache.org/docs/reference-guide.html#database-connection-pool , and the JavaEE Container for Apache Tomcat 9 instructions http://syncope.apache.org/docs/reference-guide.html#apache-tomcat-9. We are using the JDBC driver >= 8.0.17 as well.

We followed the customization section of the instructions to then compile and build the project war files for deployment.
In your documentation there is the following text: http://syncope.apache.org/docs/reference-guide.html#customization


“The WAR artifacts are generated by running the Maven command (with reference to the suggested directory layout):
$ mvn clean verify \
   -Dconf.directory=/opt/syncope/conf \
   -Dbundles.directory=/opt/syncope/bundles \
   -Dlog.directory=/opt/syncope/log
$ cp core/target/classes/*properties /opt/syncope/conf
$ cp console/target/classes/*properties /opt/syncope/conf
$ cp enduser/target/classes/*properties /opt/syncope/conf
$ cp enduser/target/classes/customFormAttributes.json /opt/syncope/conf
$ cp enduser/target/classes/customTemplate.json /opt/syncope/conf
After downloading all of the dependencies that are needed, three WAR files will be produced:
1.       core/target/syncope.war
2.       console/target/syncope-console.war
3.       enduser/target/syncope-enduser.war
If no failures are encountered, your basic Apache Syncope project is now ready to be deployed.”
We are simply trying to get the basic Apache Syncope project deployed and running. We have built these directories, run the maven clean verify command, and copied over the properties file to our created configuration directories. Deploying the war files to tomcat still produce the exceptions previously noted.

This is not expected: the syncope.war file already contains all required dependencies, including Cocoon and Spring, you don't need to add anything; a simple

jar tvf syncope.war

should be enough to prove this.

How did you get Tomcat 9.0.20? Was it from some RPM package, or straight from http://tomcat.apache.org/?

How do you deploy syncope.war into your Tomcat instance?

Regards.

1.       Following the documentation for deployment/customization produces a “Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent” exception during deployment.

2.       Adding the cocoon-pipeline-components-1.0.0.jar to the syncope lib directory as a dependency and restarting the application produces a “Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextException” error during deployment.

3.       Adding in spring-context-5.1.9.RELEASE.jar as a dependency and restarting tomcat produces a “Caused by: java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapable”

4.       Replacing the spring-core-2.5.1.jar with spring-core-5.1.9.RELEASE.jar then produces a “Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent” exception.
Is there documentation on which version of spring components the syncope core project should be using? Or which version of cocoon pipeline components? Any further help or insight would be greatly appreciated!
Thank you,
Hunter


From: Francesco Chicchiriccò <il...@apache.org>
Sent: Saturday, September 28, 2019 10:59 AM
To: user <us...@syncope.apache.org>
Subject: EXTERNAL: Re: Install 2.1.5 Issue, Syncope Core Failing to Deploy

Hi,
glad of your interest in Apache Syncope. See my replies embedded below.
Regards.

On 27-set-19, at 16:14, Aardema, Hunter T. <Hu...@leidos.com> wrote:



Hello,

I’m trying to install the latest Apache Syncope 2.1.5 using the maven build instructions found here: http://syncope.apache.org/docs/2.1/getting-started.html#maven-project

Maven is our preferred method of installation as we would like to use this product in production. Docker is a potential back up option but we want to exhaust our options with maven first so we can utilize custom java item transformers more easily.

My environment looks as follows:

OS: RHEL 7
Syncope 2.1.5
Maven 3.6.2
Tomcat 9.0.20
MySQL 8.0.17
It seems you forgot to mention your JDK version; for Syncope 2.1, JDK 1.8 is required.
After generating the syncope-archetype project, building the war files, and deploying the war files to our tomcat server, we see the following error. The syncope.war file is failing to deploy for what looks to be a missing dependency issue.
The WAR files generated cannot be simply taken for deployment, as the guide linked above says:

"Before actual deployment onto a standalone Java EE container, you need to further check the Customization chapter of the Apache Syncope Reference Guide."

e.g. http://syncope.apache.org/docs/reference-guide.html#customization

In fact, you'll have at least to configure your Syncope project to work with MySQL, as indicated in

http://syncope.apache.org/docs/reference-guide.html#mysql

After the appropriate settings for MySQL, you'll need to build the project, as suggested in the Customization chapter linked above, e.g.

$ mkdir /opt/syncope
$ mkdir /opt/syncope/bundles
$ mkdir /opt/syncope/log
$ mkdir /opt/syncope/conf

$ mvn clean verify \
   -Dconf.directory=/opt/syncope/conf \
   -Dbundles.directory=/opt/syncope/bundles \
   -Dlog.directory=/opt/syncope/log

$ cp core/target/classes/*properties /opt/syncope/conf
$ cp console/target/classes/*properties /opt/syncope/conf
$ cp enduser/target/classes/*properties /opt/syncope/conf
$ cp enduser/target/classes/customFormAttributes.json /opt/syncope/conf
$ cp enduser/target/classes/customTemplate.json /opt/syncope/conf

Only at this point the three WAR files are ready for deployment in Tomcat.

HTH
Regards.
Here is a snippet from the tomcat catalina.log:

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1415)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:700)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:223)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607)
at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:53)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
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: java.lang.NoClassDefFoundError: org/apache/cocoon/pipeline/component/PipelineComponent
                at java.lang.Class.getDeclaredFields0(Native Method)
                at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
                at java.lang.Class.getDeclaredFields(Class.java:1916)
                at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:137)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
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:5048)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                ... 32more
        Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
                ... 45more

Resolved this by adding the following to the core/pom.xml, re-compiling and re-deploying the new war file to tomcat:

<dependency>
        <groupId>org.apache.cocoon</groupId>
        <artifactId>cocoon-pipeline-components</artifactId>
        <version>1.0.0</version>
    </dependency>


After re-dploy a new error appeared in our tomcat catalina.log relating to the syncope.war deployment:

SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
                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.start(HostConfig.java:1576)
                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
                at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
                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:134)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
        Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
                at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
                ... 37more
        Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextException
                at java.lang.Class.getDeclaredFields0(Native Method)
                at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
                at java.lang.Class.getDeclaredFields(Class.java:1916)
                at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
                at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:89)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
                at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
                at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
                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:5048)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                ... 38more
        Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextException
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)

The missing dependency spring-context is a jar that the syncope-console uses, so I copied that jar from ${SYNCOPE_HOME}/console/target/syncope-console/WEB-INF/lib/spring-context-5.1.9.RELEASE.jar to the ${TOMCAT_HOME}/ webapps/syncope/WEB-INF/lib/ then restarted tomcat.
SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
                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.start(HostConfig.java:1576)
                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
                at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
                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:134)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
        Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
                at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
                ... 37 more
        Caused by: java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapable
                at java.lang.ClassLoader.defineClass1(Native Method)
                at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
                at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2415)
                at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:863)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
                at java.lang.ClassLoader.defineClass1(Native Method)
                at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
                at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2415)
                at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:863)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
                at java.lang.Class.getDeclaredFields0(Native Method)
                at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
                at java.lang.Class.getDeclaredFields(Class.java:1916)
                at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
                at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:89)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
                at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
                at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
                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:5048)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                ... 38 more
        Caused by: java.lang.ClassNotFoundException: org.springframework.core.env.EnvironmentCapable
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
                ... 65 more

This looked like an issue with spring-core even though a spring-core jar is packaged in the war file. So I checked the versions of all the spring related components in the syncope core lib directory and saw the following:

spring-beans-5.1.9.RELEASE.jar
spring-context-5.1.9.RELEASE.jar
spring-core-2.5.1.jar
spring-web-5.1.9.RELEASE.jar

spring core was on an older version than the other spring products so I replaced it with spring-core-5.1.9.RELEASE.jar. I restarted tomcat and now I am back to square one with the syncope.war deployment complaining about PipelineComponent.

SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
                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.start(HostConfig.java:1576)
                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
                at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
                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:134)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
        Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
                at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
                ... 37more
        Caused by: java.lang.NoClassDefFoundError: org/apache/cocoon/pipeline/component/PipelineComponent
                at java.lang.Class.getDeclaredFields0(Native Method)
                at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
                at java.lang.Class.getDeclaredFields(Class.java:1916)
                at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
                at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:137)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69)
                at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
                at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
                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:5048)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                ... 38more
        Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
                ... 51more


I’m not sure if this is an issue with the maven built war files or an environment configuration on my end that needs to be updated. I’m also not sure why the PipelineComponent class not found exception appeared to be resolved and then returned.

I have tried blasting away the maven project on my server and rebuilding from scratch and was able to reproduce the behavior described above.
When I run `mvn dependency:tree -X` on the command line, the only errors I see in the syncope-archetype project are
[WARNING] The POM for org.apache.syncope.core:syncope-core-rest-cxf:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-rest-cxf:2.1.5
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @ org.apache.syncope:syncope-core:2.1.5

[WARNING] The POM for org.apache.syncope.core:syncope-core-workflow-java:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-workflow-java:2.1.5
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @

[WARNING] The POM for org.apache.syncope.core:syncope-core-persistence-jpa:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-persistence-jpa:2.1.5
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @

This error above may be a red herring but I’m adding it just in case.

If anyone has had any experience or luck with getting a maven installation of Apache Syncope running, any help would be greatly appreciated.

Thanks!
Hunter

--

Francesco Chicchiriccò



Tirasa - Open Source Excellence

http://www.tirasa.net/



Member at The Apache Software Foundation

Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail

http://home.apache.org/~ilgrosso/

Re: EXTERNAL: Re: Install 2.1.5 Issue, Syncope Core Failing to Deploy

Posted by Francesco Chicchiriccò <il...@apache.org>.
Hi,
it seems that there were some problems when Maven initially downloaded Syncope artifacts; as a result, the dependency resolution is broken and your artifacts are missing transitive dependencies (as Spring and Cocoon, for example).

You can try by removing your ~/.m2 folder and building again.

Regards.

On 01/10/19 16:56, Aardema, Hunter T. wrote:
>
> We installed Tomcat 9.0 by grabbing directly from https://tomcat.apache.org/download-90.cgi.
>
>  
>
> We deploy the syncope war files by copying them to them to the /apps/apache-tomcat-9.0.20/webapps/ directory and then tomcat automatically deploys them when I start tomcat with /apps/apache-tomcat-9.0.20/bin/startup.sh
>
>  
>
> When I run the jar tvf syncope.war command on the syncope.war file built from maven (without my manual addition of cocoon in the pom.xml) I see this:
>
>  
>
> jar -tvf syncope.war
>
>     80 Tue Oct 01 14:18:20 UTC 2019 META-INF/MANIFEST.MF
>
>      0 Tue Oct 01 14:18:20 UTC 2019 META-INF/
>
>      0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/
>
>      0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/
>
>      0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/domains/
>
>      0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/all/
>
>      0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/
>
>      0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/
>
>      0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/audit/
>
>      0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/lib/
>
>   1749 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/web.xml
>
>   5421 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/domains/MasterDomain.xml
>
>   1244 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/domains/Master.properties
>
>   1084 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/all/workflow.properties
>
> 83064 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/disruptor-3.4.2.jar
>
>   1722 Wed Sep 25 14:54:52 UTC 2019 WEB-INF/jboss-deployment-structure.xml
>
>   1420 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/all/workflowTestContext.xml
>
>    970 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/all/saml2sp-logic.properties
>
>   1897 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/all/provisioning.properties
>
>   6221 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_mariadb.sql
>
>   7610 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_postgres.sql
>
>   8746 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_oracle.sql
>
>   7869 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_mysql_innodb.sql
>
>   7565 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/indexes.xml
>
>   6558 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/spring-orm-sqlserver.xml
>
>   6562 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/spring-orm-oracle.xml
>
>   2347 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/DEPENDENCIES
>
>    969 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/audit/audit_oracle.sql
>
>   1091 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/audit/audit_sqlserver.sql
>
>    992 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/audit/audit.sql
>
>    997 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/audit/audit_mysql_innodb.sql
>
>   1854 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/provisioning.properties
>
>   6663 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/lib/syncope-common-2.1.5.jar
>
> 296223 Fri Sep 20 18:56:00 UTC 2019 WEB-INF/lib/syncope-common-lib-2.1.5.jar
>
> 16461 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/jcl-over-slf4j-1.7.28.jar
>
> 167915 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/jquery-3.3.1-1.jar
>
>   1396 Wed Sep 25 14:54:52 UTC 2019 WEB-INF/glassfish-web.xml
>
> 125678 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/syncope-core-rest-cxf-2.1.5.jar
>
> 281154 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/jquery-ui-1.12.1.jar
>
>   1524 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/persistence.properties
>
> 21368 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/syncope-core-workflow-java-2.1.5.jar
>
> 41117 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/slf4j-api-1.7.28.jar
>
> 276771 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/log4j-api-2.12.1.jar
>
> 702610 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/highlightjs-9.15.8.jar
>
>   1167 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/mail.properties
>
> 1674433 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/log4j-core-2.12.1.jar
>
>   2796 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/coreContext.xml
>
>    841 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/connid.properties
>
> 23518 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/log4j-slf4j-impl-2.12.1.jar
>
>   7738 Tue Oct 01 14:13:12 UTC 2019 META-INF/maven/org.apache.syncope/syncope-core/pom.xml
>
>     65 Tue Oct 01 14:18:18 UTC 2019 META-INF/maven/org.apache.syncope/syncope-core/pom.properties
>
>   7190 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/views.xml
>
> 14295 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/domains/MasterContent.xml
>
> 682437 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/syncope-core-persistence-jpa-2.1.5.jar
>
>   1425 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/security.properties
>
>   6221 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_mysql.sql
>
>   6847 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_h2.sql
>
> 10492 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_sqlServer.sql
>
>   8572 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/log4j2.xml
>
>   1302 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/persistence-enhance.xml
>
>   8130 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/spring-orm.xml
>
>    193 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/NOTICE
>
> 11358 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/LICENSE
>
>    964 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/logic.properties
>
> 414240 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/jstl-1.2.jar
>
>  
>
> I also ran the following command to check dependencies during the build:
>
>  
>
> /apps/apache-maven-3.6.2/bin/mvn dependency:tree -X | grep ERROR
>
>  
>
> [ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-common:2.1.5, must be "pom" but is "jar" @ org.apache.syncope:syncope-common:2.1.5
>
> [ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @ org.apache.syncope:syncope-core:2.1.5
>
> [ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @
>
> [ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @
>
> [ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-common:2.1.5, must be "pom" but is "jar" @
>
>  
>
> /apps/apache-maven-3.6.2/bin/mvn dependency:tree -X | grep WARNING
>
>  
>
> [WARNING] The POM for org.apache.syncope.common:syncope-common-lib:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.common:syncope-common-lib:2.1.5
>
> [WARNING] The POM for org.apache.syncope.core:syncope-core-rest-cxf:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-rest-cxf:2.1.5
>
> [WARNING] The POM for org.apache.syncope.core:syncope-core-workflow-java:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-workflow-java:2.1.5
>
> [WARNING] The POM for org.apache.syncope.core:syncope-core-persistence-jpa:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-persistence-jpa:2.1.5
>
> [WARNING] The POM for org.apache.syncope.common:syncope-common-rest-api:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.common:syncope-common-rest-api:2.1.5
>
>  
>
>  
>
> *From:*Francesco Chicchiriccò <il...@apache.org>
> *Sent:* Tuesday, October 1, 2019 9:39 AM
> *To:* user@syncope.apache.org
> *Subject:* EXTERNAL: Re: Install 2.1.5 Issue, Syncope Core Failing to Deploy
>
>  
>
> On 01/10/19 15:33, Aardema, Hunter T. wrote:
>
>     Thank you for your reply!
>
>      
>
>     I forgot to mention but yes we are using JDK 1.8.
>
>      
>
>     We have also followed the instructions for section 4.6.1 DBMS MySQL http://syncope.apache.org/docs/reference-guide.html#mysql, 4.6.2 Database Connection Pool  http://syncope.apache.org/docs/reference-guide.html#database-connection-pool , and the JavaEE Container for Apache Tomcat 9 instructions http://syncope.apache.org/docs/reference-guide.html#apache-tomcat-9. We are using the JDBC driver >= 8.0.17 as well.
>
>      
>
>     We followed the customization section of the instructions to then compile and build the project war files for deployment.
>
>     In your documentation there is the following text: http://syncope.apache.org/docs/reference-guide.html#customization
>
>      
>
>     “The WAR artifacts are generated by running the Maven command (with reference to the suggested directory layout):
>
>     $ mvn clean verify \
>
>        -Dconf.directory=/opt/syncope/conf \
>
>        -Dbundles.directory=/opt/syncope/bundles \
>
>        -Dlog.directory=/opt/syncope/log
>
>     $ cp core/target/classes/*properties /opt/syncope/conf
>
>     $ cp console/target/classes/*properties /opt/syncope/conf
>
>     $ cp enduser/target/classes/*properties /opt/syncope/conf
>
>     $ cp enduser/target/classes/customFormAttributes.json /opt/syncope/conf
>
>     $ cp enduser/target/classes/customTemplate.json /opt/syncope/conf
>
>     After downloading all of the dependencies that are needed, three WAR files will be produced:
>
>     1.       core/target/syncope.war
>
>     2.       console/target/syncope-console.war
>
>     3.       enduser/target/syncope-enduser.war
>
>     If no failures are encountered, your basic Apache Syncope project is now ready to be deployed.”
>
>     We are simply trying to get the basic Apache Syncope project deployed and running. We have built these directories, run the maven clean verify command, and copied over the properties file to our created configuration directories. Deploying the war files to tomcat still produce the exceptions previously noted.
>
> This is not expected: the syncope.war file already contains all required dependencies, including Cocoon and Spring, you don't need to add anything; a simple
>
> jar tvf syncope.war
>
> should be enough to prove this.
>
> How did you get Tomcat 9.0.20? Was it from some RPM package, or straight from http://tomcat.apache.org/ <http://tomcat.apache.org/>?
>
> How do you deploy syncope.war into your Tomcat instance?
>
> Regards.
>
>     1.       Following the documentation for deployment/customization produces a “Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent” exception during deployment.
>
>     2.       Adding the cocoon-pipeline-components-1.0.0.jar to the syncope lib directory as a dependency and restarting the application produces a “Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextException” error during deployment.
>
>     3.       Adding in |spring-context-5.1.9.RELEASE.jar|as a dependency and restarting tomcat produces a “Caused by: java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapable”
>
>     4.       Replacing the spring-core-2.5.1.jar with spring-core-5.1.9.RELEASE.jar then produces a “Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent” exception.
>
>     Is there documentation on which version of spring components the syncope core project should be using? Or which version of cocoon pipeline components? Any further help or insight would be greatly appreciated!
>
>     Thank you,
>
>     Hunter
>
>      
>
>      
>
>     *From:* Francesco Chicchiriccò <il...@apache.org> <ma...@apache.org>
>     *Sent:* Saturday, September 28, 2019 10:59 AM
>     *To:* user <us...@syncope.apache.org> <ma...@syncope.apache.org>
>     *Subject:* EXTERNAL: Re: Install 2.1.5 Issue, Syncope Core Failing to Deploy
>
>      
>
>     Hi,
>     glad of your interest in Apache Syncope. See my replies embedded below.
>
>     Regards.
>
>     On 27-set-19, at 16:14, Aardema, Hunter T. <Hu...@leidos.com> <ma...@leidos.com> wrote:
>
>
>         Hello,
>
>          
>
>         I’m trying to install the latest Apache Syncope 2.1.5 using the maven build instructions found here: http://syncope.apache.org/docs/2.1/getting-started.html#maven-project
>
>          
>
>         Maven is our preferred method of installation as we would like to use this product in production. Docker is a potential back up option but we want to exhaust our options with maven first so we can utilize custom java item transformers more easily.
>
>          
>
>         My environment looks as follows:
>
>          
>
>         OS: RHEL 7
>
>         Syncope 2.1.5
>
>         Maven 3.6.2
>
>         Tomcat 9.0.20
>
>         MySQL 8.0.17
>
>     It seems you forgot to mention your JDK version; for Syncope 2.1, JDK 1.8 is required.
>
>         After generating the syncope-archetype project, building the war files, and deploying the war files to our tomcat server, we see the following error. The syncope.war file is failing to deploy for what looks to be a missing dependency issue.
>
>     The WAR files generated cannot be simply taken for deployment, as the guide linked above says:
>
>     "Before actual deployment onto a standalone Java EE container, you need to further check the Customization chapter of the Apache Syncope Reference Guide."
>
>      
>
>     e.g. http://syncope.apache.org/docs/reference-guide.html#customization
>
>      
>
>     In fact, you'll have at least to configure your Syncope project to work with MySQL, as indicated in
>
>      
>
>     http://syncope.apache.org/docs/reference-guide.html#mysql
>
>      
>
>     After the appropriate settings for MySQL, you'll need to build the project, as suggested in the Customization chapter linked above, e.g.
>
>      
>
>     $ mkdir /opt/syncope
>
>     $ mkdir /opt/syncope/bundles
>
>     $ mkdir /opt/syncope/log
>
>     $ mkdir /opt/syncope/conf
>
>      
>
>     $ mvn clean verify \
>
>        -Dconf.directory=/opt/syncope/conf \
>
>        -Dbundles.directory=/opt/syncope/bundles \
>
>        -Dlog.directory=/opt/syncope/log
>
>      
>
>     $ cp core/target/classes/*properties /opt/syncope/conf
>
>     $ cp console/target/classes/*properties /opt/syncope/conf
>
>     $ cp enduser/target/classes/*properties /opt/syncope/conf
>
>     $ cp enduser/target/classes/customFormAttributes.json /opt/syncope/conf
>
>     $ cp enduser/target/classes/customTemplate.json /opt/syncope/conf
>
>      
>
>     Only at this point the three WAR files are ready for deployment in Tomcat.
>
>      
>
>     HTH
>     Regards.
>
>         Here is a snippet from the tomcat catalina.log:
>
>          
>
>         org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
>
>         at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
>
>         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
>
>         at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1415)
>
>         at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:700)
>
>         at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:223)
>
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
>
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
>
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
>
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>
>         at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
>
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>
>         at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
>
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
>
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
>
>         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607)
>
>         at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
>
>         at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:53)
>
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
>
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
>
>         at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
>
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
>
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
>
>         at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
>
>         at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
>
>         at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
>
>         at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
>
>         at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
>
>         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: java.lang.NoClassDefFoundError: org/apache/cocoon/pipeline/component/PipelineComponent
>
>                         at java.lang.Class.getDeclaredFields0(Native Method)
>
>                         at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
>
>                         at java.lang.Class.getDeclaredFields(Class.java:1916)
>
>                         at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
>
>         at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
>
>         at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:137)
>
>         at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69)
>
>         at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
>
>         at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
>
>         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:5048)
>
>         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                         ... 32more
>
>                 Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent
>
>         at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
>
>         at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
>
>                         ... 45more
>
>          
>
>         Resolved this by adding the following to the core/pom.xml, re-compiling and re-deploying the new war file to tomcat:
>
>          
>
>         <dependency>
>
>                 <groupId>org.apache.cocoon</groupId>
>
>                 <artifactId>cocoon-pipeline-components</artifactId>
>
>                 <version>1.0.0</version>
>
>             </dependency>
>
>          
>
>          
>
>         After re-dploy a new error appeared in our tomcat catalina.log relating to the syncope.war deployment:
>
>          
>
>         SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)
>
>                         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
>
>                         at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
>
>                         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.start(HostConfig.java:1576)
>
>                         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
>
>                         at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
>
>                         at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
>
>                         at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
>
>                         at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
>
>                         at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
>
>                         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
>
>                         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
>
>                         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:134)
>
>                         at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
>
>                         at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
>
>                         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                         at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
>
>                         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                         at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
>
>                         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                         at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
>
>                         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>                         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>
>                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
>                         at java.lang.reflect.Method.invoke(Method.java:498)
>
>                         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
>
>                         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
>
>                 Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
>
>                         at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
>
>                         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
>
>                         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
>
>                         ... 37more
>
>                 Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextException
>
>                         at java.lang.Class.getDeclaredFields0(Native Method)
>
>                         at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
>
>                         at java.lang.Class.getDeclaredFields(Class.java:1916)
>
>                         at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
>
>                         at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
>
>                         at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:89)
>
>                         at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
>
>                         at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
>
>                         at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
>
>                         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:5048)
>
>                         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                         ... 38more
>
>                 Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextException
>
>                         at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
>
>                         at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
>
>          
>
>         The missing dependency spring-context is a jar that the syncope-console uses, so I copied that jar from ${SYNCOPE_HOME}/|console/target/syncope-console/WEB-INF/lib/spring-context-5.1.9.RELEASE.jar to the ${TOMCAT_HOME}/| |webapps/syncope/WEB-INF/lib/ then restarted tomcat.|
>
>         |SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)|
>
>         |                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)|
>
>         |                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)|
>
>         |                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.start(HostConfig.java:1576)|
>
>         |                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)|
>
>         |                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)|
>
>         |                at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)|
>
>         |                at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)|
>
>         |                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)|
>
>         |                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)|
>
>         |                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)|
>
>         |                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)|
>
>         |                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)|
>
>         |                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:134)|
>
>         |                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)|
>
>         |                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)|
>
>         |                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)|
>
>         |                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)|
>
>         |                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)|
>
>         |                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)|
>
>         |                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)|
>
>         |                at org.apache.catalina.startup.Catalina.start(Catalina.java:633)|
>
>         |                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)|
>
>         |                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)|
>
>         |                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)|
>
>         |                at java.lang.reflect.Method.invoke(Method.java:498)|
>
>         |                at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)|
>
>         |                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)|
>
>         |        Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]|
>
>         |                at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)|
>
>         |                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)|
>
>         |                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)|
>
>         |                ... 37 more|
>
>         |        Caused by: java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapable|
>
>         |                at java.lang.ClassLoader.defineClass1(Native Method)|
>
>         |                at java.lang.ClassLoader.defineClass(ClassLoader.java:763)|
>
>         |                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)|
>
>         |                at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2415)|
>
>         |                at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:863)|
>
>         |                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)|
>
>         |                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)|
>
>         |                at java.lang.ClassLoader.defineClass1(Native Method)|
>
>         |                at java.lang.ClassLoader.defineClass(ClassLoader.java:763)|
>
>         |                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)|
>
>         |                at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2415)|
>
>         |                at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:863)|
>
>         |                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)|
>
>         |                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)|
>
>         |                at java.lang.Class.getDeclaredFields0(Native Method)|
>
>         |                at java.lang.Class.privateGetDeclaredFields(Class.java:2583)|
>
>         |                at java.lang.Class.getDeclaredFields(Class.java:1916)|
>
>         |                at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)|
>
>         |                at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)|
>
>         |                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:89)|
>
>         |                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)|
>
>         |                at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)|
>
>         |                at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)|
>
>         |                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:5048)|
>
>         |                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)|
>
>         |                ... 38 more|
>
>         |        Caused by: java.lang.ClassNotFoundException: org.springframework.core.env.EnvironmentCapable|
>
>         |                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)|
>
>         |                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)|
>
>         |                ... 65 more|
>
>          
>
>         This looked like an issue with spring-core even though a spring-core jar is packaged in the war file. So I checked the versions of all the spring related components in the syncope core lib directory and saw the following:
>
>          
>
>         spring-beans-5.1.9.RELEASE.jar
>
>         spring-context-5.1.9.RELEASE.jar
>
>         spring-core-2.5.1.jar
>
>         spring-web-5.1.9.RELEASE.jar
>
>          
>
>         spring core was on an older version than the other spring products so I replaced it with spring-core-5.1.9.RELEASE.jar. I restarted tomcat and now I am back to square one with the syncope.war deployment complaining about PipelineComponent.
>
>          
>
>         SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)
>
>                         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
>
>                         at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
>
>                         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.start(HostConfig.java:1576)
>
>                         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
>
>                         at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
>
>                         at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
>
>                         at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
>
>                         at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
>
>                         at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
>
>                         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
>
>                         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
>
>                         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:134)
>
>                         at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
>
>                         at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
>
>                         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                         at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
>
>                         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                         at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
>
>                         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                         at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
>
>                         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>                         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>
>                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
>                         at java.lang.reflect.Method.invoke(Method.java:498)
>
>                         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
>
>                         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
>
>                 Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
>
>                         at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
>
>                         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
>
>                         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
>
>                         ... 37more
>
>                 Caused by: java.lang.NoClassDefFoundError: org/apache/cocoon/pipeline/component/PipelineComponent
>
>                         at java.lang.Class.getDeclaredFields0(Native Method)
>
>                         at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
>
>                         at java.lang.Class.getDeclaredFields(Class.java:1916)
>
>                         at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
>
>                         at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
>
>                         at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:137)
>
>                         at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69)
>
>                         at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
>
>                         at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
>
>                         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:5048)
>
>                         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                         ... 38more
>
>                 Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent
>
>                         at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
>
>                         at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
>
>                         ... 51more
>
>          
>
>          
>
>         I’m not sure if this is an issue with the maven built war files or an environment configuration on my end that needs to be updated. I’m also not sure why the PipelineComponent class not found exception appeared to be resolved and then returned.
>
>          
>
>         I have tried blasting away the maven project on my server and rebuilding from scratch and was able to reproduce the behavior described above.
>
>         When I run `mvn dependency:tree -X` on the command line, the only errors I see in the syncope-archetype project are
>
>         [WARNING] The POM for org.apache.syncope.core:syncope-core-rest-cxf:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-rest-cxf:2.1.5
>
>         [ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @ org.apache.syncope:syncope-core:2.1.5
>
>          
>
>         [WARNING] The POM for org.apache.syncope.core:syncope-core-workflow-java:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-workflow-java:2.1.5
>
>         [ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @
>
>          
>
>         [WARNING] The POM for org.apache.syncope.core:syncope-core-persistence-jpa:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-persistence-jpa:2.1.5
>
>         [ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @
>
>          
>
>         This error above may be a red herring but I’m adding it just in case.
>
>          
>
>         If anyone has had any experience or luck with getting a maven installation of Apache Syncope running, any help would be greatly appreciated.
>
>          
>
>         Thanks!
>
>         Hunter
>
-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/


RE: EXTERNAL: Re: Install 2.1.5 Issue, Syncope Core Failing to Deploy

Posted by "Aardema, Hunter T." <Hu...@leidos.com>.
We installed Tomcat 9.0 by grabbing directly from https://tomcat.apache.org/download-90.cgi.

We deploy the syncope war files by copying them to them to the /apps/apache-tomcat-9.0.20/webapps/ directory and then tomcat automatically deploys them when I start tomcat with /apps/apache-tomcat-9.0.20/bin/startup.sh

When I run the jar tvf syncope.war command on the syncope.war file built from maven (without my manual addition of cocoon in the pom.xml) I see this:

jar -tvf syncope.war
    80 Tue Oct 01 14:18:20 UTC 2019 META-INF/MANIFEST.MF
     0 Tue Oct 01 14:18:20 UTC 2019 META-INF/
     0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/
     0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/
     0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/domains/
     0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/all/
     0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/
     0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/
     0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/audit/
     0 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/lib/
  1749 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/web.xml
  5421 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/domains/MasterDomain.xml
  1244 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/domains/Master.properties
  1084 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/all/workflow.properties
83064 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/disruptor-3.4.2.jar
  1722 Wed Sep 25 14:54:52 UTC 2019 WEB-INF/jboss-deployment-structure.xml
  1420 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/all/workflowTestContext.xml
   970 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/all/saml2sp-logic.properties
  1897 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/all/provisioning.properties
  6221 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_mariadb.sql
  7610 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_postgres.sql
  8746 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_oracle.sql
  7869 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_mysql_innodb.sql
  7565 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/indexes.xml
  6558 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/spring-orm-sqlserver.xml
  6562 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/spring-orm-oracle.xml
  2347 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/DEPENDENCIES
   969 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/audit/audit_oracle.sql
  1091 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/audit/audit_sqlserver.sql
   992 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/audit/audit.sql
   997 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/audit/audit_mysql_innodb.sql
  1854 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/provisioning.properties
  6663 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/lib/syncope-common-2.1.5.jar
296223 Fri Sep 20 18:56:00 UTC 2019 WEB-INF/lib/syncope-common-lib-2.1.5.jar
16461 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/jcl-over-slf4j-1.7.28.jar
167915 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/jquery-3.3.1-1.jar
  1396 Wed Sep 25 14:54:52 UTC 2019 WEB-INF/glassfish-web.xml
125678 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/syncope-core-rest-cxf-2.1.5.jar
281154 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/jquery-ui-1.12.1.jar
  1524 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/persistence.properties
21368 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/syncope-core-workflow-java-2.1.5.jar
41117 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/slf4j-api-1.7.28.jar
276771 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/log4j-api-2.12.1.jar
702610 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/highlightjs-9.15.8.jar
  1167 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/mail.properties
1674433 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/log4j-core-2.12.1.jar
  2796 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/coreContext.xml
   841 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/connid.properties
23518 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/log4j-slf4j-impl-2.12.1.jar
  7738 Tue Oct 01 14:13:12 UTC 2019 META-INF/maven/org.apache.syncope/syncope-core/pom.xml
    65 Tue Oct 01 14:18:18 UTC 2019 META-INF/maven/org.apache.syncope/syncope-core/pom.properties
  7190 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/views.xml
14295 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/domains/MasterContent.xml
682437 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/syncope-core-persistence-jpa-2.1.5.jar
  1425 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/security.properties
  6221 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_mysql.sql
  6847 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_h2.sql
10492 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/quartz/tables_sqlServer.sql
  8572 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/log4j2.xml
  1302 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/persistence-enhance.xml
  8130 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/spring-orm.xml
   193 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/NOTICE
11358 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/META-INF/LICENSE
   964 Tue Oct 01 14:18:18 UTC 2019 WEB-INF/classes/logic.properties
414240 Fri Sep 20 18:56:14 UTC 2019 WEB-INF/lib/jstl-1.2.jar

I also ran the following command to check dependencies during the build:

/apps/apache-maven-3.6.2/bin/mvn dependency:tree -X | grep ERROR

[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-common:2.1.5, must be "pom" but is "jar" @ org.apache.syncope:syncope-common:2.1.5
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @ org.apache.syncope:syncope-core:2.1.5
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-common:2.1.5, must be "pom" but is "jar" @

/apps/apache-maven-3.6.2/bin/mvn dependency:tree -X | grep WARNING

[WARNING] The POM for org.apache.syncope.common:syncope-common-lib:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.common:syncope-common-lib:2.1.5
[WARNING] The POM for org.apache.syncope.core:syncope-core-rest-cxf:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-rest-cxf:2.1.5
[WARNING] The POM for org.apache.syncope.core:syncope-core-workflow-java:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-workflow-java:2.1.5
[WARNING] The POM for org.apache.syncope.core:syncope-core-persistence-jpa:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-persistence-jpa:2.1.5
[WARNING] The POM for org.apache.syncope.common:syncope-common-rest-api:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.common:syncope-common-rest-api:2.1.5


From: Francesco Chicchiriccò <il...@apache.org>
Sent: Tuesday, October 1, 2019 9:39 AM
To: user@syncope.apache.org
Subject: EXTERNAL: Re: Install 2.1.5 Issue, Syncope Core Failing to Deploy

On 01/10/19 15:33, Aardema, Hunter T. wrote:
Thank you for your reply!

I forgot to mention but yes we are using JDK 1.8.

We have also followed the instructions for section 4.6.1 DBMS MySQL http://syncope.apache.org/docs/reference-guide.html#mysql, 4.6.2 Database Connection Pool  http://syncope.apache.org/docs/reference-guide.html#database-connection-pool , and the JavaEE Container for Apache Tomcat 9 instructions http://syncope.apache.org/docs/reference-guide.html#apache-tomcat-9. We are using the JDBC driver >= 8.0.17 as well.

We followed the customization section of the instructions to then compile and build the project war files for deployment.
In your documentation there is the following text: http://syncope.apache.org/docs/reference-guide.html#customization


“The WAR artifacts are generated by running the Maven command (with reference to the suggested directory layout):
$ mvn clean verify \
   -Dconf.directory=/opt/syncope/conf \
   -Dbundles.directory=/opt/syncope/bundles \
   -Dlog.directory=/opt/syncope/log
$ cp core/target/classes/*properties /opt/syncope/conf
$ cp console/target/classes/*properties /opt/syncope/conf
$ cp enduser/target/classes/*properties /opt/syncope/conf
$ cp enduser/target/classes/customFormAttributes.json /opt/syncope/conf
$ cp enduser/target/classes/customTemplate.json /opt/syncope/conf
After downloading all of the dependencies that are needed, three WAR files will be produced:
1.       core/target/syncope.war
2.       console/target/syncope-console.war
3.       enduser/target/syncope-enduser.war
If no failures are encountered, your basic Apache Syncope project is now ready to be deployed.”
We are simply trying to get the basic Apache Syncope project deployed and running. We have built these directories, run the maven clean verify command, and copied over the properties file to our created configuration directories. Deploying the war files to tomcat still produce the exceptions previously noted.

This is not expected: the syncope.war file already contains all required dependencies, including Cocoon and Spring, you don't need to add anything; a simple

jar tvf syncope.war

should be enough to prove this.

How did you get Tomcat 9.0.20? Was it from some RPM package, or straight from http://tomcat.apache.org/?

How do you deploy syncope.war into your Tomcat instance?

Regards.

1.       Following the documentation for deployment/customization produces a “Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent” exception during deployment.

2.       Adding the cocoon-pipeline-components-1.0.0.jar to the syncope lib directory as a dependency and restarting the application produces a “Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextException” error during deployment.

3.       Adding in spring-context-5.1.9.RELEASE.jar as a dependency and restarting tomcat produces a “Caused by: java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapable”

4.       Replacing the spring-core-2.5.1.jar with spring-core-5.1.9.RELEASE.jar then produces a “Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent” exception.
Is there documentation on which version of spring components the syncope core project should be using? Or which version of cocoon pipeline components? Any further help or insight would be greatly appreciated!
Thank you,
Hunter


From: Francesco Chicchiriccò <il...@apache.org>
Sent: Saturday, September 28, 2019 10:59 AM
To: user <us...@syncope.apache.org>
Subject: EXTERNAL: Re: Install 2.1.5 Issue, Syncope Core Failing to Deploy

Hi,
glad of your interest in Apache Syncope. See my replies embedded below.
Regards.

On 27-set-19, at 16:14, Aardema, Hunter T. <Hu...@leidos.com> wrote:


Hello,

I’m trying to install the latest Apache Syncope 2.1.5 using the maven build instructions found here: http://syncope.apache.org/docs/2.1/getting-started.html#maven-project

Maven is our preferred method of installation as we would like to use this product in production. Docker is a potential back up option but we want to exhaust our options with maven first so we can utilize custom java item transformers more easily.

My environment looks as follows:

OS: RHEL 7
Syncope 2.1.5
Maven 3.6.2
Tomcat 9.0.20
MySQL 8.0.17
It seems you forgot to mention your JDK version; for Syncope 2.1, JDK 1.8 is required.
After generating the syncope-archetype project, building the war files, and deploying the war files to our tomcat server, we see the following error. The syncope.war file is failing to deploy for what looks to be a missing dependency issue.
The WAR files generated cannot be simply taken for deployment, as the guide linked above says:

"Before actual deployment onto a standalone Java EE container, you need to further check the Customization chapter of the Apache Syncope Reference Guide."

e.g. http://syncope.apache.org/docs/reference-guide.html#customization

In fact, you'll have at least to configure your Syncope project to work with MySQL, as indicated in

http://syncope.apache.org/docs/reference-guide.html#mysql

After the appropriate settings for MySQL, you'll need to build the project, as suggested in the Customization chapter linked above, e.g.

$ mkdir /opt/syncope
$ mkdir /opt/syncope/bundles
$ mkdir /opt/syncope/log
$ mkdir /opt/syncope/conf

$ mvn clean verify \
   -Dconf.directory=/opt/syncope/conf \
   -Dbundles.directory=/opt/syncope/bundles \
   -Dlog.directory=/opt/syncope/log

$ cp core/target/classes/*properties /opt/syncope/conf
$ cp console/target/classes/*properties /opt/syncope/conf
$ cp enduser/target/classes/*properties /opt/syncope/conf
$ cp enduser/target/classes/customFormAttributes.json /opt/syncope/conf
$ cp enduser/target/classes/customTemplate.json /opt/syncope/conf

Only at this point the three WAR files are ready for deployment in Tomcat.

HTH
Regards.
Here is a snippet from the tomcat catalina.log:

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1415)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:700)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:223)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607)
at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:53)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
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: java.lang.NoClassDefFoundError: org/apache/cocoon/pipeline/component/PipelineComponent
                at java.lang.Class.getDeclaredFields0(Native Method)
                at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
                at java.lang.Class.getDeclaredFields(Class.java:1916)
                at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:137)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
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:5048)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                ... 32more
        Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
                ... 45more

Resolved this by adding the following to the core/pom.xml, re-compiling and re-deploying the new war file to tomcat:

<dependency>
        <groupId>org.apache.cocoon</groupId>
        <artifactId>cocoon-pipeline-components</artifactId>
        <version>1.0.0</version>
    </dependency>


After re-dploy a new error appeared in our tomcat catalina.log relating to the syncope.war deployment:

SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
                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.start(HostConfig.java:1576)
                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
                at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
                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:134)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
        Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
                at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
                ... 37more
        Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextException
                at java.lang.Class.getDeclaredFields0(Native Method)
                at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
                at java.lang.Class.getDeclaredFields(Class.java:1916)
                at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
                at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:89)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
                at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
                at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
                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:5048)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                ... 38more
        Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextException
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)

The missing dependency spring-context is a jar that the syncope-console uses, so I copied that jar from ${SYNCOPE_HOME}/console/target/syncope-console/WEB-INF/lib/spring-context-5.1.9.RELEASE.jar to the ${TOMCAT_HOME}/ webapps/syncope/WEB-INF/lib/ then restarted tomcat.
SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
                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.start(HostConfig.java:1576)
                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
                at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
                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:134)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
        Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
                at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
                ... 37 more
        Caused by: java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapable
                at java.lang.ClassLoader.defineClass1(Native Method)
                at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
                at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2415)
                at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:863)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
                at java.lang.ClassLoader.defineClass1(Native Method)
                at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
                at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2415)
                at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:863)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
                at java.lang.Class.getDeclaredFields0(Native Method)
                at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
                at java.lang.Class.getDeclaredFields(Class.java:1916)
                at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
                at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:89)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
                at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
                at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
                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:5048)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                ... 38 more
        Caused by: java.lang.ClassNotFoundException: org.springframework.core.env.EnvironmentCapable
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
                ... 65 more

This looked like an issue with spring-core even though a spring-core jar is packaged in the war file. So I checked the versions of all the spring related components in the syncope core lib directory and saw the following:

spring-beans-5.1.9.RELEASE.jar
spring-context-5.1.9.RELEASE.jar
spring-core-2.5.1.jar
spring-web-5.1.9.RELEASE.jar

spring core was on an older version than the other spring products so I replaced it with spring-core-5.1.9.RELEASE.jar. I restarted tomcat and now I am back to square one with the syncope.war deployment complaining about PipelineComponent.

SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
                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.start(HostConfig.java:1576)
                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
                at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
                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:134)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
        Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
                at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
                ... 37more
        Caused by: java.lang.NoClassDefFoundError: org/apache/cocoon/pipeline/component/PipelineComponent
                at java.lang.Class.getDeclaredFields0(Native Method)
                at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
                at java.lang.Class.getDeclaredFields(Class.java:1916)
                at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
                at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:137)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69)
                at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
                at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
                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:5048)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                ... 38more
        Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
                ... 51more


I’m not sure if this is an issue with the maven built war files or an environment configuration on my end that needs to be updated. I’m also not sure why the PipelineComponent class not found exception appeared to be resolved and then returned.

I have tried blasting away the maven project on my server and rebuilding from scratch and was able to reproduce the behavior described above.
When I run `mvn dependency:tree -X` on the command line, the only errors I see in the syncope-archetype project are
[WARNING] The POM for org.apache.syncope.core:syncope-core-rest-cxf:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-rest-cxf:2.1.5
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @ org.apache.syncope:syncope-core:2.1.5

[WARNING] The POM for org.apache.syncope.core:syncope-core-workflow-java:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-workflow-java:2.1.5
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @

[WARNING] The POM for org.apache.syncope.core:syncope-core-persistence-jpa:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-persistence-jpa:2.1.5
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @

This error above may be a red herring but I’m adding it just in case.

If anyone has had any experience or luck with getting a maven installation of Apache Syncope running, any help would be greatly appreciated.

Thanks!
Hunter

--

Francesco Chicchiriccò



Tirasa - Open Source Excellence

http://www.tirasa.net/



Member at The Apache Software Foundation

Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail

http://home.apache.org/~ilgrosso/

Re: Install 2.1.5 Issue, Syncope Core Failing to Deploy

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 01/10/19 15:33, Aardema, Hunter T. wrote:
>
> Thank you for your reply!
>
>  
>
> I forgot to mention but yes we are using JDK 1.8.
>
>  
>
> We have also followed the instructions for section 4.6.1 DBMS MySQL http://syncope.apache.org/docs/reference-guide.html#mysql, 4.6.2 Database Connection Pool  http://syncope.apache.org/docs/reference-guide.html#database-connection-pool , and the JavaEE Container for Apache Tomcat 9 instructions http://syncope.apache.org/docs/reference-guide.html#apache-tomcat-9. We are using the JDBC driver >= 8.0.17 as well.
>
>  
>
> We followed the customization section of the instructions to then compile and build the project war files for deployment.
>
> In your documentation there is the following text: http://syncope.apache.org/docs/reference-guide.html#customization
>
>  
>
> “The WAR artifacts are generated by running the Maven command (with reference to the suggested directory layout):
>
> $ mvn clean verify \
>
>    -Dconf.directory=/opt/syncope/conf \
>
>    -Dbundles.directory=/opt/syncope/bundles \
>
>    -Dlog.directory=/opt/syncope/log
>
> $ cp core/target/classes/*properties /opt/syncope/conf
>
> $ cp console/target/classes/*properties /opt/syncope/conf
>
> $ cp enduser/target/classes/*properties /opt/syncope/conf
>
> $ cp enduser/target/classes/customFormAttributes.json /opt/syncope/conf
>
> $ cp enduser/target/classes/customTemplate.json /opt/syncope/conf
>
> After downloading all of the dependencies that are needed, three WAR files will be produced:
>
> 1.      core/target/syncope.war
>
> 2.      console/target/syncope-console.war
>
> 3.      enduser/target/syncope-enduser.war
>
> If no failures are encountered, your basic Apache Syncope project is now ready to be deployed.”
>
> We are simply trying to get the basic Apache Syncope project deployed and running. We have built these directories, run the maven clean verify command, and copied over the properties file to our created configuration directories. Deploying the war files to tomcat still produce the exceptions previously noted.
>
This is not expected: the syncope.war file already contains all required dependencies, including Cocoon and Spring, you don't need to add anything; a simple

jar tvf syncope.war

should be enough to prove this.

How did you get Tomcat 9.0.20? Was it from some RPM package, or straight from http://tomcat.apache.org/?

How do you deploy syncope.war into your Tomcat instance?

Regards.

> 1.      Following the documentation for deployment/customization produces a “Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent” exception during deployment.
>
> 2.      Adding the cocoon-pipeline-components-1.0.0.jar to the syncope lib directory as a dependency and restarting the application produces a “Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextException” error during deployment.
>
> 3.      Adding in |spring-context-5.1.9.RELEASE.jar|as a dependency and restarting tomcat produces a “Caused by: java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapable”
>
> 4.      Replacing the spring-core-2.5.1.jar with spring-core-5.1.9.RELEASE.jar then produces a “Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent” exception.
>
> Is there documentation on which version of spring components the syncope core project should be using? Or which version of cocoon pipeline components? Any further help or insight would be greatly appreciated!
>
> Thank you,
>
> Hunter
>
>  
>
>  
>
> *From:* Francesco Chicchiriccò <il...@apache.org>
> *Sent:* Saturday, September 28, 2019 10:59 AM
> *To:* user <us...@syncope.apache.org>
> *Subject:* EXTERNAL: Re: Install 2.1.5 Issue, Syncope Core Failing to Deploy
>
>  
>
> Hi,
> glad of your interest in Apache Syncope. See my replies embedded below.
>
> Regards.
>
> On 27-set-19, at 16:14, Aardema, Hunter T. <Hu...@leidos.com> wrote:
>
>     Hello,
>
>      
>
>     I’m trying to install the latest Apache Syncope 2.1.5 using the maven build instructions found here: http://syncope.apache.org/docs/2.1/getting-started.html#maven-project
>
>      
>
>     Maven is our preferred method of installation as we would like to use this product in production. Docker is a potential back up option but we want to exhaust our options with maven first so we can utilize custom java item transformers more easily.
>
>      
>
>     My environment looks as follows:
>
>      
>
>     OS: RHEL 7
>
>     Syncope 2.1.5
>
>     Maven 3.6.2
>
>     Tomcat 9.0.20
>
>     MySQL 8.0.17
>
> It seems you forgot to mention your JDK version; for Syncope 2.1, JDK 1.8 is required.
>
>     After generating the syncope-archetype project, building the war files, and deploying the war files to our tomcat server, we see the following error. The syncope.war file is failing to deploy for what looks to be a missing dependency issue.
>
> The WAR files generated cannot be simply taken for deployment, as the guide linked above says:
>
> "Before actual deployment onto a standalone Java EE container, you need to further check the Customization chapter of the Apache Syncope Reference Guide."
>
>  
>
> e.g. http://syncope.apache.org/docs/reference-guide.html#customization
>
>  
>
> In fact, you'll have at least to configure your Syncope project to work with MySQL, as indicated in
>
>  
>
> http://syncope.apache.org/docs/reference-guide.html#mysql
>
>  
>
> After the appropriate settings for MySQL, you'll need to build the project, as suggested in the Customization chapter linked above, e.g.
>
>  
>
> $ mkdir /opt/syncope
>
> $ mkdir /opt/syncope/bundles
>
> $ mkdir /opt/syncope/log
>
> $ mkdir /opt/syncope/conf
>
>  
>
> $ mvn clean verify \
>
>    -Dconf.directory=/opt/syncope/conf \
>
>    -Dbundles.directory=/opt/syncope/bundles \
>
>    -Dlog.directory=/opt/syncope/log
>
>  
>
> $ cp core/target/classes/*properties /opt/syncope/conf
>
> $ cp console/target/classes/*properties /opt/syncope/conf
>
> $ cp enduser/target/classes/*properties /opt/syncope/conf
>
> $ cp enduser/target/classes/customFormAttributes.json /opt/syncope/conf
>
> $ cp enduser/target/classes/customTemplate.json /opt/syncope/conf
>
>  
>
> Only at this point the three WAR files are ready for deployment in Tomcat.
>
>  
>
> HTH
> Regards.
>
>     Here is a snippet from the tomcat catalina.log:
>
>      
>
>     org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
>
>     at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
>
>     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
>
>     at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1415)
>
>     at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:700)
>
>     at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:223)
>
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
>
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
>
>     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
>
>     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>
>     at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
>
>     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>
>     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>
>     at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
>
>     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>
>     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>
>     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
>
>     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
>
>     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607)
>
>     at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
>
>     at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:53)
>
>     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
>
>     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
>
>     at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
>
>     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
>
>     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
>
>     at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
>
>     at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
>
>     at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
>
>     at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
>
>     at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
>
>     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: java.lang.NoClassDefFoundError: org/apache/cocoon/pipeline/component/PipelineComponent
>
>                     at java.lang.Class.getDeclaredFields0(Native Method)
>
>                     at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
>
>                     at java.lang.Class.getDeclaredFields(Class.java:1916)
>
>                     at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
>
>     at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
>
>     at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:137)
>
>     at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69)
>
>     at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
>
>     at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
>
>     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:5048)
>
>     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                     ... 32more
>
>             Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent
>
>     at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
>
>     at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
>
>                     ... 45more
>
>      
>
>     Resolved this by adding the following to the core/pom.xml, re-compiling and re-deploying the new war file to tomcat:
>
>      
>
>     <dependency>
>
>             <groupId>org.apache.cocoon</groupId>
>
>             <artifactId>cocoon-pipeline-components</artifactId>
>
>             <version>1.0.0</version>
>
>         </dependency>
>
>      
>
>      
>
>     After re-dploy a new error appeared in our tomcat catalina.log relating to the syncope.war deployment:
>
>      
>
>     SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)
>
>                     at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
>
>                     at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
>
>                     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.start(HostConfig.java:1576)
>
>                     at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
>
>                     at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
>
>                     at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
>
>                     at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
>
>                     at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
>
>                     at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
>
>                     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
>
>                     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
>
>                     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:134)
>
>                     at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
>
>                     at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
>
>                     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                     at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
>
>                     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                     at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
>
>                     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                     at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
>
>                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>
>                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
>                     at java.lang.reflect.Method.invoke(Method.java:498)
>
>                     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
>
>                     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
>
>             Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
>
>                     at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
>
>                     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
>
>                     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
>
>                     ... 37more
>
>             Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextException
>
>                     at java.lang.Class.getDeclaredFields0(Native Method)
>
>                     at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
>
>                     at java.lang.Class.getDeclaredFields(Class.java:1916)
>
>                     at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
>
>                     at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
>
>                     at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:89)
>
>                     at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
>
>                     at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
>
>                     at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
>
>                     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:5048)
>
>                     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                     ... 38more
>
>             Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextException
>
>                     at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
>
>                     at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
>
>      
>
>     The missing dependency spring-context is a jar that the syncope-console uses, so I copied that jar from ${SYNCOPE_HOME}/|console/target/syncope-console/WEB-INF/lib/spring-context-5.1.9.RELEASE.jar to the ${TOMCAT_HOME}/||webapps/syncope/WEB-INF/lib/ then restarted tomcat.|
>
>     |SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)|
>
>     |                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)|
>
>     |                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)|
>
>     |                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.start(HostConfig.java:1576)|
>
>     |                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)|
>
>     |                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)|
>
>     |                at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)|
>
>     |                at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)|
>
>     |                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)|
>
>     |                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)|
>
>     |                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)|
>
>     |                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)|
>
>     |                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)|
>
>     |                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:134)|
>
>     |                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)|
>
>     |                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)|
>
>     |                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)|
>
>     |                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)|
>
>     |                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)|
>
>     |                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)|
>
>     |                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)|
>
>     |                at org.apache.catalina.startup.Catalina.start(Catalina.java:633)|
>
>     |                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)|
>
>     |                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)|
>
>     |                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)|
>
>     |                at java.lang.reflect.Method.invoke(Method.java:498)|
>
>     |                at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)|
>
>     |                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)|
>
>     |        Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]|
>
>     |                at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)|
>
>     |                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)|
>
>     |                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)|
>
>     |                ... 37 more|
>
>     |        Caused by: java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapable|
>
>     |                at java.lang.ClassLoader.defineClass1(Native Method)|
>
>     |                at java.lang.ClassLoader.defineClass(ClassLoader.java:763)|
>
>     |                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)|
>
>     |                at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2415)|
>
>     |                at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:863)|
>
>     |                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)|
>
>     |                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)|
>
>     |                at java.lang.ClassLoader.defineClass1(Native Method)|
>
>     |                at java.lang.ClassLoader.defineClass(ClassLoader.java:763)|
>
>     |                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)|
>
>     |                at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2415)|
>
>     |                at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:863)|
>
>     |                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)|
>
>     |                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)|
>
>     |                at java.lang.Class.getDeclaredFields0(Native Method)|
>
>     |                at java.lang.Class.privateGetDeclaredFields(Class.java:2583)|
>
>     |                at java.lang.Class.getDeclaredFields(Class.java:1916)|
>
>     |                at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)|
>
>     |                at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)|
>
>     |                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:89)|
>
>     |                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)|
>
>     |                at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)|
>
>     |                at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)|
>
>     |                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:5048)|
>
>     |                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)|
>
>     |                ... 38 more|
>
>     |        Caused by: java.lang.ClassNotFoundException: org.springframework.core.env.EnvironmentCapable|
>
>     |                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)|
>
>     |                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)|
>
>     |                ... 65 more|
>
>      
>
>     This looked like an issue with spring-core even though a spring-core jar is packaged in the war file. So I checked the versions of all the spring related components in the syncope core lib directory and saw the following:
>
>      
>
>     spring-beans-5.1.9.RELEASE.jar
>
>     spring-context-5.1.9.RELEASE.jar
>
>     spring-core-2.5.1.jar
>
>     spring-web-5.1.9.RELEASE.jar
>
>      
>
>     spring core was on an older version than the other spring products so I replaced it with spring-core-5.1.9.RELEASE.jar. I restarted tomcat and now I am back to square one with the syncope.war deployment complaining about PipelineComponent.
>
>      
>
>     SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)
>
>                     at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
>
>                     at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
>
>                     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.start(HostConfig.java:1576)
>
>                     at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
>
>                     at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
>
>                     at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
>
>                     at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
>
>                     at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
>
>                     at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
>
>                     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
>
>                     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
>
>                     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:134)
>
>                     at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
>
>                     at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
>
>                     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                     at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
>
>                     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                     at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
>
>                     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                     at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
>
>                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>
>                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
>                     at java.lang.reflect.Method.invoke(Method.java:498)
>
>                     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
>
>                     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
>
>             Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
>
>                     at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
>
>                     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
>
>                     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
>
>                     ... 37more
>
>             Caused by: java.lang.NoClassDefFoundError: org/apache/cocoon/pipeline/component/PipelineComponent
>
>                     at java.lang.Class.getDeclaredFields0(Native Method)
>
>                     at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
>
>                     at java.lang.Class.getDeclaredFields(Class.java:1916)
>
>                     at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
>
>                     at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
>
>                     at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:137)
>
>                     at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69)
>
>                     at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
>
>                     at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
>
>                     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:5048)
>
>                     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>
>                     ... 38more
>
>             Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent
>
>                     at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
>
>                     at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
>
>                     ... 51more
>
>      
>
>      
>
>     I’m not sure if this is an issue with the maven built war files or an environment configuration on my end that needs to be updated. I’m also not sure why the PipelineComponent class not found exception appeared to be resolved and then returned.
>
>      
>
>     I have tried blasting away the maven project on my server and rebuilding from scratch and was able to reproduce the behavior described above.
>
>     When I run `mvn dependency:tree -X` on the command line, the only errors I see in the syncope-archetype project are
>
>     [WARNING] The POM for org.apache.syncope.core:syncope-core-rest-cxf:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-rest-cxf:2.1.5
>
>     [ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @ org.apache.syncope:syncope-core:2.1.5
>
>      
>
>     [WARNING] The POM for org.apache.syncope.core:syncope-core-workflow-java:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-workflow-java:2.1.5
>
>     [ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @
>
>      
>
>     [WARNING] The POM for org.apache.syncope.core:syncope-core-persistence-jpa:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-persistence-jpa:2.1.5
>
>     [ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @
>
>      
>
>     This error above may be a red herring but I’m adding it just in case.
>
>      
>
>     If anyone has had any experience or luck with getting a maven installation of Apache Syncope running, any help would be greatly appreciated.
>
>      
>
>     Thanks!
>
>     Hunter
>
-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/


RE: Install 2.1.5 Issue, Syncope Core Failing to Deploy

Posted by "Aardema, Hunter T." <Hu...@leidos.com>.
Thank you for your reply!

I forgot to mention but yes we are using JDK 1.8.

We have also followed the instructions for section 4.6.1 DBMS MySQL http://syncope.apache.org/docs/reference-guide.html#mysql, 4.6.2 Database Connection Pool  http://syncope.apache.org/docs/reference-guide.html#database-connection-pool , and the JavaEE Container for Apache Tomcat 9 instructions http://syncope.apache.org/docs/reference-guide.html#apache-tomcat-9. We are using the JDBC driver >= 8.0.17 as well.

We followed the customization section of the instructions to then compile and build the project war files for deployment.
In your documentation there is the following text: http://syncope.apache.org/docs/reference-guide.html#customization


“The WAR artifacts are generated by running the Maven command (with reference to the suggested directory layout):
$ mvn clean verify \
   -Dconf.directory=/opt/syncope/conf \
   -Dbundles.directory=/opt/syncope/bundles \
   -Dlog.directory=/opt/syncope/log
$ cp core/target/classes/*properties /opt/syncope/conf
$ cp console/target/classes/*properties /opt/syncope/conf
$ cp enduser/target/classes/*properties /opt/syncope/conf
$ cp enduser/target/classes/customFormAttributes.json /opt/syncope/conf
$ cp enduser/target/classes/customTemplate.json /opt/syncope/conf
After downloading all of the dependencies that are needed, three WAR files will be produced:
1.      core/target/syncope.war
2.      console/target/syncope-console.war
3.      enduser/target/syncope-enduser.war
If no failures are encountered, your basic Apache Syncope project is now ready to be deployed.”
We are simply trying to get the basic Apache Syncope project deployed and running. We have built these directories, run the maven clean verify command, and copied over the properties file to our created configuration directories. Deploying the war files to tomcat still produce the exceptions previously noted.

1.      Following the documentation for deployment/customization produces a “Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent” exception during deployment.

2.      Adding the cocoon-pipeline-components-1.0.0.jar to the syncope lib directory as a dependency and restarting the application produces a “Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextException” error during deployment.

3.      Adding in spring-context-5.1.9.RELEASE.jar as a dependency and restarting tomcat produces a “Caused by: java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapable”

4.      Replacing the spring-core-2.5.1.jar with spring-core-5.1.9.RELEASE.jar then produces a “Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent” exception.
Is there documentation on which version of spring components the syncope core project should be using? Or which version of cocoon pipeline components? Any further help or insight would be greatly appreciated!
Thank you,
Hunter


From: Francesco Chicchiriccò <il...@apache.org>
Sent: Saturday, September 28, 2019 10:59 AM
To: user <us...@syncope.apache.org>
Subject: EXTERNAL: Re: Install 2.1.5 Issue, Syncope Core Failing to Deploy

Hi,
glad of your interest in Apache Syncope. See my replies embedded below.
Regards.

On 27-set-19, at 16:14, Aardema, Hunter T. <Hu...@leidos.com> wrote:

Hello,

I’m trying to install the latest Apache Syncope 2.1.5 using the maven build instructions found here: http://syncope.apache.org/docs/2.1/getting-started.html#maven-project

Maven is our preferred method of installation as we would like to use this product in production. Docker is a potential back up option but we want to exhaust our options with maven first so we can utilize custom java item transformers more easily.

My environment looks as follows:

OS: RHEL 7
Syncope 2.1.5
Maven 3.6.2
Tomcat 9.0.20
MySQL 8.0.17
It seems you forgot to mention your JDK version; for Syncope 2.1, JDK 1.8 is required.
After generating the syncope-archetype project, building the war files, and deploying the war files to our tomcat server, we see the following error. The syncope.war file is failing to deploy for what looks to be a missing dependency issue.
The WAR files generated cannot be simply taken for deployment, as the guide linked above says:

"Before actual deployment onto a standalone Java EE container, you need to further check the Customization chapter of the Apache Syncope Reference Guide."

e.g. http://syncope.apache.org/docs/reference-guide.html#customization

In fact, you'll have at least to configure your Syncope project to work with MySQL, as indicated in

http://syncope.apache.org/docs/reference-guide.html#mysql

After the appropriate settings for MySQL, you'll need to build the project, as suggested in the Customization chapter linked above, e.g.

$ mkdir /opt/syncope
$ mkdir /opt/syncope/bundles
$ mkdir /opt/syncope/log
$ mkdir /opt/syncope/conf

$ mvn clean verify \
   -Dconf.directory=/opt/syncope/conf \
   -Dbundles.directory=/opt/syncope/bundles \
   -Dlog.directory=/opt/syncope/log

$ cp core/target/classes/*properties /opt/syncope/conf
$ cp console/target/classes/*properties /opt/syncope/conf
$ cp enduser/target/classes/*properties /opt/syncope/conf
$ cp enduser/target/classes/customFormAttributes.json /opt/syncope/conf
$ cp enduser/target/classes/customTemplate.json /opt/syncope/conf

Only at this point the three WAR files are ready for deployment in Tomcat.

HTH
Regards.
Here is a snippet from the tomcat catalina.log:

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1415)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:700)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:223)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607)
at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:53)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
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: java.lang.NoClassDefFoundError: org/apache/cocoon/pipeline/component/PipelineComponent
                at java.lang.Class.getDeclaredFields0(Native Method)
                at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
                at java.lang.Class.getDeclaredFields(Class.java:1916)
                at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:137)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
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:5048)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                ... 32more
        Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
                ... 45more

Resolved this by adding the following to the core/pom.xml, re-compiling and re-deploying the new war file to tomcat:

<dependency>
        <groupId>org.apache.cocoon</groupId>
        <artifactId>cocoon-pipeline-components</artifactId>
        <version>1.0.0</version>
    </dependency>


After re-dploy a new error appeared in our tomcat catalina.log relating to the syncope.war deployment:

SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
                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.start(HostConfig.java:1576)
                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
                at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
                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:134)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
        Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
                at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
                ... 37more
        Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextException
                at java.lang.Class.getDeclaredFields0(Native Method)
                at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
                at java.lang.Class.getDeclaredFields(Class.java:1916)
                at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
                at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:89)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
                at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
                at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
                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:5048)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                ... 38more
        Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextException
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)

The missing dependency spring-context is a jar that the syncope-console uses, so I copied that jar from ${SYNCOPE_HOME}/console/target/syncope-console/WEB-INF/lib/spring-context-5.1.9.RELEASE.jar to the ${TOMCAT_HOME}/ webapps/syncope/WEB-INF/lib/ then restarted tomcat.
SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
                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.start(HostConfig.java:1576)
                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
                at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
                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:134)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
        Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
                at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
                ... 37 more
        Caused by: java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapable
                at java.lang.ClassLoader.defineClass1(Native Method)
                at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
                at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2415)
                at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:863)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
                at java.lang.ClassLoader.defineClass1(Native Method)
                at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
                at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2415)
                at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:863)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
                at java.lang.Class.getDeclaredFields0(Native Method)
                at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
                at java.lang.Class.getDeclaredFields(Class.java:1916)
                at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
                at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:89)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
                at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
                at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
                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:5048)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                ... 38 more
        Caused by: java.lang.ClassNotFoundException: org.springframework.core.env.EnvironmentCapable
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
                ... 65 more

This looked like an issue with spring-core even though a spring-core jar is packaged in the war file. So I checked the versions of all the spring related components in the syncope core lib directory and saw the following:

spring-beans-5.1.9.RELEASE.jar
spring-context-5.1.9.RELEASE.jar
spring-core-2.5.1.jar
spring-web-5.1.9.RELEASE.jar

spring core was on an older version than the other spring products so I replaced it with spring-core-5.1.9.RELEASE.jar. I restarted tomcat and now I am back to square one with the syncope.war deployment complaining about PipelineComponent.

SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
                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.start(HostConfig.java:1576)
                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
                at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
                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:134)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
        Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]
                at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
                ... 37more
        Caused by: java.lang.NoClassDefFoundError: org/apache/cocoon/pipeline/component/PipelineComponent
                at java.lang.Class.getDeclaredFields0(Native Method)
                at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
                at java.lang.Class.getDeclaredFields(Class.java:1916)
                at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
                at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:137)
                at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69)
                at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
                at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
                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:5048)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                ... 38more
        Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.pipeline.component.PipelineComponent
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
                ... 51more


I’m not sure if this is an issue with the maven built war files or an environment configuration on my end that needs to be updated. I’m also not sure why the PipelineComponent class not found exception appeared to be resolved and then returned.

I have tried blasting away the maven project on my server and rebuilding from scratch and was able to reproduce the behavior described above.
When I run `mvn dependency:tree -X` on the command line, the only errors I see in the syncope-archetype project are
[WARNING] The POM for org.apache.syncope.core:syncope-core-rest-cxf:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-rest-cxf:2.1.5
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @ org.apache.syncope:syncope-core:2.1.5

[WARNING] The POM for org.apache.syncope.core:syncope-core-workflow-java:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-workflow-java:2.1.5
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @

[WARNING] The POM for org.apache.syncope.core:syncope-core-persistence-jpa:jar:2.1.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.syncope.core:syncope-core-persistence-jpa:2.1.5
[ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5, must be "pom" but is "war" @

This error above may be a red herring but I’m adding it just in case.

If anyone has had any experience or luck with getting a maven installation of Apache Syncope running, any help would be greatly appreciated.

Thanks!
Hunter


--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/

Re: Install 2.1.5 Issue, Syncope Core Failing to Deploy

Posted by Francesco Chicchiriccò <il...@apache.org>.
Hi, 
glad of your interest in Apache Syncope. See my replies embedded below. 

Regards. 

On 27-set-19, at 16:14, Aardema, Hunter T. <Hu...@leidos.com> wrote: 

> Hello,

> I’m trying to install the latest Apache Syncope 2.1.5 using the maven build
> instructions found here: [
> http://syncope.apache.org/docs/2.1/getting-started.html#maven-project |
> http://syncope.apache.org/docs/2.1/getting-started.html#maven-project ]

> Maven is our preferred method of installation as we would like to use this
> product in production. Docker is a potential back up option but we want to
> exhaust our options with maven first so we can utilize custom java item
> transformers more easily.

> My environment looks as follows:

> OS: RHEL 7

> Syncope 2.1.5

> Maven 3.6.2

> Tomcat 9.0.20

> MySQL 8.0.17

It seems you forgot to mention your JDK version; for Syncope 2.1, JDK 1.8 is required. 

> After generating the syncope-archetype project, building the war files, and
> deploying the war files to our tomcat server, we see the following error. The
> syncope.war file is failing to deploy for what looks to be a missing dependency
> issue.

The WAR files generated cannot be simply taken for deployment, as the guide linked above says: 

"Before actual deployment onto a standalone Java EE container, you need to further check the Customization chapter of the Apache Syncope Reference Guide." 

e.g. [ http://syncope.apache.org/docs/reference-guide.html#customization | http://syncope.apache.org/docs/reference-guide.html#customization ] 

In fact, you'll have at least to configure your Syncope project to work with MySQL, as indicated in 

[ http://syncope.apache.org/docs/reference-guide.html#mysql | http://syncope.apache.org/docs/reference-guide.html#mysql ] 

After the appropriate settings for MySQL, you'll need to build the project, as suggested in the Customization chapter linked above, e.g. 

$ mkdir /opt/syncope 
$ mkdir /opt/syncope/bundles 
$ mkdir /opt/syncope/log 
$ mkdir /opt/syncope/conf 

$ mvn clean verify \ 
-Dconf.directory=/opt/syncope/conf \ 
-Dbundles.directory=/opt/syncope/bundles \ 
-Dlog.directory=/opt/syncope/log 

$ cp core/target/classes/*properties /opt/syncope/conf 
$ cp console/target/classes/*properties /opt/syncope/conf 
$ cp enduser/target/classes/*properties /opt/syncope/conf 
$ cp enduser/target/classes/customFormAttributes.json /opt/syncope/conf 
$ cp enduser/target/classes/customTemplate.json /opt/syncope/conf 

Only at this point the three WAR files are ready for deployment in Tomcat. 

HTH 
Regards. 

> Here is a snippet from the tomcat catalina.log:

> org.apache.catalina.LifecycleException: Failed to start component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/syncope]]

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

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

> at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1415)

> at
> org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:700)

> at
> org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:223)

> at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)

> at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)

> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

> at
> org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)

> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

> at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)

> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607)

> at
> org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)

> at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:53)

> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)

> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)

> at
> org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)

> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)

> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)

> at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)

> at
> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

> at
> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)

> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)

> at
> org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

> 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: java.lang.NoClassDefFoundError:
> org/apache/cocoon/pipeline/component/PipelineComponent

> at java.lang.Class.getDeclaredFields0(Native Method)

> at java.lang.Class.privateGetDeclaredFields(Class.java:2583)

> at java.lang.Class.getDeclaredFields(Class.java:1916)

> at
> org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)

> at
> org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)

> at
> org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:137)

> at
> org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69)

> at
> org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)

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

> 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:5048)

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

> ... 32 more

> Caused by: java.lang.ClassNotFoundException:
> org.apache.cocoon.pipeline.component.PipelineComponent

> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)

> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)

> ... 45 more

> Resolved this by adding the following to the core/pom.xml, re-compiling and
> re-deploying the new war file to tomcat:

> <dependency>

> <groupId>org.apache.cocoon</groupId>

> <artifactId>cocoon-pipeline-components</artifactId>

> <version>1.0.0</version>

> </dependency>

> After re-dploy a new error appeared in our tomcat catalina.log relating to the
> syncope.war deployment:

> SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying
> web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)

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

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

> 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.start(HostConfig.java:1576)

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

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

> at
> org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)

> at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)

> at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)

> at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)

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

> at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)

> at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)

> 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:134)

> at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)

> at
> org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)

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

> at
> org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)

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

> at
> org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)

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

> at org.apache.catalina.startup.Catalina.start(Catalina.java:633)

> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

> at java.lang.reflect.Method.invoke(Method.java:498)

> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)

> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)

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

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

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

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

> ... 37 more

> Caused by: java.lang.NoClassDefFoundError:
> org/springframework/context/ApplicationContextException

> at java.lang.Class.getDeclaredFields0(Native Method)

> at java.lang.Class.privateGetDeclaredFields(Class.java:2583)

> at java.lang.Class.getDeclaredFields(Class.java:1916)

> at
> org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)

> at
> org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)

> at
> org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:89)

> at
> org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)

> at
> org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)

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

> 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:5048)

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

> ... 38 more

> Caused by: java.lang.ClassNotFoundException:
> org.springframework.context.ApplicationContextException

> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)

> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)

> The missing dependency spring-context is a jar that the syncope-console uses, so
> I copied that jar from ${SYNCOPE_HOME}/
> console/target/syncope-console/WEB-INF/lib/spring-context-5.1.9.RELEASE.jar to
> the ${TOMCAT_HOME}/ webapps/syncope/WEB-INF/lib/ then restarted tomcat.

> SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying
> web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)

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

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

> 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.start(HostConfig.java:1576)

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

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

> at
> org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)

> at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)

> at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)

> at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)

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

> at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)

> at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)

> 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:134)

> at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)

> at
> org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)

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

> at
> org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)

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

> at
> org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)

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

> at org.apache.catalina.startup.Catalina.start(Catalina.java:633)

> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

> at java.lang.reflect.Method.invoke(Method.java:498)

> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)

> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)

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

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

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

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

> ... 37 more

> Caused by: java.lang.NoClassDefFoundError:
> org/springframework/core/env/EnvironmentCapable

> at java.lang.ClassLoader.defineClass1(Native Method)

> at java.lang.ClassLoader.defineClass(ClassLoader.java:763)

> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

> at
> org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2415)

> at
> org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:863)

> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)

> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)

> at java.lang.ClassLoader.defineClass1(Native Method)

> at java.lang.ClassLoader.defineClass(ClassLoader.java:763)

> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

> at
> org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2415)

> at
> org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:863)

> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)

> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)

> at java.lang.Class.getDeclaredFields0(Native Method)

> at java.lang.Class.privateGetDeclaredFields(Class.java:2583)

> at java.lang.Class.getDeclaredFields(Class.java:1916)

> at
> org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)

> at
> org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)

> at
> org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:89)

> at
> org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)

> at
> org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)

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

> 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:5048)

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

> ... 38 more

> Caused by: java.lang.ClassNotFoundException:
> org.springframework.core.env.EnvironmentCapable

> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)

> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)

> ... 65 more

> This looked like an issue with spring-core even though a spring-core jar is
> packaged in the war file. So I checked the versions of all the spring related
> components in the syncope core lib directory and saw the following:

> spring-beans-5.1.9.RELEASE.jar

> spring-context-5.1.9.RELEASE.jar

> spring-core-2.5.1.jar

> spring-web-5.1.9.RELEASE.jar

> spring core was on an older version than the other spring products so I replaced
> it with spring-core-5.1.9.RELEASE.jar. I restarted tomcat and now I am back to
> square one with the syncope.war deployment complaining about PipelineComponent.

> SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying
> web application archive [/apps/apache-tomcat-9.0.20/webapps/syncope.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:705)

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

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

> 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.start(HostConfig.java:1576)

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

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

> at
> org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)

> at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)

> at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)

> at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)

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

> at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)

> at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)

> 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:134)

> at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)

> at
> org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)

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

> at
> org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)

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

> at
> org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)

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

> at org.apache.catalina.startup.Catalina.start(Catalina.java:633)

> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

> at java.lang.reflect.Method.invoke(Method.java:498)

> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)

> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)

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

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

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

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

> ... 37 more

> Caused by: java.lang.NoClassDefFoundError:
> org/apache/cocoon/pipeline/component/PipelineComponent

> at java.lang.Class.getDeclaredFields0(Native Method)

> at java.lang.Class.privateGetDeclaredFields(Class.java:2583)

> at java.lang.Class.getDeclaredFields(Class.java:1916)

> at
> org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)

> at
> org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)

> at
> org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:137)

> at
> org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69)

> at
> org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)

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

> 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:5048)

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

> ... 38 more

> Caused by: java.lang.ClassNotFoundException:
> org.apache.cocoon.pipeline.component.PipelineComponent

> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)

> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)

> ... 51 more

> I’m not sure if this is an issue with the maven built war files or an
> environment configuration on my end that needs to be updated. I’m also not sure
> why the PipelineComponent class not found exception appeared to be resolved and
> then returned.

> I have tried blasting away the maven project on my server and rebuilding from
> scratch and was able to reproduce the behavior described above.

> When I run `mvn dependency:tree -X` on the command line, the only errors I see
> in the syncope-archetype project are

> [WARNING] The POM for org.apache.syncope.core:syncope-core-rest-cxf:jar:2.1.5 is
> invalid, transitive dependencies (if any) will not be available: 1 problem was
> encountered while building the effective model for
> org.apache.syncope.core:syncope-core-rest-cxf:2.1.5

> [ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5,
> must be "pom" but is "war" @ org.apache.syncope:syncope-core:2.1.5

> [WARNING] The POM for
> org.apache.syncope.core:syncope-core-workflow-java:jar:2.1.5 is invalid,
> transitive dependencies (if any) will not be available: 1 problem was
> encountered while building the effective model for
> org.apache.syncope.core:syncope-core-workflow-java:2.1.5

> [ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5,
> must be "pom" but is "war" @

> [WARNING] The POM for
> org.apache.syncope.core:syncope-core-persistence-jpa:jar:2.1.5 is invalid,
> transitive dependencies (if any) will not be available: 1 problem was
> encountered while building the effective model for
> org.apache.syncope.core:syncope-core-persistence-jpa:2.1.5

> [ERROR] Invalid packaging for parent POM org.apache.syncope:syncope-core:2.1.5,
> must be "pom" but is "war" @

> This error above may be a red herring but I’m adding it just in case.

> If anyone has had any experience or luck with getting a maven installation of
> Apache Syncope running, any help would be greatly appreciated.

> Thanks!

> Hunter

-- 
Francesco Chicchiriccò 

Tirasa - Open Source Excellence 
http://www.tirasa.net/ 

Member at The Apache Software Foundation 
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail 
http://home.apache.org/~ilgrosso/