cancel
Showing results for 
Search instead for 
Did you mean: 

FirstFoundationClient and Oracle DB

michaelr
Champ in-the-making
Champ in-the-making
Hallo,

I have installed Alfresco CommunityEdition and the SDK. The Community  Edition runs under Oracle9, but I get the following error when trying the FirstFoundationClient sample:

….
Caused by: org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access: could not execute query; nested exception is java.sql.SQLException: ORA-00933: SQL command not properly ended


Any ideas?

Thank you in advance.

Regards,
Michael
12 REPLIES 12

davidc
Star Contributor
Star Contributor
Have you adjusted your db configuration for oracle?

e.g.

addition of hibernate.dialect property to custom-repository.properties

michaelr
Champ in-the-making
Champ in-the-making
Have you adjusted your db configuration for oracle?

e.g.

addition of hibernate.dialect property to custom-repository.properties


Hallo,
this is my custom-repository.properties file.

#
# Sample custom content and index data location
#

dir.root=f:/alfresco/data

hibernate.dialect=org.hibernate.dialect.Oracle9Dialect

db.username=alfresco
db.password=alfresco

#
# MySQL connection (This is default and requires mysql-connector-java-3.1.12-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:@khv08:1521:KHV

#
# 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

Regards,
Michael

davidc
Star Contributor
Star Contributor
Can you add

hibernate.show_sql=true

and post the statement in error with the error stack.

michaelr
Champ in-the-making
Champ in-the-making
This is the output to the console. By the way, the WebService example is running.

11:59:58,677 ERROR [transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to execute command: imconvert "C:\DOKUME~1\MICHAE~1\LOKALE~1\Temp\Alfresco\ImageMagickContentTransformer_init_source_64274.gif"  "C:\DOKUME~1\MICHAE~1\LOKALE~1\Temp\Alfresco\ImageMagickContentTransformer_init_target_64275.png"
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:2148)
   at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
   at org.hibernate.loader.Loader.list(Loader.java:2024)
   at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
   at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
   at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
   at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)
   at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
   at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749)
   at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:153)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine$2.doInJbpm(JBPMEngine.java:239)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine$2.doInJbpm(JBPMEngine.java:232)
   at org.springmodules.workflow.jbpm31.JbpmTemplate$1.doInHibernate(JbpmTemplate.java:87)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:365)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333)
   at org.springmodules.workflow.jbpm31.JbpmTemplate.execute(JbpmTemplate.java:80)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.isDefinitionDeployed(JBPMEngine.java:230)
   at org.alfresco.repo.workflow.WorkflowServiceImpl.isDefinitionDeployed(WorkflowServiceImpl.java:102)
   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:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
   at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:116)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:32)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:41)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:210)
   at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:156)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:61)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
   at $Proxy24.isDefinitionDeployed(Unknown Source)
   at org.alfresco.repo.workflow.WorkflowDeployer.deploy(WorkflowDeployer.java:195)
   at org.alfresco.repo.workflow.WorkflowDeployer.onBootstrap(WorkflowDeployer.java:227)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:54)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:45)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:225)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:323)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:87)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:72)
   at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:40)
   at org.alfresco.sample.FirstFoundationClient.main(FirstFoundationClient.java:62)
Caused by: java.sql.SQLException: ORA-00933: SQL command not properly ended

   at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
   at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
   at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
   at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
   at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)
   at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
   at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
   at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
   at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
   at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
   at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
   at org.hibernate.loader.Loader.doQuery(Loader.java:662)
   at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
   at org.hibernate.loader.Loader.doList(Loader.java:2145)
   … 48 more
12:00:20,646 ERROR [jbpm.db.GraphSession] org.hibernate.exception.SQLGrammarException: could not execute query
Exception in thread "main" org.alfresco.error.AlfrescoRuntimeException: Workflow deployment failed
   at org.alfresco.repo.workflow.WorkflowDeployer.deploy(WorkflowDeployer.java:216)
   at org.alfresco.repo.workflow.WorkflowDeployer.onBootstrap(WorkflowDeployer.java:227)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:54)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:45)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:225)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:323)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:87)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:72)
   at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:40)
   at org.alfresco.sample.FirstFoundationClient.main(FirstFoundationClient.java:62)
