AnsweredAssumed Answered

HOw to config Alfresco with JBOSS and MS SQL Server 2005?

Question asked by kentzhou on Nov 12, 2007
I try to config Alfresco with JBOSS GA 4.2.2 and SQL Server 2005 with Service Pack 2.

In SQL Server 2005, I create a database alfresco and a user name as alfresco and assign this user with dbo permission.

In file C:\jboss-4.2.2.GA\server\default\deploy\extensions\extension\custom-repository.properties, set config for database as:
db.username=alfresco
db.password=alfresco
db.pool.initial=10
db.pool.max=100
db.driver=com.microsoft.jdbc.sqlserver.SQLServerDriver
db.url=jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=Alfresco
(the JDBC setting here has been tested directly using mssql-ds.xml and works fine)

File custom-hibernate-dialect.properties:
hibernate.dialect=org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect

SQL Server JDBC driver is:
Microsoft SQL Server 2000 Driver for JDBC
     Service Pack 3
     Version 2.2.0040

When I start JBOSS, I got a huge error messages from console as:

15:22:16,078 INFO  [HbmBinder] Mapping collection: org.jbpm.graph.action.Script.
variableAccesses -> JBPM_VARIABLEACCESS
15:22:17,250 INFO  [ConnectionProviderFactory] Initializing connection provider:
org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
15:22:17,281 INFO  [STDOUT] Cannot load JDBC driver class 'org.gjt.mm.mysql.Driv
er'
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1358)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1204)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:760)
        at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.java:540)
        at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.
getConnection(LocalDataSourceConnectionProvider.java:81)
        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:
76)
        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2006
)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
a:1289)
        at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSession
Factory(LocalSessionFactoryBean.java:804)
        at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessi
onFactory(LocalSessionFactoryBean.java:744)
        at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPr
…..

        … 229 more
15:23:33,671 INFO  [Dialect] Using dialect: org.hibernate.dialect.MySQLInnoDBDia
lect
15:23:33,703 INFO  [TransactionFactoryFactory] Using default transaction strateg
y (direct JDBC transactions)
15:23:33,734 INFO  [TransactionManagerLookupFactory] No TransactionManagerLookup
configured (in JTA environment, use of read-write or transactional second-level
cache is not recommended)
15:23:33,765 INFO  [SettingsFactory] Automatic flush during beforeCompletion():
disabled
15:23:33,781 INFO  [SettingsFactory] Automatic session close at end of transacti
on: disabled
15:23:33,812 INFO  [SettingsFactory] Scrollable result sets: disabled
15:23:33,812 INFO  [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
15:23:33,828 INFO  [SettingsFactory] Connection release mode: auto
15:23:33,828 INFO  [SettingsFactory] Maximum outer join fetch depth: 10
15:23:33,843 INFO  [SettingsFactory] Default batch fetch size: 1
15:23:33,859 INFO  [SettingsFactory] Generate SQL with comments: disabled
15:23:33,875 INFO  [SettingsFactory] Order SQL updates by primary key: disabled
15:23:33,953 INFO  [SettingsFactory] Query translator: org.hibernate.hql.ast.AST
QueryTranslatorFactory
…….

(Many many similar message as below)

org.jboss.deployment.DeploymentInfo@dc5c2754 { url=file:/C:/jboss-4.2.2.GA/serve
r/default/deploy/extensions/messages/workflow-interpreter-help_pl_PL.properties
}
  deployer: null
  status: null
  state: INIT_WAITING_DEPLOYER
  watch: file:/C:/jboss-4.2.2.GA/server/default/deploy/extensions/messages/workf
low-interpreter-help_pl_PL.properties
  altDD: null
  lastDeployed: 1194897573093
  lastModified: 1194897573093
  mbeans:






Then I go the database alfresco to check if any table created, nothing happen. Alfresco is a empty database.


I saw there is message said:
Using dialect: org.hibernate.dialect.MySQLInnoDBDialect

But  I have changed to SQL Server in custom-hibernate-dialect.properties.


Did I make anything wrong? Help please.

Outcomes