shikharagarwal19 Posted June 15, 2016 Share Posted June 15, 2016 In my project, I try to work with Hibernate, get the data in a class, and then put it in a JRBeanCollectionDataSource and work with the data in iReport.While creating Java Bean DataSource in iReport I'm getting an error message as General Problem NULL.I'm sure the issue is while getting the Session Factory, because if I comment the part in which I'm working with Hibernate code, and add a dummy value to my collection, the iReport datasource connection test is successful!But on opening just one line code which gets Hibernate Session, The problem starts. Adding code snippet of my Collection Retrieval Method:-listMapping = handlerObj.getMappingMap();[/code]for(HashMap loopMap : listMapping)[/code]{[/code]EmployeeAllocationReportBean beanObj = new EmployeeAllocationReportBean();[/code]reportRows.add(beanObj);[/code]}[/code]return reportRows;[/code] Adding code snippet from Handler Method (getMappingMap()) which uses Hibernate codes:-,>mapperDAOOj = new ProjectEmployeeMapperDAO(); //This line is causing problem [/code]empObj = mapperDAOOj .getEmployee(); [/code] Please help. Link to comment Share on other sites More sharing options...
hozawa Posted June 15, 2016 Share Posted June 15, 2016 There's a Hibernate sample at the following page.http://jasperreports.sourceforge.net/sample.reference/hibernate/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now