Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Registered resource factory problem
Registered resource factory problem [message #584225] Tue, 16 March 2004 15:47
Hayden Marchant is currently offline Hayden MarchantFriend
Messages: 90
Registered: July 2009
Member
I am trying to run the Eclipse XSD parser within Weblogic 8.1 App Server.
I am using XSD 1.1.1 and this version has worked fine in all other
execution environments.

In my code, I register the xsd resource factory with the following code:

ResourceSet resourceSet = new ResourceSetImpl();

resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put( "*",
new XSDResourceFactoryImpl());

I use the wildcard '*' since I want all files that go through this parser
to be treated as xsd's to allow for bad file names.

I am getting the following exception when trying to read an xsd which is
called a few lines after the resource factory registry:

java.lang.RuntimeException: Cannot create a resource for
'zip:E:/bea/user_projects/domains/unicorn/myserver/.wlnotdel ete/extract/myserver_unicorn_unicorn/jarfil
es/WEB-INF/lib/xsd.resources36809.jar!/org/eclipse/xsd/plugi n.properties/cache/www.w3.org/2001/XMLSchema-instance.xsd';
a registered resource factory is needed
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:282)
at
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaInstance(XSDSche maImpl.java:710)
at
org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2039)
at
org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1485)
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
at
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
at
org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 88)
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)


Thanks,
Hayden Marchant
Previous Topic:Any tools for reducing a schema?
Next Topic:Registered resource factory problem
Goto Forum:
  


Current Time: Mon Oct 26 08:47:33 GMT 2020

Powered by FUDForum. Page generated in 0.01682 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top