rudolfweber2 Posted July 14, 2014 Share Posted July 14, 2014 Hi,I currently working on an project, implementing a dataadpter to connect to our server, fetching data and displaying them inside jasperstudio. The implementation looks pretty much the same as the com.jaspersoft.studio.data.hive plugin. The only difference I see, is that the DataAdapterImpl.xml is inside my plugin.After debugging i found out, that the following line could not found the DataAdapterImpl.xml inside my plugin.mis = JRLoader.getLocationInputStream(mappingFile);Because it could not be found it throws the following exceptionCaused by: net.sf.jasperreports.engine.JRRuntimeException: org.exolab.castor.mapping.MappingException: Nested error: org.exolab.castor.xml.MarshalExceptionat net.sf.jasperreports.util.CastorUtil.write(CastorUtil.java:378)at net.sf.jasperreports.util.CastorUtil.write(CastorUtil.java:336)at net.sf.jasperreports.util.CastorUtil.write(CastorUtil.java:516)at com.jaspersoft.studio.data.DataAdapterDescriptor.toXml(DataAdapterDescriptor.java:90)at com.jaspersoft.studio.data.DataAdapterManager.cloneDataAdapter(DataAdapterManager.java:185)at com.jaspersoft.studio.data.wizard.DataAdapterWizard.createPageControls(DataAdapterWizard.java:75)at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:736) Is this a classpath problem? Maybe i have to use an extensionpoint somehow? Thanks for the help Link to comment Share on other sites More sharing options...
galfstad1 Posted July 20, 2014 Share Posted July 20, 2014 I am working on the same, but did not have a DataAdapterImpl.xml in my jar, so thank you for the tip. I have not re-tested yet.I wonder if it could be your PLUGIN_ID in your Activator class. This should be your code package name. I had quite a bit of troubles getting the icon to show on my New Data Adapter Dialog, it was the plugin id, as it is used to find the root path to icons. Perhaps the same with the DataAdapterImpl.xml. Link to comment Share on other sites More sharing options...
galfstad1 Posted July 21, 2014 Share Posted July 21, 2014 Make sure that your jasperreports_extension.properties has a line like:net.sf.jasperreports.extension.repository.castor.mapping.mongodb=com/jaspersoft/mongodb/adapter/MongoDbDataAdapterImpl.xmlSeems it must get the path from that file. Link to comment Share on other sites More sharing options...
leika Posted August 30, 2014 Share Posted August 30, 2014 Hi, im fightend the Same Issue at the Moment. I wonder if you succeeded. From my debugging it looks like the Hbase pluging gets the file IS via classloading (context loader). I'm still testing why my plugin doesn't succeed. File name and path looking good, but the ContextClassloader doesn't see the file. My eclipse Plattform coding is a bit rusty so I don't remember the exact architecture of the Classloader Architecture, something I need to do some relase arch on I think stefan Link to comment Share on other sites More sharing options...
leika Posted August 31, 2014 Share Posted August 31, 2014 Hi All, in case this still matters. I found the tricky Bit :-) To enable classloading to see the mappin.xml ressource what you'd need to do is to add a Buddy registration to your plugin/Manifest file Eclipse-BuddyPolicy: registeredEclipse-RegisterBuddy: com.jaspersoft.studio.dataThis one did the trick for me :-)Stefan Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now