AnsweredAssumed Answered

ALFRESCO 2.1 POSTGRES 9.0 PROBLEMI ALL'AVVIO

Question asked by giuseppe on May 27, 2011
Latest reply on May 31, 2011 by mturatti
Buongiorno,

stò cercando di installare Alfresco 2.1 ma non riesco a farlo avviare.
Versioni che uso:
postgres 9.0
Cmdbuild 1.3.1.0
jdk1.6.0_16
Tomcat 6.0

Ho scompattato il alfresco-tomcat-2.1.0.zip sotto C:/alfresco

Configurazioni di alfresco:
C:/alfresco/tomcat/conf/server.xml (ho tolto le righe commentate)
<Server port="8006" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
  <GlobalNamingResources>
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
   <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
       description="User database that can be updated and saved"
           factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
          pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>
  <Service name="Catalina">
    <!– Define a non-SSL HTTP/1.1 Connector on port 8080 –>
    <Connector port="8080" URIEncoding="UTF-8" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />
    <Engine name="Catalina" defaultHost="localhost">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>
      <Host name="localhost" appBase="webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">
      </Host>
</Engine>
</Service>
</Server>


C:/alfresco/tomcat/shared/classes/alfresco/extension/custom-repository.properties

###############################
## Common Alfresco Properties #
###############################
#
# Sample custom content and index data location
#
dir.root=C:/alfresco/data
dir.indexes=C:/alfresco/data
#
# Sample database connection properties
#
db.username=username del db
db.password=pwd del db
#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
#
# 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/alfresco
#
# Oracle connection (requires ojdbc14_g.jar or equivalent jar in shared libraries location)
#
#db.driver=oracle.jdbc.OracleDriver
#db.url=jdbc:oracle:thin:@localhost:1521:alfresco
#
# Sybase connection (requires jconn2d.jar or equivalent jar in shared libraries location)
#
#db.driver=com.sybase.jdbc2.jdbc.SybDriver
#db.url=jdbc:sybase:Tds:localhost:2638/alfresco
#
# SQLServer connection (requires jdts-1.2.jar or equivalent - http://jtds.sourceforge.net/)
#
#db.driver=net.sourceforge.jtds.jdbc.Driver
#db.url=jdbc:jtds:sqlserver://localhost/alfresco
#
# SQLServer connection using Microsoft JDDB driver
#
#db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
#db.url=jdbc:sqlserver://localhost;DatabaseName=alfresco
#
# PostgreSQL connection (requires postgresql-8.2-504.jdbc3.jar or equivalent)
#
db.driver=org.postgresql.Driver
db.url=jdbc:postgresql://localhost:5432/alfresco


C:/alfresco/tomcat/shared/classes/alfresco/extension/custom-hibernate-dialect.properties
#
# 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
#

#
# HSQL dialect
#
#hibernate.dialect=org.hibernate.dialect.HSQLDialect
#
# MySQL dialect (default)
#
#hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
#
# Oracle dialect
#
#hibernate.dialect=org.hibernate.dialect.Oracle9Dialect
#
# Sybase dialect
#
#hibernate.dialect=org.alfresco.repo.domain.hibernate.dialect.AlfrescoSybaseAnywhereDialect
#
# SQLServer dialect
#
#hibernate.dialect=org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect
#
# PostgreSQL dialect
#
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
hibernate.query.substitutions=true TRUE, false FALSE


C:/Alfresco/tomcat/shared/classes/alfresco/extension/file-server-custom.xml aggiunta la definizione per il server FTP

<alfresco-config area="file-servers">
   <!– abilitazione server FTP –>
   <config evaluator="string-compare" condition="FTP Server">
   <serverEnable enabled="true"/>
   <port>1121</port>
   </config>
   <config evaluator="string-compare" condition="Filesystems" replace="true">
      <filesystems>
        <filesystem name="Alfresco">
            <store>workspace://SpacesStore</store>
            <rootPath>/app:company_home</rootPath>
            <!– Add a URL file to each folder that links back to the web client –>
            <urlFile>
               <filename>__Alfresco.url</filename>
               <webpath>http://${localname}:8080/alfresco/</webpath>
            </urlFile>
            <!– Mark locked files as offline –>
            <offlineFiles/>
            <!– Desktop actions –>
            <desktopActions>
               <global>
                  <path>alfresco/desktop/Alfresco.exe</path>
                  <webpath>http://${localname}:8080/alfresco/</webpath>
               </global>
               <action>
                  <class>org.alfresco.filesys.smb.server.repo.desk.CheckInOutDesktopAction</class>
                  <name>CheckInOut</name>
                  <filename>__CheckInOut.exe</filename>
               </action>
               <action>
                  <class>org.alfresco.filesys.smb.server.repo.desk.JavaScriptDesktopAction</class>
                  <name>JavaScriptURL</name>
                  <filename>__ShowDetails.exe</filename>
                  <script>alfresco/desktop/showDetails.js</script>
                  <attributes>anyFiles</attributes>
                  <preprocess>copyToTarget</preprocess>
               </action>
            </desktopActions>
         </filesystem>
       
         <!– AVM virtualization view of all stores/versions for WCM –>
         <avmfilesystem name="AVM">
            <virtualView/>
         </avmfilesystem>
      </filesystems>
   </config>
