Instalación de alfresco labs3 bajo tomcat con mysql

cancel
Showing results for 
Search instead for 
Did you mean: 
pjcaracuel_2349
Active Member II

Re: Instalación de alfresco labs3 bajo tomcat con mysql

Buenas Francisco,

Puedes poner el contenido de los ficheros que has modificado?

Gracias
franciscoxd
Member II

Re: Instalación de alfresco labs3 bajo tomcat con mysql

custom-repository.properties.install
###############################
## Common Alfresco Properties #
###############################

#
# Sample custom content and index data location
#
dir.root=C:/Alfresco/alf_data
dir.indexes=C:/Alfresco/alf_data/lucene-indexes
ooo.exe=C:/Alfresco/openoffice/OpenOffice.org 3/program/soffice
ooo.user=${dir.root}/oouser

#dir.root=@@ALF_DATA@@
#dir.indexes=@@ALF_INDEXES@@
#ooo.exe=@@ALF_OO@@/program/soffice
#ooo.user=${dir.root}/oouser

#
# Sample database connection properties
#
db.name=alfresco
db.username=root
db.password=previred
#db.pool.initial=10
#db.pool.max=100

#
# Property to control whether schema updates are performed automatically.
# Updates must be enabled during upgrades as, apart from the static upgrade scripts,
# there are also auto-generated update scripts that will need to be executed.  After
# upgrading to a new version, this can be disabled.
#
#db.schema.update=true

#
# Derby connection
#
#derby#db.driver=org.apache.derby.jdbc.EmbeddedDriver
#derby#db.url=jdbc:derby:@@ALF_DATA@@/derby_data/alfresco;create=true

#
# MySQL connection
#

db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://localhost:8080/alfresco

#
# Oracle connection
#
#oracle#db.driver=oracle.jdbc.OracleDriver
#oracle#db.url=jdbc:oracle:thin:@@@DB_HOST@@:@@DB_PORT@@:@@DB_NAME@@

#
# SQLServer connection (note you must enable TCP protocol on fixed port 1433)
#
#sqlserver#db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
#sqlserver#db.url=jdbc:sqlserver://@@DB_HOST@@:@@DB_PORT@@;databaseName=@@DB_NAME@@

custom-hibernate-dialect.properties.install
#
# Sample Hibernate configuration for changing Database dialect
# For a full list: http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#configuration-optional-dialects
#

#
# Derby dialect
#
#derby#hibernate.dialect=org.hibernate.dialect.DerbyDialect

#
# MySQL dialect (default)
#
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect

#
# Oracle dialect
#
#oracle#hibernate.dialect=org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect

#
# SQLServer dialect
#
#sqlserver#hibernate.dialect=org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect

Alfresco.LOG
16:04:25,841 INFO  [org.alfresco.config.xml.XMLConfigService$PropertyConfigurer] Loading properties file from class path resource [alfresco/file-servers.properties]
16:05:06,307 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luceneIndexBackupComponent' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection
   at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
   at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
   at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
   at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
   at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
   at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
   at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
   at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
   at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
   at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:510)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:350)
   at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:262)
   at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:219)
   at org.alfresco.util.transaction.SpringAwareUserTransaction.begin(SpringAwareUserTransaction.java:394)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:309)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:227)
   at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerAndSearcherFactory$LuceneIndexBackupComponent.afterPropertiesSet(AbstractLuceneIndexerAndSearcherFactory.java:1441)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:516)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'
   at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:766)
   at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
   at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)
   at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
   … 48 more
Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:169)
   at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:760)
   … 51 more
16:05:57,992 INFO  [org.alfresco.web.site.FrameworkHelper] Successfully Initialized Web Framework
pjcaracuel_2349
Active Member II

Re: Instalación de alfresco labs3 bajo tomcat con mysql

Buenas Francisco,

Fijate en este error

Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'


Yo comprobaria que tienes instalado el conector mysql-connector-java-5.1.0-bin.jar en el directorio lib del tomcat

Saludos
franciscoxd
Member II

Re: Instalación de alfresco labs3 bajo tomcat con mysql

Tenias Razon el archivo "mysql-connector-java-5.1.0-bin.jar" que tenia en la carpeta lib estaba con fallas, lo descargue de nuevo lo reemplace y listo.

Gracias.
nanija
Member II

Re: Instalación de alfresco labs3 bajo tomcat con mysql

Hola de nuevo:
He vuelto a instalar en una máquina virtual
Alfresco-Labs-3Stable-Full-Setup.exe (que lleva todo incluido: maquina virtual java, openoffice, tomcat)
junto con mysql:
mysql-essential-5.1.30-win32.msi
y también el conector de base de datos de mysql:
mysql-connector-java-5.1.7.zip
el cual por supuesto he descomprimido en el lib del tomcat.
He configurado los archivos custom-repository.properties y custom-hibernate-dialect.properties
###############################
## Common Alfresco Properties #
###############################

#
# Sample custom content and index data location
#
dir.root=C:/Alfresco/alf_data
dir.indexes=C:/Alfresco/alf_data/lucene_indexes
ooo.exe=C:/Alfresco/OpenOffice.org/program/soffice
ooo.user=${dir.root}/oouser
#
# Sample database connection properties
#
db.name=alfresco
db.username=alfresco
db.password=alfresco
#db.pool.initial=10
#db.pool.max=100

