cancel
Showing results for 
Search instead for 
Did you mean: 

[Résolu] Lancement d'Apache Maven sur linux

lemizo
Champ in-the-making
Champ in-the-making
Bonjour,

Je suis en train de suivre le tutoriel http://ecmarchitect.com/alfresco-developer-series-tutorials/maven-sdk/tutorial/tutorial.html et sur la ligne mvn integration-test -Pamp-to-war j'ai l'erreur suivant

[INFO] Scanning for projects…
[INFO]
[INFO] ————————————————————————
[INFO] Building Telma-mvn-projet-alfresco AMP project 1.0-SNAPSHOT
[INFO] ————————————————————————
Downloading: https://artifacts.alfresco.com/nexus/content/groups/public/org/jvnet/staxex/stax-ex/maven-metadata.x...
Downloading: https://artifacts.alfresco.com/nexus/content/groups/public/org/jvnet/staxex/stax-ex/maven-metadata.x...
Downloading: https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/org/jvnet/staxex/stax-ex/maven-...
avr. 10, 2014 2:55:38 PM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
Infos: I/O exception (java.net.SocketException) caught when connecting to the target host: Can't connect to SOCKS proxy:Connection timed out
avr. 10, 2014 2:55:38 PM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
Infos: I/O exception (java.net.SocketException) caught when connecting to the target host: Can't connect to SOCKS proxy:Connection timed out
avr. 10, 2014 2:55:38 PM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
Infos: I/O exception (java.net.SocketException) caught when connecting to the target host: Can't connect to SOCKS proxy:Connection timed out
avr. 10, 2014 2:55:38 PM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
Infos: Retrying connect
avr. 10, 2014 2:55:38 PM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
Infos: Retrying connect
avr. 10, 2014 2:55:38 PM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
Infos: Retrying connect
^Cdina@dpqp-dina:~/Telma-mvn-projet-alfresco$ export MAVEN_OPTS="-DsocksProxyHost=localhost -DsocksProxyPort=1080"
dina@dpqp-dina:~/Telma-mvn-projet-alfresco$ mvn integration-test -Pamp-to-war
[INFO] Scanning for projects…
[INFO]
[INFO] ————————————————————————
[INFO] Building Telma-mvn-projet-alfresco AMP project 1.0-SNAPSHOT
[INFO] ————————————————————————
Downloading: https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/org/jvnet/staxex/stax-ex/maven-...
Downloading: https://artifacts.alfresco.com/nexus/content/groups/public/org/jvnet/staxex/stax-ex/maven-metadata.x...
Downloading: https://artifacts.alfresco.com/nexus/content/groups/public/org/jvnet/staxex/stax-ex/maven-metadata.x...
[INFO]
[INFO] — alfresco-maven-plugin:1.1.1:set-version (default-set-version) @ Telma-mvn-projet-alfresco —
[INFO] Removed -SNAPSHOT suffix from version - 1.0
[INFO] Added timestamp to version - 1.0.1404101456
[INFO]
[INFO] — build-helper-maven-plugin:1.8:add-test-resource (add-env-test-properties) @ Telma-mvn-projet-alfresco —
[INFO]
[INFO] — maven-resources-plugin:2.6:resources (default-resources) @ Telma-mvn-projet-alfresco —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/dina/Telma-mvn-projet-alfresco/src/main/resources
[INFO] Copying 9 resources to ../Telma-mvn-projet-alfresco
[INFO]
[INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ Telma-mvn-projet-alfresco —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ Telma-mvn-projet-alfresco —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO]
[INFO] — maven-resources-plugin:2.6:copy-resources (prepare-amp-testing-classpath) @ Telma-mvn-projet-alfresco —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ Telma-mvn-projet-alfresco —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-surefire-plugin:2.16:test (default-test) @ Telma-mvn-projet-alfresco —
[INFO] Tests are skipped.
[INFO]
[INFO] — maven-dependency-plugin:2.8:unpack (unpack-alfresco) @ Telma-mvn-projet-alfresco —
[INFO] Configured Artifact: org.alfresco:alfresco:4.2.c:war
[INFO] alfresco-4.2.c.war already unpacked.
[INFO]
[INFO] — maven-resources-plugin:2.6:copy-resources (copy-alfresco-test-resources) @ Telma-mvn-projet-alfresco —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/dina/Telma-mvn-projet-alfresco/src/test/webapp
[INFO] Copying 6 resources to WEB-INF/classes
[INFO] Copying 1 resource to WEB-INF/classes
[INFO]
[INFO] — maven-resources-plugin:2.6:copy-resources (copy-tomcat-resources) @ Telma-mvn-projet-alfresco —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource to WEB-INF
[INFO]
[INFO] — alfresco-maven-plugin:1.1.1:amp (default-amp) @ Telma-mvn-projet-alfresco —
[INFO] Building jar: /home/dina/Telma-mvn-projet-alfresco/target/Telma-mvn-projet-alfresco/lib/Telma-mvn-projet-alfresco.jar
[INFO] Adding directory to AMP package [ '/home/dina/Telma-mvn-projet-alfresco/target/Telma-mvn-projet-alfresco' '']
[INFO] Building amp: /home/dina/Telma-mvn-projet-alfresco/target/Telma-mvn-projet-alfresco.amp
[INFO]
[INFO] — alfresco-maven-plugin:1.1.1:install (amps-to-war-overlay) @ Telma-mvn-projet-alfresco —
- WARNING: The file '/WEB-INF/classes/alfresco/module/Telma-mvn-projet-alfresco/context/service-context.xml' is being overwritten by this module. The original has been backed-up to '/WEB-INF/classes/alfresco/module/backup/298f8642-c0a7-11e3-bde7-5b8eed1bc690.bin'
- WARNING: The file '/WEB-INF/classes/alfresco/module/Telma-mvn-projet-alfresco/log4j.properties' is being overwritten by this module. The original has been backed-up to '/WEB-INF/classes/alfresco/module/backup/298ffb73-c0a7-11e3-bde7-5b8eed1bc690.bin'
- WARNING: The file '/WEB-INF/classes/alfresco/module/Telma-mvn-projet-alfresco/module-context.xml' is being overwritten by this module. The original has been backed-up to '/WEB-INF/classes/alfresco/module/backup/29904994-c0a7-11e3-bde7-5b8eed1bc690.bin'
[INFO]
[INFO] — tomcat7-maven-plugin:2.1:run-war-only (run-wars) @ Telma-mvn-projet-alfresco —
[INFO] Démarrage du war sur http://localhost:8080/Telma-mvn-projet-alfresco
[INFO] Utilisation de la configuration existante du serveur Tomcat sur /home/dina/Telma-mvn-projet-alfresco/target/tomcat
[INFO] create webapp with contextPath: /alfresco
avr. 10, 2014 2:56:34 PM org.apache.coyote.AbstractProtocol init
Infos: Initializing ProtocolHandler ["http-bio-8080"]
avr. 10, 2014 2:56:34 PM org.apache.catalina.core.StandardService startInternal
Infos: Starting service Tomcat
avr. 10, 2014 2:56:34 PM org.apache.catalina.core.StandardEngine startInternal
Infos: Starting Servlet Engine: Apache Tomcat/7.0.37
avr. 10, 2014 2:56:43 PM org.apache.catalina.startup.TaglibUriRule body
Infos: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
avr. 10, 2014 2:56:43 PM org.apache.catalina.core.StandardContext addApplicationListener
Infos: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
avr. 10, 2014 2:56:44 PM org.apache.catalina.core.ApplicationContext log
Infos: Initializing Spring root WebApplicationContext
2014-04-10 14:56:49,685 WARN [hibernate.cfg.SettingsFactory] [localhost-startStop-1] Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (IO Exception: "java.net.UnknownHostException: dpqp-dina: dpqp-dina: Name or service not known" [90028-174])
avr. 10, 2014 2:56:49 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
Infos: WSSERVLET12: JAX-WS context listener initializing
avr. 10, 2014 2:56:52 PM com.sun.xml.ws.transport.http.servlet.WSServletDelegate
Infos: WSSERVLET14: JAX-WS servlet initializing
avr. 10, 2014 2:56:52 PM org.apache.catalina.core.StandardContext startInternal
Grave: Error listenerStart
avr. 10, 2014 2:57:39 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
Infos: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [46,596] milliseconds.
avr. 10, 2014 2:57:39 PM org.apache.catalina.core.StandardContext startInternal
Grave: Context [/alfresco] startup failed due to previous errors
avr. 10, 2014 2:57:39 PM com.sun.xml.ws.transport.http.servlet.WSServletDelegate destroy
Infos: WSSERVLET15: JAX-WS servlet destroyed

