Bug #561
closedError Export and Export to zip
0%
Description
Now the morpho code in CVS head has a problem in both export and export to zip
action. When I tried these actions and I got a error:
java.lang.NoClassDefFoundError: org/apache/xerces/framework/XMLParser
[java] at java.lang.Class.forName0(Native Method)
[java] at java.lang.Class.forName(Class.java:120)
[java] at
org.apache.xalan.xslt.XSLTEngineImpl.<init>(XSLTEngineImpl.java:360)
[java] at
org.apache.xalan.xslt.XSLTProcessorFactory.getProcessor(XSLTProcessorFactory.java:79)
[java] at
edu.ucsb.nceas.morpho.datapackage.DataPackage.export(DataPackage.java:1262)
[java] at
edu.ucsb.nceas.morpho.datapackage.DataPackagePlugin.export(DataPackagePlugin.java:218)
[java] at
edu.ucsb.nceas.morpho.query.ResultPanel.exportDataset(ResultPanel.java:518)
[java] at
edu.ucsb.nceas.morpho.query.ResultPanel.access$2800(ResultPanel.java:70)
[java] at
edu.ucsb.nceas.morpho.query.ResultPanel$8.construct(ResultPanel.java:1288)
[java] at
edu.ucsb.nceas.morpho.framework.SwingWorker$2.run(SwingWorker.java:140)
For export I can get a package without the html file even the error happend.
But for export to zip, I got nothing.
I tried the 1.1.2 release (Windows), the export and export to zip works fine.
Updated by Matt Jones over 22 years ago
This is likely a classloader issue, where an alternate CL is not able to search
the classpath. Make sure that the current ClassLoader is being used for loading
objects dynamically. This is reliably done (I think) by calling:
ClassLoader cl = Thread.getContextClassLoader();
and then using cl to instantiate the object.
Reassigned to Tao.
Updated by Jing Tao over 22 years ago
Matthew wrote a new class named XMLTransformer which is based on the Xalan
2.4.0. In export method, the new class was used.
In export zip action, a zip filter was added too.
Now both export and export zip workes fine.