cancel
Showing results for 
Search instead for 
Did you mean: 

Error installing MSSQL database - 5.3

jchildress
Champ in-the-making
Champ in-the-making
Running "setup.install" with a new copy of 5.3 on MSSQL Server 2008 R2.

Has anyone got 5.3 working with MSSQL?  I plan on just editing the SQL and re-running , but thought I'd go ahead and post here in case others had a similar error.

I get the following error message:

deploy:
     [copy] Copying 1 file to C:\lib\activiti-5.3\apps\apache-tomcat-6.0.32\webapps\activiti-rest\WEB-INF\lib
[deploy-bar] Initializing process engine default
[deploy-bar] Mar 5, 2011 8:16:44 AM org.activiti.engine.ProcessEngines initProcessEnginFromResource
[deploy-bar] INFO: initializing process engine for resource file:/C:/lib/activiti-5.3/workspace/activiti-engine-examples/src/main/config/activiti.cfg.xml
[deploy-bar] Mar 5, 2011 8:16:44 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
[deploy-bar] INFO: Loading XML bean definitions from resource loaded through InputStream
[deploy-bar] Mar 5, 2011 8:16:45 AM org.activiti.engine.impl.db.DbSqlSession dbSchemaUpgrade
[deploy-bar] INFO: upgrading activiti engine schema from 5.1 to 5.3
[deploy-bar] Mar 5, 2011 8:16:45 AM org.activiti.engine.impl.db.DbSqlSession dbSchemaUpgrade
[deploy-bar] INFO: upgrading activiti history schema from 5.1 to 5.3
[deploy-bar] Mar 5, 2011 8:16:45 AM org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
[deploy-bar] INFO: performing upgrade on history with resource org/activiti/db/upgrade/activiti.mssql.upgradestep.52.to.53.history.sql
[deploy-bar] Mar 5, 2011 8:16:46 AM org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
[deploy-bar] SEVERE: problem during schema upgrade, statement 'alter table ACT_HI_TASKINST add column PRIORITY_ int
[deploy-bar] java.sql.SQLException: Incorrect syntax near the keyword 'column'.
[deploy-bar]    at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
[deploy-bar]    at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)
[deploy-bar]    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)
[deploy-bar]    at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632)

[deploy-bar] Mar 5, 2011 8:16:46 AM org.activiti.engine.impl.interceptor.CommandContext close
[deploy-bar] SEVERE: Error while closing command context
[deploy-bar] org.activiti.engine.ActivitiException: couldn't upgrade db schema: alter table ACT_HI_TASKINST add column PRIORITY_ int
[deploy-bar]    at org.activiti.engine.impl.db.DbSqlSession.executeSchemaResource(DbSqlSession.java:795)
[deploy-bar]    at org.activiti.engine.impl.db.DbSqlSession.executeSchemaResource(DbSqlSession.java:722)
[deploy-bar]    at org.activiti.engine.impl.db.DbSqlSession.dbSchemaUpgrade(DbSqlSession.java:701)
[deploy-bar]    at org.activiti.engine.impl.db.DbSqlSession.dbSchemaUpdate(DbSqlSession.java:627)
[deploy-bar]    at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:854)
[deploy-bar]    at org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:25)
17 REPLIES 17

jchildress
Champ in-the-making
Champ in-the-making
It looks like the PRIORITY column is already there…  checking the file "activiti.mssql.create.history.sql"

Is there anyway to skip the upgrade process if it's a clean install?

John

frederikherema1
Star Contributor
Star Contributor
Hi,

