cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Enterprise 2.2 on Sybase ASE 15

jett
Champ in-the-making
Champ in-the-making
Has anyone tried installing Alfresco with Sybase ASE 15 as the database? We are getting the error message below in the JBoss server.log file.

Can anyone point me to a configuration file or code that needs to be altered to make it work with ASE?

Thanks in advance for any help/direction provided.


18:33:59,693 ERROR [[/alfresco]] Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.hibernate.exception.SQLGrammarException: could not execute query
   at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
   at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
   at org.hibernate.loader.Loader.doList(Loader.java:2214)
   at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095)
   at org.hibernate.loader.Loader.list(Loader.java:2090)
   at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:388)
   at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
   at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
   at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
   at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
   at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:804)
   at org.alfresco.repo.avm.hibernate.IssuerDAOHibernate.getIssuerValue(IssuerDAOHibernate.java:66)
   at org.alfresco.repo.avm.Issuer$1TxnWork.execute(Issuer.java:80)
   at org.alfresco.repo.avm.Issuer$1TxnWork.execute(Issuer.java:76)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:225)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:174)
   at org.alfresco.repo.avm.Issuer.initialize(Issuer.java:83)
   at org.alfresco.repo.avm.AvmBootstrap.onBootstrap(AvmBootstrap.java:77)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
   at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
   at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:241)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
   at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
   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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
   at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
   at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
   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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.
8 REPLIES 8

pmonks
Star Contributor
Star Contributor
This is often caused by forgetting to set the correct Hibernate dialect (property "hibernate.dialect" in file "custom-hibernate-dialect.properties") for your JDBC driver and database.  Can you post which JDBC driver and Hibernate dialect you've configured Alfresco to use?

Cheers,
Peter

paulsar
Champ in-the-making
Champ in-the-making
hi pmonks,

thanks for the info. i'm working with jett. anyway, here are other details:

i specified the hibernate dialect in a custom file named as "custom-hibernate-dialect.properties"
hibernate.dialect=org.hibernate.dialect.SybaseDialect

and also here is my repository configuration

dir.root=/home/paul/alf_data_sybaseDB
db.schema.update=false
db.driver=net.sourceforge.jtds.jdbc.Driver
db.url=jdbc:jtds:sybase://192.168.1.127:5000;DatabaseName=alfresco
db.username=alfresco
db.password=alfresco

in addition to this, I used the JDBC file and parameters(db.driver and db.url) used by Dbvisualizer program since i was able to connect and try some queries with it.

thanks,

paul

paulsar
Champ in-the-making
Champ in-the-making
hi guys,

In addition again to my last post, i even tried to edit the file "alfresco/domain/hibernate-cfg.properties" specified in the "hibernate-context.xml" file just to make sure i'm using the correct dialect settings.

from the default:
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect

i replaced with:
hibernate.dialect=org.hibernate.dialect.SybaseDialect

i hope there's some resolution on this.

thanks,

paul

pmonks
Star Contributor
Star Contributor
I don't have a Sybase database to test with, but I think the correct JDBC driver for Sybase is com.sybase.jdbc3.jdbc.SybDriver, which is part of the Sybase jConnect product (available from http://www.sybase.com/products/allproductsa-z/softwaredeveloperkit/jconnect).

Are you in a position to download and test with the Sybase jConnect JDBC driver?

Cheers,
Peter

paulsar
Champ in-the-making
Champ in-the-making
hi peter,

too bad i can't download the JDBC driver. since i have no rights for my role. anyway, i saw a JDBC driver filenamed "jTDS3.jar" that is included in Sybase ASE15 installation.  I'm not quite sure if it is correct because i tried to use that old driver with no success that why i tried using the free sybase JDBC driver from sourceforge.

i'll be very much grateful if you can download it for me.   :wink:

thanks very much! Smiley Happy

br,
paul

paulsar
Champ in-the-making
Champ in-the-making
hello guys,

I tried a different JDBC driver, this time using the jconn3.jar provided at sybase installer. however, i've been getting the same error:
Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.hibernate.exception.SQLGrammarException: could not execute query

I think the problem is on hibernate. Are there any particular hibernate parameter that I should set when using a sybase dialect.

my current hibernate-cfg.properties
#

# Hibernate configuration
#
hibernate.dialect=org.hibernate.dialect.SybaseDialect
hibernate.jdbc.use_streams_for_binary=true
hibernate.show_sql=false
hibernate.cache.use_query_cache=true
hibernate.max_fetch_depth=10
hibernate.cache.provider_class=org.alfresco.repo.cache.InternalEhCacheManagerFactoryBean
hibernate.cache.use_second_level_cache=true
hibernate.default_batch_fetch_size=1
hibernate.jdbc.batch_size=32
hibernate.connection.release_mode=auto
hibernate.connection.isolation=2
#hibernate.jdbc.use_get_generated_keys=true

and my repository.properties
dir.root=/home/paul/alf_data_sybaseDB
db.schema.update=false
db.driver=com.sybase.jdbc3.jdbc.SybConnectionPoolDataSource
db.url=jdbc:sybase:Tds:192.168.1.123:5000/alfresco
db.username=alfresco
db.password=alfresco

thanks,

Paul

steve
Champ in-the-making
Champ in-the-making
Hi,

Our last supported version of Sybase was v12 - so you could be finding some differences in the way hibernate handles Sybase 15 that's causing your problems.
We have not yet tested Alfresco on Sybase 15 so I can't offer any guidance on what might be causing this problem.

Steve

jonathanb
Champ in-the-making
Champ in-the-making
Can you post the complete stack trace (and any other data) around your problem?   I'm hoping it will have more detail, which could help point towards a solution.

Also, I suggest using com.sybase.jdbc3.jdbc.SybDriver, rather instead of the pooled source, as Hibernate has it's own caching system.