ExportManager.java: surrounded statement with try-catch block
authorAlexander Oppermann <a.oppermann@bgbm.org>
Tue, 11 Sep 2012 12:15:54 +0000 (12:15 +0000)
committerAlexander Oppermann <a.oppermann@bgbm.org>
Tue, 11 Sep 2012 12:15:54 +0000 (12:15 +0000)
JaxbExportWizard.java: Fixed savePath as File representation and converted it then toURI().

plugin.xml: Commented out the JaxbWizard-Menu see also #3077

eu.etaxonomy.taxeditor.cdmlib/.classpath
eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.osgi-3.7.2.v20120110-1415.jar
eu.etaxonomy.taxeditor.store/plugin.xml
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/ExportManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/JaxbExportWizard.java

index cb70cd30d2aa22615c46f4d9a7b4ebd8fc8f7103..80e78d4f9e89cc131b1a53b75d0bf0462ae3c5ab 100644 (file)
@@ -1,22 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
 <classpath>\r
-       <classpathentry exported="true" kind="lib" path="lib/postgresql-9.1-901.jdbc4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.0.13-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.0.13-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.0.13-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.0.13-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.0.13-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.0.13-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.0.13-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.0.13-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.0.13-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.0.13-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.0.13-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.0.13-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.0.13-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.0.13-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.0.13-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.0.13-SNAPSHOT.jar" sourcepath="lib/cdmlib-services-3.0.13-SNAPSHOT-sources.jar"/>\r
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>\r
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
        <classpathentry exported="true" kind="lib" path="lib/activation-1.1.jar" sourcepath="lib/activation-1.1src.zip"/>\r
        <classpathentry exported="true" kind="lib" path="lib/xstream-1.3.1.jar" sourcepath="lib/xstream-1.3.1src.zip"/>\r
        <classpathentry exported="true" kind="lib" path="lib/hibernate-envers-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-envers-3.4.0-SNAPSHOTsrc.zip"/>\r
        <classpathentry exported="true" kind="lib" path="lib/spring-xml-1.5.6.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.0.13-SNAPSHOT-sources.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.0.13-SNAPSHOT.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.0.13-SNAPSHOT-sources.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.0.13-SNAPSHOT.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.0.13-SNAPSHOT-sources.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.0.13-SNAPSHOT.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.0.13-SNAPSHOT-sources.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.0.13-SNAPSHOT.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.0.13-SNAPSHOT-sources.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.0.13-SNAPSHOT.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.0.13-SNAPSHOT-sources.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.0.13-SNAPSHOT.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.0.13-SNAPSHOT-sources.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.0.13-SNAPSHOT.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.0.13-SNAPSHOT-sources.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.0.13-SNAPSHOT.jar" sourcepath="lib/cdmlib-services-3.0.13-SNAPSHOT-sources.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/postgresql-9.1-901.jdbc4.jar"/>\r
        <classpathentry kind="output" path="target/classes"/>\r
 </classpath>\r
index 25f118068392d39fda76feea6c855dfb3633db17..f131a431cbf20a8f2194c84912950bd3e0a6485b 100644 (file)
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.osgi-3.7.2.v20120110-1415.jar and b/eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.osgi-3.7.2.v20120110-1415.jar differ
index c9cc810b911be2924812c8e4ec0639c0df5da371..dc47925fb35317e2a69c514ca875c5781c6dd4b5 100644 (file)
             id="eu.etaxonomy.taxeditor.io.import.tcs"
             name="TCS">
       </wizard>
-      <wizard
+<!--      <wizard
             category="eu.etaxonomy.taxeditor.import.category.cdm"
             class="eu.etaxonomy.taxeditor.io.wizard.JaxbImportWizard"
             id="eu.etaxonomy.taxeditor.io.import.jaxb"
             name="JAXB">
-      </wizard>
+      </wizard> -->
       <wizard
             category="eu.etaxonomy.taxeditor.import.category.cdm"
             class="eu.etaxonomy.taxeditor.io.wizard.BerlinModelImportWizard"
index d6e798f6867c84e286c7bb3dbe8b68d929511408..984b7697b94aec721f63f5b821d4be9a1e55dbf8 100644 (file)
@@ -131,10 +131,17 @@ public class ExportManager extends AbstractIOManager<IExportConfigurator> {
                                                        // trigger
                                                        // change listener
                                                        // TODO verify correct behaviour
-                                                       conversationEnabled.getConversationHolder()
+                                                       
+                                                       try{
+                                                               conversationEnabled.getConversationHolder()
                                                                        .startTransaction();
-                                                       conversationEnabled.getConversationHolder()
+                                                       
+                                                               conversationEnabled.getConversationHolder()
                                                                        .commit();
+                                                       }catch(RuntimeException e){
+                                                               StoreUtil.errorDialog("Error starting conversation handling", this, "" +
+                                                                               "Conversation Error: "+ e);
+                                                       }
                                                }
                                        }
                                });
index eada1477bbf3f1db1fe801a6323c8639bded663a..9b3b75663d000154b8d1f18744876be8440240f9 100644 (file)
@@ -49,17 +49,15 @@ public class JaxbExportWizard extends AbstractExportWizard<JaxbExportConfigurato
        /** {@inheritDoc} */
        @Override
        public boolean performFinish() {
-               try {
-                       URI urlString = new URI(page.getFolderText() + File.separator + page.getExportFileName());
-                       configurator.setDestination(urlString);
-                       CdmStore.getExportManager().run(configurator);
-                       return true;
-               } catch (URISyntaxException e) {
-                       StoreUtil.error(getClass(), "Could not run JAXB export", e);
-               }
-               
-               return false;
-               
+               boolean performFinish = false;
+               URI urlString;
+               File savePath = new File(page.getFolderText() + File.separator + page.getExportFileName());
+               urlString = savePath.toURI();
+               //orig: urlString = new URI(page.getFolderText() + File.separator + page.getExportFileName());
+               configurator.setDestination(urlString);
+               CdmStore.getExportManager().run(configurator);
+               performFinish = true;
+               return performFinish;
        }
 
        /* (non-Javadoc)