ClassNotFound : Class path error from iReport


By: akmalkhan - akmalkhan
ClassNotFound : Class path error from iReport
2005-11-30 03:14
When i design report using JavaBean ,iReport is not deducting my Bean and says that Bean is not available in classpath. But i included that class into classpath using menu. But still it says error.

Pls how to connect my Bean from iReport. Where to set class path.

If you have any screen shot or demo , pls send it too.


2005 IR Help's picture
Joined: Aug 9 2006 - 3:40am
Last seen: 14 years 8 months ago

6 Answers:

Hi, I have had the same problem. No ideas found. I tried everything and I found proprietal SOULUTION. Try to copy your project jar file into iReport\lib directory. Its look strange but it works!!
veb's picture
Joined: Oct 9 2006 - 11:52pm
Last seen: 14 years 6 months ago
I encountered the same problem. After spending many hours looking at the problem, I decide to "fix" my class problem i.e. by removing the "missing" classes from my application. Painful but it works, I didnt want to put my entire project into iReport/lib directory.

I believe the problem lies with the implementation of the iReport's classpath's classloader. The "missing" classes are found in a separate classloader rather then the Class that complaints the missing class.
chungonn's picture
Joined: Nov 20 2006 - 2:24pm
Last seen: 14 years 4 months ago
And STILL this problem persists in iReport 2.0.4!!!

I have the same issue - the reports DOES compile, but there is a constant 'problem' being reported.

The class IS in the classpath, AND the package is being imported by the report.

There is no way that I can put the application in the iReport lib directory - that's NOT a solution. A PROPER fix is LONG overdue, I'd say.
sww's picture
Joined: Jan 9 2008 - 7:02pm
Last seen: 13 years 3 months ago

 I see that the previous posts are quite old but in case anyone comes across these like I did...

The way to do it now is:

Tools-> Options -> Classpath tab.

schenkjd's picture
Joined: Mar 9 2012 - 10:47am
Last seen: 1 year 7 months ago

Go to Options, select Classpath tab, include you project jar, and all set.

eflores767003's picture
Joined: Mar 30 2007 - 2:14am
Last seen: 7 years 3 months ago

In fact, You are not really need to create a JAR for the same. You can directely map your classes from the project folder. 

I am going to post my way I used to get rid of it.


1. go to "Tools->Options->iReport" and then select the CLASSPATH tab

2. click on 'Add Folder' the select the directory contains classes (eg:- "ProjectPath\target\classes") 

3. Click OK, You are done with class path now.

4. click on add DataSource Button from the top header buttons. A window will gets open.

5. Click on "New" on the right PAN of the last window.

6. Choose JavaBeans set datasource, click next.

7. enter any name you want to give to your datasource.

8. In the factory class option enter the fully qualified class path of your bean (eg: com.jasper.bean.BeanClass) 

9. Select the radio button (Either a Collection/ ArrayList depending on your bean retreiving method)

10. In The static method area give the name of the retreivaial method (eg:- listAllBean)

11. click on 'Test'

12. If you are succeed click on SAVE.

Hope it helps. 


shikharagarwal19's picture
Joined: Jun 15 2016 - 5:53am
Last seen: 4 years 9 months ago