questions=dao.getNamedQueryResultList("getUnansweredQuestionsByCategory", new Object[]{strUser});
for(Question selectedResumes:questions) {
//do something with the SelectedResumes object
System.out.println("Unanswered::"+selectedResumes.getQuestion());
}
================================================== ==================== -
following error is coming:
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.sx.mcqs.model.Question at com.sx.mcqs.service.QuestionService.findRelatedQuestionsGame(QuestionService.java:142) at com.sx.mcqs.service.QuestionService$$FastClassByCGLIB$$cd78275c.invoke () at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689) at org.springframework.aop.framework .ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework。