Hi,
I just checked and the settings.xml for maven is in 
/apps/apache-maven-3.0.5/conf/settings.xml and everything in that settings.xml 
is commented out.
Our environment people say there is nothing weird about our environment (no 
private repos) that would cause Maven to behave badly.
I am going to try on a machine in my own environment if I can.
Jim


    On Monday, October 28, 2019, 7:36:05 AM UTC, Francesco Chicchiriccò 
<[email protected]> wrote:  
 
   Hi, I am sorry for your struggle, but it seems there is something 
misbehaving on your side. 
  First of all, I'd like to invite you to visit 
  http://syncope.apache.org/integration 
  to check how the various branches of our GIT repository are built at every 
push, with a whole set of unit and integration tests run at once.
  
  Moreover, I would also ensure that projects based on all Syncope versions - 
including 2.1.4 and 2.1.5 mentioned below - are built via Maven and deployed 
all over the  world without troubles in the vast majority of cases.
  
  Since the problem you repeatedly report below seems related to bad resolution 
of transitive dependencies, and especially because the same problem was 
experienced only by your colleague in the whole history of this project, I 
suspect that there should be something weird on your side, and my bet is that 
you are using some sort of Maven private mirror or proxy which fails to resolve 
transitive dependencies, for some reason.
  
  Normally, in fact, after generating a new Maven project from archetype as you 
did, you can execute the following commands:
 
 mvn clean install cd core mvn dependency:tree 
  showing at the end something like 
  https://paste.apache.org/d3zrp 
  where, as you can see, all transitive dependencies are reported, including 
spring, commons-lang3 and cocoon3 artifacts; this normally implies that such 
artifacts will  be contained by 
  core/target/syncope.war 
  Since this is not happening for you and your colleague only, I strongly 
suspect your Maven command is not properly working, possibly because you have 
something defined in Maven's settings.xml. 
  I invite you to try from somewhere else - a machine on some cloud provider, 
your personal PC at home: you'll see that such weird behavior is not going to 
happen. 
  Let me also respond to some of the statements you embedded in the e-mail 
thread below: 
   
As described previously, he was eventually able to get a good build by using 
Maven 3.0.5 instead of Maven 3.6.2.
  
  There is no need at all to use Maven 3.0.5: while that version is the minimum 
required, all works pretty fine with Maven 3.6.2 - including the various CI 
systems mentioned above. 
  
 [COCOON3-138] Cannot build with JDK 1.8 - ASF JIRA
   Is that issue still open?
 FYI, all along, we have been trying build Syncope with JDK 1.8 (in my case 
build 231)!
 So do we have to build Syncope with JDK 1.7 instead??? 
 
 While COCOON3-138 is still open, it just reports that Cocoon 3 sources cannot 
be *built* with JDK 8, not *run* by JDK 8; consider that in Syncope 3.0 (yet to 
come) we  are using JDK 11 and Cocoon 3 works still fine. 
  And, by the way, Syncope 2.1 requires JDK 8 to run.
  
   
I tried with JDK 1.8 and lower Tomcat (8.5) because Tomcat 9 is not compatible 
with JDK 1.8.
 
  This is untrue: Syncope 2_1_X runs the whole test suite on OpenJDK 8 and 
latest Tomcat 9 (such configuration is also our default deployment option). You 
don't have to trust me, just check
 
 http://tomcat.apache.org/whichversion.html
  
  Wish you good luck.
 Regards.
  
  On 27/10/19 18:40, [email protected] wrote:
  
   I've been continuing to try to get a build working and I am now dropping JAR 
files that I downloaded from the 'net to try to get past the problem. 
  So far, I have had to add the cocoon-pipeline JARs and commons JARs and the 
spring-web and spring-core JARs into the Apache Tomcat lib directory, but I  am 
now stuck with this error, that I have not been able get around, when I start 
Tomcat up: 
   27-Oct-2019 17:34:24.916 SEVERE [localhost-startStop-1] 
org.apache.catalina.core.StandardContext.listenerStart Exception sending 
context initialized event to listener instance of class 
[org.apache.syncope.client.console.init.ConsoleInitializer]
         java.lang.IllegalArgumentException: ResourceLoader must not be null
                 at org.springframework.util.Assert.notNull(Assert.java:112)
                 
atorg.springframework.core.io.support.ResourcePatternUtils.getResourcePatternResolver(ResourcePatternUtils.java:62)
                 
