Jump to content

Exception loading Custom DataSource FieldsProvider


levas

Recommended Posts

I am using iReport 3.6.2 (embedded in Netbeans) and have a custom datasource that I am migrating from the old iReport 3.0.0 stand-alone style.

While migrating, among other changes, I changed the FieldsProvider from it.businesslogic.ireport.FieldsProvider to com.jaspersoft.ireport.designer.FieldsProvider.

Then I place my custom data source jar in some directory and set the iReport classpath to point to it.  For example I edit the ireport.properties file and create a line that looks like:

IREPORT_CLASSPATH=;C\:\\Downloads\\JasperSoft\\iReport\\3.6.2\\iReport-3.6.2-src\\build\\testuserdir\\lib\\MyCustomDataSource.jar;C\:\\Downloads\\JasperSoft\\iReport\\3.6.2\\iReport-3.6.2-src\\build\\cluster\\modules\\ext\\jasperreports-extensions-3.5.3.jar

When I run iReport I see the classpath set in the options. 

I also set up a query executor for my custom datasource, setting the language name, the executor factory class name and the fields provider class name. I am positive that the class names I set are correct.

So when I create a report, edit the query, and set the language to my custom data source's language, a ClassNotFoundException is thrown.  The exeption from the log file is included.

I walked through the source and found that my when the class is being loaded by the class loader the excption is being thrown. This is around line 1276 in ReportQueryDialog.java.  I assume is a classpath problem.

any help on this would be appreciated.

Thanks,

Rob

 

Code:
java.lang.NoClassDefFoundError: com/jaspersoft/ireport/designer/FieldsProvider	at java.lang.ClassLoader.defineClass1(Native Method)	at java.lang.ClassLoader.defineClass(ClassLoader.java:621)	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)	at java.net.URLClassLoader.access$000(URLClassLoader.java:56)	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)	at java.security.AccessController.doPrivileged(Native Method)	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)	at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:211)	at java.lang.ClassLoader.loadClass(ClassLoader.java:300)	at java.lang.ClassLoader.loadClass(ClassLoader.java:300)	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)	at java.lang.Class.forName0(Native Method)	at java.lang.Class.forName(Class.java:247)	at com.jaspersoft.ireport.designer.data.ReportQueryDialog.jComboBoxQueryTypeActionPerformed(ReportQueryDialog.java:1279)	at com.jaspersoft.ireport.designer.data.ReportQueryDialog.access$1000(ReportQueryDialog.java:75)	at com.jaspersoft.ireport.designer.data.ReportQueryDialog$5.actionPerformed(ReportQueryDialog.java:790)	at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1240)	at javax.swing.JComboBox.setSelectedItem(JComboBox.java:567)	at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:603)	at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:816)	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)	at java.awt.Component.processMouseEvent(Component.java:6216)	at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)	at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:480)	at java.awt.Component.processEvent(Component.java:5981)	at java.awt.Container.processEvent(Container.java:2041)	at java.awt.Component.dispatchEventImpl(Component.java:4583)	at java.awt.Container.dispatchEventImpl(Container.java:2099)	at java.awt.Component.dispatchEvent(Component.java:4413)	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)	at java.awt.Container.dispatchEventImpl(Container.java:2085)	at java.awt.Window.dispatchEventImpl(Window.java:2475)	at java.awt.Component.dispatchEvent(Component.java:4413)	at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)	at java.awt.Dialog$1.run(Dialog.java:1051)	at java.awt.Dialog$3.run(Dialog.java:1103)	at java.security.AccessController.doPrivileged(Native Method)	at java.awt.Dialog.show(Dialog.java:1101)	at java.awt.Component.show(Component.java:1516)	at java.awt.Component.setVisible(Component.java:1468)	at java.awt.Window.setVisible(Window.java:841)	at java.awt.Dialog.setVisible(Dialog.java:991)	at com.jaspersoft.ireport.designer.menu.OpenQueryDialogAction.performAction(OpenQueryDialogAction.java:59)	at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:118)	at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:77)	at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:114)	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)	at java.awt.Component.processMouseEvent(Component.java:6216)	at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)	at java.awt.Component.processEvent(Component.java:5981)	at java.awt.Container.processEvent(Container.java:2041)	at java.awt.Component.dispatchEventImpl(Component.java:4583)	at java.awt.Container.dispatchEventImpl(Container.java:2099)	at java.awt.Component.dispatchEvent(Component.java:4413)	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)	at java.awt.Container.dispatchEventImpl(Container.java:2085)	at java.awt.Window.dispatchEventImpl(Window.java:2475)	at java.awt.Component.dispatchEvent(Component.java:4413)	at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)Caused by: java.lang.ClassNotFoundException: com.jaspersoft.ireport.designer.FieldsProvider	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)	at java.security.AccessController.doPrivileged(Native Method)	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)	... 83 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

Popular Days

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