reset password
Author Message
pchavda
Posts: 12
Posted 03:29 Jan 30, 2016 |

Hello Professor,

When i am taking File(java.io.File) as a datatype for transcript i am getting following error while running test case.

org.springframework.orm.jpa.JpaSystemException: org.hibernate.type.SerializationException: could not deserialize; nested exception is javax.persistence.PersistenceException: org.hibernate.type.SerializationException: could not deserialize

    at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:418)

    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:418)

    at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:59)

    at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213)

    at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:147)

    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)

    at com.sun.proxy.$Proxy40.getUsers(Unknown Source)

    at gapp.model.dao.UserDaoTest.getStudentApplication(UserDaoTest.java:29)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:606)

    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)

    at org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:197)

    at org.springframework.test.context.testng.AbstractTestNGSpringContextTests.run(AbstractTestNGSpringContextTests.java:175)

    at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:209)

    at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)

    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820)

    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128)

    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)

    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)

    at org.testng.TestRunner.privateRun(TestRunner.java:782)

    at org.testng.TestRunner.run(TestRunner.java:632)

    at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)

    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)

    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)

    at org.testng.SuiteRunner.run(SuiteRunner.java:268)

    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)

    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)

    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)

    at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)

    at org.testng.TestNG.run(TestNG.java:1064)

    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:113)

    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:206)

    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:177)

when i am using string type for transcript it works fine. what could be the best datatype for File type (i.e. transcript)

Thanks

 

 

cysun
Posts: 2935
Posted 09:41 Jan 30, 2016 |

Please see this.

pchavda
Posts: 12
Posted 12:22 Jan 30, 2016 |
cysun wrote:

Please see this.

Thanks