Jump to content
JasperReports Library 7.0 is now available ×

Unable to read attributes on JBean DataSource


RoseRoo

Recommended Posts

Hello everyone~

 

I got 2 java beans in classpath of iReport.

In iReport, [Database]-[JavaBean DataSource]

set bean full package & class name, click [Read attributes],

it should read bean attribute automatically right?

 

I got 2 beans, bean#A's attributes in one bean can

be read correctly by iReport,

but bean#B can't.

Click [Read attributes] but nothing happen,

no error message, no response, just like the

click event was ravened.

 

What's going on?

I can read & use bean#B yesterday......

Link to comment
Share on other sites

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

Top Posters In This Topic

Top Posters In This Topic

I am now having a similar problem. I can read the attributes of all beans except one. :( I am using iReport version 2.0. I enter the 'path' to the bean click the button and nothing happens. Any other bean in the same package shows the fields fine.

 

I can not nest this problem bean in another bean and drill-down to the attributes that way either.

 

I have read them from this bean in the past. I'm not sure if I was able to read the attributes using version 2.0 of iReport. I can, though, open the report in version 1.3 of iReport and read the attributes of this bean fine.

 

Any suggestions would be appreciated. Thanks.

Link to comment
Share on other sites

Turns out I had somehow removed a required jar from the classpath. :blush:

 

I found that running the source, a

java.lang.NoClassDefFoundError

showed up and didn't manifest itself in an error dialog or the console:

 

Code:
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/objectstyle/cayenne/CayenneDataObject
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
at it.businesslogic.ireport.ReportClassLoader.loadClassData(ReportClassLoader.java:424)
at it.businesslogic.ireport.ReportClassLoader.findClass(ReportClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
at it.businesslogic.ireport.ReportClassLoader.loadClassData(ReportClassLoader.java:424)
at it.businesslogic.ireport.ReportClassLoader.findClass(ReportClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
at it.businesslogic.ireport.ReportClassLoader.loadClassData(ReportClassLoader.java:424)
at it.businesslogic.ireport.ReportClassLoader.findClass(ReportClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethods(Class.java:1791)
at java.beans.Introspector$1.run(Introspector.java:1272)
at java.security.AccessController.doPrivileged(Native Method)
at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1270)
at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1136)
at java.beans.Introspector.getBeanInfo(Introspector.java:387)
at java.beans.Introspector.getBeanInfo(Introspector.java:159)
at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptors(PropertyUtilsBean.java:896)
at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptors(PropertyUtils.java:326)
at it.businesslogic.ireport.data.BeanInspectorPanel.exploreBean(BeanInspectorPanel.java:340)
at it.businesslogic.ireport.data.BeanInspectorPanel.setClassName(BeanInspectorPanel.java:104)
at it.businesslogic.ireport.gui.ReportQueryDialog.jButtonReadBeanAttributes3ActionPerformed(ReportQueryDialog.java:1424)
...
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...