I spent 3 day for this problem, but i can not solve it.Please, help me!

I refer Building from Source. And i build source step by step, but at build project step, it occur a error (i copy it from TEST-org.joget.directory.model.TestDirectoryManagerProxyImpl.xml):

<testcase time="0" classname="org.joget.directory.model.TestDirectoryManagerProxyImpl" name="test">
    <error message="Failed to load ApplicationContext" type="java.lang.IllegalStateException">java.lang.IllegalStateException: Failed to load ApplicationContext
    at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:203)
    at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
    at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
    at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:255)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:93)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:130)
    at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
    at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
    at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
    at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
    at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
    at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
    at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
    at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
    at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
    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.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
    at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'setupSessionFactory' defined in class path resource [commonsApplicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1336)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
    at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:96)
    at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:44)
    at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:173)
    at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:199)
    ... 20 more
Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
    at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
    at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
    at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:426)
    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:128)
    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2073)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1298)
    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814)
    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732)
    at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1367)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1333)
    ... 36 more
</error>

  • No labels

30 Comments

  1. Hi Thanh Son,

    The stack trace posted is incomplete, can't really see the actual exception that causes this. But, this kind of trace usually indicates that there is a problem connecting to the MySQL database. Do you already have Joget installed and running on your machine?

    1. I'm happy! everything is OK now.

      I installed MySQL server at 3306 port and import wflowdb database and built again, it's OK!

      Thanks for your support!

  2. hi, I got an error when build project when executing setup-maven.xml. I already setup environment variable for maven. the error looks like this:

    BUILD FAILED
    c:\BENGKEL\git_JOGET\jogetworkflow.git\setup-maven.xml:13: Execute failed: java.
    io.IOException: Cannot run program "mvn": CreateProcess error=2, The system cann
    ot find the file specified
            at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
            at java.lang.Runtime.exec(Runtime.java:593)
            at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Exec
    ute.java:862)
            at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
            at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
            at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:631)
            at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
            at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
            at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
    a:106)
            at org.apache.tools.ant.Task.perform(Task.java:348)
            at org.apache.tools.ant.Target.execute(Target.java:390)
            at org.apache.tools.ant.Target.performTasks(Target.java:411)
            at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
            at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
            at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
    cutor.java:41)
            at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
            at org.apache.tools.ant.Main.runBuild(Main.java:809)
            at org.apache.tools.ant.Main.startAnt(Main.java:217)
            at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
            at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
    Caused by: java.io.IOException: CreateProcess error=2, The system cannot find th
    e file specified
            at java.lang.ProcessImpl.create(Native Method)
            at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
            at java.lang.ProcessImpl.start(ProcessImpl.java:30)
            at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
            ... 24 more

    Total time: 0 seconds

    can somebody give some clue?thx

    1. Hey there,

      Just giving it a shot. Try to change from "mvn" to "mvn.bat" and see if it helps! Good luck.

      1. Thx Hugo, its works thanks

  3. Hi, I got error when doing mvn install. The stacktrace looks like below. any help will be apreciate. thx

    [ERROR] Failed to execute goal on project wflow-commons: Could not resolve depen
    dencies for project org.joget:wflow-commons:jar:2.0-SNAPSHOT: Could not find art
    ifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2
    ) -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
    n project wflow-commons: Could not resolve dependencies for project org.joget:wf
    low-commons:jar:2.0-SNAPSHOT: Could not find artifact javax.transaction:jta:jar:
    1.0.1B in central (http://repo1.maven.org/maven2)
            at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDe
    pendencies(LifecycleDependencyResolver.java:196)
            at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resol
    veProjectDependencies(LifecycleDependencyResolver.java:108)
            at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAr
    eResolved(MojoExecutor.java:258)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
    .java:201)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
    .java:153)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
    .java:145)
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
    ct(LifecycleModuleBuilder.java:84)
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
    ct(LifecycleModuleBuilder.java:59)
            at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
    ild(LifecycleStarter.java:183)
            at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
    eStarter.java:161)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
            at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
            at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
            at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
            at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
    cher.java:290)
            at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
    a:230)
            at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
    uncher.java:409)
            at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
    352)
    Caused by: org.apache.maven.project.DependencyResolutionException: Could not res
    olve dependencies for project org.joget:wflow-commons:jar:2.0-SNAPSHOT: Could no
    t find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.
    org/maven2)
            at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(D
    efaultProjectDependenciesResolver.java:170)
            at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDe
    pendencies(LifecycleDependencyResolver.java:171)
            ... 22 more

    1. Looks like it couldn't find the artifact required - javax.transaction:jta:jar.

      Try to download the package manually and install it in your machine.

      Here's the sample command on how to install:-

      mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta -Dpackaging=jar -Dversion=1.0.1B -Dfile=jta-1.0.1B.jar -DgeneratePom=true

      Good luck!

      1. thanks again Hugo, I install all the artifact left. but again I got compiler error fiuhh, any suggestion?

        1. Hey,

          What kinda error that you are getting this round? You can share some log so that we can try to help you out.

          Cheers!!

  4. Hi,

    I tried setting up the source code as mentioned in the Building from Source link provided, but I'm getting an error while I tried building the project using mvn install and the error occured when it builds the wflow-directory and the remaining projects were skipped from the build.

    As mentioned in one of the previous post, it seems this kind of error might occur due to Joget/mysql installation or might occur while connecting to my sql. I have installed Joget in my machine and my sql is also running. I am able to connect to the same my sql db using my code to fetch the workflow variables or for testing my other application functionalities. Also Im getting Hibernate Dialect must be explicitly set error in the stack trace.

    I have attached the error logs(org.joget.directory.model.TestDirectoryDao.txt,org.joget.directory.model.TestDirectoryManagerProxyImpl.txt,TEST-org.joget.directory.model.TestDirectoryDao.xml,TEST-org.joget.directory.model.TestDirectoryManagerProxyImpl.xml).

    Kindly help in resolving the issue.

    Thanks,

    Vignesh

    1. Hey there,

      Maybe you can try to build the projects by getting the copy from the SNAPSHOT-2.0 instead. See if it helps.

      Good luck!

      1. Hi Hugo,

        I am not getting you clearly, could you please provide more details on the same, SNAPSHOT-2.0 in the sense???

        Thanks,

        Vignesh

        1. Hi Vignesh,

          In order to build Joget, you need to make sure that you can run the Joget installed from the installer first. This is to create the necessary datasource config file on your machine first. From there on, during the build process, it would make use of the config file created to establish database connection for various purposes such as running test cases.

          Also, please grab the copy from GitHub's https://github.com/jogetworkflow/jogetworkflow just in case you do not at the moment!

          Good luck! Hope it helps!

          1. Hi Hugo,

            I have installed Joget and the same is running in my machine fine and I have been using the same for my other developments which is not having any issues.

            I have downloaded the Source code from the GitHub's location you provided and tried to build the same and I got the same build error with this copy of code as well.

            I have Java 6, MySql and other prerequisites installed and running in my machine fine. Kindly let me know whether Im missing any other setup other than this.

            The error stack trace is mentioning that java.lang.IllegalStateException: Failed to load ApplicationContext and Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'setupSessionFactory' defined in class path resource [commonsApplicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Hibernate Dialect must be explicitly set.

            Kindly help in this regard.

            Thanks,

            Vignesh

            1. I'm not too sure if I'm seeing the root cause accurately or not but it seems like from the log, it is telling us that it has problem connecting to the database though as you are getting the exception org.hibernate.HibernateException: Hibernate Dialect must be explicitly set.

              Just in case you have not seen this article yet, it's worth a read. Building from Source

              You may want to check your datasource.properties file as when it builds, it would get the database configuration from there as well.

              Another suggestion would be, instead, probably you can try to build wflow-app as it will build each and every other projects in the proper sequence which may eliminate some of your problems.

              Good luck!

              1. Hi Hugo,

                Im building the project by running the mvn install command from the wflow-app directory only and I got the above mentioned build Error. Also I dont face any issues with related to connecting to the database since I am using the same Joget installation for an application which I had built using Jsp and Servlets which will access the same MySql database for request creation and approval for fetching the workflow data.

                I have attached the datasource.properties file and other properties file in the same directory. Kindly let me know if you see any discrepancies with the same.

                Thanks,

                Vignesh

                datasource.properties

                datasource-default.properties

                datasource-sample.properties

                1. Hi Vignesh,

                  Please make sure that your MySQL server at path jdbc\:mysql\://localhost\:3307/sampledb?characterEncoding\=UTF-8 is running first before proceeding to build.

                  In your datasource.properties, it is pointing to datasource-sample.properties. And in this file, it is pointing to the MySQL server at port 3307.

                  Have a try and good luck!

                  Hugo

                  1. Hi Hugo,

                    The MySQL server is running fine, and I had tested the same with a Standalone program, for fetching the columns present in the shkactivitydata table and the code is working fine without issues and I am able to get the column details.

                    And I am getting the same build error even now.

                    Kindly let me know is there any other workaround to overcome the issue.

                    Thanks,

                    Vignesh

                    1. Hi Hugo,

                      Still the same issue, do you have any other thoughts/workaround for this issue?

                      Also as mentioned by Kapil in Getting Error while running createplugin.bat post, is this problem due to the POM? If so could you please provide the latest POM or let me know what are the changes that we need to do in the POM?

                      Thanks,

                      Vignesh

                      1. I had a same issue. Source code config xml file refers to MySQL running on port 3306 and DB wflowdb. Copy sampledb database to wflowdb and let MySQL server on 3306 and it should compile fine.

                        Marek

                      2. Hi Vignesh,

                        I'm not too sure if this would help. I'm using maven 2.2.1 currently. Perhaps you may want to try using this version if you are not at the moment.

                        Hope it helps!

                        Hugo

                        1. Hi Hugo,

                          I tried with maven 2.2.1 and modified the MySQL port and DB settings as mentioned by Marek, and the build went till the last step and I got a build error while building the wflow-designerweb folder saying, Failed to resolve artifact and missing com.sun.java.jnlp:jnlp-servlet:jar:5.0. Attached the screenshot BuildError.jpg

                          Kindly let me know whether Im missing anything here.

                          Thanks,

                          Vignesh

                          1. I downloaded the missing Jar file manually and installed the same and now Im able to build the wflow-directory.

                            Thanks.

                    2. it seems that the build is not taking into consideration the datasource files since I had a password on my root user in mysql, and I kept getting an error... what I did to solve the problem was adding
                      <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
                      in commonsApplicationContext.xml under hibernateProperties, and I had to use an empty password for the root user

  5. Trying the same. While building it from wflow-app ; the spring context does not get loaded and it says that hibernate dialect needs to be explicitly set. Any idea on this? Is there any documentation on the source code on the site?

      <testcase time="0" classname="org.joget.directory.model.TestDirectoryDao" name="testRemoveOrganization">
        <error message="Failed to load ApplicationContext" type="java.lang.IllegalStateException">java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:203) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:255) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:93) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:130) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) 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.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'setupSessionFactory' defined in class path resource [commonsApplicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Hibernate Dialect must be explicitly set at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1336) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:96) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:44) at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:173) at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:199) ... 20 more
    Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57) at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39) at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:426) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:128) at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2090) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2086) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1311) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1367) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1333)
    -------------------------------------------------------------------------------

    Test set: org.joget.directory.model.TestDirectoryDao

    -------------------------------------------------------------------------------

    Tests run: 77, Failures: 0, Errors: 77, Skipped: 0, Time elapsed: 164.761 sec <<< FAILURE!

    testAddOrganizationParent(org.joget.directory.model.TestDirectoryDao)  Time elapsed: 0 sec  <<< ERROR!

    java.lang.IllegalStateException: Failed to load ApplicationContext

    at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:203)

    at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)

    at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)

    at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:255)

    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:93)

    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:130)

    at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)

    at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)

    at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)

    at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)

    at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)

    at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)

    at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)

    at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)

    at org.apache.maven.surefire.Surefire.run(Surefire.java:177)

    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.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)

    at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)

    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'setupSessionFactory' defined in class path resource [commonsApplicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Hibernate Dialect must be explicitly set

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1336)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

    at java.security.AccessController.doPrivileged(Native Method)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)

    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)

    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)

    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)

    at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:96)

    at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:44)

    at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:173)

    at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:199)

    ... 20 more

    Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set

    at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)

    at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)

    at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:426)

    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:128)

    at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2090)

    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2086)

    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1311)

    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814)

    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732)

    at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1367)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1333)

    ... 36 more

    testAddOrganizationChild(org.joget.directory.model.TestDirectoryDao)  Time elapsed: 0.001 sec  <<< ERROR!

    java.lang.IllegalStateException: Failed to load ApplicationContext

    at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:203)

    1. Hi Kapil,

      Make sure that the MySQL service is up and running first before building it. You may refer to the postings above this thread for better clarifications.

      Good luck!

      Hugo

      1. I believe mysql is always running since joget-start starts mysql. I ran test cases with joget up and running with mysql. I was under the impression that the test cases were standalone. also when I changed the port to 3306, I got issues starting joget. 

        Does testing require a seperate mysql isntance then the current one?

        1. Hi Kapil,

          The answer is no. The test cases are using the same data source defined in your wflow/datasource.properties file.

          Hugo

  6. I tried to build, I get the following in test. What should I do?

    Running org.joget.directory.model.service.TestDirectoryManager
    No properties path set - looking for transactions.properties in classpath...
    transactions.properties not found - looking for jta.properties in classpath...
    Failed to open transactions properties file - using default values
    INFO  05 Dec 2011 16:50:52 org.joget.commons.util.SetupManager  - Using base dir
    ectory: C:\Users\user\wflow\
    INFO  05 Dec 2011 16:50:52 org.joget.commons.util.DynamicDataSource  - datasourc
    eName=workflow, url=jdbc:mysql://localhost:3306/jwdb?characterEncoding=UTF-8, us
    er=root
    ERROR 05 Dec 2011 16:50:52 org.hibernate.util.JDBCExceptionReporter  - Cannot cr
    eate PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using
     password: NO))
    ERROR 05 Dec 2011 16:50:52 org.springframework.test.context.TestContextManager
    - Caught exception while allowing TestExecutionListener [org.springframework.tes
    t.context.support.DependencyInjectionTestExecutionListener@546d3b92] to prepare
    test instance [org.joget.directory.model.service.TestDirectoryManager@4f62198b]
    java.lang.IllegalStateException: Failed to load ApplicationContext
            at org.springframework.test.context.TestContext.getApplicationContext(Te
    stContext.java:201)
            at org.springframework.test.context.support.DependencyInjectionTestExecu
    tionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:10
    9)
            at org.springframework.test.context.support.DependencyInjectionTestExecu
    tionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:7
    5)
            at org.springframework.test.context.TestContextManager.prepareTestInstan
    ce(TestContextManager.java:255)
            at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.creat
    eTest(SpringJUnit4ClassRunner.java:111)
            at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invok
    eTestMethod(SpringJUnit4ClassRunner.java:148)
            at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRu
    nner.java:51)
            at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.
    java:44)
            at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.jav
    a:27)
            at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:
    37)
            at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.ja
    va:42)
            at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(S
    pringJUnit4ClassRunner.java:97)
            at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.
    java:62)
            at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
    tSet(AbstractDirectoryTestSuite.java:140)
            at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
    stractDirectoryTestSuite.java:127)
            at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
    refireBooter.java:345)
            at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
    ava:1009)
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creati
    ng bean with name 'setupSessionFactory' defined in class path resource [commonsA
    pplicationContext.xml]: Invocation of init method failed; nested exception is or
    g.hibernate.HibernateException: Hibernate Dialect must be explicitly set
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory$1.run(AbstractAutowireCapableBeanFactory.java:409)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.createBean(AbstractAutowireCapableBeanFactory.java:380)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
    ject(AbstractBeanFactory.java:264)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
    y.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
    an(AbstractBeanFactory.java:261)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:185)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:164)
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.
    preInstantiateSingletons(DefaultListableBeanFactory.java:423)
            at org.springframework.context.support.AbstractApplicationContext.finish
    BeanFactoryInitialization(AbstractApplicationContext.java:728)
            at org.springframework.context.support.AbstractApplicationContext.refres
    h(AbstractApplicationContext.java:380)
            at org.springframework.test.context.support.AbstractGenericContextLoader
    .loadContext(AbstractGenericContextLoader.java:84)
            at org.springframework.test.context.support.AbstractGenericContextLoader
    .loadContext(AbstractGenericContextLoader.java:42)
            at org.springframework.test.context.TestContext.loadApplicationContext(T
    estContext.java:173)
            at org.springframework.test.context.TestContext.getApplicationContext(Te
    stContext.java:197)
            ... 21 more
    Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitl
    y set
            at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.
    java:57)
            at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java
    :39)
            at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.ja
    va:426)
            at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:
    128)
            at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.j
    ava:2090)
            at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2086
    )
            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
    a:1311)
            at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSession
    Factory(LocalSessionFactoryBean.java:814)
            at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessi
    onFactory(LocalSessionFactoryBean.java:732)
            at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPr
    opertiesSet(AbstractSessionFactoryBean.java:211)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
            ... 37 more
    No properties path set - looking for transactions.properties in classpath...
    transactions.properties not found - looking for jta.properties in classpath...
    Failed to open transactions properties file - using default values
    INFO  05 Dec 2011 16:50:53 org.joget.commons.util.DynamicDataSource  - datasourc
    eName=workflow, url=jdbc:mysql://localhost:3306/jwdb?characterEncoding=UTF-8, us
    er=root
    ERROR 05 Dec 2011 16:50:53 org.hibernate.util.JDBCExceptionReporter  - Cannot cr
    eate PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using
     password: NO))
    ERROR 05 Dec 2011 16:50:53 org.springframework.test.context.TestContextManager
    - Caught exception while allowing TestExecutionListener [org.springframework.tes
    t.context.support.DependencyInjectionTestExecutionListener@546d3b92] to prepare
    test instance [org.joget.directory.model.service.TestDirectoryManager@1d6b6c55]
    java.lang.IllegalStateException: Failed to load ApplicationContext
            at org.springframework.test.context.TestContext.getApplicationContext(Te
    stContext.java:201)
            at org.springframework.test.context.support.DependencyInjectionTestExecu
    tionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:10
    9)
            at org.springframework.test.context.support.DependencyInjectionTestExecu
    tionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:7
    5)
            at org.springframework.test.context.TestContextManager.prepareTestInstan
    ce(TestContextManager.java:255)
            at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.creat
    eTest(SpringJUnit4ClassRunner.java:111)
            at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invok
    eTestMethod(SpringJUnit4ClassRunner.java:148)
            at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRu
    nner.java:51)
            at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.
    java:44)
            at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.jav
    a:27)
            at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:
    37)
            at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.ja
    va:42)
            at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(S
    pringJUnit4ClassRunner.java:97)
            at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.
    java:62)
            at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
    tSet(AbstractDirectoryTestSuite.java:140)
            at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
    stractDirectoryTestSuite.java:127)
            at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
    refireBooter.java:345)
            at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
    ava:1009)
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creati
    ng bean with name 'setupSessionFactory' defined in class path resource [commonsA
    pplicationContext.xml]: Invocation of init method failed; nested exception is or
    g.hibernate.HibernateException: Hibernate Dialect must be explicitly set
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory$1.run(AbstractAutowireCapableBeanFactory.java:409)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.createBean(AbstractAutowireCapableBeanFactory.java:380)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
    ject(AbstractBeanFactory.java:264)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
    y.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
    an(AbstractBeanFactory.java:261)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:185)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:164)
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.
    preInstantiateSingletons(DefaultListableBeanFactory.java:423)
            at org.springframework.context.support.AbstractApplicationContext.finish
    BeanFactoryInitialization(AbstractApplicationContext.java:728)
            at org.springframework.context.support.AbstractApplicationContext.refres
    h(AbstractApplicationContext.java:380)
            at org.springframework.test.context.support.AbstractGenericContextLoader
    .loadContext(AbstractGenericContextLoader.java:84)
            at org.springframework.test.context.support.AbstractGenericContextLoader
    .loadContext(AbstractGenericContextLoader.java:42)
            at org.springframework.test.context.TestContext.loadApplicationContext(T
    estContext.java:173)
            at org.springframework.test.context.TestContext.getApplicationContext(Te
    stContext.java:197)
            ... 21 more
    Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitl
    y set
            at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.
    java:57)
            at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java
    :39)
            at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.ja
    va:426)
            at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:
    128)
            at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.j
    ava:2090)
            at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2086
    )
            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
    a:1311)
            at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSession
    Factory(LocalSessionFactoryBean.java:814)
            at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessi
    onFactory(LocalSessionFactoryBean.java:732)
            at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPr
    opertiesSet(AbstractSessionFactoryBean.java:211)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
            ... 37 more
    No properties path set - looking for transactions.properties in classpath...
    transactions.properties not found - looking for jta.properties in classpath...
    Failed to open transactions properties file - using default values
    INFO  05 Dec 2011 16:50:54 org.joget.commons.util.DynamicDataSource  - datasourc
    eName=workflow, url=jdbc:mysql://localhost:3306/jwdb?characterEncoding=UTF-8, us
    er=root
    ERROR 05 Dec 2011 16:50:54 org.hibernate.util.JDBCExceptionReporter  - Cannot cr
    eate PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using
     password: NO))
    ERROR 05 Dec 2011 16:50:54 org.springframework.test.context.TestContextManager
    - Caught exception while allowing TestExecutionListener [org.springframework.tes
    t.context.support.DependencyInjectionTestExecutionListener@546d3b92] to prepare
    test instance [org.joget.directory.model.service.TestDirectoryManager@f27461b]
    java.lang.IllegalStateException: Failed to load ApplicationContext
            at org.springframework.test.context.TestContext.getApplicationContext(Te
    stContext.java:201)
            at org.springframework.test.context.support.DependencyInjectionTestExecu
    tionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:10
    9)
            at org.springframework.test.context.support.DependencyInjectionTestExecu
    tionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:7
    5)
            at org.springframework.test.context.TestContextManager.prepareTestInstan
    ce(TestContextManager.java:255)
            at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.creat
    eTest(SpringJUnit4ClassRunner.java:111)
            at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invok
    eTestMethod(SpringJUnit4ClassRunner.java:148)
            at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRu
    nner.java:51)
            at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.
    java:44)
            at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.jav
    a:27)
            at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:
    37)
            at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.ja
    va:42)
            at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(S
    pringJUnit4ClassRunner.java:97)
            at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.
    java:62)
            at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
    tSet(AbstractDirectoryTestSuite.java:140)
            at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
    stractDirectoryTestSuite.java:127)
            at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
    refireBooter.java:345)
            at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
    ava:1009)
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creati
    ng bean with name 'setupSessionFactory' defined in class path resource [commonsA
    pplicationContext.xml]: Invocation of init method failed; nested exception is or
    g.hibernate.HibernateException: Hibernate Dialect must be explicitly set
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory$1.run(AbstractAutowireCapableBeanFactory.java:409)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.createBean(AbstractAutowireCapableBeanFactory.java:380)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
    ject(AbstractBeanFactory.java:264)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
    y.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
    an(AbstractBeanFactory.java:261)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:185)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:164)
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.
    preInstantiateSingletons(DefaultListableBeanFactory.java:423)
            at org.springframework.context.support.AbstractApplicationContext.finish
    BeanFactoryInitialization(AbstractApplicationContext.java:728)
            at org.springframework.context.support.AbstractApplicationContext.refres
    h(AbstractApplicationContext.java:380)
            at org.springframework.test.context.support.AbstractGenericContextLoader
    .loadContext(AbstractGenericContextLoader.java:84)
            at org.springframework.test.context.support.AbstractGenericContextLoader
    .loadContext(AbstractGenericContextLoader.java:42)
            at org.springframework.test.context.TestContext.loadApplicationContext(T
    estContext.java:173)
            at org.springframework.test.context.TestContext.getApplicationContext(Te
    stContext.java:197)
            ... 21 more
    Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitl
    y set
            at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.
    java:57)
            at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java
    :39)
            at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.ja
    va:426)
            at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:
    128)
            at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.j
    ava:2090)
            at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2086
    )
            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
    a:1311)
            at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSession
    Factory(LocalSessionFactoryBean.java:814)
            at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessi
    onFactory(LocalSessionFactoryBean.java:732)
            at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPr
    opertiesSet(AbstractSessionFactoryBean.java:211)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
            ... 37 more
    Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 3.708 sec <<< FA
    ILURE!

    1. Hi there,

      Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set

      You need to setup your wflow folder and set up the database connection first. Good luck!