Caused by: org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access: could not execute query; nested exception is java.sql.SQLException: ORA-00933: SQL command not properly ended

   at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:631)
   at org.springmodules.workflow.jbpm31.JbpmAccessor.convertJbpmException(JbpmAccessor.java:47)
   at org.springmodules.workflow.jbpm31.JbpmTemplate.execute(JbpmTemplate.java:97)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.isDefinitionDeployed(JBPMEngine.java:230)
   at org.alfresco.repo.workflow.WorkflowServiceImpl.isDefinitionDeployed(WorkflowServiceImpl.java:102)
   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:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
   at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:116)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:32)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:41)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:210)
   at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:156)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:61)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
   at $Proxy24.isDefinitionDeployed(Unknown Source)
   at org.alfresco.repo.workflow.WorkflowDeployer.deploy(WorkflowDeployer.java:195)
   … 9 more
Caused by: java.sql.SQLException: ORA-00933: SQL command not properly ended

   at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
   at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
   at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
   at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
   at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)
   at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
   at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
   at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
   at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
   at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
   at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
   at org.hibernate.loader.Loader.doQuery(Loader.java:662)
   at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
   at org.hibernate.loader.Loader.doList(Loader.java:2145)
   at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
   at org.hibernate.loader.Loader.list(Loader.java:2024)
   at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
   at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
   at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
   at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)
   at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
   at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749)
   at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:153)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine$2.doInJbpm(JBPMEngine.java:239)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine$2.doInJbpm(JBPMEngine.java:232)
   at org.springmodules.workflow.jbpm31.JbpmTemplate$1.doInHibernate(JbpmTemplate.java:87)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:365)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333)
   at org.springmodules.workflow.jbpm31.JbpmTemplate.execute(JbpmTemplate.java:80)
   … 33 more
12:01:02,896 ERROR [quartz.core.JobRunShell] Job DEFAULT.org.springframework.scheduling.quartz.JobDetailBean#cef6f1 threw an unhandled Exception:
org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not execute query; bad SQL grammar [select max(transactio1_.id) as col_0_0_ from alf_node_status nodestatus0_ inner join alf_transaction transactio1_ on nodestatus0_.transaction_id=transactio1_.id]; nested exception is java.sql.SQLException: ORA-00933: SQL command not properly ended

java.sql.SQLException: ORA-00933: SQL command not properly ended

   at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
   at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
   at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
   at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
   at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)
   at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
   at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
   at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
   at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
   at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
   at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
   at org.hibernate.loader.Loader.doQuery(Loader.java:662)
   at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
   at org.hibernate.loader.Loader.doList(Loader.java:2145)
   at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
   at org.hibernate.loader.Loader.list(Loader.java:2024)
   at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
   at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
   at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
   at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)
   at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
   at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749)
   at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl$13.doInHibernate(HibernateNodeDaoServiceImpl.java:1031)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:365)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333)
   at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.getLastTxn(HibernateNodeDaoServiceImpl.java:1034)
   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:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
   at org.alfresco.repo.transaction.TransactionalDaoInterceptor.invoke(TransactionalDaoInterceptor.java:60)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
   at $Proxy1.getLastTxn(Unknown Source)
   at org.alfresco.repo.node.index.FullIndexRecoveryComponent.reindexImpl(FullIndexRecoveryComponent.java:120)
   at org.alfresco.repo.node.index.AbstractReindexComponent$1.doWork(AbstractReindexComponent.java:209)
   at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:168)
   at org.alfresco.repo.transaction.TransactionUtil.executeInUserTransaction(TransactionUtil.java:74)
   at org.alfresco.repo.node.index.AbstractReindexComponent.reindex(AbstractReindexComponent.java:213)
   at org.alfresco.repo.node.index.IndexRecoveryJob.execute(IndexRecoveryJob.java:31)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
12:01:02,958 ERROR [quartz.core.ErrorLogger] Job (DEFAULT.org.springframework.scheduling.quartz.JobDetailBean#cef6f1 threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not execute query; bad SQL grammar [select max(transactio1_.id) as col_0_0_ from alf_node_status nodestatus0_ inner join alf_transaction transactio1_ on nodestatus0_.transaction_id=transactio1_.id]; nested exception is java.sql.SQLException: ORA-00933: SQL command not properly ended
]
   at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