On a clean DB, no upgrade should be performed. Are you sure the DB doesn't have any 5.2 tables?
You can always set the databaseSchemaUpgrade property to false (see http://activiti.org/userguide/index.html#databaseUpgrade).

weiyi2011
Champ in-the-making
Champ in-the-making
Hi,

On a clean DB, no upgrade should be performed. Are you sure the DB doesn't have any 5.2 tables?
You can always set the databaseSchemaUpgrade property to false (see http://activiti.org/userguide/index.html#databaseUpgrade).

Hi, All.

I have the same problem. Acitiviti 5.3, SQL2008, JTDS-1.2.4.JAR
And my database is a new one.  But Activiti5.2 work well by execute the create SQL by yourself.
I need your help, my project use SQL2008. Thanks very much!

log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).
log4j:WARN Please initialize the log4j system properly.
12:57:12,468 FIN  | database product name: 'Microsoft SQL Server'  [org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl]
12:57:12,468 FIN  | using database type: mssql  [org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl]
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
12:57:13,078 FIN  |                                                                                                       [org.activiti.engine.impl.interceptor.LogInterceptor]
12:57:13,078 FIN  | — starting SchemaOperationsProcessEngineBuild ——————————————————–  [org.activiti.engine.impl.interceptor.LogInterceptor]
12:57:13,187 INF  | upgrading activiti engine schema from 5.1 to 5.3  [org.activiti.engine.impl.db.DbSqlSession]
12:57:13,187 FIN  | no schema resource org/activiti/db/upgrade/activiti.mssql.upgradestep.51.to.52.engine.sql for upgrade  [org.activiti.engine.impl.db.DbSqlSession]
12:57:13,187 FIN  | no schema resource org/activiti/db/upgrade/activiti.mssql.upgradestep.52.to.53.engine.sql for upgrade  [org.activiti.engine.impl.db.DbSqlSession]
12:57:13,218 INF  | upgrading activiti history schema from 5.1 to 5.3  [org.activiti.engine.impl.db.DbSqlSession]
12:57:13,218 FIN  | no schema resource org/activiti/db/upgrade/activiti.mssql.upgradestep.51.to.52.history.sql for upgrade  [org.activiti.engine.impl.db.DbSqlSession]
12:57:13,218 INF  | performing upgrade on history with resource org/activiti/db/upgrade/activiti.mssql.upgradestep.52.to.53.history.sql  [org.activiti.engine.impl.db.DbSqlSession]
12:57:13,218 FIN  | removing not null constraint from ACT_HI_DETAIL.PROC_INST_ID_ and ACT_HI_DETAIL.EXECUTION_ID_  [org.activiti.engine.impl.db.DbSqlSession]
12:57:13,234 FIN  | Add column PRIORITY_ to ACT_HI_TASKINST and set to default priority (ACT-484)  [org.activiti.engine.impl.db.DbSqlSession]
12:57:13,234 SEV  | problem during schema upgrade, statement 'alter table ACT_HI_TASKINST add column PRIORITY_ int
java.sql.SQLException: 关键字 'column' 附近有语法错误。
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632)
at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:723)
at net.sourceforge.jtds.jdbc.JtdsStatement.execute(JtdsStatement.java:1160)
at org.activiti.engine.impl.db.DbSqlSession.executeSchemaResource(DbSqlSession.java:769)
at org.activiti.engine.impl.db.DbSqlSession.executeSchemaResource(DbSqlSession.java:722)
at org.activiti.engine.impl.db.DbSqlSession.dbSchemaUpgrade(DbSqlSession.java:701)
at org.activiti.engine.impl.db.DbSqlSession.dbSchemaUpdate(DbSqlSession.java:627)
at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:854)
at org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:25)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:77)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:233)
at org.activiti.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:61)
at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:56)
at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:32)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1433)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:249)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:353)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:983)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:879)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:900)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:455)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at org.activiti.designer.test.LfxjTest.<init>(LfxjTest.java:32)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at junit.framework.TestSuite.createTest(TestSuite.java:61)
at junit.framework.TestSuite.addTestMethod(TestSuite.java:283)
at junit.framework.TestSuite.<init>(TestSuite.java:146)
at org.junit.internal.runners.JUnit38ClassRunner.<init>(JUnit38ClassRunner.java:71)
at org.junit.internal.builders.JUnit3Builder.runnerForClass(JUnit3Builder.java:14)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:33)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:32)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestMethodReference.<init>(JUnit4TestMethodReference.java:25)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:42)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:31)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
  [org.activiti.engine.impl.db.DbSqlSession]
12:57:13,250 SEV  | Error while closing command context

frederikherema1
Star Contributor
Star Contributor
Hi,

Translated messages states: "Keyword 'column' Incorrect syntax near."

Looks like the "ADD COLUMN" should just be "ADD" on MS SQL. We don't have QA for MSSQL yet so it slipped through:

alter table ACT_HI_TASKINST add column PRIORITY_ int;

I'll make sure the SQL is altered on trunk. As a workaround, you could edit the org/activiti/db/upgrade/activiti.mssql.upgradestep.52.to.53.history.sql in activiti-engine.jar.

weiyi2011
Champ in-the-making
Champ in-the-making
Hi,

Translated messages states: "Keyword 'column' Incorrect syntax near."

Looks like the "ADD COLUMN" should just be "ADD" on MS SQL. We don't have QA for MSSQL yet so it slipped through:

alter table ACT_HI_TASKINST add column PRIORITY_ int;

I'll make sure the SQL is altered on trunk. As a workaround, you could edit the org/activiti/db/upgrade/activiti.mssql.upgradestep.52.to.53.history.sql in activiti-engine.jar.

Hi,  Smiley Very Happy

When I edit activiti.mssql.create.engine.sql in activiti-engine.jar. 5.1 to 5.3. It work well!
insert into ACT_GE_PROPERTY
values ('schema.version', '5.3', 1);

insert into ACT_GE_PROPERTY
values ('schema.history', 'create(5.3)', 1);

weiyi2011
Champ in-the-making
Champ in-the-making
OH NO!

I found that It work well by org.activiti.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration.
But When I use org.activiti.spring.SpringProcessEngineConfiguration have a test.
There is only identityService can save data, other Service have no a transaction.
What is the problem?


14:58:06,781 FIN  |                                                                                                       [org.activiti.engine.impl.interceptor.LogInterceptor]
14:58:06,781 FIN  | — starting SchemaOperationsProcessEngineBuild ——————————————————–  [org.activiti.engine.impl.interceptor.LogInterceptor]
14:58:07,000 FIN  | flush summary:  [org.activiti.engine.impl.db.DbSqlSession]
14:58:07,000 FIN  | now executing flush…  [org.activiti.engine.impl.db.DbSqlSession]
14:58:07,000 FIN  | — SchemaOperationsProcessEngineBuild finished ——————————————————–  [org.activiti.engine.impl.interceptor.LogInterceptor]
14:58:07,000 FIN  |                                                                                                       [org.activiti.engine.impl.interceptor.LogInterceptor]
14:58:07,000 INF  | ProcessEngine default created  [org.activiti.engine.impl.ProcessEngineImpl]

frederikherema1
Star Contributor
Star Contributor
Hi,

Can you show your FULL spring-context you are using?

weiyi2011
Champ in-the-making
Champ in-the-making
Smiley Surprisedops:

No problem with my spring-context. Beacause Junit Annotation doesn't work.

frederikherema1
Star Contributor
Star Contributor
So is your problem solved then?