Jump to content
We've recently updated our Privacy Statement, available here ×

ClassNotFound : Class path error from iReport


2005 IR Help

Recommended Posts

By: akmalkhan - akmalkhan
ClassNotFound : Class path error from iReport
2005-11-30 03:14
Hi
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.

Thanks!

Link to comment
Share on other sites

  • 2 months later...
  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

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.

Link to comment
Share on other sites

  • 1 year later...

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.

Link to comment
Share on other sites

  • 4 years later...
  • 1 year later...
  • 2 years later...

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:- "ProjectPathtargetclasses") 

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. 

Enjoy. 

Link to comment
Share on other sites

  • 5 years later...

It look like you are trying to use external bean

For that 

step -1: create a jar for that class 

step-2: add to class path of that jar

step -3: Then while adding class file to jar import it by selecting the complete properties and change language from java to groovy.

Hope this helps

Link to comment
Share on other sites

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...