I followed the wiki article on creating and using a custom JRDataSource adapter. After trying and retrying I keep getting the same issue no matter how I organize my code, change sources, etc. The wiki article I followed is at http://community.jaspersoft.com/wiki/how-create-and-use-jrdatasource-adapter.
When searching for the "Factory Class" portion of the "DataAdapter Wizard" it finds my "CustomDataAdapter.MyImplementation" class using the "..." search. Every time I click the "Test" button I get the following error:
net.sf.jasperreports.engine.JRException: java.lang.ClassNotFoundException: CustomDataAdapter.MyImplementation
at net.sf.jasperreports.data.ds.DataSourceDataAdapterService.contributeParameters(DataSourceDataAdapterService.java:92)
at net.sf.jasperreports.data.AbstractDataAdapterService.test(AbstractDataAdapterService.java:129)
at com.jaspersoft.studio.data.wizard.AbstractDataAdapterWizard$3.run(AbstractDataAdapterWizard.java:163)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.ClassNotFoundException: CustomDataAdapter.MyImplementation
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:175)
at net.sf.jasperreports.data.ds.DataSourceDataAdapterService.contributeParameters(DataSourceDataAdapterService.java:80)
... 3 more
I've even copied and pasted the attachment from that article into my CustomDataAdapter/MyImplementation.java file to ensure that I've not made a typo.
I'm using "MyReports" as my project name and it's also configured as the source folder on build path. I am completely new to Jaspersoft Studio so I'm hoping it's not something I'm doing incorrectly that is obvious and I'm missing it.
Recommended Comments