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=mydbusername db.password=mydbpwd #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=jdbcracle: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=jdbcostgresql://localhost:5432/alfresco
C:/alfresco/tomcat/shared/classes/alfresco/extension/file-server-custom.xml (I add the definition in bold)
<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>
in postgres , I created the db with name “alfresco“ using PgAdminIII CREATE DATABASE alfresco WITH OWNER = postgres ENCODING = 'UTF8' TABLESPACE = pg_default LC_COLLATE = 'Italian, Italy' LC_CTYPE = 'Italian, Italy' CONNECTION LIMIT = -1;
I pasted the driver postgresql-8.2-504.jdbc3.jar in the directory C:\alfresco\tomcat\common\lib (I also tried with postgresql-8.3-603.jdbc3.jar but I get the same problems. Using postgresql-9.0-801.jdbc4.jar the alfresco db doesn’t filled.
I deleted the directory alf_data that is substituted with the directory data configured in the custom-repository.properties file. When I launch alf_start.bat the database alfresco is filled but the Alfresco page doesn’t start..
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
Have you installed the Postgress AMP? Alfresco 2.1 is "before my involvement with Alfresco" but I believe that there used to be a separate AMP that you had to install to get alfresco to use Postgress.
I'd urge you to install a more recent version, especially if you want or need help in the forums.
Unfortunately I have to use Alfresco 2.1 because Cmdbuild works only with this version. Do you think that postgres 9.0 is not compatible with Alfresco 2.1? Is Postgres AMP a particular version? I know Postgres 8.3 only.