cancel
Showing results for 
Search instead for 
Did you mean: 

10 minute tutorial

agiledevpro
Champ in-the-making
Champ in-the-making
Hi,

I've followed the 10 minute tutorial on activiti.org, but when I run the code I get an error saying:

[main] ERROR org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl - Exception while initializing Database connection
org.h2.jdbc.JdbcSQLException: A file path that is implicitly relative to the current working directory is not allowed in the database URL "jdbc:h2:tcp://localhost/activiti". Use an absolute path, ~/name, ./name, or the baseDir setting instead. [90011-179]

I've changed the URL in the db.properties file to: jdbc:h2:tcp://localhost/~/activiti but the error is still exacly the same, and the changes does not seem to have been applied since the error still is as above…."jdbc:h2:tcp://localhost/activiti". Use an absolute path, ~/name, ./name, or the baseDir setting instead. [90011-179].

My os is Windows 7 and I'm using jre 6.

Any suggestions?
12 REPLIES 12

sathish1
Champ in-the-making
Champ in-the-making
Make sure H2 is running as a server in your local machine., H2 tutorial here. <link>http://www.h2database.com/html/tutorial.html</link>
Cheers.,

agiledevpro
Champ in-the-making
Champ in-the-making
Hi, thank you for the fast reply. But H2 is up and running, I've started it through H2 Console (Command Line). And connection is successful.

So I don't know whats wrong…Any other ideas?

Thanks

agiledevpro
Champ in-the-making
Champ in-the-making
The place where I set the URL is in db.properties at "C:\apache-tomcat-7.0.54\webapps\activiti-explorer\WEB-INF\classes", do I need to set the URL somewhere else as well. I've read something about a file called activiti.cfg.xml, I don't have this file anywhere. Should I create it, and if so, where in my project should I put it.

(I've created a maven project in Eclipse).

Thanks

sathish1
Champ in-the-making
Champ in-the-making
Can u post the activiti-cfg.xml file or from ur cfg file can u confirm from the
<code>  <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration" > </code>
is set for the processEngineConfiguration. I think you might have the config something like this
<code><bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration"></code>
cheers.,

agiledevpro
Champ in-the-making
Champ in-the-making
I didn't get the activiti.cfg.xml file when I downloaded activiti. I don't know if I were supposed to get it or not, but anyway, I've copied the file from activiti.org:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans.xsd">

  <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
 
    <property name="jdbcUrl" value="jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000" />
    <property name="jdbcDriver" value="org.h2.Driver" />
    <property name="jdbcUsername" value="sa" />
    <property name="jdbcPassword" value="" />
   
    <property name="databaseSchemaUpdate" value="true" />
   
    <property name="jobExecutorActivate" value="false" />
   
    <property name="mailServerHost" value="mail.my-corp.com" />
    <property name="mailServerPort" value="5025" />   
  </bean>

</beans>

…and I've put it under resourses, but I still get the same error. (I know that the url isn't changed here). Do I use this filein the wrong way?

Thanks

agiledevpro
Champ in-the-making
Champ in-the-making
Sorry for the message above, something happend when I pasted the xml from activiti.org.
I've attached the file instead (in txt format)


Thanks

sathish1
Champ in-the-making
Champ in-the-making
Got it., try creating the activit-cfg.xml file in the classpath and here is a sample file <link>http://pastebin.com/kAJunk3C</link>.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi.

for me it seems like h2 configuration issue.
https://groups.google.com/forum/#!topic/h2-database/SlSwte0DLSU

Regards
Martin

agiledevpro
Champ in-the-making
Champ in-the-making
Hi Martin,

I've looked at the link before, but that is one of my problems the other problem is even though I change the path to an absolute path the error message is still the same. The error code complains about the old path, the changes I make isn't there. It is if another file is used that I'm not aware of.

The error still is as above…."jdbc:h2:tcp://localhost/activiti"…and not "jdbc:h2:tcp://localhost/~/activiti".

Satish, by classpath you mean that I should go to properties -> build path and add the file here?

Thank you