#
# Sample external executable locations
#
#ooo.exe=/opt/openoffice/program/soffice
#ooo.user=${dir.root}/oouser
#img.root=/srv/alfresco/ImageMagick
#swf.exe=/srv/alfresco/bin/pdf2swf

#
# Sample index tracking frequency
#
#index.tracking.cronExpression=0/5 * * * * ?

#
# Property to control whether schema updates are performed automatically.
# Updates must be enabled during upgrades as, apart from the static upgrade scripts,
# there are also auto-generated update scripts that will need to be executed.  After
# upgrading to a new version, this can be disabled.
#
#db.schema.update=true

#
# Derby connection
#
#db.driver=org.apache.derby.jdbc.EmbeddedDriver
#db.url=jdbc:derby:alf_data/derby_data/alfresco;create=true

#
# HSQL connection
#
#db.driver=org.hsqldb.jdbcDriver
#db.url=jdbc:hsqldb:file:alf_data/hsql_data/alfresco;ifexists=true;shutdown=true;

#
# MySQL connection (This is default and requires mysql-connector-java-5.0.3-bin.jar, which ships with the Alfresco server)
#
db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://localhost:3306/alfresco

#
# PostgreSQL connection (requires postgresql-8.2-504.jdbc3.jar or equivalent)
#
#db.driver=org.postgresql.Driver
#db.url=jdbc:postgresql://localhost:5432/alfresco

###############################
## Common Alfresco Properties #
###############################

#
# Sample custom content and index data location
#
dir.root=C:/Alfresco/alf_data
dir.indexes=C:/Alfresco/alf_data/lucene_indexes
ooo.exe=C:/Alfresco/OpenOffice.org/program/soffice
ooo.user=${dir.root}/oouser
#
# Sample database connection properties
#
db.name=alfresco
db.username=alfresco
db.password=alfresco
#db.pool.initial=10
#db.pool.max=100

#
# Sample external executable locations
#
#ooo.exe=/opt/openoffice/program/soffice
#ooo.user=${dir.root}/oouser
#img.root=/srv/alfresco/ImageMagick
#swf.exe=/srv/alfresco/bin/pdf2swf

#
# Sample index tracking frequency
#
#index.tracking.cronExpression=0/5 * * * * ?

#
# Property to control whether schema updates are performed automatically.
# Updates must be enabled during upgrades as, apart from the static upgrade scripts,
# there are also auto-generated update scripts that will need to be executed.  After
# upgrading to a new version, this can be disabled.
#
#db.schema.update=true

#
# Derby connection
#
#db.driver=org.apache.derby.jdbc.EmbeddedDriver
#db.url=jdbc:derby:alf_data/derby_data/alfresco;create=true

#
# HSQL connection
#
#db.driver=org.hsqldb.jdbcDriver
#db.url=jdbc:hsqldb:file:alf_data/hsql_data/alfresco;ifexists=true;shutdown=true;

#
# MySQL connection (This is default and requires mysql-connector-java-5.0.3-bin.jar, which ships with the Alfresco server)
#
db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://localhost:3306/alfresco

#
# PostgreSQL connection (requires postgresql-8.2-504.jdbc3.jar or equivalent)
#
#db.driver=org.postgresql.Driver
#db.url=jdbc:postgresql://localhost:5432/alfresco


Una vez que lo tengo todo instalado y configurado me dispongo a ejecutar:
alf_start.bat
Nada más abrirse la ventana de msdos para arrancar el Tomcat, con las mismas se cierra, es un "visto y no visto", y después de las veces que lo he instalado y ha funcionado, no entiendo ahora por qué no arranca tomcat.

Me gustaría si alguien pudiera echarme una mano.

Gracias de antemano
nanija
Member II

Re: Instalación de alfresco labs3 bajo tomcat con mysql

Hola de nuevo:
He conseguido hacer un impresión de pantalla antes de que se cierre rápidamente, de la pantalla de msdos, y lo que pone es lo siguiente:

Starting Tomcat…
Neither the JAVA_HOME nor the JRE_HOME enviroment variable is defined.
At least one of these enviroment variable is needed to run this program

Y es entonces cuando se cierra la ventana

Gracias
franciscoxd
Member II

Re: Instalación de alfresco labs3 bajo tomcat con mysql

Mira también pase por el mismo problema, debes definir la variable global de la ruta de java.
franciscoxd
Member II

Re: Instalación de alfresco labs3 bajo tomcat con mysql

Para definirla click derecho sobre Mi PC>propiedades>Opciones Avanzadas> Variables de entorno
Aqui creas una nueva llamada JAVA_HOME
con valor : C:\Archivos de programa\Java\jdk1.6.0_12     
(la ruta donde esta el jdk, si no lo tienes descargalohttps://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDeta... )

Si te sigue fallando despues de declarar la variable o reinicias para que tome el valor, o pon el valor al final de la variable Path poniendo ";"

Suerte ojala te resulte