</alfresco-config>



Creato in postgres con pgadmin il database alfresco
CREATE DATABASE alfresco
  WITH OWNER = postgres
       ENCODING = 'UTF8'
       TABLESPACE = pg_default
       LC_COLLATE = 'Italian, Italy'
       LC_CTYPE = 'Italian, Italy'
       CONNECTION LIMIT = -1;



Una volta configurato i file ho inserito nella directory C:\alfresco\tomcat\common\lib l driver postgresql-8.2-504.jdbc3.jar
(Ho anche provato con il dirver postgresql-8.3-603.jdbc3.jar ma il problema è uguale
Con la libreria postgresql-9.0-801.jdbc4.jar non popola nemmeno il database.


Cancellato completamente la cartella alf_data che viene sostituita con la cartella data configurata  nel file custom-repository.properties


All'avvio del servizio di alfresco con alf_start.bat il database alfresco viene popolato ma il dervizio non parte.
Mi da il seguente alfresco.log:

11:34:45,181 WARN  [org.springframework.remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
11:34:48,613 WARN  [org.alfresco.util.OpenOfficeConnectionTester] A connection to OpenOffice could not be established.
11:34:54,572 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.PostgreSQLDialect.
11:34:54,728 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script C:\alfresco\tomcat\temp\Alfresco\AlfrescoSchemaCreate-org.hibernate.dialect.PostgreSQLDialect-7594952547763709728.sql (Generated).
11:35:03,683 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script C:\alfresco\tomcat\temp\Alfresco\AlfrescoSchemaUpdate-org.hibernate.dialect.PostgreSQLDialect-6410981750726339490.sql (Copied from classpath:alfresco/dbscripts/create/2.1/org.hibernate.dialect.PostgreSQLDialect/AlfrescoPostCreate-2.1-FKIndexes.sql).
11:35:05,804 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] All executed statements written to file C:\alfresco\tomcat\temp\Alfresco\AlfrescoSchemaUpdate-All_Statements-7539457490348660135.sql.
11:35:58,860 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.hibernate.type.SerializationException: could not deserialize
   at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:217)
   at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:240)
   at org.hibernate.type.SerializableType.fromBytes(SerializableType.java:82)
   at org.hibernate.type.SerializableType.get(SerializableType.java:39)
   at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:113)
   at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:102)
   at org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
   at org.hibernate.type.ComponentType.hydrate(ComponentType.java:560)
   at org.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:275)
……
…..
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.io.StreamCorruptedException: invalid stream header: BB656430
   at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
   at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
   at org.hibernate.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:252)
   at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:209)
   … 86 more
11:35:59,140 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.hibernate.type.SerializationException: could not deserialize
   at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:217)
   at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:240)
   at org.hibernate.type.SerializableType.fromBytes(SerializableType.java:82)
   at org.hibernate.type.SerializableType.get(SerializableType.java:39)
   at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:113)
   at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:102)
   at org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
………..
……….
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.io.StreamCorruptedException: invalid stream header: BB656430
   at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
   at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
   at org.hibernate.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:252)
   at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:209)
   … 86 more
11:35:59,374 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextListener
org.hibernate.type.SerializationException: could not deserialize
   at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:217)
   at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:240)
   at org.hibernate.type.SerializableType.fromBytes(SerializableType.java:82)
   at org.hibernate.type.SerializableType.get(SerializableType.java:39)
…….
…….
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.io.StreamCorruptedException: invalid stream header: BB656430
   at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
   at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
   at org.hibernate.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:252)
   at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:209)
   … 86 more


Aiutatemi non so più dove sbattere la testa e dove andare a guardare

Outcomes