* Nested Exception (Underlying Cause) —————
org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not execute query; bad SQL grammar [select max(transactio1_.id) as col_0_0_ from alf_node_status nodestatus0_ inner join alf_transaction transactio1_ on nodestatus0_.transaction_id=transactio1_.id]; nested exception is java.sql.SQLException: ORA-00933: SQL command not properly ended

java.sql.SQLException: ORA-00933: SQL command not properly ended

   at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
   at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
   at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
   at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
   at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)
   at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
   at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
   at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
   at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
   at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
   at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
   at org.hibernate.loader.Loader.doQuery(Loader.java:662)
   at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
   at org.hibernate.loader.Loader.doList(Loader.java:2145)
   at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
   at org.hibernate.loader.Loader.list(Loader.java:2024)
   at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
   at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
   at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
   at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)
   at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
   at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749)
   at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl$13.doInHibernate(HibernateNodeDaoServiceImpl.java:1031)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:365)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333)
   at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.getLastTxn(HibernateNodeDaoServiceImpl.java:1034)
   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:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
   at org.alfresco.repo.transaction.TransactionalDaoInterceptor.invoke(TransactionalDaoInterceptor.java:60)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
   at $Proxy1.getLastTxn(Unknown Source)
   at org.alfresco.repo.node.index.FullIndexRecoveryComponent.reindexImpl(FullIndexRecoveryComponent.java:120)
   at org.alfresco.repo.node.index.AbstractReindexComponent$1.doWork(AbstractReindexComponent.java:209)
   at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:168)
   at org.alfresco.repo.transaction.TransactionUtil.executeInUserTransaction(TransactionUtil.java:74)
   at org.alfresco.repo.node.index.AbstractReindexComponent.reindex(AbstractReindexComponent.java:213)
   at org.alfresco.repo.node.index.IndexRecoveryJob.execute(IndexRecoveryJob.java:31)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)

davidc
Star Contributor
Star Contributor
Odd, if the web service sample is working, you should be able to copy the configuration from your installed server to the sdk sample.

gatesda
Champ in-the-making
Champ in-the-making
I am getting the same problem as posted above.  The strange thing is that the SQL statement that is printed in the error stack runs fine in SQL Developer (select max(transactio1_.id) as col_0_0_ from alfresco.alf_node_status nodestatus0_ inner join alfresco.alf_transaction transactio1_ on nodestatus0_.transaction_id=transactio1_.id).
Is there any resolution to the problem?

amgad2002
Champ in-the-making
Champ in-the-making
Hello

I got the same error
:cry:  :cry:

14:11:27,162 ERROR [transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available:
Failed to execute command: imconvert "C:\DOCUME~1\ahanafy\LOCALS~1\Temp\Alfresco\ImageMagickContentTransformer_init_sou
rce_20126.gif"  "C:\DOCUME~1\ahanafy\LOCALS~1\Temp\Alfresco\ImageMagickContentTransformer_init_target_20127.png"
14:11:29,053 WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
14:11:52,286 ERROR [jbpm.db.GraphSession] org.hibernate.exception.SQLGrammarException: could not execute query
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:2148)
   at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
   at org.hibernate.loader.Loader.list(Loader.java:2024)
   at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
   at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
   at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
   at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)
   at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
   at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749)
   at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:153)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine$2.doInJbpm(JBPMEngine.java:288)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine$2.doInJbpm(JBPMEngine.java:281)
   at org.springmodules.workflow.jbpm31.JbpmTemplate$1.doInHibernate(JbpmTemplate.java:87)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:365)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333)
   at org.springmodules.workflow.jbpm31.JbpmTemplate.execute(JbpmTemplate.java:80)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.isDefinitionDeployed(JBPMEngine.java:279)
   at org.alfresco.repo.workflow.WorkflowServiceImpl.isDefinitionDeployed(WorkflowServiceImpl.java:124)
   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:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
   at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:116)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.jav
a:40)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInt
erceptor.java:49)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:219)
   at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:165)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
   at $Proxy22.isDefinitionDeployed(Unknown Source)
   at org.alfresco.repo.workflow.WorkflowDeployer.deploy(WorkflowDeployer.java:203)
   at org.alfresco.repo.workflow.WorkflowDeployer.onBootstrap(WorkflowDeployer.java:235)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster
