icccapital Posted July 19, 2012 Share Posted July 19, 2012 I am trying to test a report that uses java beans for its data source. The createBeanCollection method uses MyBatis to fill the java beans and returns a list of the beans. The application runs fine filling the beans and returning the list of beans from createBeanCollection when I test it. But when I try to preview the report in IReport i get the error below. When I compile the report I can run it in the application and everything works fine. I am trying to edit the look of the report with live data, but can't easily because of this issue. the org/apache/ibatis/io/Resources class is in the mybatis jar, which is in the dist/lib of the project. java.lang.reflect.InvocationTargetException 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 com.jaspersoft.ireport.designer.connection.JavaBeanDataSourceConnection.getJRDataSource(JavaBeanDataSourceConnection.java:163) at com.jaspersoft.ireport.designer.IReportConnection.getJRDataSource(IReportConnection.java:71) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:914) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Caused by: java.lang.NoClassDefFoundError: org/apache/ibatis/io/Resources at org.myapp.controller.MyBatisHelper.getSession(MyBatisHelper.java:27) at testbean.TestBean.createBeanCollection(TestBean.java:37) ... 9 more 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