Author: gturrell
Date: Mon Mar 26 02:35:08 2007
New Revision: 522465
URL: http://svn.apache.org/viewvc?view=rev&rev=522465
Log:
[WODEN-154] SimpleURIResolver was attempting to create a File object (then a
FileInputStream) from a URI representing a jar URL.
Changed to use OpenStream() from the URL.
Modified:
incubator/woden/trunk/java/src/org/apache/woden/internal/resolver/SimpleURIResolver.java
Modified:
incubator/woden/trunk/java/src/org/apache/woden/internal/resolver/SimpleURIResolver.java
URL:
http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/internal/resolver/SimpleURIResolver.java?view=diff&rev=522465&r1=522464&r2=522465
==============================================================================
---
incubator/woden/trunk/java/src/org/apache/woden/internal/resolver/SimpleURIResolver.java
(original)
+++
incubator/woden/trunk/java/src/org/apache/woden/internal/resolver/SimpleURIResolver.java
Mon Mar 26 02:35:08 2007
@@ -85,7 +85,7 @@
private final String rootURLsList =
PropertyUtils.findProperty(RESOLVER_BASE_PROPERTY);
private final String schemaCatalogFile = "schema.catalog";
- private final String schemaCatalogLocation = "meta-inf/"; // eg. under
woden.jar root
+ private final String schemaCatalogLocation = "META-INF/"; // eg. under
woden.jar root
private Hashtable uriTable = null;
// logging
@@ -185,21 +185,27 @@
try
{
if (catalogURI != null) {
- catalog.load(new FileInputStream(new
File(catalogURI)));
+ catalog.load(catalogURI.toURL().openStream());
}
}
- catch (FileNotFoundException e) {
+ catch (IllegalArgumentException e) {
+ e.printStackTrace();
// treat missing properties file as empty file, ie no
resolves specified.
// TODO log this
}
+ catch (MalformedURLException e) {
+ e.printStackTrace();
+ // load() failed, continue with no resolves
+ // TODO log this
+ }
catch (IOException e) {
+ e.printStackTrace();
// load() failed, continue with no resolves
// TODO log this
}
}
return catalog;
- }
-
+ }
/**
* Construct a list of URLs from a semi-colon seperated String list of
URLs
*
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]