.java:45)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:225)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:323)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:87)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:72)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:63)
   at org.alfresco.sample.FirstJCRClient.main(FirstJCRClient.java:64)
Caused by: java.sql.SQLException: ORA-00933: SQL command not properly ended

   at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
   at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
   at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
   at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:911)
   at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1121)
   at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:962)
   at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1243)
   at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3415)
   at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3459)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
   at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
   at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
   at org.hibernate.loader.Loader.doQuery(Loader.java:662)
   at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
   at org.hibernate.loader.Loader.doList(Loader.java:2145)
   … 48 more
Exception in thread "main" org.alfresco.error.AlfrescoRuntimeException: Workflow deployment failed
   at org.alfresco.repo.workflow.WorkflowDeployer.deploy(WorkflowDeployer.java:224)
   at org.alfresco.repo.workflow.WorkflowDeployer.onBootstrap(WorkflowDeployer.java:235)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster
.java:45)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:225)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:323)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:87)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:72)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:63)
   at org.alfresco.sample.FirstJCRClient.main(FirstJCRClient.java:64)
Caused by: org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access: could not
execute query; nested exception is java.sql.SQLException: ORA-00933: SQL command not properly ended

   at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:631)
   at org.springmodules.workflow.jbpm31.JbpmAccessor.convertJbpmException(JbpmAccessor.java:47)
   at org.springmodules.workflow.jbpm31.JbpmTemplate.execute(JbpmTemplate.java:97)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.isDefinitionDeployed(JBPMEngine.java:279)
   at org.alfresco.repo.workflow.WorkflowServiceImpl.isDefinitionDeployed(WorkflowServiceImpl.java:124)
   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:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
   at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:116)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.jav
a:40)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInt
erceptor.java:49)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:219)
   at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:165)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
   at $Proxy22.isDefinitionDeployed(Unknown Source)
   at org.alfresco.repo.workflow.WorkflowDeployer.deploy(WorkflowDeployer.java:203)
   … 9 more
Caused by: java.sql.SQLException: ORA-00933: SQL command not properly ended

   at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
   at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
   at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
   at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:911)
   at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1121)
   at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:962)
   at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1243)
   at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3415)
   at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3459)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
   at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
   at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
   at org.hibernate.loader.Loader.doQuery(Loader.java:662)
   at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
   at org.hibernate.loader.Loader.doList(Loader.java:2145)
   at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
   at org.hibernate.loader.Loader.list(Loader.java:2024)
   at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
   at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
   at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
   at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)
   at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
   at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749)
   at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:153)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine$2.doInJbpm(JBPMEngine.java:288)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine$2.doInJbpm(JBPMEngine.java:281)
   at org.springmodules.workflow.jbpm31.JbpmTemplate$1.doInHibernate(JbpmTemplate.java:87)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:365)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333)
   at org.springmodules.workflow.jbpm31.JbpmTemplate.execute(JbpmTemplate.java:80)
   … 33 more
14:12:31,160 ERROR [quartz.core.JobRunShell] Job DEFAULT.org.springframework.scheduling.quartz.JobDetailBean#17200b4 thr
ew an unhandled Exception:
org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not execute query; bad SQL grammar [select m
ax(transactio1_.id) as col_0_0_ from alf_node_status nodestatus0_ inner join alf_transaction transactio1_ on nodestatus0
_.transaction_id=transactio1_.id]; nested exception is java.sql.SQLException: ORA-00933: SQL command not properly ended

:cry:  :cry:

avro
Champ in-the-making
Champ in-the-making
I'm in the same situation…

Anybody knows how to solve it?

avro
Champ in-the-making
Champ in-the-making
I have the database configuration properly made but it does not work.

I execute the query in the SQL Navigator and it works.

However, the "inner join" that query includes could be tricky. In Oracle versions older than 9i inner joins are not supported. I'm using an Oracle 10g database, so that problem should not happen (that's why the query works via the SQL navigator). The hibernate SQL dialect that I use is    org.hibernate.dialect.Oracle9Dialect, that should work well with Oracle 10g, so this query stuff should not be a problem.

Before I tried this embedded solution of the FirstFoundationClient I installed Alfresco with the Oracle database in order to try the web services… and they worked like charm, no problem there at all. I'm using now the same schema and the same properties and I get this error.

Did anybody ever have this problem solved? Please, it's frustrating.

Thanks.