[LIGNES MANQUANTES TROP LONGUES]

avr. 10, 2014 2:57:39 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextDestroyed
Infos: WSSERVLET13: JAX-WS context listener destroyed
avr. 10, 2014 2:57:39 PM org.apache.catalina.core.ApplicationContext log
Infos: Closing Spring root WebApplicationContext
avr. 10, 2014 2:57:39 PM org.apache.catalina.core.ApplicationContext log
Infos: Shutting down log4j
avr. 10, 2014 2:57:39 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Grave: The web application [/alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@45ae70ee]) and a value of type [org.apache.cxf.bus.CXFBusImpl] (value [org.apache.cxf.bus.CXFBusImpl@3f783cff]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
avr. 10, 2014 2:57:39 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Grave: The web application [/alfresco] created a ThreadLocal with key of type [com.sun.xml.bind.v2.ClassFactory$1] (value [com.sun.xml.bind.v2.ClassFactory$1@254983]) and a value of type [java.util.WeakHashMap] (value [{class javax.xml.bind.annotation.W3CDomHandler=java.lang.ref.WeakReference@4fcd7198}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
avr. 10, 2014 2:57:39 PM org.apache.coyote.AbstractProtocol start
Infos: Starting ProtocolHandler ["http-bio-8080"]

pour information, j'utilise Alfresco 4.2.c (déjà installé), avec jdk 1.7 et apache Maven 3.0.5 sous le système ubuntu 12.04

Je vous remercie d'avance de votre réponse.
Lemizo
2 REPLIES 2

cleseach
Star Contributor
Star Contributor
Bonjour,

Pas très simple de se retrouver dans votre log…

La ligne qui me semble digne d'intérêt est celle-ci :
2014-04-10 14:56:49,685 WARN [hibernate.cfg.SettingsFactory] [localhost-startStop-1] Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (IO Exception: "java.net.UnknownHostException: dpqp-dina: dpqp-dina: Name or service not known" [90028-174])


Et ça ressemble fort à un problème de configuration de votre machine.
Vérifiez que son nom est bien référencé dans le host et que le proxy que vous avez configuré n'engendre pas de problème dans la résolution des noms.

Cordialement,
Charles Le Seac'h

lemizo
Champ in-the-making
Champ in-the-making
Merci beaucoup de votre aide et Vraiment navré de vous avoir imposer mon log assez long. Mais en fait ça c'est résolu tout seul, je pense que c'est au fait que j'utilise un tunnel ssh pour la connexion et dès que j'ai reboucher le tunnel, j'ai essayer de lancer à nouveau la commande mvn -X integration-test -Pamp-to-war et ça a marché nickel Smiley Happy

Mais je me demande toujours si je dois configurer le tunnel dans le fichier setting.xml