atorg.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.setResourceLoader(ClassPathScanningCandidateComponentProvider.java:265)
                 
atorg.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.<init>(ClassPathScanningCandidateComponentProvider.java:150)
                 
atorg.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.<init>(ClassPathScanningCandidateComponentProvider.java:133)
                 
atorg.apache.syncope.client.console.init.ClassPathScanImplementationLookup.load(ClassPathScanImplementationLookup.java:139)
                 
atorg.apache.syncope.client.console.init.ConsoleInitializer.contextInitialized(ConsoleInitializer.java:42)
                 
atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4699)
                 
atorg.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5165)
                 at 
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                 
atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
                 at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
                 at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
                 at 
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:970)
                 
atorg.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1841)
                 at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
                 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
                 
atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
                 
atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
                 at java.lang.Thread.run(Thread.java:748)
 
  
  These are the JARs that I had to add to the Tomcat lib: 
   -rw-r--r--. 1 root root   13323 Oct 27 16:29 
cocoon-controller-3.0.0-alpha-3.jar
 -rw-r--r--. 1 root root   52300 Oct 27 16:29 
cocoon-monitoring-3.0.0-alpha-3.jar
 -rw-r--r--. 1 root root   43421 Oct 27 16:29 cocoon-optional-3.0.0-alpha-3.jar
 -rw-r--r--. 1 root root   51626 Oct 27 16:29 cocoon-pipeline-3.0.0-alpha-3.jar
 -rw-r--r--. 1 root root   63960 Oct 27 16:29 cocoon-profiling-3.0.0-alpha-3.jar
 -rw-r--r--. 1 root root   41104 Oct 27 16:29 cocoon-rest-3.0.0-alpha-3.jar
 -rw-r--r--. 1 root root  113642 Oct 27 16:29 cocoon-sax-3.0.0-alpha-3.jar
 -rw-r--r--. 1 root root   49052 Oct 27 16:29 cocoon-servlet-3.0.0-alpha-3.jar
 -rw-r--r--. 1 root root   92034 Oct 27 16:29 cocoon-sitemap-3.0.0-alpha-3.jar
 -rw-r--r--. 1 root root   49016 Oct 27 16:29 cocoon-stax-3.0.0-alpha-3.jar
 -rw-r--r--. 1 root root   18040 Oct 27 16:29 
cocoon-stringtemplate-3.0.0-alpha-3.jar
 -rw-r--r--. 1 root root   22684 Oct 27 16:29 cocoon-wicket-3.0.0-alpha-3.jar
 -rw-r--r--. 1 root root  503880 Oct 27 16:40 commons-lang3-3.9.jar
 -rw-r--r--. 1 root root  557770 Oct 27 16:40 commons-lang3-3.9-sources.jar
 -rw-r--r--. 1 root root  969971 Oct 27 16:40 commons-lang3-3.9-tests.jar
 -rw-r--r--. 1 root root  451693 Oct 27 16:40 commons-lang3-3.9-test-sources.jar
 
  
 -rw-r--r--. 1 root root 1227025 Oct 27 17:33 spring-core-5.0.8.RELEASE.jar
 -rw-r--r--. 1 root root 1263363 Oct 27 17:33 spring-web-5.0.8.RELEASE.jar    
  
  I know it is obvious that the syncope-artefact/pom.xml is bad (missing 
depencies) but I am not familiar with Maven :(, so I have had to do it this 
way... 
  Jim
  
  
      On Sunday, October 27, 2019, 12:55:53 PM UTC, [email protected] 
<[email protected]> wrote:  
  
      Ok, I tried with JDK 1.8 and lower Tomcat (8.5) because Tomcat 9 is not 
compatible with JDK 1.8. 
  
  So I get the same errors. 
  So now I am looking at the error during startup: 
    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)
                 
atorg.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
                 
atorg.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
                 
atorg.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:137)
                 
atorg.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69)
 
  and I searched and it doesn't look like the Cocoon stuff is deployed, so I 
have been looking at Cocoon, both 2.2.0 and 2.1.12, and it  doesn't look like 
there is a "pipeline/component/PipelineComponent" CLASS, even in the Cocoon 
source!! 
  So does anyone know why that is missing?  Is there a different distro of 
Cocoon that Syncope needs? 
  Thanks, Jim
   
  
  
       On Saturday, October 26, 2019, 7:41:26 PM UTC, [email protected] 
