Error while running the sample application with default db and mysql

353 views
Skip to first unread message

ARASAR

unread,
Sep 24, 2010, 9:53:29 AM9/24/10
to Grails Activiti Plugin Discussion Forum
Hi,

I am trying to use ativiti plugin. I created a sample project using
SpringSourceTool suite and installed the activiti plugin. I followed
the instructions in the project home for configuration changes.

When I tried to run the application with defalut db, I am getting the
following error:

Activiti Process Engine Initialization...
2010-09-24 19:02:17,062 [main] ERROR context.GrailsContextLoader -
Error executing bootstraps: Error creating bean with name
'messageSource': Initialization of bean failed;

nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'transactionManager': Cannot resolve reference
to bean

'sessionFactory' while setting bean property 'sessionFactory'; nested
exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name

'sessionFactory': Cannot resolve reference to bean
'hibernateProperties' while setting bean property
'hibernateProperties'; nested exception is

org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'hibernateProperties': Cannot resolve
reference to bean 'dialectDetector' while

setting bean property 'properties' with key [hibernate.dialect];
nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name

'dialectDetector': Invocation of init method failed; nested exception
is org.springframework.jdbc.support.MetaDataAccessException: Error
while extracting DatabaseMetaData;

nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot
create PoolableConnectionFactory (Connection is broken: "session
closed" [90067-132])
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'messageSource': Initialization of bean
failed; nested exception is

org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'transactionManager': Cannot resolve reference
to bean 'sessionFactory' while

setting bean property 'sessionFactory'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sessionFactory': Cannot

resolve reference to bean 'hibernateProperties' while setting bean
property 'hibernateProperties'; nested exception is

org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'hibernateProperties': Cannot resolve
reference to bean 'dialectDetector' while

setting bean property 'properties' with key [hibernate.dialect];
nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name

'dialectDetector': Invocation of init method failed; nested exception
is org.springframework.jdbc.support.MetaDataAccessException: Error
while extracting DatabaseMetaData;

nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot
create PoolableConnectionFactory (Connection is broken: "session
closed" [90067-132])
at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:164)
at grails.web.container.EmbeddableServer$start.call(Unknown Source)
at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:
158)
at _GrailsRun_groovy
$_run_closure5_closure12.doCall(_GrailsRun_groovy)
at _GrailsSettings_groovy
$_run_closure10.doCall(_GrailsSettings_groovy:280)
at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:149)
at _GrailsRun_groovy$_run_closure5.call(_GrailsRun_groovy)
at _GrailsRun_groovy.runInline(_GrailsRun_groovy:116)
at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy)
at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:59)
at RunApp$_run_closure1.doCall(RunApp:33)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:590)
at gant.Gant.executeTargets(Gant.groovy:589)
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'transactionManager': Cannot resolve
reference to bean 'sessionFactory'

while setting bean property 'sessionFactory'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sessionFactory':

Cannot resolve reference to bean 'hibernateProperties' while setting
bean property 'hibernateProperties'; nested exception is

org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'hibernateProperties': Cannot resolve
reference to bean 'dialectDetector' while

setting bean property 'properties' with key [hibernate.dialect];
nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name

'dialectDetector': Invocation of init method failed; nested exception
is org.springframework.jdbc.support.MetaDataAccessException: Error
while extracting DatabaseMetaData;

nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot
create PoolableConnectionFactory (Connection is broken: "session
closed" [90067-132])
... 23 more
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'sessionFactory': Cannot resolve
reference to bean 'hibernateProperties'

while setting bean property 'hibernateProperties'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name

'hibernateProperties': Cannot resolve reference to bean
'dialectDetector' while setting bean property 'properties' with key
[hibernate.dialect]; nested exception is

org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'dialectDetector': Invocation of init method
failed; nested exception is

org.springframework.jdbc.support.MetaDataAccessException: Error while
extracting DatabaseMetaData; nested exception is
org.apache.commons.dbcp.SQLNestedException:

Cannot create PoolableConnectionFactory (Connection is broken:
"session closed" [90067-132])
... 23 more
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'hibernateProperties': Cannot resolve
reference to bean 'dialectDetector'

while setting bean property 'properties' with key [hibernate.dialect];
nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with

name 'dialectDetector': Invocation of init method failed; nested
exception is org.springframework.jdbc.support.MetaDataAccessException:
Error while extracting

DatabaseMetaData; nested exception is
org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Connection is broken: "session closed"

[90067-132])
... 23 more
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'dialectDetector': Invocation of init
method failed; nested exception is

