Estoy aprendiendo a desarrollar para Alfresco 5.1 y me encuentro creando el proyecto que contiene el repo. Cuando ejecuto el comando ¨"run.bat" no se inicia porque no puede iniciar dos componentes del Tomcat.
Este es el error:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:20 min
[INFO] Finished at: 2017-12-06T18:35:05+00:00
[INFO] Final Memory: 72M/565M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.alfresco.maven.plugin:alfresco-maven-plugin:3.0.1:run (default-cli) on project content-tutorial-repo: Unable to execute mojo: Could not start Tomcat: Failed to start component [StandardServer[-1]]: Failed to start component [StandardService[Tomcat]]: Failed to start component [StandardEngine[Tomcat]]: A child container failed during start -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
java.lang.NoClassDefFoundError: de/schlichtherle/truezip/fs/FsLockController$1Sync
at de.schlichtherle.truezip.fs.FsLockController.sync(FsLockController.java:240)
at de.schlichtherle.truezip.fs.archive.zip.KeyController.sync(KeyController.java:128)
at de.schlichtherle.truezip.fs.FsDecoratingController.sync(FsDecoratingController.java:131)
at de.schlichtherle.truezip.fs.FsFalsePositiveArchiveController.sync(FsFalsePositiveArchiveController.java:480)
at de.schlichtherle.truezip.fs.FsManager.sync(FsManager.java:105)
at de.schlichtherle.truezip.fs.FsDefaultManager.sync(FsDefaultManager.java:190)
at de.schlichtherle.truezip.fs.FsSyncShutdownHook$Hook.run(FsSyncShutdownHook.java:93)
Caused by: java.lang.ClassNotFoundException: de.schlichtherle.truezip.fs.FsLockController$1Sync
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
... 7 more
Exception in thread "Thread-4" Exception in thread "Thread-3" java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
at org.apache.tomcat.maven.plugin.tomcat7.run.RunMojo$2.run(RunMojo.java:295)
Exception in thread "Thread-5" Exception in thread "Thread-2" Exception in thread "Thread-6" java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
at org.apache.tomcat.maven.plugin.tomcat7.run.RunMojo$1.run(RunMojo.java:140)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
... 1 more
java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
at org.apache.tomcat.maven.plugin.tomcat7.run.RunMojo$2.run(RunMojo.java:295)
java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
at org.apache.tomcat.maven.plugin.tomcat7.run.RunMojo$2.run(RunMojo.java:295)
java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
at org.apache.tomcat.maven.plugin.tomcat7.run.RunMojo$2.run(RunMojo.java:295)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
... 1 more
Agradeceria cualquier ayuda,llevo dos meses y no he podido empezar por este bache. Mi correo es smontalvo1992@gmail.com
Parece que es un problema con la versión de Alfresco SDK 3 para los proyectos AIO
https://github.com/Alfresco/alfresco-sdk/issues/455
https://github.com/Alfresco/alfresco-sdk/issues/420
Prueba a utilizar el siguiente comando en vez del run.bat
mvn clean install alfresco:run -DskipTests=true
Probé el comando "mvn clean install alfresco:run -DskipTests=true" y me sale:
D:\Workspace of Maven\alfresco 5.1\content-tutorial-repo>mvn clean install alfresco:run -DskipTests=true
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.415 s
[INFO] Finished at: 2017-12-07T15:28:24+00:00
[INFO] Final Memory: 17M/619M
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'run' in plugin org.alfresco.maven.plugin:alfresco-maven-plugin:2.2.0 among available goals amp, help, install, refresh, refresh-repo, refresh-share, set-version, validate -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoNotFoundException
Que otra cosa puedo hacer??
Creo que deberías empezar de cero... En el primer ejemplo estabas usando SDK 3.0.1 y ahora me pasas una salida de 2.2.0...
Estoy trabajando en los dos para ver quien levanta pero nada,he empezado 15 veces hasta tener un repositorio de 1,45GB y mas de cinco repositorios externos
Sé que el alfresco 5.1 trabaja con sdk 2.2.0 mientras que el 5.2 emplea el 3.0.1. Disculpa los cruces pero ahora me voy a centrar en el sdk 2.2.0 y es la salida anterior.Empezare otra vez y te digo.
Gracias
Hice lo que me aconsejaste y ahora no da error, sólo se queda en esta linea:
INFORMACIËN: WSSERVLET12: JAX-WS context listener initializing dic 07, 2017 3:50:20 PM com.sun.xml.ws.transport.http.servlet.WSServletDelegate <init>
INFORMACIËN: WSSERVLET14: JAX-WS servlet initializing
2017-12-07 15:50:34,263 WARN [shared_impl.util.LocaleUtils] [localhost-startStop-1] Locale name in faces-config.xml null or empty, setting locale to default locale : es_ES
dic 07, 2017 3:50:35 PM org.apache.coyote.AbstractProtocol start
INFORMACIËN: Starting ProtocolHandler ["http-bio-8080"]
Realmente la consola tienes más cosas (muchas más cosas) pero se queda congelado ahí mientras que el proyecto que tiene el share se queda con:
INFORMACIËN: Initializing Spring FrameworkServlet 'Spring Surf Dispatcher Servlet'
¿Puedes indicarme qué opciones estás cogiendo?
Acabo de probar esto:
$ mvn archetype:generate -Dfilter=org.alfresco:
Choose archetype:
1: remote -> org.alfresco.maven.archetype:activiti-jar-archetype (Sample project with full support for lifecycle and rapid development of Activiti JARs)
2: remote -> org.alfresco.maven.archetype:alfresco-allinone-archetype (Sample multi-module project for All-in-One development on the Alfresco plaftorm. Includes modules for Platform/Repository JAR and Share JAR)
3: remote -> org.alfresco.maven.archetype:alfresco-amp-archetype (Sample project with full support for lifecycle and rapid development of Repository AMPs (Alfresco Module Packages))
4: remote -> org.alfresco.maven.archetype:alfresco-platform-jar-archetype (Sample project with full support for lifecycle and rapid development of Platform/Repository JARs and AMPs (Alfresco Module Packages))
5: remote -> org.alfresco.maven.archetype:alfresco-share-jar-archetype (Share project with full support for lifecycle and rapid development of JARs and AMPs (Alfresco Module
Packages))
6: remote -> org.alfresco.maven.archetype:share-amp-archetype (Share project with full support for lifecycle and rapid development of AMPs (Alfresco Module
Packages))
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 2
Choose org.alfresco.maven.archetype:alfresco-allinone-archetype version:
1: 2.0.0-beta-1
2: 2.0.0-beta-2
3: 2.0.0-beta-3
4: 2.0.0-beta-4
5: 2.0.0
6: 2.1.0
7: 2.1.1
8: 2.2.0
9: 3.0.0
10: 3.0.1
Choose a number: 10:
Y funciona sin problemas al hacer el ./run.sh
Yo utilizo la opcion 3 y 6 que son comunity y luego elijo la opción para la version 2.2.0. Ahora no se si puedo desarrollar con la opcion All-in-One y luego integrar el módulo a una versión comunity
A mí también me gusta desarrollar por artefactos, así que creo que es una buena alternativa (3 y 6).
Lo he probado y me ha funcionado sin problemas. Vamos a ver los pasos para buscar el problema.
Creación del artefacto de repositorio (AMP 2.2.0)
$ mvn archetype:generate -Dfilter=org.alfresco:
3: remote -> org.alfresco.maven.archetype:alfresco-amp-archetype (Sample project with full support for lifecycle and rapid development of Repository AMPs (Alfresco Module Packages))
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 3
Choose org.alfresco.maven.archetype:alfresco-amp-archetype version:
8: 2.2.0
Choose a number: 8:
Define value for property 'groupId': : es.keensoft
Define value for property 'artifactId': : test-repo
[INFO] Using property: version = 1.0-SNAPSHOT
Define value for property 'package': es.keensoft: :
Confirm properties configuration:
groupId: es.keensoft
artifactId: test-repo
version: 1.0-SNAPSHOT
package: es.keensoft
Y: :
Creación del artefacto de Share (AMP 2.2.0)
$ mvn archetype:generate -Dfilter=org.alfresco:
6: remote -> org.alfresco.maven.archetype:share-amp-archetype (Share project with full support for lifecycle and rapid development of AMPs (Alfresco Module
Packages))
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 6
Choose org.alfresco.maven.archetype:share-amp-archetype version:
8: 2.2.0
Choose a number: 8:
Define value for property 'groupId': : es.keensoft
Define value for property 'artifactId': : test-share
[INFO] Using property: version = 1.0-SNAPSHOT
Define value for property 'package': es.keensoft: :
Confirm properties configuration:
groupId: es.keensoft
artifactId: test-share
version: 1.0-SNAPSHOT
package: es.keensoft
Y: :
Lanzamiento del artefacto de Repositorio
$ cd test-repo
$ chmod +x run.sh
$ ./run.sh
...
INFO: Starting ProtocolHandler ["http-bio-8080"]
Lanzamiento del artefacto de Share
$ cd test-share
$ chmod +x run.sh
$ ./run.sh
...
INFO: Starting ProtocolHandler ["http-bio-8081"]
Una vez que aparecen esas dos líneas (8080 y 8081) estará levantado el proyecto de repositorio en el puerto 8080 y el proyecto de share en el puerto 8081. Puedes verificarlo en las URLs:
http://localhost:8080/alfresco
Otras consideraciones
Incluyo algunas de las configuraciones de mi equipo:
$ mvn -version
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T21:39:06+02:00)
Maven home: /usr/local/Cellar/maven/3.5.0/libexec
Java version: 1.8.0_121, vendor: Oracle Corporation
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.1", arch: "x86_64", family: "mac"
$ java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
$ echo $MAVEN_OPTS
-Xms1024m -Xmx4096m
Por lo que describes quizá el problema sea que no tienes suficiente memoria asignada a Maven.
Espero que esto sea de ayuda.
Le asigné más memoria a Maven ("GB) y ya el repo me da la salida que definiste,sin embargo el share sigue quedándose colgado cuando muestra: Initializing Spring FrameworkServlet 'Spring Surf Dispatcher Servlet'.
Aqui te expongo lo que muestra (una parte de la consola):
dic 08, 2017 2:02:11 PM org.apache.catalina.core.StandardService startInternal
INFORMACIËN: Starting service Tomcat
dic 08, 2017 2:02:11 PM org.apache.catalina.core.StandardEngine startInternal
INFORMACIËN: Starting Servlet Engine: Apache Tomcat/7.0.47
dic 08, 2017 2:02:27 PM org.apache.catalina.core.ApplicationContext log
INFORMACIËN: No Spring WebApplicationInitializer types detected on classpath
dic 08, 2017 2:02:28 PM org.apache.catalina.core.ApplicationContext log
INFORMACIËN: Initializing Spring root WebApplicationContext
2017-12-08 14:02:41,460 INFO [config.packaging.ModulePackageManager] [localhost-startStop-1] Found 2 module package(s)
2017-12-08 14:02:41,489 INFO [config.packaging.ModulePackageManager] [localhost-startStop-1] content-tutorial-share AMP project, 1.0-SNAPSHOT, Manages the lifecycle of the content-tutorial-share AMP (Alfresco Module Package)
content-tutorial-share AMP project, 1.0-SNAPSHOT, Manages the lifecycle of the content-tutorial-share AMP (Alfresco Module Package)
2017-12-08 14:02:44,157 INFO [extensions.webscripts.TemplateProcessorRegistry] [localhost-startStop-1] Registered template processor freemarker for extension ftl
2017-12-08 14:02:44,215 INFO [extensions.webscripts.ScriptProcessorRegistry] [localhost-startStop-1] Registered script processor javascript for extension js
2017-12-08 14:02:44,230 INFO [extensions.webscripts.TemplateProcessorRegistry] [localhost-startStop-1] Registered template processor freemarker for extension ftl
2017-12-08 14:02:44,235 INFO [extensions.webscripts.ScriptProcessorRegistry] [localhost-startStop-1] Registered script processor javascript for extension js
2017-12-08 14:02:48,979 INFO [extensions.webscripts.DeclarativeRegistry] [localhost-startStop-1] Registered 383 Web Scripts (+0 failed), 401 URLs
2017-12-08 14:02:48,982 INFO [extensions.webscripts.DeclarativeRegistry] [localhost-startStop-1] Registered 8 Package Description Documents (+0 failed)
2017-12-08 14:02:48,984 INFO [extensions.webscripts.DeclarativeRegistry] [localhost-startStop-1] Registered 0 Schema Description Documents (+0 failed)
2017-12-08 14:02:49,085 INFO [extensions.webscripts.AbstractRuntimeContainer] [localhost-startStop-1] Initialised Spring Surf Container Web Script Container (in 4802.3325ms)
2017-12-08 14:02:49,090 INFO [extensions.webscripts.TemplateProcessorRegistry] [localhost-startStop-1] Registered template processor freemarker for extension ftl
2017-12-08 14:02:49,091 INFO [extensions.webscripts.ScriptProcessorRegistry] [localhost-startStop-1] Registered script processor javascript for extension js
2017-12-08 14:02:49,332 WARN [shared_impl.util.LocaleUtils] [localhost-startStop-1] Locale name in faces-config.xml null or empty, setting locale to default locale : es_ES
dic 08, 2017 2:02:49 PM org.apache.catalina.core.ApplicationContext log
INFORMACIËN: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok)
dic 08, 2017 2:02:49 PM org.apache.catalina.core.ApplicationContext log
INFORMACIËN: Initializing Spring FrameworkServlet 'Spring Surf Dispatcher Servlet'
Algo debe faltar pero desconozco lo que es.Espero que estemos más cerca de solucionarlo.
Discussions about Alfresco Content Services and Alfresco Process Services in Spanish
Related:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.