Author: dgeraskov
Date: 2011-12-08 09:35:04 -0500 (Thu, 08 Dec 2011)
New Revision: 37114
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
Log:
https://issues.jboss.org/browse/JBIDE-10277
Fix zip file closed problem which appeared because of redundant reinitialization of class
loader
Also there is a problem with orm.xml validation
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2011-12-08
14:34:41 UTC (rev 37113)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2011-12-08
14:35:04 UTC (rev 37114)
@@ -367,7 +367,7 @@
}
if (configXMLFile == null) {
URL url = null;
- reinitClassLoader();
+ //reinitClassLoader();
if (classLoader != null) {
url = classLoader.findResource("hibernate.cfg.xml"); //$NON-NLS-1$
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java 2011-12-08
14:34:41 UTC (rev 37113)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java 2011-12-08
14:35:04 UTC (rev 37114)
@@ -396,9 +396,10 @@
List<Throwable> errors = new ArrayList<Throwable>();
XMLHelper helper = new XMLHelper();
SAXReader saxReader = helper.createSAXReader(configXMLFile.getPath(), errors,
entityResolver);
+ saxReader.setValidation(false);
doc = saxReader.read(new InputSource( stream));
if (errors.size() != 0) {
- HibernateConsolePlugin.getDefault().logErrorMessage("invalid
configuration", (Throwable)null); //$NON-NLS-1$
+ HibernateConsolePlugin.getDefault().logErrorMessage("invalid
configuration", (Throwable[])errors.toArray(new Throwable[0])); //$NON-NLS-1$
}
}
catch (DocumentException e) {