org.springframework.jdbc.support.MetaDataAccessException: Error while
extracting DatabaseMetaData; nested exception is
org.apache.commons.dbcp.SQLNestedException:

Cannot create PoolableConnectionFactory (Connection is broken:
"session closed" [90067-132])
... 23 more
Caused by: org.springframework.jdbc.support.MetaDataAccessException:
Error while extracting DatabaseMetaData; nested exception is

org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Connection is broken: "session
closed" [90067-132])
... 23 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Connection is broken: "session
closed" [90067-132])
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:
1225)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:
880)
at $Proxy8.getMetaData(Unknown Source)
... 23 more
Caused by: org.h2.jdbc.JdbcSQLException: Connection is broken:
"session closed" [90067-132]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:
316)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.message.DbException.get(DbException.java:144)
at org.h2.engine.SessionRemote.checkClosed(SessionRemote.java:447)
at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:326)
at
org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:
219)
at org.h2.engine.SessionRemote.createSession(SessionRemote.java:213)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:110)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:94)
at org.h2.Driver.connect(Driver.java:58)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:
38)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:
294)
at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:
1247)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:
1221)
... 25 more



Then I tried to configure with mysql as specified in the project site.
I am getting the following error.

Activiti Process Engine Initialization...
2010-09-24 18:09:06,656 [main] ERROR
persistence.IbatisPersistenceSessionFactory - problem during schema
create, statement 'create table ACT_PROPERTY (
NAME_ varchar(300),
VALUE_ varchar(300),
REV_ integer,
primary key (NAME_)
)
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified
key was too long; max key length is 767 bytes
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:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.Util.getInstance(Util.java:384)
.......
.......


Can anyone pls help me to make it working?

Thanks in advance

Chee Kin Lim

unread,
Sep 25, 2010, 2:46:49 AM9/25/10
to grails-acti...@googlegroups.com

Hi,

Thanks for using the plugin.

For the first error message when you run this plugin with H2 database, it seems like the H2 database is not started. Did you start the H2 database server?

In Activiti 5.0.beta1, there is some problems for dbSchemaStrategy = "create-drop" due to this issue at http://jira.codehaus.org/brows e/ACT-115, you need to create the Activiti's database schema manually using "ant db.create" (for H2 database, you need to start the H2 database server first with command "ant h2.start") and set the dbSchemaStrategy in Config.groovy to check-version and dbCreate in DataSource.groovy to update. For MySQL database, please refer to http://activiti.org/userguide/index.html#N101BF.

Hope this help.

Regards,
Chee Kin

limcheekin

unread,
Sep 25, 2010, 2:50:13 AM9/25/10
to Grails Activiti Plugin Discussion Forum
The URL of the jira issue is broken. The complete URL is
http://jira.codehaus.org/browse/ACT-115.

Regards,
Chee Kin


On Sep 25, 2:46 pm, Chee Kin Lim <limchee...@vobject.com> wrote:
> Hi,
>
> Thanks for using the plugin.
>
> For the first error message when you run this plugin with H2 database, it
> seems like the H2 database is not started. Did you start the H2 database
> server?
>
> In Activiti 5.0.beta1, there is some problems for dbSchemaStrategy =
> "create-drop" due to this issue athttp://jira.codehaus.org/browse/ACT-115,
> you need to create the Activiti's database schema manually using "ant
> db.create" (for H2 database, you need to start the H2 database server first
> with command "ant h2.start") and set the dbSchemaStrategy in Config.groovy
> to check-version and dbCreate in DataSource.groovy to update. For MySQL
> database, please refer tohttp://activiti.org/userguide/index.html#N101BF.
>
> Hope this help.
>
> Regards,
> Chee Kin
>
> ...
>
> read more »

limcheekin

unread,
Sep 27, 2010, 9:50:27 PM9/27/10
to Grails Activiti Plugin Discussion Forum
Hi there!

Did you managed to make it works?

Wish to hear from you soon!

Regards,
Chee Kin

On Sep 25, 2:50 pm, limcheekin <limchee...@vobject.com> wrote:
> The URL of the jira issue is broken. The complete URL ishttp://jira.codehaus.org/browse/ACT-115.
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages