Jump to content
Changes to the Jaspersoft community edition download ×

NoClassDefFoundError for class in jar in project


icccapital

Recommended Posts

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

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...