<[email protected]> wrote:  
  
      Hi, 
  I found this in Jira: 
  [COCOON3-138] Cannot build with JDK 1.8 - ASF JIRA 
   
|  
|  
| 
  |  
[COCOON3-138] Cannot build with JDK 1.8 - ASF JIRA
  |

  |

  |

  
  
  
  Is that issue still open? 
  FYI, all along, we have been trying build Syncope with JDK 1.8 (in my case 
build 231)! 
  So do we have to build Syncope with JDK 1.7 instead??? 
  Thanks, Jim
  
       On Saturday, October 26, 2019, 7:25:14 PM UTC, [email protected] 
<[email protected]> wrote:  
  
      Hi, 
  I was reviewing one of Hunter's previous threads and it seems like we are 
re-travelling the same paths :(... 
  syncope-user - Install 2.1.5 Issue, Syncope Core Failing to Deploy 
   
|  
|  
|  
| 
  | 
  |

  |

  |
|  
| 
  |  
syncope-user - Install 2.1.5 Issue, Syncope Core Failing to Deploy
 
Install 2.1.5 Issue, Syncope Core Failing to Deploy. Hello, I'm trying to  
install the latest Apache Syncope 2.1....
  |

  |

  |

  
  
  
  To add some info that was asked for in that previous thread: 
  - For Tomcat 9.0.20, we get the tar.gz from Apache website and we untar it to 
/apps. 
  - Untarring the built syncope.war from my attempts, I don't see ANY cocoon 
JARs in that (which is probably why we see classnotfound errors) 
  
  - Similarly for spring in the syncope.war, I only see a couple of xml files: 
   [root@ip-192-168-31-179 webapps]# jar tvf syncope.war | grep ocoo
 [root@ip-192-168-31-179 webapps]# jar tvf syncope.war | grep pring
   6558 Sat Oct 26 19:02:38 UTC 2019 
WEB-INF/classes/META-INF/spring-orm-sqlserver.xml
   8130 Sat Oct 26 19:02:38 UTC 2019 WEB-INF/classes/META-INF/spring-orm.xml
   6562 Sat Oct 26 19:02:38 UTC 2019 
WEB-INF/classes/META-INF/spring-orm-oracle.xml
 
  
  So, it really seems like, for some reason, for us, maven is not pulling all 
of the dependencies.  
  
  Similar to what Hunter tried previously, I have now tried maven 3.0.5 and 
3.6.2, with same results.  I have also tried building syncope 2.1.4, with same 
(bad) results :(... 
  I don't remember if I mentioned this before, but I have also tried the build 
using "mvn install" and then "mvn compile", with same  (bad) results. 
  
  Jim
   
  
  
  
  
       On Saturday, October 26, 2019, 2:53:48 PM UTC, [email protected] 
<[email protected]> wrote:  
  
      FYI, here are the steps we follow to build Syncope: 
  1) We run: 
   /apps/apache-maven-3.0.5/bin/mvnarchetype:generate 
-DarchetypeGroupId=org.apache.syncope 
-DarchetypeArtifactId=syncope-archetype-DarchetypeRepository=http://repo1.maven.org/maven2
 -DarchetypeVersion=2.1.5
           responses:
               "Define value for property 'groupId':": "org.apache.syncope"
               "Define value for property 'artifactId':":"syncope-archetype"
               "Define value for property 'version' 1.0-SNAPSHOT: :": "2.1.5"
               "Define value for property 'package' 
org.apache.syncope:":"org.apache.syncope"
               "Define value for property 'anonymousKey':": "XXX"
               "Define value for property 'jwsKey':": "XXX"
               "Define value for property 'secretKey':": "XXX"
               "Y: :": "Y"
 
  
  2) We create the "conf", "logs", and "bundles" directories  under 
/apps/syncope-archetype     
  
  3) We copy a modified "provisioning.properties" file to 
/apps/syncope-archetype/core/src/main/resources/provisioning.properties and a 
modified"Master.properties file to 
/apps/syncope-archetype/core/src/main/resources/domains/Master.properties 
(files modified for using Mysql as database)
  
  
  4) We add a "setenv.sh" file to /apps/apache-tomcat-9.0.20/bin.  setenv.sh 
contains: 
  VA_OPTS="-Djava.awt.headless=true-Dfile.encoding=UTF-8 -server -Xms1536m 
-Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m-XX:+DisableExplicitGC 
-Djava.security.egd=file:/dev/./urandom" 
  
  5) We run "/apps/apache-maven-3.0.5/bin/mvn clean 
package-Dconf.directory=/apps/syncope-archetype/conf 
-Dbundles.directory=/apps/syncope-archetype/bundles/-Dlog.directory=/apps/syncope-archetype/logs/"
 
  The builds all show as SUCCESSFUL. 
  [FYI, in a different/separate attempt, I have also tried running  the "mvn 
install" and "mvn compile" separately and both were  successful.]
  
  
   6) We copy the WAR files to <TOMCAT>/webapps.  We copy properties files to 
/apps/syncope-archetype/conf, and "customFormAttributes.json" and 
"customTemplate.json" to /apps/syncope-archetype/conf.
   
  
  
  But, per below, when we start Tomcat, we get the shown below. 
  Looking at the Tomcat Console, the syncope-console is running and the syncope 
and  syncope-enduser are not running. 
  If I try to access the syncope-console webapp, I get an error that  mentions 
"wicket": 
    org.apache.wicket.WicketRuntimeException: Unable to instantiate web session 
class org.apache.syncope.client.console.SyncopeConsoleSession
        
org.apache.wicket.authroles.authentication.AuthenticatedWebApplication.newSession(AuthenticatedWebApplication.java:121)
        
org.apache.wicket.Application.fetchCreateAndSetSession(Application.java:1555)
        org.apache.wicket.Session.get(Session.java:176)  
  I/we are really puzzled, because we don't understand why  others apparently 
are able to build Syncope, but  I/we have had terrible problems (believe many 
sleepless  nights now). 
  
  Is it because we are trying to build it using Maven?  But, it seems like the 
Syncope docs say that Maven is the best way to  build Syncope? 
  Please advise. 
  Thanks, Jim
       
   
  
  
       On Friday, October 25, 2019, 5:29:39 PM UTC, 
[email protected]<[email protected]> wrote:  
  
      Hi, 
  FYI, when we try to start Tomcat, we are seeing errors like the following  in 
catalina.out log file: 
   25-Oct-2019 16:21:29.031 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
                
atorg.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)
                
atorg.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)
                
atorg.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
                
atjava.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)
                
atorg.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
                
atorg.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                
atorg.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
                at 
org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
                
atorg.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
                
atorg.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
                at 
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                
atorg.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
                
atorg.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
                at java.util.concurrent.FutureTask.run(FutureTask.java:266)
                
atorg.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
                
atjava.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
                
atorg.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
                
atorg.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
                at 
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                
atorg.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
                at 
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                
atorg.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)
                
atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                
atsun.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]]
                
atorg.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
                at 
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
                
atorg.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)
                
atorg.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
                
atorg.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
                
atorg.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:137)
                
atorg.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69)
                
atorg.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
                
atorg.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
                
atorg.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:301)
                
atorg.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                
atorg.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
                
atorg.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
                
atorg.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
                ... 51 more
 
  
  Can someone tell us exactly what version of the products are "officially" 
being used for building  Syncope, for everything (especially maven)? 
  Also Hunter has mentioned that these are the exact same problems/errors  he 
was seeing in his earlier problem, e.g.: 
  Pony Mail! 
   
|  
|  
| 
  |  
Pony Mail!
  |

  |

  |

  
  
  
  Thanks, JIm
  
  
   
       On Friday, October 25, 2019, 5:12:53 PM UTC, 
[email protected]<[email protected]> wrote:  
  
      Hi, 
  I am trying to reproduce the Syncope 2.1.5 (on RHEL 7) build that one  of my 
colleagues (Hunter) had had problems with previously as reported on this 
mailing list.  As described previously, he was eventually able to get a good 
build by  using Maven 3.0.5 instead of Maven 3.6.2.  
  
  However in my new build, I started with using Maven 3.0.5 and  encountered 
similar "transitive dependencies" and "missing POM" errors as the ones he had 
been seeing previously, and then,  also, working with Hunter today, he tried 
both Maven 3.0.5  and 3.6.2, and today, his build attempts are also failing now.
  
  So we wanted to find out if maybe there is something bad going on with  the 
Syncope Maven repos at this time? 
  Please advise. 
  Thanks, Jim
                                      
 

 
 -- 
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/
   

Reply via email to