Can't load Schema [message #1153] |
Fri, 27 September 2002 19:20 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: troynet+web.ugcs.net
I'm trying the example from Shane Curcuru's article:
ResourceSet resourceSet = new ResourceSetImpl();
XSDResourceImpl xsdSchemaResource = /* line 40 */
(XSDResourceImpl) resourceSet.getResource(
URI.createDeviceURI( schemaURL, true));
and my schemaURL looks like this:
file:/home/troy/xxml/schema/xxml.xsd
But I get this error when I run:
Exception in thread "main" java.lang.RuntimeException: Cannot create a
resource for ' + uri + '
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:271)
at org.xxml.schema.Schema.<init>(Schema.java:40)
at org.xxml.schema.SchemaUI.main(SchemaUI.java:112)
Why would I get this error?
|
|
|
Re: Can't load Schema [message #1209 is a reply to message #1153] |
Fri, 27 September 2002 23:01 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: merks.ca.ibm.com
--------------E5DBCA926C9F9D2CE489D2E8
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Troy,
When running within Eclipse, the plugin environment does initialization that must be done
manually if you are running stand-alone.
http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javadoc/org/eclipse/xsd/util/XSDPrototypicalSchema .html#printSchema(java.lang.String)
In particular, you need to register a resouce factory to handle .xsd files. It can be done
in the global registry in this way:
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd", new
XSDResourceFactoryImpl());
Within Eclipse, this is done by the plugin.xml registration.
Troy Bridoux wrote:
> I'm trying the example from Shane Curcuru's article:
>
> ResourceSet resourceSet = new ResourceSetImpl();
> XSDResourceImpl xsdSchemaResource = /* line 40 */
> (XSDResourceImpl) resourceSet.getResource(
> URI.createDeviceURI( schemaURL, true));
>
> and my schemaURL looks like this:
> file:/home/troy/xxml/schema/xxml.xsd
>
> But I get this error when I run:
>
> Exception in thread "main" java.lang.RuntimeException: Cannot create a
> resource for ' + uri + '
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:271)
> at org.xxml.schema.Schema.<init>(Schema.java:40)
> at org.xxml.schema.SchemaUI.main(SchemaUI.java:112)
>
> Why would I get this error?
--
Ed Merks
--------------E5DBCA926C9F9D2CE489D2E8
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Troy,
<p>When running within Eclipse, the plugin environment does initialization
that must be done manually if you are running stand-alone.
<p> <a href=" http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javadoc/org/eclipse/xsd/util/XSDPrototypicalSchema .html#printSchema(java.lang.String)"> http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javadoc/org/eclipse/xsd/util/XSDPrototypicalSchema .html#printSchema(java.lang.String)</a>
<p>In particular, you need to register a resouce factory to handle .xsd
files. It can be done in the global registry in this way:
<blockquote> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd",
new XSDResourceFactoryImpl());</blockquote>
Within Eclipse, this is done by the plugin.xml registration.
<br>
<p>Troy Bridoux wrote:
<blockquote TYPE=CITE>I'm trying the example from Shane Curcuru's article:
<p>ResourceSet resourceSet = new ResourceSetImpl();
<br>XSDResourceImpl xsdSchemaResource =   ;   ;
/* line 40 */
<br> (XSDResourceImpl) resourceSet.getResource(
<br> URI.createDeviceURI( schemaURL, true));
<p>and my schemaURL looks like this:
<br><a href="file:/home/troy/xxml/schema/xxml.xsd">file:/home/troy/xxml/schema/xxml.xsd </a>
<p>But I get this error when I run:
<p>Exception in thread "main" java.lang.RuntimeException: Cannot create
a
<br>resource for ' + uri + '
<br> at
<br> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:271)
<br> at org.xxml.schema.Schema.<init>(Schema.java:40)
<br> at org.xxml.schema.SchemaUI.main(SchemaUI.java:112)
<p>Why would I get this error?</blockquote>
<p>--
<br>Ed Merks
<br> </html>
--------------E5DBCA926C9F9D2CE489D2E8--
|
|
|
Re: Can't load Schema [message #562662 is a reply to message #1153] |
Fri, 27 September 2002 23:01 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Ed Merks![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=ed.merks%40gmail.com) Messages: 33205 Registered: July 2009 |
Senior Member |
|
|
--------------E5DBCA926C9F9D2CE489D2E8
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Troy,
When running within Eclipse, the plugin environment does initialization that must be done
manually if you are running stand-alone.
http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javadoc/org/eclipse/xsd/util/XSDPrototypicalSchema .html#printSchema(java.lang.String)
In particular, you need to register a resouce factory to handle .xsd files. It can be done
in the global registry in this way:
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd", new
XSDResourceFactoryImpl());
Within Eclipse, this is done by the plugin.xml registration.
Troy Bridoux wrote:
> I'm trying the example from Shane Curcuru's article:
>
> ResourceSet resourceSet = new ResourceSetImpl();
> XSDResourceImpl xsdSchemaResource = /* line 40 */
> (XSDResourceImpl) resourceSet.getResource(
> URI.createDeviceURI( schemaURL, true));
>
> and my schemaURL looks like this:
> file:/home/troy/xxml/schema/xxml.xsd
>
> But I get this error when I run:
>
> Exception in thread "main" java.lang.RuntimeException: Cannot create a
> resource for ' + uri + '
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:271)
> at org.xxml.schema.Schema.<init>(Schema.java:40)
> at org.xxml.schema.SchemaUI.main(SchemaUI.java:112)
>
> Why would I get this error?
--
Ed Merks
--------------E5DBCA926C9F9D2CE489D2E8
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Troy,
<p>When running within Eclipse, the plugin environment does initialization
that must be done manually if you are running stand-alone.
<p> <a href=" http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javadoc/org/eclipse/xsd/util/XSDPrototypicalSchema .html#printSchema(java.lang.String)"> http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javadoc/org/eclipse/xsd/util/XSDPrototypicalSchema .html#printSchema(java.lang.String)</a>
<p>In particular, you need to register a resouce factory to handle .xsd
files. It can be done in the global registry in this way:
<blockquote> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd",
new XSDResourceFactoryImpl());</blockquote>
Within Eclipse, this is done by the plugin.xml registration.
<br>
<p>Troy Bridoux wrote:
<blockquote TYPE=CITE>I'm trying the example from Shane Curcuru's article:
<p>ResourceSet resourceSet = new ResourceSetImpl();
<br>XSDResourceImpl xsdSchemaResource =   ;   ;
/* line 40 */
<br> (XSDResourceImpl) resourceSet.getResource(
<br> URI.createDeviceURI( schemaURL, true));
<p>and my schemaURL looks like this:
<br><a href="file:/home/troy/xxml/schema/xxml.xsd">file:/home/troy/xxml/schema/xxml.xsd </a>
<p>But I get this error when I run:
<p>Exception in thread "main" java.lang.RuntimeException: Cannot create
a
<br>resource for ' + uri + '
<br> at
<br> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:271)
<br> at org.xxml.schema.Schema.<init>(Schema.java:40)
<br> at org.xxml.schema.SchemaUI.main(SchemaUI.java:112)
<p>Why would I get this error?</blockquote>
<p>--
<br>Ed Merks
<br> </html>
--------------E5DBCA926C9F9D2CE489D2E8--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02696 seconds