Reputation: 2105
I am using JasperReports 5.6 via API. I am building a report using iReport. The problem is that I've already set a jar with bean factory in the classpath of iReport as
com.myname.beanproject.beanpackage.BeanFactoryClass
Also I set up static method to call a list of beans:
getListEntries
but still getting a error while testing a connection. What am I doing wrong?
Error is not helpful at all:
General problem: null
As I can see, the problem is not in classpath neither factory: when I change any, the error is changing either to
"No class found"
(if I add something to class name)
or
"General problem: com.myname.beanproject.beanpackage.BeanFactoryClass.getListEntries11111()"
(if I add 11111 to the name of factory method to test)
Upvotes: 3
Views: 1781
Reputation: 75
Your getListEntries()
method should be static and public too
that way , ireport can deal with it :)
i ran into the same problem, i had put my method like that
protected static getmyBeans().....
i fix the connection test after i put
public static getmyBeans().....
in my factoryClass so check your method defenition and dont forget to rebuild your jar code and restart ireport good luck, and sorry if i do mistakes in my english language
Upvotes: 3
Reputation: 447
I just ran into the same problem. Your getListEntries() method should be static. That fixed it for me.
Upvotes: 0