[Building Sakai] Hibernate - Error in creating SessionFacto ry

Steve Swinsburg s.swinsburg at lancaster.ac.uk
Fri May 1 04:12:02 PDT 2009


Hi Mak,

Add -Dmaven.test.skip=true on your maven build command and see if it  
builds successfully. If so then it is an issue with the test of that  
particular module but is ok otherwise.


cheers,
Steve

---
Steve Swinsburg
Portal Systems Developer
Centre for e-Science
Lancaster University
Lancaster
LA1 4YT

email: s.swinsburg at lancaster.ac.uk
phone: +44 (0) 1524 594870







On 1 May 2009, at 10:57, m_yaghmaie at modares.ac.ir wrote:

> Dear all,
>
> I am trying to build Sakai 2.5.3 with Maven 2.0.9. According to  
> maven log there are some errors in running tests of CourseManagement  
> module.
>
> Tests run: 85, Failures: 0, Errors: 85, Skipped: 0
>
> [INFO]  
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]  
> ------------------------------------------------------------------------
> [INFO] There are test failures.
>
> Please refer to C:\MyProjects\M.S\Project\development\sakai\sakai- 
> src-2.5.3\sakai-src-2.5.3\course-management\cm-impl\hibernate-impl 
> \impl\m2-target\surefire-reports for the individual test results.
>
> In the test results log I found the following stack trace:
>
>   <testcase  
> classname 
> = 
> "org 
> .sakaiproject 
> .coursemanagement.test.CourseManagementAdministrationTest"  
> time="0.128" name="testCreateCanonicalCourse">
>     <error  
> type="org.springframework.beans.factory.BeanCreationException"  
> message="Error creating bean with name &apos;cmSessionFactory&apos;  
> defined in class path resource [spring-test.xml]: Invocation of init  
> method failed; nested exception is java.lang.NoClassDefFoundError:  
> org/hibernate/ 
> ConnectionReleaseMode 
> ">org.springframework.beans.factory.BeanCreationException: Error  
> creating bean with name &apos;cmSessionFactory&apos; defined in  
> class path resource [spring-test.xml]: Invocation of init method  
> failed; nested exception is java.lang.NoClassDefFoundError: org/ 
> hibernate/ConnectionReleaseMode
> Caused by: java.lang.NoClassDefFoundError: org/hibernate/ 
> ConnectionReleaseMode
>     at  
> org 
> .springframework 
> .orm 
> .hibernate3 
> .LocalSessionFactoryBean 
> .buildSessionFactory(LocalSessionFactoryBean.java:593)
>     at  
> org 
> .springframework 
> .orm 
> .hibernate3 
> .AbstractSessionFactoryBean 
> .afterPropertiesSet(AbstractSessionFactoryBean.java:134)
>     at  
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .AbstractAutowireCapableBeanFactory 
> .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
>     at  
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .AbstractAutowireCapableBeanFactory 
> .initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
>     at  
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .AbstractAutowireCapableBeanFactory 
> .createBean(AbstractAutowireCapableBeanFactory.java:425)
>     at org.springframework.beans.factory.support.AbstractBeanFactory 
> $1.getObject(AbstractBeanFactory.java:251)
>     at  
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .DefaultSingletonBeanRegistry 
> .getSingleton(DefaultSingletonBeanRegistry.java:156)
>     at  
> org 
> .springframework 
> .beans 
> .factory 
> .support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>     at  
> org 
> .springframework 
> .beans 
> .factory 
> .support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>     at  
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .DefaultListableBeanFactory 
> .preInstantiateSingletons(DefaultListableBeanFactory.java:284)
>     at  
> org 
> .springframework 
> .context 
> .support 
> .AbstractApplicationContext.refresh(AbstractApplicationContext.java: 
> 352)
>     at  
> org 
> .springframework 
> .test 
> .AbstractSingleSpringContextTests 
> .createApplicationContext(AbstractSingleSpringContextTests.java:199)
>     at  
> org 
> .springframework 
> .test 
> .AbstractSingleSpringContextTests 
> .loadContextLocations(AbstractSingleSpringContextTests.java:179)
>     at  
> org 
> .springframework 
> .test 
> .AbstractSingleSpringContextTests 
> .loadContext(AbstractSingleSpringContextTests.java:158)
>     at  
> org 
> .springframework 
> .test 
> .AbstractSpringContextTests 
> .getContext(AbstractSpringContextTests.java:105)
>     at  
> org 
> .springframework 
> .test 
> .AbstractSingleSpringContextTests 
> .setUp(AbstractSingleSpringContextTests.java:87)
>     at junit.framework.TestCase.runBare(TestCase.java:125)
>     at  
> org 
> .springframework 
> .test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
>     at junit.framework.TestResult$1.protect(TestResult.java:106)
>     at junit.framework.TestResult.runProtected(TestResult.java:124)
>     at junit.framework.TestResult.run(TestResult.java:109)
>     at junit.framework.TestCase.run(TestCase.java:118)
>     at junit.framework.TestSuite.runTest(TestSuite.java:208)
>     at junit.framework.TestSuite.run(TestSuite.java:203)
>     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 
> .apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java: 
> 213)
>     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:585)
>     at  
> org 
> .apache 
> .maven 
> .surefire 
> .booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
>     at  
> org 
> .apache 
> .maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
>
> I found out that it has s.th to do with hibernate and session  
> factory. I am using MySql 5.0 and I have created the 'sakai' schema  
> there. Would you tell me what's wrong?
>
> Thanks in advance,
> Mak
> <mime-attachment.txt>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2437 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090501/7745c081/attachment.bin 


More information about the sakai-dev mailing list