Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Schema locations
Schema locations [message #42696] Thu, 29 April 2004 11:03 Go to next message
Eclipse UserFriend
Originally posted by: invalid.soft-gems.net

Hi group,

Currently I'm trying to find a consistent solution to load an XML schema
together will all its imported, included and redefined schemas. Until now
I have two versions to load schemas. One loads a schema fine when it is
located in an Eclipse project (with relative path name). It can also load
the schema from the file system when given with absolute path.

XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
xsdSchemaResource.setURI(URI.createURI(schemaName));
InputStream stream =
getClass().getClassLoader().getResourceAsStream(schemaName);
if (stream == null)
stream = new FileInputStream(schemaName);

if (stream != null)
{
try
{
xsdSchemaResource.load(stream, null);
schemas.add(xsdSchemaResource.getSchema());
}
catch(Exception e)
{
...
}
}

The second one can load schemas from the file system when I specify the
file:// protocol.

URI uri = URI.createURI(schemaLocation);
ResourceSet resourceSet = new ResourceSetImpl();
XSDResourceImpl xsdResource =
(XSDResourceImpl)resourceSet.getResource(uri, true);
schemas.add(xsdResource.getSchema());

My problem is now: the second version also loads all included etc. schemas
so I have the full hierarchy (which is the final goal for me). But it does
only so when given an absolute file (or another valid URI I suppose,
haven't tried). It cannot load schemas from the resource of an Eclipse
project. The first version in contrast does not load included schemas, but
only loads the main file.

So my question is: How can I make a combined version so that regardless of
the actual location of the schema (URL, local file, resouce file -> maybe
in jar) the main schema file and all those, which are referenced by it (or
recursively by the others) are loaded successfully?

I already looked at the traceLoading sample code, which uses an URI map,
however this does not help for resource files. I would need stream support
for a generic solution, but I have not found any stream reference in the
documentation.

Mike
--
www.soft-gems.net
Re: Schema locations [message #42727 is a reply to message #42696] Thu, 29 April 2004 12:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Mike,

For relative locations in a document to resolve, the URI of the document must
be an absolute URI. Have a look at XSDMainTest in org.eclipse.xsd.test to
see how it makes sure an input "path" is turned into an absolute URI.

For loading from a "class loader resource", use the URL returned by
getClass().getClassLoader().getResource(...) as the URI of the schema
resource. This should give you an absolute URI against which the relative
schemaLocation URIs can be resolved. Hopefully its a jar: scheme because zip:
doesn't work, I don't think. If it's zip:, please let me know.


Mike Lischke wrote:

> Hi group,
>
> Currently I'm trying to find a consistent solution to load an XML schema
> together will all its imported, included and redefined schemas. Until now
> I have two versions to load schemas. One loads a schema fine when it is
> located in an Eclipse project (with relative path name). It can also load
> the schema from the file system when given with absolute path.
>
> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
> xsdSchemaResource.setURI(URI.createURI(schemaName));
> InputStream stream =
> getClass().getClassLoader().getResourceAsStream(schemaName);
> if (stream == null)
> stream = new FileInputStream(schemaName);
>
> if (stream != null)
> {
> try
> {
> xsdSchemaResource.load(stream, null);
> schemas.add(xsdSchemaResource.getSchema());
> }
> catch(Exception e)
> {
> ...
> }
> }
>
> The second one can load schemas from the file system when I specify the
> file:// protocol.
>
> URI uri = URI.createURI(schemaLocation);
> ResourceSet resourceSet = new ResourceSetImpl();
> XSDResourceImpl xsdResource =
> (XSDResourceImpl)resourceSet.getResource(uri, true);
> schemas.add(xsdResource.getSchema());
>
> My problem is now: the second version also loads all included etc. schemas
> so I have the full hierarchy (which is the final goal for me). But it does
> only so when given an absolute file (or another valid URI I suppose,
> haven't tried). It cannot load schemas from the resource of an Eclipse
> project. The first version in contrast does not load included schemas, but
> only loads the main file.
>
> So my question is: How can I make a combined version so that regardless of
> the actual location of the schema (URL, local file, resouce file -> maybe
> in jar) the main schema file and all those, which are referenced by it (or
> recursively by the others) are loaded successfully?
>
> I already looked at the traceLoading sample code, which uses an URI map,
> however this does not help for resource files. I would need stream support
> for a generic solution, but I have not found any stream reference in the
> documentation.
>
> Mike
> --
> www.soft-gems.net
Re: Schema locations [message #42758 is a reply to message #42727] Thu, 29 April 2004 13:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: invalid.soft-gems.net

Ed Merks wrote:

> For relative locations in a document to resolve, the URI of the document must
> be an absolute URI. Have a look at XSDMainTest in org.eclipse.xsd.test to
> see how it makes sure an input "path" is turned into an absolute URI.

Since my include schema files can again include other schema files all
with relative file names, it seems I have to set up some URL mapping. Is
this correct?

> For loading from a "class loader resource", use the URL returned by
> getClass().getClassLoader().getResource(...) as the URI of the schema
> resource. This should give you an absolute URI against which the relative
> schemaLocation URIs can be resolved.

This does suprisingly not work, simply because getResource() returns an
invalid file URL. It looks like:

file:D:/projects/.....

so the double slash is missing after the protocol and hence
URIConverterImpl.createInputStream does not find the file. As I can't
imagine that this is a bug I supposed there must be something missing on
my side. But what?


>Hopefully its a jar: scheme because zip:
> doesn't work, I don't think. If it's zip:, please let me know.

Yes, it will be a jar once I have finished development. Until then it is
just a file in one of my Eclipse projects.

Thank you for your help Ed.

Mike
--
www.soft-gems.net
Re: Schema locations [message #42789 is a reply to message #42758] Thu, 29 April 2004 14:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Mike,

No you shouldn't need to do anything fancy like a URI map. As long as the URI of
the resource is a proper hierarchical absolute URI, relative locations will resolve
properly and find the right absolute resources. For a URI to be hierarchical,
according to the RFC (see javadoc for our URI class), the scheme must be followed
by a "/" (and to be absolute there must be a scheme.). So this file:D: thing is
bogus. You should "massage" the URL you get to not be bogus and then all should
work well...


Mike Lischke wrote:

> Ed Merks wrote:
>
> > For relative locations in a document to resolve, the URI of the document must
> > be an absolute URI. Have a look at XSDMainTest in org.eclipse.xsd.test to
> > see how it makes sure an input "path" is turned into an absolute URI.
>
> Since my include schema files can again include other schema files all
> with relative file names, it seems I have to set up some URL mapping. Is
> this correct?
>
> > For loading from a "class loader resource", use the URL returned by
> > getClass().getClassLoader().getResource(...) as the URI of the schema
> > resource. This should give you an absolute URI against which the relative
> > schemaLocation URIs can be resolved.
>
> This does suprisingly not work, simply because getResource() returns an
> invalid file URL. It looks like:
>
> file:D:/projects/.....
>
> so the double slash is missing after the protocol and hence
> URIConverterImpl.createInputStream does not find the file. As I can't
> imagine that this is a bug I supposed there must be something missing on
> my side. But what?
>
> >Hopefully its a jar: scheme because zip:
> > doesn't work, I don't think. If it's zip:, please let me know.
>
> Yes, it will be a jar once I have finished development. Until then it is
> just a file in one of my Eclipse projects.
>
> Thank you for your help Ed.
>
> Mike
> --
> www.soft-gems.net
Re: Schema locations [message #42883 is a reply to message #42789] Fri, 30 April 2004 06:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: invalid.soft-gems.net

Ed Merks wrote:

> You should "massage" the URL you get to not be bogus and then all should
> work well...

Yep, works great. Thanks!

Mike
--
www.soft-gems.net
Re: Schema locations [message #54045 is a reply to message #42696] Thu, 14 October 2004 04:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wtrichards.bigpond.com

Mike,
I saw that you have been discussing xsd on the news group. I am new to =
the Schema Infoset and an having some problems opening a file from a =
file. I have the follwoing method and continuelly get exceptions when =
trying to be the Resource. I was wounder if you have the time could you =
look at my method and provide some guidence.

private static XSDSchema loadXSDSchema(File xsdFile) {
String schemaName = xsdFile.getPath();
try {
URI uri = URI.createURI(schemaName);
ResourceSet resourceSet = new ResourceSetImpl();
XSDResourceImpl xsdResource =
(XSDResourceImpl)resourceSet.getResource(uri, true);
XSDSchema resultSchema = xsdResource.getSchema();
} catch (Exception e) {
e.printStackTrace();
}
return null;
}

the exception is:
java.lang.RuntimeException: Cannot create a resource for =
'E:\DublinCore1.xsd'; a registered resource factory is needed

at =
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
etImpl.java:282)

at =
schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
ava:26)

at =
schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
er.java:35)

at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)

at
=org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)

at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)

at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)

at xmlProcessing.xmlUI.main(xmlUI.java:257)

Any help would be appreciated.

Regards

Wayne



Mike Lischke wrote:

> Hi group,

> Currently I'm trying to find a consistent solution to load an XML schema
> together will all its imported, included and redefined schemas. Until now
> I have two versions to load schemas. One loads a schema fine when it is
> located in an Eclipse project (with relative path name). It can also load
> the schema from the file system when given with absolute path.

> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
> xsdSchemaResource.setURI(URI.createURI(schemaName));
> InputStream stream =
> getClass().getClassLoader().getResourceAsStream(schemaName);
> if (stream == null)
> stream = new FileInputStream(schemaName);

> if (stream != null)
> {
> try
> {
> xsdSchemaResource.load(stream, null);
> schemas.add(xsdSchemaResource.getSchema());
> }
> catch(Exception e)
> {
> ...
> }
> }

> The second one can load schemas from the file system when I specify the
> file:// protocol.

> URI uri = URI.createURI(schemaLocation);
> ResourceSet resourceSet = new ResourceSetImpl();
> XSDResourceImpl xsdResource =
> (XSDResourceImpl)resourceSet.getResource(uri, true);
> schemas.add(xsdResource.getSchema());

> My problem is now: the second version also loads all included etc. schemas
> so I have the full hierarchy (which is the final goal for me). But it does
> only so when given an absolute file (or another valid URI I suppose,
> haven't tried). It cannot load schemas from the resource of an Eclipse
> project. The first version in contrast does not load included schemas, but
> only loads the main file.

> So my question is: How can I make a combined version so that regardless of
> the actual location of the schema (URL, local file, resouce file -> maybe
> in jar) the main schema file and all those, which are referenced by it (or
> recursively by the others) are loaded successfully?

> I already looked at the traceLoading sample code, which uses an URI map,
> however this does not help for resource files. I would need stream support
> for a generic solution, but I have not found any stream reference in the
> documentation.

> Mike
> --
> www.soft-gems.net
Re: Schema locations [message #54072 is a reply to message #54045] Thu, 14 October 2004 10:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------070403080103000103000208
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Wayne,

A file system path is not a URI and the "\" character is not treated as
"/" in a URI. If you have a file path, use URI.createFileURI to convert
it to a proper URI. E.g., E:\DublinCore1.xsd should be
file:/E:/DublinCore.xsd


Wayne wrote:

>Mike,
>I saw that you have been discussing xsd on the news group. I am new to =
>the Schema Infoset and an having some problems opening a file from a =
>file. I have the follwoing method and continuelly get exceptions when =
>trying to be the Resource. I was wounder if you have the time could you =
>look at my method and provide some guidence.
>
> private static XSDSchema loadXSDSchema(File xsdFile) {
> String schemaName = xsdFile.getPath();
> try {
> URI uri = URI.createURI(schemaName);
> ResourceSet resourceSet = new ResourceSetImpl();
> XSDResourceImpl xsdResource =
>(XSDResourceImpl)resourceSet.getResource(uri, true);
> XSDSchema resultSchema = xsdResource.getSchema();
> } catch (Exception e) {
> e.printStackTrace();
> }
> return null;
> }
>
>the exception is:
>java.lang.RuntimeException: Cannot create a resource for =
>'E:\DublinCore1.xsd'; a registered resource factory is needed
>
>at =
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>etImpl.java:282)
>
>at =
> schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>ava:26)
>
>at =
> schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>er.java:35)
>
>at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>
>at
> =org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>
>at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>
>at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>
>at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>
>at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>
>at xmlProcessing.xmlUI.main(xmlUI.java:257)
>
>Any help would be appreciated.
>
>Regards
>
>Wayne
>
>
>
>Mike Lischke wrote:
>
>
>
>>Hi group,
>>
>>
>
>
>
>>Currently I'm trying to find a consistent solution to load an XML schema
>>together will all its imported, included and redefined schemas. Until now
>>I have two versions to load schemas. One loads a schema fine when it is
>>located in an Eclipse project (with relative path name). It can also load
>>the schema from the file system when given with absolute path.
>>
>>
>
>
>
>> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
>> xsdSchemaResource.setURI(URI.createURI(schemaName));
>> InputStream stream =
>> getClass().getClassLoader().getResourceAsStream(schemaName);
>> if (stream == null)
>> stream = new FileInputStream(schemaName);
>>
>>
>
>
>
>> if (stream != null)
>> {
>> try
>> {
>> xsdSchemaResource.load(stream, null);
>> schemas.add(xsdSchemaResource.getSchema());
>> }
>> catch(Exception e)
>> {
>> ...
>> }
>> }
>>
>>
>
>
>
>>The second one can load schemas from the file system when I specify the
>>file:// protocol.
>>
>>
>
>
>
>> URI uri = URI.createURI(schemaLocation);
>> ResourceSet resourceSet = new ResourceSetImpl();
>> XSDResourceImpl xsdResource =
>>(XSDResourceImpl)resourceSet.getResource(uri, true);
>> schemas.add(xsdResource.getSchema());
>>
>>
>
>
>
>>My problem is now: the second version also loads all included etc. schemas
>>so I have the full hierarchy (which is the final goal for me). But it does
>>only so when given an absolute file (or another valid URI I suppose,
>>haven't tried). It cannot load schemas from the resource of an Eclipse
>>project. The first version in contrast does not load included schemas, but
>>only loads the main file.
>>
>>
>
>
>
>>So my question is: How can I make a combined version so that regardless of
>>the actual location of the schema (URL, local file, resouce file -> maybe
>>in jar) the main schema file and all those, which are referenced by it (or
>>recursively by the others) are loaded successfully?
>>
>>
>
>
>
>>I already looked at the traceLoading sample code, which uses an URI map,
>>however this does not help for resource files. I would need stream support
>>for a generic solution, but I have not found any stream reference in the
>>documentation.
>>
>>
>
>
>
>>Mike
>>--
>>www.soft-gems.net
>>
>>
>
>
>
>


--------------070403080103000103000208
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Wayne,<br>
<br>
A file system path is not a URI and the "\" character is not treated as
"/" in a URI.
Re: Schema locations [message #55925 is a reply to message #54072] Mon, 06 December 2004 11:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ooi.de.ibm.com

Hi!

I've tried using the URI.createFileURI instead of URI.createURI and i got
the following exception:

java.lang.RuntimeException: Cannot create a resource for
'file:/C:/workspace/eCute4ODI/import/wsrf-WS-ResourcePropert ies-1.2-draft-01.xsd';
a registered resource factory is needed

what could be the problem?


Ed Merks wrote:

> Wayne,

> A file system path is not a URI and the "" character is not treated as
> "/" in a URI. If you have a file path, use URI.createFileURI to convert
> it to a proper URI. E.g., E:DublinCore1.xsd should be
> file:/E:/DublinCore.xsd


> Wayne wrote:

>>Mike,
>>I saw that you have been discussing xsd on the news group. I am new to =
>>the Schema Infoset and an having some problems opening a file from a =
>>file. I have the follwoing method and continuelly get exceptions when =
>>trying to be the Resource. I was wounder if you have the time could you =
>>look at my method and provide some guidence.
>>
>> private static XSDSchema loadXSDSchema(File xsdFile) {
>> String schemaName = xsdFile.getPath();
>> try {
>> URI uri = URI.createURI(schemaName);
>> ResourceSet resourceSet = new ResourceSetImpl();
>> XSDResourceImpl xsdResource =
>>(XSDResourceImpl)resourceSet.getResource(uri, true);
>> XSDSchema resultSchema = xsdResource.getSchema();
>> } catch (Exception e) {
>> e.printStackTrace();
>> }
>> return null;
>> }
>>
>>the exception is:
>>java.lang.RuntimeException: Cannot create a resource for =
>>'E:DublinCore1.xsd'; a registered resource factory is needed
>>
>>at =
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>>etImpl.java:282)
>>
>>at =
>> schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>>ava:26)
>>
>>at =
>> schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>>er.java:35)
>>
>>at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>>
>>at
>> =org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>>
>>at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>
>>at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>
>>at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>
>>at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>
>>at xmlProcessing.xmlUI.main(xmlUI.java:257)
>>
>>Any help would be appreciated.
>>
>>Regards
>>
>>Wayne
>>
>>
>>
>>Mike Lischke wrote:
>>
>>
>>
>>>Hi group,
>>>
>>>
>>
>>
>>
>>>Currently I'm trying to find a consistent solution to load an XML schema
>>>together will all its imported, included and redefined schemas. Until now
>>>I have two versions to load schemas. One loads a schema fine when it is
>>>located in an Eclipse project (with relative path name). It can also load
>>>the schema from the file system when given with absolute path.
>>>
>>>
>>
>>
>>
>>> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
>>> xsdSchemaResource.setURI(URI.createURI(schemaName));
>>> InputStream stream =
>>> getClass().getClassLoader().getResourceAsStream(schemaName);
>>> if (stream == null)
>>> stream = new FileInputStream(schemaName);
>>>
>>>
>>
>>
>>
>>> if (stream != null)
>>> {
>>> try
>>> {
>>> xsdSchemaResource.load(stream, null);
>>> schemas.add(xsdSchemaResource.getSchema());
>>> }
>>> catch(Exception e)
>>> {
>>> ...
>>> }
>>> }
>>>
>>>
>>
>>
>>
>>>The second one can load schemas from the file system when I specify the
>>>file:// protocol.
>>>
>>>
>>
>>
>>
>>> URI uri = URI.createURI(schemaLocation);
>>> ResourceSet resourceSet = new ResourceSetImpl();
>>> XSDResourceImpl xsdResource =
>>>(XSDResourceImpl)resourceSet.getResource(uri, true);
>>> schemas.add(xsdResource.getSchema());
>>>
>>>
>>
>>
>>
>>>My problem is now: the second version also loads all included etc. schemas
>>>so I have the full hierarchy (which is the final goal for me). But it does
>>>only so when given an absolute file (or another valid URI I suppose,
>>>haven't tried). It cannot load schemas from the resource of an Eclipse
>>>project. The first version in contrast does not load included schemas, but
>>>only loads the main file.
>>>
>>>
>>
>>
>>
>>>So my question is: How can I make a combined version so that regardless of
>>>the actual location of the schema (URL, local file, resouce file -> maybe
>>>in jar) the main schema file and all those, which are referenced by it (or
>>>recursively by the others) are loaded successfully?
>>>
>>>
>>
>>
>>
>>>I already looked at the traceLoading sample code, which uses an URI map,
>>>however this does not help for resource files. I would need stream support
>>>for a generic solution, but I have not found any stream reference in the
>>>documentation.
>>>
>>>
>>
>>
>>
>>>Mike
>>>--
>>>www.soft-gems.net
>>>
>>>
>>
>>
>>
>>
Re: Schema locations [message #55941 is a reply to message #55925] Mon, 06 December 2004 12:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------000708030101030107000501
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

HT,

I think you get this not matter how you create the URI since it sounds
like you are running standalone and still need to do:

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


HT Ooi wrote:

> Hi!
>
> I've tried using the URI.createFileURI instead of URI.createURI and i
> got the following exception:
>
> java.lang.RuntimeException: Cannot create a resource for
> 'file:/C:/workspace/eCute4ODI/import/wsrf-WS-ResourcePropert ies-1.2-draft-01.xsd';
> a registered resource factory is needed
>
> what could be the problem?
>
>
> Ed Merks wrote:
>
>> Wayne,
>
>
>> A file system path is not a URI and the "" character is not treated
>> as "/" in a URI. If you have a file path, use URI.createFileURI to
>> convert it to a proper URI. E.g., E:DublinCore1.xsd should be
>> file:/E:/DublinCore.xsd
>
>
>
>> Wayne wrote:
>
>
>>> Mike,
>>> I saw that you have been discussing xsd on the news group. I am new
>>> to =
>>> the Schema Infoset and an having some problems opening a file from a =
>>> file. I have the follwoing method and continuelly get exceptions when =
>>> trying to be the Resource. I was wounder if you have the time could
>>> you =
>>> look at my method and provide some guidence.
>>>
>>> private static XSDSchema loadXSDSchema(File xsdFile) {
>>> String schemaName = xsdFile.getPath();
>>> try {
>>> URI uri = URI.createURI(schemaName);
>>> ResourceSet resourceSet = new ResourceSetImpl();
>>> XSDResourceImpl xsdResource =
>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>> XSDSchema resultSchema = xsdResource.getSchema();
>>> } catch (Exception e) {
>>> e.printStackTrace();
>>> }
>>> return null;
>>> }
>>>
>>> the exception is:
>>> java.lang.RuntimeException: Cannot create a resource for =
>>> 'E:DublinCore1.xsd'; a registered resource factory is needed
>>>
>>> at =
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>>>
>>> etImpl.java:282)
>>>
>>> at =
>>> schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>>>
>>> ava:26)
>>>
>>> at =
>>> schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>>>
>>> er.java:35)
>>>
>>> at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>>>
>>> at
>>> =org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>>>
>>>
>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>>
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>>
>>> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>>
>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>>
>>> at xmlProcessing.xmlUI.main(xmlUI.java:257)
>>>
>>> Any help would be appreciated.
>>>
>>> Regards
>>>
>>> Wayne
>>>
>>>
>>>
>>> Mike Lischke wrote:
>>>
>>>
>>>
>>>> Hi group,
>>>>
>>>
>>>
>>>
>>>
>>>> Currently I'm trying to find a consistent solution to load an XML
>>>> schema
>>>> together will all its imported, included and redefined schemas.
>>>> Until now
>>>> I have two versions to load schemas. One loads a schema fine when
>>>> it is
>>>> located in an Eclipse project (with relative path name). It can
>>>> also load
>>>> the schema from the file system when given with absolute path.
>>>>
>>>
>>>
>>>
>>>
>>>> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
>>>> xsdSchemaResource.setURI(URI.createURI(schemaName));
>>>> InputStream stream =
>>>> getClass().getClassLoader().getResourceAsStream(schemaName);
>>>> if (stream == null)
>>>> stream = new FileInputStream(schemaName);
>>>>
>>>
>>>
>>>
>>>
>>>> if (stream != null)
>>>> {
>>>> try
>>>> {
>>>> xsdSchemaResource.load(stream, null);
>>>> schemas.add(xsdSchemaResource.getSchema());
>>>> }
>>>> catch(Exception e)
>>>> {
>>>> ...
>>>> }
>>>> }
>>>>
>>>
>>>
>>>
>>>
>>>> The second one can load schemas from the file system when I specify
>>>> the
>>>> file:// protocol.
>>>>
>>>
>>>
>>>
>>>
>>>> URI uri = URI.createURI(schemaLocation);
>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>> XSDResourceImpl xsdResource =
>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>> schemas.add(xsdResource.getSchema());
>>>>
>>>
>>>
>>>
>>>
>>>> My problem is now: the second version also loads all included etc.
>>>> schemas
>>>> so I have the full hierarchy (which is the final goal for me). But
>>>> it does
>>>> only so when given an absolute file (or another valid URI I suppose,
>>>> haven't tried). It cannot load schemas from the resource of an Eclipse
>>>> project. The first version in contrast does not load included
>>>> schemas, but
>>>> only loads the main file.
>>>>
>>>
>>>
>>>
>>>
>>>> So my question is: How can I make a combined version so that
>>>> regardless of
>>>> the actual location of the schema (URL, local file, resouce file ->
>>>> maybe
>>>> in jar) the main schema file and all those, which are referenced by
>>>> it (or
>>>> recursively by the others) are loaded successfully?
>>>>
>>>
>>>
>>>
>>>
>>>> I already looked at the traceLoading sample code, which uses an URI
>>>> map,
>>>> however this does not help for resource files. I would need stream
>>>> support
>>>> for a generic solution, but I have not found any stream reference
>>>> in the
>>>> documentation.
>>>>
>>>
>>>
>>>
>>>
>>>> Mike
>>>> --
>>>> www.soft-gems.net
>>>>
>>>
>>>
>>>
>>>
>>>
>
>


--------------000708030101030107000501
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
HT,<br>
<br>
I think you get this not matter how you create the URI since it sounds
like you are running standalone and still need to do:<br>
<blockquote> resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put <br>
Re: Schema locations [message #57821 is a reply to message #55941] Thu, 17 February 2005 09:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johan.naudts.ing.be

Hi,

I am currently facing a similar problem, but ONLY when running inside a
Web application server (WebSphere v5.1 in this case). This is a summary
the Exception I'm getting:

java.lang.RuntimeException: Cannot create a resource for
'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
a registered resource factory is needed
[17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
[17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
[17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:611)
[17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
[17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
[17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
[17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
[17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
[17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
[17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
[17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
[17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
[17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)


java.lang.NullPointerException
at org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1475)
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2234)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1202)
at
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:827)
at org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
at
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
at
test.XsdOnlineContentParser.getSigningEnvelopeFields(XsdOnli neContentParser.java:54)
at org.apache.jsp._TestXsdParser._jspService(_TestXsdParser.jav a:80)
at
com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(Http JspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWra pper.service(JspServlet.java:344)
at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFil e(JspServlet.java:662)
at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspSe rvlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:182)
at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)

This is an excerpt from my code:

// Register resource factory first
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd",
new XSDResourceFactoryImpl());

// Create a resource set and load the main schema file into it.
ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_L OCATION,
Boolean.TRUE);
URI uri = URI.createURI(schemaURL);
Resource res = resourceSet.getResource(uri, true);
XSDResourceImpl xsdSchemaResource = (XSDResourceImpl)res;

The schemaURL = "file:/E:/Wta/Workspace/WEB WTA BROWSER TEST/XSD
Files/IngSigEnvSchema.xsd"

But again: when running standalone with exactly the same code, I don't
have this problem, so it seems to me that, inside of a servlet/JSP
container, XSD has difficulties locating some necessary files?

Can anyone help?

Thanks!
Johan



Ed Merks wrote:

> HT,

> I think you get this not matter how you create the URI since it sounds
> like you are running standalone and still need to do:

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


> HT Ooi wrote:

>> Hi!
>>
>> I've tried using the URI.createFileURI instead of URI.createURI and i
>> got the following exception:
>>
>> java.lang.RuntimeException: Cannot create a resource for
>>
'file:/C:/workspace/eCute4ODI/import/wsrf-WS-ResourcePropert ies-1.2-draft-01.xsd';
>> a registered resource factory is needed
>>
>> what could be the problem?
>>
>>
>> Ed Merks wrote:
>>
>>> Wayne,
>>
>>
>>> A file system path is not a URI and the "" character is not treated
>>> as "/" in a URI. If you have a file path, use URI.createFileURI to
>>> convert it to a proper URI. E.g., E:DublinCore1.xsd should be
>>> file:/E:/DublinCore.xsd
>>
>>
>>
>>> Wayne wrote:
>>
>>
>>>> Mike,
>>>> I saw that you have been discussing xsd on the news group. I am new
>>>> to =
>>>> the Schema Infoset and an having some problems opening a file from a =
>>>> file. I have the follwoing method and continuelly get exceptions when =
>>>> trying to be the Resource. I was wounder if you have the time could
>>>> you =
>>>> look at my method and provide some guidence.
>>>>
>>>> private static XSDSchema loadXSDSchema(File xsdFile) {
>>>> String schemaName = xsdFile.getPath();
>>>> try {
>>>> URI uri = URI.createURI(schemaName);
>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>> XSDResourceImpl xsdResource =
>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>> XSDSchema resultSchema = xsdResource.getSchema();
>>>> } catch (Exception e) {
>>>> e.printStackTrace();
>>>> }
>>>> return null;
>>>> }
>>>>
>>>> the exception is:
>>>> java.lang.RuntimeException: Cannot create a resource for =
>>>> 'E:DublinCore1.xsd'; a registered resource factory is needed
>>>>
>>>> at =
>>>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>>>>
>>>> etImpl.java:282)
>>>>
>>>> at =
>>>>
schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>>>>
>>>> ava:26)
>>>>
>>>> at =
>>>>
schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>>>>
>>>> er.java:35)
>>>>
>>>> at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>>>>
>>>> at
>>>> =org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>>>>
>>>>
>>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>>>
>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>>>
>>>> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>>>
>>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>>>
>>>> at xmlProcessing.xmlUI.main(xmlUI.java:257)
>>>>
>>>> Any help would be appreciated.
>>>>
>>>> Regards
>>>>
>>>> Wayne
>>>>
>>>>
>>>>
>>>> Mike Lischke wrote:
>>>>
>>>>
>>>>
>>>>> Hi group,
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> Currently I'm trying to find a consistent solution to load an XML
>>>>> schema
>>>>> together will all its imported, included and redefined schemas.
>>>>> Until now
>>>>> I have two versions to load schemas. One loads a schema fine when
>>>>> it is
>>>>> located in an Eclipse project (with relative path name). It can
>>>>> also load
>>>>> the schema from the file system when given with absolute path.
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
>>>>> xsdSchemaResource.setURI(URI.createURI(schemaName));
>>>>> InputStream stream =
>>>>> getClass().getClassLoader().getResourceAsStream(schemaName);
>>>>> if (stream == null)
>>>>> stream = new FileInputStream(schemaName);
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> if (stream != null)
>>>>> {
>>>>> try
>>>>> {
>>>>> xsdSchemaResource.load(stream, null);
>>>>> schemas.add(xsdSchemaResource.getSchema());
>>>>> }
>>>>> catch(Exception e)
>>>>> {
>>>>> ...
>>>>> }
>>>>> }
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> The second one can load schemas from the file system when I specify
>>>>> the
>>>>> file:// protocol.
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> URI uri = URI.createURI(schemaLocation);
>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>> XSDResourceImpl xsdResource =
>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>> schemas.add(xsdResource.getSchema());
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> My problem is now: the second version also loads all included etc.
>>>>> schemas
>>>>> so I have the full hierarchy (which is the final goal for me). But
>>>>> it does
>>>>> only so when given an absolute file (or another valid URI I suppose,
>>>>> haven't tried). It cannot load schemas from the resource of an Eclipse
>>>>> project. The first version in contrast does not load included
>>>>> schemas, but
>>>>> only loads the main file.
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> So my question is: How can I make a combined version so that
>>>>> regardless of
>>>>> the actual location of the schema (URL, local file, resouce file ->
>>>>> maybe
>>>>> in jar) the main schema file and all those, which are referenced by
>>>>> it (or
>>>>> recursively by the others) are loaded successfully?
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> I already looked at the traceLoading sample code, which uses an URI
>>>>> map,
>>>>> however this does not help for resource files. I would need stream
>>>>> support
>>>>> for a generic solution, but I have not found any stream reference
>>>>> in the
>>>>> documentation.
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> Mike
>>>>> --
>>>>> www.soft-gems.net
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>>
Re: Schema locations [message #57849 is a reply to message #57821] Thu, 17 February 2005 11:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------090006050408040801080308
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Johan,

Only "zip" and "jar" are recognized as archive schemes by
org.eclipse.emf.common.util.URI by default but some JRE sometimes use
other schemes in their class loaders, such as "wsjar". If you define
the system property "org.eclipse.emf.common.util.URI.archiveSchemes" to
be "jar zip *wsjar*" it should work correctly because of this code in
the URI class:

// Static initializer for archiveSchemes.
static
{
Set set = new HashSet();
String propertyValue =
System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");

if (propertyValue == null)
{
set.add(SCHEME_JAR);
set.add(SCHEME_ZIP);
}
else
{
for (StringTokenizer t = new StringTokenizer(propertyValue);
t.hasMoreTokens(); )
{
set.add(t.nextToken().toLowerCase());
}
}

archiveSchemes = Collections.unmodifiableSet(set);
}



Johan Naudts wrote:

> Hi,
>
> I am currently facing a similar problem, but ONLY when running inside
> a Web application server (WebSphere v5.1 in this case). This is a
> summary the Exception I'm getting:
>
> java.lang.RuntimeException: Cannot create a resource for
> 'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
> TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
> a registered resource factory is needed
> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
>
> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
>
> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:611)
>
> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
>
> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
>
> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>
> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>
> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>
> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>
> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>
> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
> test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>
>
>
> java.lang.NullPointerException
> at org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1475)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2234)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1202)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:827)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>
> at
> test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>
> at
> test.XsdOnlineContentParser.getSigningEnvelopeFields(XsdOnli neContentParser.java:54)
>
> at org.apache.jsp._TestXsdParser._jspService(_TestXsdParser.jav a:80)
> at
> com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(Http JspBase.java:89)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWra pper.service(JspServlet.java:344)
>
> at
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFil e(JspServlet.java:662)
>
> at
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspSe rvlet.java:760)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
> at
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
> at
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
> at
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
> at
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
> at
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
> at
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
> at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
> at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
> at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
> at
> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>
> at
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
> at
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
> at
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:182)
>
> at
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
> at
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
> at
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
> at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>
> This is an excerpt from my code:
>
> // Register resource factory first
> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd",
> new XSDResourceFactoryImpl());
>
> // Create a resource set and load the main schema file into it.
> ResourceSet resourceSet = new ResourceSetImpl();
> resourceSet.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_L OCATION,
> Boolean.TRUE);
> URI uri = URI.createURI(schemaURL);
> Resource res = resourceSet.getResource(uri, true);
> XSDResourceImpl xsdSchemaResource = (XSDResourceImpl)res;
> The schemaURL = "file:/E:/Wta/Workspace/WEB WTA BROWSER TEST/XSD
> Files/IngSigEnvSchema.xsd"
>
> But again: when running standalone with exactly the same code, I don't
> have this problem, so it seems to me that, inside of a servlet/JSP
> container, XSD has difficulties locating some necessary files?
>
> Can anyone help?
>
> Thanks!
> Johan
>
>
>
> Ed Merks wrote:
>
>> HT,
>
>
>> I think you get this not matter how you create the URI since it
>> sounds like you are running standalone and still need to do:
>
>
>>
>> resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put
>> ("xsd", new XSDResourceFactoryImpl());
>
>
>
>> HT Ooi wrote:
>
>
>>> Hi!
>>>
>>> I've tried using the URI.createFileURI instead of URI.createURI and
>>> i got the following exception:
>>>
>>> java.lang.RuntimeException: Cannot create a resource for
>>
> 'file:/C:/workspace/eCute4ODI/import/wsrf-WS-ResourcePropert ies-1.2-draft-01.xsd';
>
>
>>> a registered resource factory is needed
>>>
>>> what could be the problem?
>>>
>>>
>>> Ed Merks wrote:
>>>
>>>> Wayne,
>>>
>>>
>>>
>>>> A file system path is not a URI and the "" character is not treated
>>>> as "/" in a URI. If you have a file path, use URI.createFileURI to
>>>> convert it to a proper URI. E.g., E:DublinCore1.xsd should be
>>>> file:/E:/DublinCore.xsd
>>>
>>>
>>>
>>>
>>>> Wayne wrote:
>>>
>>>
>>>
>>>>> Mike,
>>>>> I saw that you have been discussing xsd on the news group. I am
>>>>> new to =
>>>>> the Schema Infoset and an having some problems opening a file from
>>>>> a =
>>>>> file. I have the follwoing method and continuelly get exceptions
>>>>> when =
>>>>> trying to be the Resource. I was wounder if you have the time
>>>>> could you =
>>>>> look at my method and provide some guidence.
>>>>>
>>>>> private static XSDSchema loadXSDSchema(File xsdFile) {
>>>>> String schemaName = xsdFile.getPath();
>>>>> try {
>>>>> URI uri = URI.createURI(schemaName);
>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>> XSDResourceImpl xsdResource =
>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>> XSDSchema resultSchema = xsdResource.getSchema();
>>>>> } catch (Exception e) {
>>>>> e.printStackTrace();
>>>>> }
>>>>> return null;
>>>>> }
>>>>>
>>>>> the exception is:
>>>>> java.lang.RuntimeException: Cannot create a resource for =
>>>>> 'E:DublinCore1.xsd'; a registered resource factory is needed
>>>>>
>>>>> at =
>>>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>
>
>>>>>
>>>>> etImpl.java:282)
>>>>>
>>>>> at =
>>>>>
> schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>
>
>>>>>
>>>>> ava:26)
>>>>>
>>>>> at =
>>>>>
> schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>
>
>>>>>
>>>>> er.java:35)
>>>>>
>>>>> at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>>>>>
>>>>> at
>>>>> =org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>>>>>
>>>>>
>>>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>>>>
>>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>>>>
>>>>> at
>>>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>>>>
>>>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>>>>
>>>>> at xmlProcessing.xmlUI.main(xmlUI.java:257)
>>>>>
>>>>> Any help would be appreciated.
>>>>>
>>>>> Regards
>>>>>
>>>>> Wayne
>>>>>
>>>>>
>>>>>
>>>>> Mike Lischke wrote:
>>>>>
>>>>>
>>>>>
>>>>>> Hi group,
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Currently I'm trying to find a consistent solution to load an XML
>>>>>> schema
>>>>>> together will all its imported, included and redefined schemas.
>>>>>> Until now
>>>>>> I have two versions to load schemas. One loads a schema fine when
>>>>>> it is
>>>>>> located in an Eclipse project (with relative path name). It can
>>>>>> also load
>>>>>> the schema from the file system when given with absolute path.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
>>>>>> xsdSchemaResource.setURI(URI.createURI(schemaName));
>>>>>> InputStream stream =
>>>>>> getClass().getClassLoader().getResourceAsStream(schemaName);
>>>>>> if (stream == null)
>>>>>> stream = new FileInputStream(schemaName);
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> if (stream != null)
>>>>>> {
>>>>>> try
>>>>>> {
>>>>>> xsdSchemaResource.load(stream, null);
>>>>>> schemas.add(xsdSchemaResource.getSchema());
>>>>>> }
>>>>>> catch(Exception e)
>>>>>> {
>>>>>> ...
>>>>>> }
>>>>>> }
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> The second one can load schemas from the file system when I
>>>>>> specify the
>>>>>> file:// protocol.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> URI uri = URI.createURI(schemaLocation);
>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>> XSDResourceImpl xsdResource =
>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>> schemas.add(xsdResource.getSchema());
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> My problem is now: the second version also loads all included
>>>>>> etc. schemas
>>>>>> so I have the full hierarchy (which is the final goal for me).
>>>>>> But it does
>>>>>> only so when given an absolute file (or another valid URI I suppose,
>>>>>> haven't tried). It cannot load schemas from the resource of an
>>>>>> Eclipse
>>>>>> project. The first version in contrast does not load included
>>>>>> schemas, but
>>>>>> only loads the main file.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> So my question is: How can I make a combined version so that
>>>>>> regardless of
>>>>>> the actual location of the schema (URL, local file, resouce file
>>>>>> -> maybe
>>>>>> in jar) the main schema file and all those, which are referenced
>>>>>> by it (or
>>>>>> recursively by the others) are loaded successfully?
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> I already looked at the traceLoading sample code, which uses an
>>>>>> URI map,
>>>>>> however this does not help for resource files. I would need
>>>>>> stream support
>>>>>> for a generic solution, but I have not found any stream reference
>>>>>> in the
>>>>>> documentation.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Mike
>>>>>> --
>>>>>> www.soft-gems.net
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>
>


--------------090006050408040801080308
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Johan,<br>
<br>
Only "zip" and "jar" are recognized as archive schemes by
org.eclipse.emf.common.util.URI by default but some JRE sometimes use
other schemes in their class loaders, such as "wsjar".
Re: Schema locations [message #57929 is a reply to message #57849] Mon, 21 February 2005 13:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johan.naudts.ing.be

Dear Ed,

that seems to solve it BUT.... now I get a NullPointerException, caused by
a ClassCastException:

[21/02/05 14:21:08:761 CET] 1e50aa55 SystemErr R
java.lang.NullPointerException
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2035)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2296)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:399)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1348)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1725)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1125)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:115)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:103)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
Code))
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled Code))
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2075)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1947)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1232)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2245)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2797)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2829)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2368)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:442)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:348)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
java.lang.reflect.Method.invoke(Method.java:386)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R
java.lang.ClassCastException:
org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaInstance(XSDSche maImpl.java:713)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2040)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1485)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2241)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
Code))
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled Code))
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
java.lang.reflect.Method.invoke(Method.java:386)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)


Any ideas?

Thanks
Johan



Ed Merks wrote:

> Johan,

> Only "zip" and "jar" are recognized as archive schemes by
> org.eclipse.emf.common.util.URI by default but some JRE sometimes use
> other schemes in their class loaders, such as "wsjar". If you define
> the system property "org.eclipse.emf.common.util.URI.archiveSchemes" to
> be "jar zip *wsjar*" it should work correctly because of this code in
> the URI class:

> // Static initializer for archiveSchemes.
> static
> {
> Set set = new HashSet();
> String propertyValue =
> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");

> if (propertyValue == null)
> {
> set.add(SCHEME_JAR);
> set.add(SCHEME_ZIP);
> }
> else
> {
> for (StringTokenizer t = new StringTokenizer(propertyValue);
> t.hasMoreTokens(); )
> {
> set.add(t.nextToken().toLowerCase());
> }
> }

> archiveSchemes = Collections.unmodifiableSet(set);
> }



> Johan Naudts wrote:

>> Hi,
>>
>> I am currently facing a similar problem, but ONLY when running inside
>> a Web application server (WebSphere v5.1 in this case). This is a
>> summary the Exception I'm getting:
>>
>> java.lang.RuntimeException: Cannot create a resource for
>> 'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>
TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
>> a registered resource factory is needed
>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
>>
>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
>>
>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:611)
>>
>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
>>
>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
>>
>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>>
>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>>
>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>>
>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>>
>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>>
>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>>
>>
>>
>> java.lang.NullPointerException
>> at org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1475)
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2234)
>>
>> at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1202)
>>
>> at
>>
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:827)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
>> at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>>
>> at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>>
>> at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>>
>> at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>>
>> at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>>
>> at
>>
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>>
>> at
>>
test.XsdOnlineContentParser.getSigningEnvelopeFields(XsdOnli neContentParser.java:54)
>>
>> at org.apache.jsp._TestXsdParser._jspService(_TestXsdParser.jav a:80)
>> at
>>
com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(Http JspBase.java:89)
>>
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> at
>>
com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWra pper.service(JspServlet.java:344)
>>
>> at
>>
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFil e(JspServlet.java:662)
>>
>> at
>> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspSe rvlet.java:760)
>>
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> at
>>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>>
>> at
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>>
>> at
>>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>>
>> at
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>>
>> at
>>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>>
>> at
>>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>>
>> at
>>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>>
>> at
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>>
>> at
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>>
>> at
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>>
>> at
>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>
>> at
>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>>
>> at
>>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>>
>> at
>>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:182)
>>
>> at
>>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>>
>> at
>>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>>
>> at
>>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>>
>> at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>
>> This is an excerpt from my code:
>>
>> // Register resource factory first
>> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd",
>> new XSDResourceFactoryImpl());
>>
>> // Create a resource set and load the main schema file into it.
>> ResourceSet resourceSet = new ResourceSetImpl();
>> resourceSet.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_L OCATION,
>> Boolean.TRUE);
>> URI uri = URI.createURI(schemaURL);
>> Resource res = resourceSet.getResource(uri, true);
>> XSDResourceImpl xsdSchemaResource = (XSDResourceImpl)res;
>> The schemaURL = "file:/E:/Wta/Workspace/WEB WTA BROWSER TEST/XSD
>> Files/IngSigEnvSchema.xsd"
>>
>> But again: when running standalone with exactly the same code, I don't
>> have this problem, so it seems to me that, inside of a servlet/JSP
>> container, XSD has difficulties locating some necessary files?
>>
>> Can anyone help?
>>
>> Thanks!
>> Johan
>>
>>
>>
>> Ed Merks wrote:
>>
>>> HT,
>>
>>
>>> I think you get this not matter how you create the URI since it
>>> sounds like you are running standalone and still need to do:
>>
>>
>>>
>>> resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put
>>> ("xsd", new XSDResourceFactoryImpl());
>>
>>
>>
>>> HT Ooi wrote:
>>
>>
>>>> Hi!
>>>>
>>>> I've tried using the URI.createFileURI instead of URI.createURI and
>>>> i got the following exception:
>>>>
>>>> java.lang.RuntimeException: Cannot create a resource for
>>>
>>
'file:/C:/workspace/eCute4ODI/import/wsrf-WS-ResourcePropert ies-1.2-draft-01.xsd';
>>
>>
>>>> a registered resource factory is needed
>>>>
>>>> what could be the problem?
>>>>
>>>>
>>>> Ed Merks wrote:
>>>>
>>>>> Wayne,
>>>>
>>>>
>>>>
>>>>> A file system path is not a URI and the "" character is not treated
>>>>> as "/" in a URI. If you have a file path, use URI.createFileURI to
>>>>> convert it to a proper URI. E.g., E:DublinCore1.xsd should be
>>>>> file:/E:/DublinCore.xsd
>>>>
>>>>
>>>>
>>>>
>>>>> Wayne wrote:
>>>>
>>>>
>>>>
>>>>>> Mike,
>>>>>> I saw that you have been discussing xsd on the news group. I am
>>>>>> new to =
>>>>>> the Schema Infoset and an having some problems opening a file from
>>>>>> a =
>>>>>> file. I have the follwoing method and continuelly get exceptions
>>>>>> when =
>>>>>> trying to be the Resource. I was wounder if you have the time
>>>>>> could you =
>>>>>> look at my method and provide some guidence.
>>>>>>
>>>>>> private static XSDSchema loadXSDSchema(File xsdFile) {
>>>>>> String schemaName = xsdFile.getPath();
>>>>>> try {
>>>>>> URI uri = URI.createURI(schemaName);
>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>> XSDResourceImpl xsdResource =
>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>> XSDSchema resultSchema = xsdResource.getSchema();
>>>>>> } catch (Exception e) {
>>>>>> e.printStackTrace();
>>>>>> }
>>>>>> return null;
>>>>>> }
>>>>>>
>>>>>> the exception is:
>>>>>> java.lang.RuntimeException: Cannot create a resource for =
>>>>>> 'E:DublinCore1.xsd'; a registered resource factory is needed
>>>>>>
>>>>>> at =
>>>>>>
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>>
>>
>>>>>>
>>>>>> etImpl.java:282)
>>>>>>
>>>>>> at =
>>>>>>
>> schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>>
>>
>>>>>>
>>>>>> ava:26)
>>>>>>
>>>>>> at =
>>>>>>
>> schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>>
>>
>>>>>>
>>>>>> er.java:35)
>>>>>>
>>>>>> at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>>>>>>
>>>>>> at
>>>>>>
=org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>>>>>>
>>>>>>
>>>>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>>>>>
>>>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>>>>>
>>>>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>>>>>
>>>>>> at xmlProcessing.xmlUI.main(xmlUI.java:257)
>>>>>>
>>>>>> Any help would be appreciated.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Wayne
>>>>>>
>>>>>>
>>>>>>
>>>>>> Mike Lischke wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hi group,
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Currently I'm trying to find a consistent solution to load an XML
>>>>>>> schema
>>>>>>> together will all its imported, included and redefined schemas.
>>>>>>> Until now
>>>>>>> I have two versions to load schemas. One loads a schema fine when
>>>>>>> it is
>>>>>>> located in an Eclipse project (with relative path name). It can
>>>>>>> also load
>>>>>>> the schema from the file system when given with absolute path.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
>>>>>>> xsdSchemaResource.setURI(URI.createURI(schemaName));
>>>>>>> InputStream stream =
>>>>>>> getClass().getClassLoader().getResourceAsStream(schemaName);
>>>>>>> if (stream == null)
>>>>>>> stream = new FileInputStream(schemaName);
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> if (stream != null)
>>>>>>> {
>>>>>>> try
>>>>>>> {
>>>>>>> xsdSchemaResource.load(stream, null);
>>>>>>> schemas.add(xsdSchemaResource.getSchema());
>>>>>>> }
>>>>>>> catch(Exception e)
>>>>>>> {
>>>>>>> ...
>>>>>>> }
>>>>>>> }
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> The second one can load schemas from the file system when I
>>>>>>> specify the
>>>>>>> file:// protocol.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> URI uri = URI.createURI(schemaLocation);
>>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>>> XSDResourceImpl xsdResource =
>>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>>> schemas.add(xsdResource.getSchema());
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> My problem is now: the second version also loads all included
>>>>>>> etc. schemas
>>>>>>> so I have the full hierarchy (which is the final goal for me).
>>>>>>> But it does
>>>>>>> only so when given an absolute file (or another valid URI I suppose,
>>>>>>> haven't tried). It cannot load schemas from the resource of an
>>>>>>> Eclipse
>>>>>>> project. The first version in contrast does not load included
>>>>>>> schemas, but
>>>>>>> only loads the main file.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> So my question is: How can I make a combined version so that
>>>>>>> regardless of
>>>>>>> the actual location of the schema (URL, local file, resouce file
>>>>>>> -> maybe
>>>>>>> in jar) the main schema file and all those, which are referenced
>>>>>>> by it (or
>>>>>>> recursively by the others) are loaded successfully?
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> I already looked at the traceLoading sample code, which uses an
>>>>>>> URI map,
>>>>>>> however this does not help for resource files. I would need
>>>>>>> stream support
>>>>>>> for a generic solution, but I have not found any stream reference
>>>>>>> in the
>>>>>>> documentation.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Mike
>>>>>>> --
>>>>>>> www.soft-gems.net
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>
Re: Schema locations [message #57956 is a reply to message #57929] Mon, 21 February 2005 14:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Johan,

The first exception looks like what would happen if the global schema
for schema can't be loaded and the second exception looks like the
global schema was loaded with an XMIResourceImpl instead of an
XSDResourceImpl and hence failed to load. Both these problems are
likely caused by the use of a scheme other than jar: or zip: in the
classpath.


Johan Naudts wrote:

> Dear Ed,
>
> that seems to solve it BUT.... now I get a NullPointerException,
> caused by a ClassCastException:
>
> [21/02/05 14:21:08:761 CET] 1e50aa55 SystemErr R
> java.lang.NullPointerException
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2035)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2296)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:399)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1348)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1725)
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1125)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:115)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:103)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
> Code))
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
> Code))
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2075)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1947)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1232)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2245)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2797)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2829)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2368)
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:442)
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:348)
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> java.lang.reflect.Method.invoke(Method.java:386)
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R
> java.lang.ClassCastException:
> org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaInstance(XSDSche maImpl.java:713)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2040)
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1485)
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2241)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
> Code))
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
> Code))
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> java.lang.reflect.Method.invoke(Method.java:386)
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>
>
> Any ideas?
>
> Thanks
> Johan
>
>
>
> Ed Merks wrote:
>
>> Johan,
>
>
>> Only "zip" and "jar" are recognized as archive schemes by
>> org.eclipse.emf.common.util.URI by default but some JRE sometimes use
>> other schemes in their class loaders, such as "wsjar". If you define
>> the system property "org.eclipse.emf.common.util.URI.archiveSchemes"
>> to be "jar zip *wsjar*" it should work correctly because of this code
>> in the URI class:
>
>
>> // Static initializer for archiveSchemes.
>> static
>> {
>> Set set = new HashSet();
>> String propertyValue =
>>
>> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");
>
>
>> if (propertyValue == null)
>> {
>> set.add(SCHEME_JAR);
>> set.add(SCHEME_ZIP);
>> }
>> else
>> {
>> for (StringTokenizer t = new StringTokenizer(propertyValue);
>> t.hasMoreTokens(); )
>> {
>> set.add(t.nextToken().toLowerCase());
>> }
>> }
>
>
>> archiveSchemes = Collections.unmodifiableSet(set);
>> }
>
>
>
>
>> Johan Naudts wrote:
>
>
>>> Hi,
>>>
>>> I am currently facing a similar problem, but ONLY when running
>>> inside a Web application server (WebSphere v5.1 in this case). This
>>> is a summary the Exception I'm getting:
>>>
>>> java.lang.RuntimeException: Cannot create a resource for
>>> 'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>
> TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
>
>
>>> a registered resource factory is needed
>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
>
>
>>>
>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
>
>
>>>
>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:611)
>
>
>>>
>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>
> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
>
>
>>>
>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
>>>
>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>
>
>>>
>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>
>
>>>
>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>
>
>>>
>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>
>
>>>
>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>
>
>>>
>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
> test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>
>
>>>
>>>
>>>
>>> java.lang.NullPointerException
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1475)
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2234)
>>>
>>> at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1202)
>
>
>>>
>>> at
>>
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:827)
>
>
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
>>> at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>
>
>>>
>>> at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>
>
>>>
>>> at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>
>
>>>
>>> at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>
>
>>>
>>> at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>
>
>>>
>>> at
>>
> test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>
>
>>>
>>> at
>>
> test.XsdOnlineContentParser.getSigningEnvelopeFields(XsdOnli neContentParser.java:54)
>
>
>>>
>>> at
>>> org.apache.jsp._TestXsdParser._jspService(_TestXsdParser.jav a:80)
>>> at
>>
> com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(Http JspBase.java:89)
>
>
>>>
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>> at
>>
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWra pper.service(JspServlet.java:344)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFil e(JspServlet.java:662)
>
>
>>>
>>> at
>>> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspSe rvlet.java:760)
>>>
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>> at
>>
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
>
>>>
>>> at
>>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>>
>>> at
>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:182)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
>
>>>
>>> at
>>
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
>
>>>
>>> at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>
>>> This is an excerpt from my code:
>>>
>>> // Register resource factory first
>>> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd",
>>> new XSDResourceFactoryImpl());
>>> // Create a resource set and load the main schema file into it.
>>> ResourceSet resourceSet = new ResourceSetImpl();
>>> resourceSet.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_L OCATION,
>>> Boolean.TRUE);
>>> URI uri = URI.createURI(schemaURL);
>>> Resource res = resourceSet.getResource(uri, true);
>>> XSDResourceImpl xsdSchemaResource = (XSDResourceImpl)res;
>>> The schemaURL = "file:/E:/Wta/Workspace/WEB WTA BROWSER TEST/XSD
>>> Files/IngSigEnvSchema.xsd"
>>>
>>> But again: when running standalone with exactly the same code, I
>>> don't have this problem, so it seems to me that, inside of a
>>> servlet/JSP container, XSD has difficulties locating some necessary
>>> files?
>>>
>>> Can anyone help?
>>>
>>> Thanks!
>>> Johan
>>>
>>>
>>>
>>> Ed Merks wrote:
>>>
>>>> HT,
>>>
>>>
>>>
>>>> I think you get this not matter how you create the URI since it
>>>> sounds like you are running standalone and still need to do:
>>>
>>>
>>>
>>>>
>>>> resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put
>>>>
>>>> ("xsd", new XSDResourceFactoryImpl());
>>>
>>>
>>>
>>>
>>>> HT Ooi wrote:
>>>
>>>
>>>
>>>>> Hi!
>>>>>
>>>>> I've tried using the URI.createFileURI instead of URI.createURI
>>>>> and i got the following exception:
>>>>>
>>>>> java.lang.RuntimeException: Cannot create a resource for
>>>>
>>>>
>>>
> 'file:/C:/workspace/eCute4ODI/import/wsrf-WS-ResourcePropert ies-1.2-draft-01.xsd';
>
>
>>>
>>>
>>>>> a registered resource factory is needed
>>>>>
>>>>> what could be the problem?
>>>>>
>>>>>
>>>>> Ed Merks wrote:
>>>>>
>>>>>> Wayne,
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> A file system path is not a URI and the "" character is not
>>>>>> treated as "/" in a URI. If you have a file path, use
>>>>>> URI.createFileURI to convert it to a proper URI. E.g.,
>>>>>> E:DublinCore1.xsd should be file:/E:/DublinCore.xsd
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Wayne wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>> Mike,
>>>>>>> I saw that you have been discussing xsd on the news group. I am
>>>>>>> new to =
>>>>>>> the Schema Infoset and an having some problems opening a file
>>>>>>> from a =
>>>>>>> file. I have the follwoing method and continuelly get exceptions
>>>>>>> when =
>>>>>>> trying to be the Resource. I was wounder if you have the time
>>>>>>> could you =
>>>>>>> look at my method and provide some guidence.
>>>>>>>
>>>>>>> private static XSDSchema loadXSDSchema(File xsdFile) {
>>>>>>> String schemaName = xsdFile.getPath();
>>>>>>> try {
>>>>>>> URI uri = URI.createURI(schemaName);
>>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>>> XSDResourceImpl xsdResource =
>>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>>> XSDSchema resultSchema = xsdResource.getSchema();
>>>>>>> } catch (Exception e) {
>>>>>>> e.printStackTrace();
>>>>>>> }
>>>>>>> return null;
>>>>>>> }
>>>>>>>
>>>>>>> the exception is:
>>>>>>> java.lang.RuntimeException: Cannot create a resource for =
>>>>>>> 'E:DublinCore1.xsd'; a registered resource factory is needed
>>>>>>>
>>>>>>> at =
>>>>>>>
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>>>
>>>
>>>>>>>
>>>>>>> etImpl.java:282)
>>>>>>>
>>>>>>> at =
>>>>>>>
>>> schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>>>
>>>
>>>>>>>
>>>>>>> ava:26)
>>>>>>>
>>>>>>> at =
>>>>>>>
>>> schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>>>
>>>
>>>>>>>
>>>>>>> er.java:35)
>>>>>>>
>>>>>>> at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>>>>>>>
>>>>>>> at
>>>>>>>
> =org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>
>>>>>>>
>>>>>>>
>>>>>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>>>>>>
>>>>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>>>>>>
>>>>>>> at xmlProcessing.xmlUI.main(xmlUI.java:257)
>>>>>>>
>>>>>>> Any help would be appreciated.
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> Wayne
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Mike Lischke wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Hi group,
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Currently I'm trying to find a consistent solution to load an
>>>>>>>> XML schema
>>>>>>>> together will all its imported, included and redefined schemas.
>>>>>>>> Until now
>>>>>>>> I have two versions to load schemas. One loads a schema fine
>>>>>>>> when it is
>>>>>>>> located in an Eclipse project (with relative path name). It can
>>>>>>>> also load
>>>>>>>> the schema from the file system when given with absolute path.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
>>>>>>>> xsdSchemaResource.setURI(URI.createURI(schemaName));
>>>>>>>> InputStream stream =
>>>>>>>> getClass().getClassLoader().getResourceAsStream(schemaName);
>>>>>>>> if (stream == null)
>>>>>>>> stream = new FileInputStream(schemaName);
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> if (stream != null)
>>>>>>>> {
>>>>>>>> try
>>>>>>>> {
>>>>>>>> xsdSchemaResource.load(stream, null);
>>>>>>>> schemas.add(xsdSchemaResource.getSchema());
>>>>>>>> }
>>>>>>>> catch(Exception e)
>>>>>>>> {
>>>>>>>> ...
>>>>>>>> }
>>>>>>>> }
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> The second one can load schemas from the file system when I
>>>>>>>> specify the
>>>>>>>> file:// protocol.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> URI uri = URI.createURI(schemaLocation);
>>>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>>>> XSDResourceImpl xsdResource =
>>>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>>>> schemas.add(xsdResource.getSchema());
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> My problem is now: the second version also loads all included
>>>>>>>> etc. schemas
>>>>>>>> so I have the full hierarchy (which is the final goal for me).
>>>>>>>> But it does
>>>>>>>> only so when given an absolute file (or another valid URI I
>>>>>>>> suppose,
>>>>>>>> haven't tried). It cannot load schemas from the resource of an
>>>>>>>> Eclipse
>>>>>>>> project. The first version in contrast does not load included
>>>>>>>> schemas, but
>>>>>>>> only loads the main file.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> So my question is: How can I make a combined version so that
>>>>>>>> regardless of
>>>>>>>> the actual location of the schema (URL, local file, resouce
>>>>>>>> file -> maybe
>>>>>>>> in jar) the main schema file and all those, which are
>>>>>>>> referenced by it (or
>>>>>>>> recursively by the others) are loaded successfully?
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> I already looked at the traceLoading sample code, which uses an
>>>>>>>> URI map,
>>>>>>>> however this does not help for resource files. I would need
>>>>>>>> stream support
>>>>>>>> for a generic solution, but I have not found any stream
>>>>>>>> reference in the
>>>>>>>> documentation.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Mike
>>>>>>>> --
>>>>>>>> www.soft-gems.net
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>
>>>
>
>
Re: Schema locations [message #58108 is a reply to message #57956] Thu, 24 February 2005 08:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johan.naudts.ing.be

Dear Ed,

if I unzip xsd.resources.jar and put the directory structure in my
classpath, it works fine. So it looks as if WebSphere can't seem to solve
some resources when zipped. Could that be the reason?

thanks
Johan


Ed Merks wrote:

> Johan,

> The first exception looks like what would happen if the global schema
> for schema can't be loaded and the second exception looks like the
> global schema was loaded with an XMIResourceImpl instead of an
> XSDResourceImpl and hence failed to load. Both these problems are
> likely caused by the use of a scheme other than jar: or zip: in the
> classpath.


> Johan Naudts wrote:

>> Dear Ed,
>>
>> that seems to solve it BUT.... now I get a NullPointerException,
>> caused by a ClassCastException:
>>
>> [21/02/05 14:21:08:761 CET] 1e50aa55 SystemErr R
>> java.lang.NullPointerException
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2035)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2296)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:399)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1348)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1725)
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1125)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:115)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:103)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>> Code))
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>> Code))
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2075)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1947)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1232)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2245)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2797)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2829)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2368)
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:442)
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:348)
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>> java.lang.reflect.Method.invoke(Method.java:386)
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R
>> java.lang.ClassCastException:
>> org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaInstance(XSDSche maImpl.java:713)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2040)
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1485)
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2241)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>> Code))
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>> Code))
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> java.lang.reflect.Method.invoke(Method.java:386)
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>
>>
>> Any ideas?
>>
>> Thanks
>> Johan
>>
>>
>>
>> Ed Merks wrote:
>>
>>> Johan,
>>
>>
>>> Only "zip" and "jar" are recognized as archive schemes by
>>> org.eclipse.emf.common.util.URI by default but some JRE sometimes use
>>> other schemes in their class loaders, such as "wsjar". If you define
>>> the system property "org.eclipse.emf.common.util.URI.archiveSchemes"
>>> to be "jar zip *wsjar*" it should work correctly because of this code
>>> in the URI class:
>>
>>
>>> // Static initializer for archiveSchemes.
>>> static
>>> {
>>> Set set = new HashSet();
>>> String propertyValue =
>>>
>>> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");
>>
>>
>>> if (propertyValue == null)
>>> {
>>> set.add(SCHEME_JAR);
>>> set.add(SCHEME_ZIP);
>>> }
>>> else
>>> {
>>> for (StringTokenizer t = new StringTokenizer(propertyValue);
>>> t.hasMoreTokens(); )
>>> {
>>> set.add(t.nextToken().toLowerCase());
>>> }
>>> }
>>
>>
>>> archiveSchemes = Collections.unmodifiableSet(set);
>>> }
>>
>>
>>
>>
>>> Johan Naudts wrote:
>>
>>
>>>> Hi,
>>>>
>>>> I am currently facing a similar problem, but ONLY when running
>>>> inside a Web application server (WebSphere v5.1 in this case). This
>>>> is a summary the Exception I'm getting:
>>>>
>>>> java.lang.RuntimeException: Cannot create a resource for
>>>> 'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>>
>>
TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
>>
>>
>>>> a registered resource factory is needed
>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
>>
>>
>>>>
>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
>>
>>
>>>>
>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:611)
>>
>>
>>>>
>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>
>>
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
>>
>>
>>>>
>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>
org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
>>>>
>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>>
>>
>>>>
>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>>
>>
>>>>
>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>>
>>
>>>>
>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>>
>>
>>>>
>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>>
>>
>>>>
>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>
>>
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>>
>>
>>>>
>>>>
>>>>
>>>> java.lang.NullPointerException
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1475)
>>>> at
>>>>
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2234)
>>>>
>>>> at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1202)
>>
>>
>>>>
>>>> at
>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:827)
>>
>>
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
>>>> at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>>
>>
>>>>
>>>> at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>>
>>
>>>>
>>>> at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>>
>>
>>>>
>>>> at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>>
>>
>>>>
>>>> at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>>
>>
>>>>
>>>> at
>>>
>>
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>>
>>
>>>>
>>>> at
>>>
>>
test.XsdOnlineContentParser.getSigningEnvelopeFields(XsdOnli neContentParser.java:54)
>>
>>
>>>>
>>>> at
>>>> org.apache.jsp._TestXsdParser._jspService(_TestXsdParser.jav a:80)
>>>> at
>>>
>>
com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(Http JspBase.java:89)
>>
>>
>>>>
>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>> at
>>>
>>
com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWra pper.service(JspServlet.java:344)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFil e(JspServlet.java:662)
>>
>>
>>>>
>>>> at
>>>>
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspSe rvlet.java:760)
>>>>
>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>> at
>>>
>>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>>
>>
>>>>
>>>> at
>>>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:182)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>>
>>
>>>>
>>>> at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>
>>>> This is an excerpt from my code:
>>>>
>>>> // Register resource factory first
>>>> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd",
>>>> new XSDResourceFactoryImpl());
>>>> // Create a resource set and load the main schema file into it.
>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>> resourceSet.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_L OCATION,
>>>> Boolean.TRUE);
>>>> URI uri = URI.createURI(schemaURL);
>>>> Resource res = resourceSet.getResource(uri, true);
>>>> XSDResourceImpl xsdSchemaResource = (XSDResourceImpl)res;
>>>> The schemaURL = "file:/E:/Wta/Workspace/WEB WTA BROWSER TEST/XSD
>>>> Files/IngSigEnvSchema.xsd"
>>>>
>>>> But again: when running standalone with exactly the same code, I
>>>> don't have this problem, so it seems to me that, inside of a
>>>> servlet/JSP container, XSD has difficulties locating some necessary
>>>> files?
>>>>
>>>> Can anyone help?
>>>>
>>>> Thanks!
>>>> Johan
>>>>
>>>>
>>>>
>>>> Ed Merks wrote:
>>>>
>>>>> HT,
>>>>
>>>>
>>>>
>>>>> I think you get this not matter how you create the URI since it
>>>>> sounds like you are running standalone and still need to do:
>>>>
>>>>
>>>>
>>>>>
>>>>> resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put
>>>>>
>>>>> ("xsd", new XSDResourceFactoryImpl());
>>>>
>>>>
>>>>
>>>>
>>>>> HT Ooi wrote:
>>>>
>>>>
>>>>
>>>>>> Hi!
>>>>>>
>>>>>> I've tried using the URI.createFileURI instead of URI.createURI
>>>>>> and i got the following exception:
>>>>>>
>>>>>> java.lang.RuntimeException: Cannot create a resource for
>>>>>
>>>>>
>>>>
>>
'file:/C:/workspace/eCute4ODI/import/wsrf-WS-ResourcePropert ies-1.2-draft-01.xsd';
>>
>>
>>>>
>>>>
>>>>>> a registered resource factory is needed
>>>>>>
>>>>>> what could be the problem?
>>>>>>
>>>>>>
>>>>>> Ed Merks wrote:
>>>>>>
>>>>>>> Wayne,
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> A file system path is not a URI and the "" character is not
>>>>>>> treated as "/" in a URI. If you have a file path, use
>>>>>>> URI.createFileURI to convert it to a proper URI. E.g.,
>>>>>>> E:DublinCore1.xsd should be file:/E:/DublinCore.xsd
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Wayne wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>> Mike,
>>>>>>>> I saw that you have been discussing xsd on the news group. I am
>>>>>>>> new to =
>>>>>>>> the Schema Infoset and an having some problems opening a file
>>>>>>>> from a =
>>>>>>>> file. I have the follwoing method and continuelly get exceptions
>>>>>>>> when =
>>>>>>>> trying to be the Resource. I was wounder if you have the time
>>>>>>>> could you =
>>>>>>>> look at my method and provide some guidence.
>>>>>>>>
>>>>>>>> private static XSDSchema loadXSDSchema(File xsdFile) {
>>>>>>>> String schemaName = xsdFile.getPath();
>>>>>>>> try {
>>>>>>>> URI uri = URI.createURI(schemaName);
>>>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>>>> XSDResourceImpl xsdResource =
>>>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>>>> XSDSchema resultSchema = xsdResource.getSchema();
>>>>>>>> } catch (Exception e) {
>>>>>>>> e.printStackTrace();
>>>>>>>> }
>>>>>>>> return null;
>>>>>>>> }
>>>>>>>>
>>>>>>>> the exception is:
>>>>>>>> java.lang.RuntimeException: Cannot create a resource for =
>>>>>>>> 'E:DublinCore1.xsd'; a registered resource factory is needed
>>>>>>>>
>>>>>>>> at =
>>>>>>>>
>>>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>>>>
>>>>
>>>>>>>>
>>>>>>>> etImpl.java:282)
>>>>>>>>
>>>>>>>> at =
>>>>>>>>
>>>>
schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>>>>
>>>>
>>>>>>>>
>>>>>>>> ava:26)
>>>>>>>>
>>>>>>>> at =
>>>>>>>>
>>>>
schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>>>>
>>>>
>>>>>>>>
>>>>>>>> er.java:35)
>>>>>>>>
>>>>>>>> at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>>>>>>>>
>>>>>>>> at
>>>>>>>>
>> =org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>>>>>>>
>>>>>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>>>>>>>
>>>>>>>> at xmlProcessing.xmlUI.main(xmlUI.java:257)
>>>>>>>>
>>>>>>>> Any help would be appreciated.
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>> Wayne
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Mike Lischke wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Hi group,
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Currently I'm trying to find a consistent solution to load an
>>>>>>>>> XML schema
>>>>>>>>> together will all its imported, included and redefined schemas.
>>>>>>>>> Until now
>>>>>>>>> I have two versions to load schemas. One loads a schema fine
>>>>>>>>> when it is
>>>>>>>>> located in an Eclipse project (with relative path name). It can
>>>>>>>>> also load
>>>>>>>>> the schema from the file system when given with absolute path.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
>>>>>>>>> xsdSchemaResource.setURI(URI.createURI(schemaName));
>>>>>>>>> InputStream stream =
>>>>>>>>> getClass().getClassLoader().getResourceAsStream(schemaName);
>>>>>>>>> if (stream == null)
>>>>>>>>> stream = new FileInputStream(schemaName);
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> if (stream != null)
>>>>>>>>> {
>>>>>>>>> try
>>>>>>>>> {
>>>>>>>>> xsdSchemaResource.load(stream, null);
>>>>>>>>> schemas.add(xsdSchemaResource.getSchema());
>>>>>>>>> }
>>>>>>>>> catch(Exception e)
>>>>>>>>> {
>>>>>>>>> ...
>>>>>>>>> }
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> The second one can load schemas from the file system when I
>>>>>>>>> specify the
>>>>>>>>> file:// protocol.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> URI uri = URI.createURI(schemaLocation);
>>>>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>>>>> XSDResourceImpl xsdResource =
>>>>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>>>>> schemas.add(xsdResource.getSchema());
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> My problem is now: the second version also loads all included
>>>>>>>>> etc. schemas
>>>>>>>>> so I have the full hierarchy (which is the final goal for me).
>>>>>>>>> But it does
>>>>>>>>> only so when given an absolute file (or another valid URI I
>>>>>>>>> suppose,
>>>>>>>>> haven't tried). It cannot load schemas from the resource of an
>>>>>>>>> Eclipse
>>>>>>>>> project. The first version in contrast does not load included
>>>>>>>>> schemas, but
>>>>>>>>> only loads the main file.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> So my question is: How can I make a combined version so that
>>>>>>>>> regardless of
>>>>>>>>> the actual location of the schema (URL, local file, resouce
>>>>>>>>> file -> maybe
>>>>>>>>> in jar) the main schema file and all those, which are
>>>>>>>>> referenced by it (or
>>>>>>>>> recursively by the others) are loaded successfully?
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> I already looked at the traceLoading sample code, which uses an
>>>>>>>>> URI map,
>>>>>>>>> however this does not help for resource files. I would need
>>>>>>>>> stream support
>>>>>>>>> for a generic solution, but I have not found any stream
>>>>>>>>> reference in the
>>>>>>>>> documentation.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Mike
>>>>>>>>> --
>>>>>>>>> www.soft-gems.net
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>
Re: Schema locations [message #58182 is a reply to message #58108] Thu, 24 February 2005 11:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------010902070605020909020208
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Johan,

I believe it's still caused by WebSphere using wsjar for the things on
the classpath and the xsd.resources.jar will be on the classpath. You
earlier showed this trace:

wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d

If wsjar is not configured to be recognized as an archive scheme, this
URI will be treated as opaque. (The RFC http://www.ietf.org/rfc/rfc2396.txt
defines this term; a URI is opaque if the schema is not followed by a
/.) An opaque URI has no file extension so the .xsd in the name is not
recognized and the XSDResourceFactory is not used, resulting in either
no factory for standalone or an XMIResourceFactory for Eclipse/headless
being used.

Are you sure you've set the system property to configure the archive
schemes? All symptoms still seem to indicate you've not...


Johan Naudts wrote:

> Dear Ed,
>
> if I unzip xsd.resources.jar and put the directory structure in my
> classpath, it works fine. So it looks as if WebSphere can't seem to
> solve some resources when zipped. Could that be the reason?
>
> thanks
> Johan
>
>
> Ed Merks wrote:
>
>> Johan,
>
>
>> The first exception looks like what would happen if the global schema
>> for schema can't be loaded and the second exception looks like the
>> global schema was loaded with an XMIResourceImpl instead of an
>> XSDResourceImpl and hence failed to load. Both these problems are
>> likely caused by the use of a scheme other than jar: or zip: in the
>> classpath.
>
>
>
>> Johan Naudts wrote:
>
>
>>> Dear Ed,
>>>
>>> that seems to solve it BUT.... now I get a NullPointerException,
>>> caused by a ClassCastException:
>>>
>>> [21/02/05 14:21:08:761 CET] 1e50aa55 SystemErr R
>>> java.lang.NullPointerException
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2035)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2296)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:399)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1348)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1725)
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1125)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:115)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:103)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>
>
>>> Code))
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>> Code))
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2075)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1947)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1232)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2245)
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2797)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2829)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2368)
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:442)
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:348)
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>> java.lang.reflect.Method.invoke(Method.java:386)
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R
>>> java.lang.ClassCastException:
>>> org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaInstance(XSDSche maImpl.java:713)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2040)
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1485)
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2241)
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>
>
>>> Code))
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>> Code))
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> java.lang.reflect.Method.invoke(Method.java:386)
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>
>>>
>>> Any ideas?
>>>
>>> Thanks
>>> Johan
>>>
>>>
>>>
>>> Ed Merks wrote:
>>>
>>>> Johan,
>>>
>>>
>>>
>>>> Only "zip" and "jar" are recognized as archive schemes by
>>>> org.eclipse.emf.common.util.URI by default but some JRE sometimes
>>>> use other schemes in their class loaders, such as "wsjar". If you
>>>> define the system property
>>>> "org.eclipse.emf.common.util.URI.archiveSchemes" to be "jar zip
>>>> *wsjar*" it should work correctly because of this code in the URI
>>>> class:
>>>
>>>
>>>
>>>> // Static initializer for archiveSchemes.
>>>> static
>>>> {
>>>> Set set = new HashSet();
>>>> String propertyValue =
>>>>
>>>> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");
>>>
>>>
>>>
>>>> if (propertyValue == null)
>>>> {
>>>> set.add(SCHEME_JAR);
>>>> set.add(SCHEME_ZIP);
>>>> }
>>>> else
>>>> {
>>>> for (StringTokenizer t = new StringTokenizer(propertyValue);
>>>> t.hasMoreTokens(); )
>>>> {
>>>> set.add(t.nextToken().toLowerCase());
>>>> }
>>>> }
>>>
>>>
>>>
>>>> archiveSchemes = Collections.unmodifiableSet(set);
>>>> }
>>>
>>>
>>>
>>>
>>>
>>>> Johan Naudts wrote:
>>>
>>>
>>>
>>>>> Hi,
>>>>>
>>>>> I am currently facing a similar problem, but ONLY when running
>>>>> inside a Web application server (WebSphere v5.1 in this case).
>>>>> This is a summary the Exception I'm getting:
>>>>>
>>>>> java.lang.RuntimeException: Cannot create a resource for
>>>>> 'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>>>
>>>>
>>>
> TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
>
>
>>>
>>>
>>>>> a registered resource factory is needed
>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
>
>
>>>
>>>
>>>>>
>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
>
>
>>>
>>>
>>>>>
>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:611)
>
>
>>>
>>>
>>>>>
>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>>>>>
>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
>
>
>>>
>>>
>>>>>
>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>
> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
>
>
>>>>>
>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>
>
>>>
>>>
>>>>>
>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>
>
>>>
>>>
>>>>>
>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>
>
>>>
>>>
>>>>>
>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>
>
>>>
>>>
>>>>>
>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>
>
>>>
>>>
>>>>>
>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>
>>>>> java.lang.NullPointerException
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1475)
>>>>> at
>>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2234)
>
>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1202)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:827)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
>>>>> at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> test.XsdOnlineContentParser.getSigningEnvelopeFields(XsdOnli neContentParser.java:54)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>> org.apache.jsp._TestXsdParser._jspService(_TestXsdParser.jav a:80)
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(Http JspBase.java:89)
>
>
>>>
>>>
>>>>>
>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWra pper.service(JspServlet.java:344)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFil e(JspServlet.java:662)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspSe rvlet.java:760)
>
>
>>>>>
>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>
>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:182)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
>
>>>
>>>
>>>>>
>>>>> at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>>
>>>>> This is an excerpt from my code:
>>>>>
>>>>> // Register resource factory first
>>>>> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd",
>>>>> new XSDResourceFactoryImpl());
>>>>> // Create a resource set and load the main schema file into
>>>>> it.
>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>> resourceSet.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_L OCATION,
>>>>> Boolean.TRUE);
>>>>> URI uri = URI.createURI(schemaURL);
>>>>> Resource res = resourceSet.getResource(uri, true);
>>>>> XSDResourceImpl xsdSchemaResource = (XSDResourceImpl)res;
>>>>> The schemaURL = "file:/E:/Wta/Workspace/WEB WTA BROWSER TEST/XSD
>>>>> Files/IngSigEnvSchema.xsd"
>>>>>
>>>>> But again: when running standalone with exactly the same code, I
>>>>> don't have this problem, so it seems to me that, inside of a
>>>>> servlet/JSP container, XSD has difficulties locating some
>>>>> necessary files?
>>>>>
>>>>> Can anyone help?
>>>>>
>>>>> Thanks!
>>>>> Johan
>>>>>
>>>>>
>>>>>
>>>>> Ed Merks wrote:
>>>>>
>>>>>> HT,
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> I think you get this not matter how you create the URI since it
>>>>>> sounds like you are running standalone and still need to do:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>> resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put
>>>>>>
>>>>>> ("xsd", new XSDResourceFactoryImpl());
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> HT Ooi wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>> Hi!
>>>>>>>
>>>>>>> I've tried using the URI.createFileURI instead of URI.createURI
>>>>>>> and i got the following exception:
>>>>>>>
>>>>>>> java.lang.RuntimeException: Cannot create a resource for
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> 'file:/C:/workspace/eCute4ODI/import/wsrf-WS-ResourcePropert ies-1.2-draft-01.xsd';
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>> a registered resource factory is needed
>>>>>>>
>>>>>>> what could be the problem?
>>>>>>>
>>>>>>>
>>>>>>> Ed Merks wrote:
>>>>>>>
>>>>>>>> Wayne,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> A file system path is not a URI and the "" character is not
>>>>>>>> treated as "/" in a URI. If you have a file path, use
>>>>>>>> URI.createFileURI to convert it to a proper URI. E.g.,
>>>>>>>> E:DublinCore1.xsd should be file:/E:/DublinCore.xsd
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Wayne wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>> Mike,
>>>>>>>>> I saw that you have been discussing xsd on the news group. I
>>>>>>>>> am new to =
>>>>>>>>> the Schema Infoset and an having some problems opening a file
>>>>>>>>> from a =
>>>>>>>>> file. I have the follwoing method and continuelly get
>>>>>>>>> exceptions when =
>>>>>>>>> trying to be the Resource. I was wounder if you have the time
>>>>>>>>> could you =
>>>>>>>>> look at my method and provide some guidence.
>>>>>>>>>
>>>>>>>>> private static XSDSchema loadXSDSchema(File xsdFile) {
>>>>>>>>> String schemaName = xsdFile.getPath();
>>>>>>>>> try {
>>>>>>>>> URI uri = URI.createURI(schemaName);
>>>>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>>>>> XSDResourceImpl xsdResource =
>>>>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>>>>> XSDSchema resultSchema = xsdResource.getSchema();
>>>>>>>>> } catch (Exception e) {
>>>>>>>>> e.printStackTrace();
>>>>>>>>> }
>>>>>>>>> return null;
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> the exception is:
>>>>>>>>> java.lang.RuntimeException: Cannot create a resource for =
>>>>>>>>> 'E:DublinCore1.xsd'; a registered resource factory is needed
>>>>>>>>>
>>>>>>>>> at =
>>>>>>>>>
>>>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>
>
>>>>>
>>>>>
>>>>>>>>>
>>>>>>>>> etImpl.java:282)
>>>>>>>>>
>>>>>>>>> at =
>>>>>>>>>
>>>>>
> schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>
>
>>>>>
>>>>>
>>>>>>>>>
>>>>>>>>> ava:26)
>>>>>>>>>
>>>>>>>>> at =
>>>>>>>>>
>>>>>
> schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>
>
>>>>>
>>>>>
>>>>>>>>>
>>>>>>>>> er.java:35)
>>>>>>>>>
>>>>>>>>> at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>>
>>> =org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>>>
>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>>>>>>>>
>>>>>>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at xmlProcessing.xmlUI.main(xmlUI.java:257)
>>>>>>>>>
>>>>>>>>> Any help would be appreciated.
>>>>>>>>>
>>>>>>>>> Regards
>>>>>>>>>
>>>>>>>>> Wayne
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Mike Lischke wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Hi group,
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Currently I'm trying to find a consistent solution to load an
>>>>>>>>>> XML schema
>>>>>>>>>> together will all its imported, included and redefined
>>>>>>>>>> schemas. Until now
>>>>>>>>>> I have two versions to load schemas. One loads a schema fine
>>>>>>>>>> when it is
>>>>>>>>>> located in an Eclipse project (with relative path name). It
>>>>>>>>>> can also load
>>>>>>>>>> the schema from the file system when given with absolute path.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
>>>>>>>>>> xsdSchemaResource.setURI(URI.createURI(schemaName));
>>>>>>>>>> InputStream stream =
>>>>>>>>>> getClass().getClassLoader().getResourceAsStream(schemaName);
>>>>>>>>>> if (stream == null)
>>>>>>>>>> stream = new FileInputStream(schemaName);
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> if (stream != null)
>>>>>>>>>> {
>>>>>>>>>> try
>>>>>>>>>> {
>>>>>>>>>> xsdSchemaResource.load(stream, null);
>>>>>>>>>> schemas.add(xsdSchemaResource.getSchema());
>>>>>>>>>> }
>>>>>>>>>> catch(Exception e)
>>>>>>>>>> {
>>>>>>>>>> ...
>>>>>>>>>> }
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> The second one can load schemas from the file system when I
>>>>>>>>>> specify the
>>>>>>>>>> file:// protocol.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> URI uri = URI.createURI(schemaLocation);
>>>>>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>>>>>> XSDResourceImpl xsdResource =
>>>>>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>>>>>> schemas.add(xsdResource.getSchema());
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> My problem is now: the second version also loads all included
>>>>>>>>>> etc. schemas
>>>>>>>>>> so I have the full hierarchy (which is the final goal for
>>>>>>>>>> me). But it does
>>>>>>>>>> only so when given an absolute file (or another valid URI I
>>>>>>>>>> suppose,
>>>>>>>>>> haven't tried). It cannot load schemas from the resource of
>>>>>>>>>> an Eclipse
>>>>>>>>>> project. The first version in contrast does not load included
>>>>>>>>>> schemas, but
>>>>>>>>>> only loads the main file.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> So my question is: How can I make a combined version so that
>>>>>>>>>> regardless of
>>>>>>>>>> the actual location of the schema (URL, local file, resouce
>>>>>>>>>> file -> maybe
>>>>>>>>>> in jar) the main schema file and all those, which are
>>>>>>>>>> referenced by it (or
>>>>>>>>>> recursively by the others) are loaded successfully?
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> I already looked at the traceLoading sample code, which uses
>>>>>>>>>> an URI map,
>>>>>>>>>> however this does not help for resource files. I would need
>>>>>>>>>> stream support
>>&g
Re: Schema locations [message #58258 is a reply to message #58182] Fri, 25 February 2005 13:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johan.naudts.ing.be

Ed,

I am sure I set the system property in the WebSphere server configuration.
It will be passed as a "-D" parameter at startup. Apparently it doesn't
change anything. Is there any way I could set this parameter
programmatically instead of passing it as a system property?

Johan

Ed Merks wrote:

> Johan,

> I believe it's still caused by WebSphere using wsjar for the things on
> the classpath and the xsd.resources.jar will be on the classpath. You
> earlier showed this trace:

> wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>
TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d

> If wsjar is not configured to be recognized as an archive scheme, this
> URI will be treated as opaque. (The RFC http://www.ietf.org/rfc/rfc2396.txt
> defines this term; a URI is opaque if the schema is not followed by a
> /.) An opaque URI has no file extension so the .xsd in the name is not
> recognized and the XSDResourceFactory is not used, resulting in either
> no factory for standalone or an XMIResourceFactory for Eclipse/headless
> being used.

> Are you sure you've set the system property to configure the archive
> schemes? All symptoms still seem to indicate you've not...


> Johan Naudts wrote:

>> Dear Ed,
>>
>> if I unzip xsd.resources.jar and put the directory structure in my
>> classpath, it works fine. So it looks as if WebSphere can't seem to
>> solve some resources when zipped. Could that be the reason?
>>
>> thanks
>> Johan
>>
>>
>> Ed Merks wrote:
>>
>>> Johan,
>>
>>
>>> The first exception looks like what would happen if the global schema
>>> for schema can't be loaded and the second exception looks like the
>>> global schema was loaded with an XMIResourceImpl instead of an
>>> XSDResourceImpl and hence failed to load. Both these problems are
>>> likely caused by the use of a scheme other than jar: or zip: in the
>>> classpath.
>>
>>
>>
>>> Johan Naudts wrote:
>>
>>
>>>> Dear Ed,
>>>>
>>>> that seems to solve it BUT.... now I get a NullPointerException,
>>>> caused by a ClassCastException:
>>>>
>>>> [21/02/05 14:21:08:761 CET] 1e50aa55 SystemErr R
>>>> java.lang.NullPointerException
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2035)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2296)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:399)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1348)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1725)
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1125)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:115)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:103)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>>
>>
>>>> Code))
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>>> Code))
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2075)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1947)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1232)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2245)
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2797)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2829)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2368)
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:442)
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:348)
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>> java.lang.reflect.Method.invoke(Method.java:386)
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R
>>>> java.lang.ClassCastException:
>>>> org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaInstance(XSDSche maImpl.java:713)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2040)
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1485)
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2241)
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>>
>>
>>>> Code))
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>>> Code))
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>> java.lang.reflect.Method.invoke(Method.java:386)
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>
>>>>
>>>> Any ideas?
>>>>
>>>> Thanks
>>>> Johan
>>>>
>>>>
>>>>
>>>> Ed Merks wrote:
>>>>
>>>>> Johan,
>>>>
>>>>
>>>>
>>>>> Only "zip" and "jar" are recognized as archive schemes by
>>>>> org.eclipse.emf.common.util.URI by default but some JRE sometimes
>>>>> use other schemes in their class loaders, such as "wsjar". If you
>>>>> define the system property
>>>>> "org.eclipse.emf.common.util.URI.archiveSchemes" to be "jar zip
>>>>> *wsjar*" it should work correctly because of this code in the URI
>>>>> class:
>>>>
>>>>
>>>>
>>>>> // Static initializer for archiveSchemes.
>>>>> static
>>>>> {
>>>>> Set set = new HashSet();
>>>>> String propertyValue =
>>>>>
>>>>> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");
>>>>
>>>>
>>>>
>>>>> if (propertyValue == null)
>>>>> {
>>>>> set.add(SCHEME_JAR);
>>>>> set.add(SCHEME_ZIP);
>>>>> }
>>>>> else
>>>>> {
>>>>> for (StringTokenizer t = new StringTokenizer(propertyValue);
>>>>> t.hasMoreTokens(); )
>>>>> {
>>>>> set.add(t.nextToken().toLowerCase());
>>>>> }
>>>>> }
>>>>
>>>>
>>>>
>>>>> archiveSchemes = Collections.unmodifiableSet(set);
>>>>> }
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> Johan Naudts wrote:
>>>>
>>>>
>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I am currently facing a similar problem, but ONLY when running
>>>>>> inside a Web application server (WebSphere v5.1 in this case).
>>>>>> This is a summary the Exception I'm getting:
>>>>>>
>>>>>> java.lang.RuntimeException: Cannot create a resource for
>>>>>> 'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>>>>
>>>>>
>>>>
>>
TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
>>
>>
>>>>
>>>>
>>>>>> a registered resource factory is needed
>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:611)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>>>>>>
>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>
>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
>>
>>
>>>>>>
>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> java.lang.NullPointerException
>>>>>> at
>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1475)
>>>>>> at
>>>>>
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2234)
>>
>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1202)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:827)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
>>>>>> at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
test.XsdOnlineContentParser.getSigningEnvelopeFields(XsdOnli neContentParser.java:54)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>> org.apache.jsp._TestXsdParser._jspService(_TestXsdParser.jav a:80)
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(Http JspBase.java:89)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWra pper.service(JspServlet.java:344)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFil e(JspServlet.java:662)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspSe rvlet.java:760)
>>
>>
>>>>>>
>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>
>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:182)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>>>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>>>
>>>>>> This is an excerpt from my code:
>>>>>>
>>>>>> // Register resource factory first
>>>>>>
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd",
>>>>>> new XSDResourceFactoryImpl());
>>>>>> // Create a resource set and load the main schema file into
>>>>>> it.
>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>> resourceSet.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_L OCATION,
>>>>>> Boolean.TRUE);
>>>>>> URI uri = URI.createURI(schemaURL);
>>>>>> Resource res = resourceSet.getResource(uri, true);
>>>>>> XSDResourceImpl xsdSchemaResource = (XSDResourceImpl)res;
>>>>>> The schemaURL = "file:/E:/Wta/Workspace/WEB WTA BROWSER TEST/XSD
>>>>>> Files/IngSigEnvSchema.xsd"
>>>>>>
>>>>>> But again: when running standalone with exactly the same code, I
>>>>>> don't have this problem, so it seems to me that, inside of a
>>>>>> servlet/JSP container, XSD has difficulties locating some
>>>>>> necessary files?
>>>>>>
>>>>>> Can anyone help?
>>>>>>
>>>>>> Thanks!
>>>>>> Johan
>>>>>>
>>>>>>
>>>>>>
>>>>>> Ed Merks wrote:
>>>>>>
>>>>>>> HT,
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> I think you get this not matter how you create the URI since it
>>>>>>> sounds like you are running standalone and still need to do:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>>
resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put
>>>>>>>
>>>>>>> ("xsd", new XSDResourceFactoryImpl());
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> HT Ooi wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>> Hi!
>>>>>>>>
>>>>>>>> I've tried using the URI.createFileURI instead of URI.createURI
>>>>>>>> and i got the following exception:
>>>>>>>>
>>>>>>>> java.lang.RuntimeException: Cannot create a resource for
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
'file:/C:/workspace/eCute4ODI/import/wsrf-WS-ResourcePropert ies-1.2-draft-01.xsd';
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>> a registered resource factory is needed
>>>>>>>>
>>>>>>>> what could be the problem?
>>>>>>>>
>>>>>>>>
>>>>>>>> Ed Merks wrote:
>>>>>>>>
>>>>>>>>> Wayne,
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> A file system path is not a URI and the "" character is not
>>>>>>>>> treated as "/" in a URI. If you have a file path, use
>>>>>>>>> URI.createFileURI to convert it to a proper URI. E.g.,
>>>>>>>>> E:DublinCore1.xsd should be file:/E:/DublinCore.xsd
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Wayne wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>> Mike,
>>>>>>>>>> I saw that you have been discussing xsd on the news group. I
>>>>>>>>>> am new to =
>>>>>>>>>> the Schema Infoset and an having some problems opening a file
>>>>>>>>>> from a =
>>>>>>>>>> file. I have the follwoing method and continuelly get
>>>>>>>>>> exceptions when =
>>>>>>>>>> trying to be the Resource. I was wounder if you have the time
>>>>>>>>>> could you =
>>>>>>>>>> look at my method and provide some guidence.
>>>>>>>>>>
>>>>>>>>>> private static XSDSchema loadXSDSchema(File xsdFile) {
>>>>>>>>>> String schemaName = xsdFile.getPath();
>>>>>>>>>> try {
>>>>>>>>>> URI uri = URI.createURI(schemaName);
>>>>>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>>>>>> XSDResourceImpl xsdResource =
>>>>>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>>>>>> XSDSchema resultSchema = xsdResource.getSchema();
>>>>>>>>>> } catch (Exception e) {
>>>>>>>>>> e.printStackTrace();
>>>>>>>>>> }
>>>>>>>>>> return null;
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> the exception is:
>>>>>>>>>> java.lang.RuntimeException: Cannot create a resource for =
>>>>>>>>>> 'E:DublinCore1.xsd'; a registered resource factory is needed
>>>>>>>>>>
>>>>>>>>>> at =
>>>>>>>>>>
>>>>>>
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>>
>>
>>>>>>
>>>>>>
>>>>>>>>>>
>>>>>>>>>> etImpl.java:282)
>>>>>>>>>>
>>>>>>>>>> at =
>>>>>>>>>>
>>>>>>
>> schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>>
>>
>>>>>>
>>>>>>
>>>>>>>>>>
>>>>>>>>>> ava:26)
>>>>>>>>>>
>>>>>>>>>> at =
>>>>>>>>>>
>>>>>>
>> schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>>
>>
>>>>>>
>>>>>>
>>>>>>>>>>
>>>>>>>>>> er.java:35)
>>>>>>>>>>
>>>>>>>>>> at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>> =org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>>>>
>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>>>>>>>>>
>>>>>>>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at xmlProcessing.xmlUI.main(xmlUI.java:257)
>>>>>>>>>>
>>>>>>>>>> Any help would be appreciated.
>>>>>>>>>>
>>>>>>>>>> Regards
>>>>>>>>>>
>>>>>>>>>> Wayne
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Mike Lischke wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Hi group,
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Currently I'm trying to find a consistent solution to load an
>>>>>>>>>>> XML schema
>>>>>>>>>>> together will all its imported, included and redefined
>>>>>>>>>>> schemas. Until now
>>>>>>>>>>> I have two versions to load schemas. One loads a schema fine
>>>>>>>>>>> when it is
>>>>>>>>>>> located in an Eclipse
Re: Schema locations [message #58310 is a reply to message #58258] Fri, 25 February 2005 17:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------020804030907080609060000
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Johan,

Setting a breakpoint in the URI code that does this will help, if that's
possible to do

static
{
Set set = new HashSet();
String propertyValue =
System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");

if (propertyValue == null)
{
set.add(SCHEME_JAR);
set.add(SCHEME_ZIP);
}
else
{
for (StringTokenizer t = new StringTokenizer(propertyValue);
t.hasMoreTokens(); )
{
set.add(t.nextToken().toLowerCase());
}
}

archiveSchemes = Collections.unmodifiableSet(set);
}

You should be able to set this with System.setProperty. You should
double check that the property is indeed set to the right value.
Obviously a typo in the property name will ruin everything. Maybe it's
as simple as needing to put quotes around the space separated schemes.
in the startup parameter.


Johan Naudts wrote:

> Ed,
>
> I am sure I set the system property in the WebSphere server
> configuration. It will be passed as a "-D" parameter at startup.
> Apparently it doesn't change anything. Is there any way I could set
> this parameter programmatically instead of passing it as a system
> property?
>
> Johan
>
> Ed Merks wrote:
>
>> Johan,
>
>
>> I believe it's still caused by WebSphere using wsjar for the things
>> on the classpath and the xsd.resources.jar will be on the classpath.
>> You earlier showed this trace:
>
>
>> wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>
>
> TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d
>
>
>> If wsjar is not configured to be recognized as an archive scheme,
>> this URI will be treated as opaque. (The RFC
>> http://www.ietf.org/rfc/rfc2396.txt
>> defines this term; a URI is opaque if the schema is not followed by a
>> /.) An opaque URI has no file extension so the .xsd in the name is
>> not recognized and the XSDResourceFactory is not used, resulting in
>> either no factory for standalone or an XMIResourceFactory for
>> Eclipse/headless being used.
>
>
>> Are you sure you've set the system property to configure the archive
>> schemes? All symptoms still seem to indicate you've not...
>
>
>
>> Johan Naudts wrote:
>
>
>>> Dear Ed,
>>>
>>> if I unzip xsd.resources.jar and put the directory structure in my
>>> classpath, it works fine. So it looks as if WebSphere can't seem to
>>> solve some resources when zipped. Could that be the reason?
>>>
>>> thanks
>>> Johan
>>>
>>>
>>> Ed Merks wrote:
>>>
>>>> Johan,
>>>
>>>
>>>
>>>> The first exception looks like what would happen if the global
>>>> schema for schema can't be loaded and the second exception looks
>>>> like the global schema was loaded with an XMIResourceImpl instead
>>>> of an XSDResourceImpl and hence failed to load. Both these
>>>> problems are likely caused by the use of a scheme other than jar:
>>>> or zip: in the classpath.
>>>
>>>
>>>
>>>
>>>> Johan Naudts wrote:
>>>
>>>
>>>
>>>>> Dear Ed,
>>>>>
>>>>> that seems to solve it BUT.... now I get a NullPointerException,
>>>>> caused by a ClassCastException:
>>>>>
>>>>> [21/02/05 14:21:08:761 CET] 1e50aa55 SystemErr R
>>>>> java.lang.NullPointerException
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2035)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2296)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:399)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1348)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1725)
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1125)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:115)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:103)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>
>
>>>
>>>
>>>>> Code))
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>>>> Code))
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2075)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1947)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1232)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2245)
>
>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2797)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2829)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2368)
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:442)
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:348)
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>> java.lang.reflect.Method.invoke(Method.java:386)
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>
>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R
>>>>> java.lang.ClassCastException:
>>>>> org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaInstance(XSDSche maImpl.java:713)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2040)
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1485)
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2241)
>
>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>
>
>>>
>>>
>>>>> Code))
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>>>> Code))
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>> java.lang.reflect.Method.invoke(Method.java:386)
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>
>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>>
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> Thanks
>>>>> Johan
>>>>>
>>>>>
>>>>>
>>>>> Ed Merks wrote:
>>>>>
>>>>>> Johan,
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Only "zip" and "jar" are recognized as archive schemes by
>>>>>> org.eclipse.emf.common.util.URI by default but some JRE sometimes
>>>>>> use other schemes in their class loaders, such as "wsjar". If
>>>>>> you define the system property
>>>>>> "org.eclipse.emf.common.util.URI.archiveSchemes" to be "jar zip
>>>>>> *wsjar*" it should work correctly because of this code in the URI
>>>>>> class:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> // Static initializer for archiveSchemes.
>>>>>> static
>>>>>> {
>>>>>> Set set = new HashSet();
>>>>>> String propertyValue =
>>>>>>
>>>>>> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> if (propertyValue == null)
>>>>>> {
>>>>>> set.add(SCHEME_JAR);
>>>>>> set.add(SCHEME_ZIP);
>>>>>> }
>>>>>> else
>>>>>> {
>>>>>> for (StringTokenizer t = new
>>>>>> StringTokenizer(propertyValue);
>>>>>> t.hasMoreTokens(); )
>>>>>> {
>>>>>> set.add(t.nextToken().toLowerCase());
>>>>>> }
>>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> archiveSchemes = Collections.unmodifiableSet(set);
>>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Johan Naudts wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I am currently facing a similar problem, but ONLY when running
>>>>>>> inside a Web application server (WebSphere v5.1 in this case).
>>>>>>> This is a summary the Exception I'm getting:
>>>>>>>
>>>>>>> java.lang.RuntimeException: Cannot create a resource for
>>>>>>> 'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>> a registered resource factory is needed
>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:611)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>>>>>>>
>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
>>>
>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
>>>>>>>
>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> java.lang.NullPointerException
>>>>>>> at
>>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1475)
>>>>>>> at
>>>>>>
>>>>>>
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2234)
>>>
>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1202)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:827)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> test.XsdOnlineContentParser.getSigningEnvelopeFields(XsdOnli neContentParser.java:54)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.apache.jsp._TestXsdParser._jspService(_TestXsdParser.jav a:80)
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(Http JspBase.java:89)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWra pper.service(JspServlet.java:344)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFil e(JspServlet.java:662)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspSe rvlet.java:760)
>>>
>>>
>>>>>>>
>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>>
>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:182)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
Re: Schema locations [message #58340 is a reply to message #58310] Mon, 28 February 2005 13:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johan.naudts.ing.be

Ed,

I cannot seem to locate this code in version 1.x of EMF. If I try to run
WebSphere with EMF version 2.x, I run into NoSuchMethodErrors:

"java.lang.NoSuchMethodError: org.eclipse.xsd.impl.XSDPackageImpl: method
initEClas(Lorg/eclipse/emf/ecore/EClass;Ljava/lang/Class;Lja va/lang/String;ZZZ)Lorg/eclipse/emf/ecore/EClass;
not found at
org.eclipse.xsd.impl.XSDPackageImpl.initializePackageContent s(XSDPackageImpl.java:4248)... "

This is probably because of conflicts with my current WSAD: I'm using WSAD
version 5.1.1, which corresponds to Eclipse 2.1.2.
Still, this doesn't explain why it works fine when I unzip
xsd.resources.jar???

Help :-)

Ed Merks wrote:

> Johan,

> Setting a breakpoint in the URI code that does this will help, if that's
> possible to do

> static
> {
> Set set = new HashSet();
> String propertyValue =
> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");

> if (propertyValue == null)
> {
> set.add(SCHEME_JAR);
> set.add(SCHEME_ZIP);
> }
> else
> {
> for (StringTokenizer t = new StringTokenizer(propertyValue);
> t.hasMoreTokens(); )
> {
> set.add(t.nextToken().toLowerCase());
> }
> }

> archiveSchemes = Collections.unmodifiableSet(set);
> }

> You should be able to set this with System.setProperty. You should
> double check that the property is indeed set to the right value.
> Obviously a typo in the property name will ruin everything. Maybe it's
> as simple as needing to put quotes around the space separated schemes.
> in the startup parameter.


> Johan Naudts wrote:

>> Ed,
>>
>> I am sure I set the system property in the WebSphere server
>> configuration. It will be passed as a "-D" parameter at startup.
>> Apparently it doesn't change anything. Is there any way I could set
>> this parameter programmatically instead of passing it as a system
>> property?
>>
>> Johan
>>
>> Ed Merks wrote:
>>
>>> Johan,
>>
>>
>>> I believe it's still caused by WebSphere using wsjar for the things
>>> on the classpath and the xsd.resources.jar will be on the classpath.
>>> You earlier showed this trace:
>>
>>
>>> wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>>
>>
>>
TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d
>>
>>
>>> If wsjar is not configured to be recognized as an archive scheme,
>>> this URI will be treated as opaque. (The RFC
>>> http://www.ietf.org/rfc/rfc2396.txt
>>> defines this term; a URI is opaque if the schema is not followed by a
>>> /.) An opaque URI has no file extension so the .xsd in the name is
>>> not recognized and the XSDResourceFactory is not used, resulting in
>>> either no factory for standalone or an XMIResourceFactory for
>>> Eclipse/headless being used.
>>
>>
>>> Are you sure you've set the system property to configure the archive
>>> schemes? All symptoms still seem to indicate you've not...
>>
>>
>>
>>> Johan Naudts wrote:
>>
>>
>>>> Dear Ed,
>>>>
>>>> if I unzip xsd.resources.jar and put the directory structure in my
>>>> classpath, it works fine. So it looks as if WebSphere can't seem to
>>>> solve some resources when zipped. Could that be the reason?
>>>>
>>>> thanks
>>>> Johan
>>>>
>>>>
>>>> Ed Merks wrote:
>>>>
>>>>> Johan,
>>>>
>>>>
>>>>
>>>>> The first exception looks like what would happen if the global
>>>>> schema for schema can't be loaded and the second exception looks
>>>>> like the global schema was loaded with an XMIResourceImpl instead
>>>>> of an XSDResourceImpl and hence failed to load. Both these
>>>>> problems are likely caused by the use of a scheme other than jar:
>>>>> or zip: in the classpath.
>>>>
>>>>
>>>>
>>>>
>>>>> Johan Naudts wrote:
>>>>
>>>>
>>>>
>>>>>> Dear Ed,
>>>>>>
>>>>>> that seems to solve it BUT.... now I get a NullPointerException,
>>>>>> caused by a ClassCastException:
>>>>>>
>>>>>> [21/02/05 14:21:08:761 CET] 1e50aa55 SystemErr R
>>>>>> java.lang.NullPointerException
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2035)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2296)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:399)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1348)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1725)
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1125)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:115)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:103)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>>
>>
>>>>
>>>>
>>>>>> Code))
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>>>>> Code))
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2075)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1947)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1232)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2245)
>>
>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2797)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2829)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2368)
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:442)
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:348)
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>> java.lang.reflect.Method.invoke(Method.java:386)
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>
>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R
>>>>>> java.lang.ClassCastException:
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaInstance(XSDSche maImpl.java:713)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2040)
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1485)
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2241)
>>
>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>>
>>
>>>>
>>>>
>>>>>> Code))
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>>>>> Code))
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>> java.lang.reflect.Method.invoke(Method.java:386)
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>
>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>>>
>>>>>>
>>>>>> Any ideas?
>>>>>>
>>>>>> Thanks
>>>>>> Johan
>>>>>>
>>>>>>
>>>>>>
>>>>>> Ed Merks wrote:
>>>>>>
>>>>>>> Johan,
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Only "zip" and "jar" are recognized as archive schemes by
>>>>>>> org.eclipse.emf.common.util.URI by default but some JRE sometimes
>>>>>>> use other schemes in their class loaders, such as "wsjar". If
>>>>>>> you define the system property
>>>>>>> "org.eclipse.emf.common.util.URI.archiveSchemes" to be "jar zip
>>>>>>> *wsjar*" it should work correctly because of this code in the URI
>>>>>>> class:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> // Static initializer for archiveSchemes.
>>>>>>> static
>>>>>>> {
>>>>>>> Set set = new HashSet();
>>>>>>> String propertyValue =
>>>>>>>
>>>>>>> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> if (propertyValue == null)
>>>>>>> {
>>>>>>> set.add(SCHEME_JAR);
>>>>>>> set.add(SCHEME_ZIP);
>>>>>>> }
>>>>>>> else
>>>>>>> {
>>>>>>> for (StringTokenizer t = new
>>>>>>> StringTokenizer(propertyValue);
>>>>>>> t.hasMoreTokens(); )
>>>>>>> {
>>>>>>> set.add(t.nextToken().toLowerCase());
>>>>>>> }
>>>>>>> }
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> archiveSchemes = Collections.unmodifiableSet(set);
>>>>>>> }
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Johan Naudts wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I am currently facing a similar problem, but ONLY when running
>>>>>>>> inside a Web application server (WebSphere v5.1 in this case).
>>>>>>>> This is a summary the Exception I'm getting:
>>>>>>>>
>>>>>>>> java.lang.RuntimeException: Cannot create a resource for
>>>>>>>> 'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>> a registered resource factory is needed
>>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:611)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>>>
org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>
org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
>>>>
>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> java.lang.NullPointerException
>>>>>>>> at
>>>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1475)
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2234)
>>>>
>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1202)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:827)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
>>>>>>>>
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
test.XsdOnlineContentParser.getSigningEnvelopeFields(XsdOnli neContentParser.java:54)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.apache.jsp._TestXsdParser._jspService(_TestXsdParser.jav a:80)
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(Http JspBase.java:89)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>>>>> at
>>>>>>>
Re: Schema locations [message #58376 is a reply to message #58340] Mon, 28 February 2005 22:32 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Johan,

Sorry, I assumed you were using the latest and you can't just switch
without affecting WebSphere itself. The only work around with the
older EMF is to unzip the jar. In this case, the URI does not need to
use jar:/wsjar:, since the files aren't in a jar and the whole problem
is avoided. It might work to patch in the newer
org.eclipse.emf.common.util.URI.class into the older build version's jar
so that you can use the system property approach...


Johan Naudts wrote:

> Ed,
>
> I cannot seem to locate this code in version 1.x of EMF. If I try to
> run WebSphere with EMF version 2.x, I run into NoSuchMethodErrors:
>
> "java.lang.NoSuchMethodError: org.eclipse.xsd.impl.XSDPackageImpl:
> method
> initEClas(Lorg/eclipse/emf/ecore/EClass;Ljava/lang/Class;Lja va/lang/String;ZZZ)Lorg/eclipse/emf/ecore/EClass;
> not found at
> org.eclipse.xsd.impl.XSDPackageImpl.initializePackageContent s(XSDPackageImpl.java:4248)... "
>
>
> This is probably because of conflicts with my current WSAD: I'm using
> WSAD version 5.1.1, which corresponds to Eclipse 2.1.2.
> Still, this doesn't explain why it works fine when I unzip
> xsd.resources.jar???
>
> Help :-)
>
> Ed Merks wrote:
>
>> Johan,
>
>
>> Setting a breakpoint in the URI code that does this will help, if
>> that's possible to do
>
>
>> static
>> {
>> Set set = new HashSet();
>> String propertyValue =
>>
>> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");
>
>
>> if (propertyValue == null)
>> {
>> set.add(SCHEME_JAR);
>> set.add(SCHEME_ZIP);
>> }
>> else
>> {
>> for (StringTokenizer t = new StringTokenizer(propertyValue);
>> t.hasMoreTokens(); )
>> {
>> set.add(t.nextToken().toLowerCase());
>> }
>> }
>
>
>> archiveSchemes = Collections.unmodifiableSet(set);
>> }
>
>
>> You should be able to set this with System.setProperty. You should
>> double check that the property is indeed set to the right value.
>> Obviously a typo in the property name will ruin everything. Maybe
>> it's as simple as needing to put quotes around the space separated
>> schemes. in the startup parameter.
>
>
>
>> Johan Naudts wrote:
>
>
>>> Ed,
>>>
>>> I am sure I set the system property in the WebSphere server
>>> configuration. It will be passed as a "-D" parameter at startup.
>>> Apparently it doesn't change anything. Is there any way I could set
>>> this parameter programmatically instead of passing it as a system
>>> property?
>>>
>>> Johan
>>>
>>> Ed Merks wrote:
>>>
>>>> Johan,
>>>
>>>
>>>
>>>> I believe it's still caused by WebSphere using wsjar for the things
>>>> on the classpath and the xsd.resources.jar will be on the
>>>> classpath. You earlier showed this trace:
>>>
>>>
>>>
>>>> wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>>>
>>>
>>>
>>>
> TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d
>
>
>>>
>>>
>>>> If wsjar is not configured to be recognized as an archive scheme,
>>>> this URI will be treated as opaque. (The RFC
>>>> http://www.ietf.org/rfc/rfc2396.txt
>>>> defines this term; a URI is opaque if the schema is not followed by
>>>> a /.) An opaque URI has no file extension so the .xsd in the name
>>>> is not recognized and the XSDResourceFactory is not used, resulting
>>>> in either no factory for standalone or an XMIResourceFactory for
>>>> Eclipse/headless being used.
>>>
>>>
>>>
>>>> Are you sure you've set the system property to configure the
>>>> archive schemes? All symptoms still seem to indicate you've not...
>>>
>>>
>>>
>>>
>>>> Johan Naudts wrote:
>>>
>>>
>>>
>>>>> Dear Ed,
>>>>>
>>>>> if I unzip xsd.resources.jar and put the directory structure in my
>>>>> classpath, it works fine. So it looks as if WebSphere can't seem
>>>>> to solve some resources when zipped. Could that be the reason?
>>>>>
>>>>> thanks
>>>>> Johan
>>>>>
>>>>>
>>>>> Ed Merks wrote:
>>>>>
>>>>>> Johan,
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> The first exception looks like what would happen if the global
>>>>>> schema for schema can't be loaded and the second exception looks
>>>>>> like the global schema was loaded with an XMIResourceImpl instead
>>>>>> of an XSDResourceImpl and hence failed to load. Both these
>>>>>> problems are likely caused by the use of a scheme other than jar:
>>>>>> or zip: in the classpath.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Johan Naudts wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>> Dear Ed,
>>>>>>>
>>>>>>> that seems to solve it BUT.... now I get a NullPointerException,
>>>>>>> caused by a ClassCastException:
>>>>>>>
>>>>>>> [21/02/05 14:21:08:761 CET] 1e50aa55 SystemErr R
>>>>>>> java.lang.NullPointerException
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2035)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2296)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:399)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1348)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1725)
>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1125)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:115)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:103)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>> Code))
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>>>>>> Code))
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2075)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1947)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1232)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2245)
>>>
>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2797)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2829)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2368)
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:442)
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:348)
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>> java.lang.reflect.Method.invoke(Method.java:386)
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>>
>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R
>>>>>>> java.lang.ClassCastException:
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaInstance(XSDSche maImpl.java:713)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2040)
>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1485)
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2241)
>>>
>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>> Code))
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>>>>>> Code))
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>> java.lang.reflect.Method.invoke(Method.java:386)
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>>
>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>>>>
>>>>>>>
>>>>>>> Any ideas?
>>>>>>>
>>>>>>> Thanks
>>>>>>> Johan
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Ed Merks wrote:
>>>>>>>
>>>>>>>> Johan,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Only "zip" and "jar" are recognized as archive schemes by
>>>>>>>> org.eclipse.emf.common.util.URI by default but some JRE
>>>>>>>> sometimes use other schemes in their class loaders, such as
>>>>>>>> "wsjar". If you define the system property
>>>>>>>> "org.eclipse.emf.common.util.URI.archiveSchemes" to be "jar zip
>>>>>>>> *wsjar*" it should work correctly because of this code in the
>>>>>>>> URI class:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> // Static initializer for archiveSchemes.
>>>>>>>> static
>>>>>>>> {
>>>>>>>> Set set = new HashSet();
>>>>>>>> String propertyValue =
>>>>>>>>
>>>>>>>> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> if (propertyValue == null)
>>>>>>>> {
>>>>>>>> set.add(SCHEME_JAR);
>>>>>>>> set.add(SCHEME_ZIP);
>>>>>>>> }
>>>>>>>> else
>>>>>>>> {
>>>>>>>> for (StringTokenizer t = new
>>>>>>>> StringTokenizer(propertyValue);
>>>>>>>> t.hasMoreTokens(); )
>>>>>>>> {
>>>>>>>> set.add(t.nextToken().toLowerCase());
>>>>>>>> }
>>>>>>>> }
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> archiveSchemes = Collections.unmodifiableSet(set);
>>>>>>>> }
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Johan Naudts wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I am currently facing a similar problem, but ONLY when running
>>>>>>>>> inside a Web application server (WebSphere v5.1 in this case).
>>>>>>>>> This is a summary the Exception I'm getting:
>>>>>>>>>
>>>>>>>>> java.lang.RuntimeException: Cannot create a resource for
>>>>>>>>> 'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>
>>>
> TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>> a registered resource factory is needed
>>>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>
>>>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
>
>
>>>
>>>
>>>>&g
Re: Schema locations [message #586297 is a reply to message #42696] Thu, 29 April 2004 12:09 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Mike,

For relative locations in a document to resolve, the URI of the document must
be an absolute URI. Have a look at XSDMainTest in org.eclipse.xsd.test to
see how it makes sure an input "path" is turned into an absolute URI.

For loading from a "class loader resource", use the URL returned by
getClass().getClassLoader().getResource(...) as the URI of the schema
resource. This should give you an absolute URI against which the relative
schemaLocation URIs can be resolved. Hopefully its a jar: scheme because zip:
doesn't work, I don't think. If it's zip:, please let me know.


Mike Lischke wrote:

> Hi group,
>
> Currently I'm trying to find a consistent solution to load an XML schema
> together will all its imported, included and redefined schemas. Until now
> I have two versions to load schemas. One loads a schema fine when it is
> located in an Eclipse project (with relative path name). It can also load
> the schema from the file system when given with absolute path.
>
> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
> xsdSchemaResource.setURI(URI.createURI(schemaName));
> InputStream stream =
> getClass().getClassLoader().getResourceAsStream(schemaName);
> if (stream == null)
> stream = new FileInputStream(schemaName);
>
> if (stream != null)
> {
> try
> {
> xsdSchemaResource.load(stream, null);
> schemas.add(xsdSchemaResource.getSchema());
> }
> catch(Exception e)
> {
> ...
> }
> }
>
> The second one can load schemas from the file system when I specify the
> file:// protocol.
>
> URI uri = URI.createURI(schemaLocation);
> ResourceSet resourceSet = new ResourceSetImpl();
> XSDResourceImpl xsdResource =
> (XSDResourceImpl)resourceSet.getResource(uri, true);
> schemas.add(xsdResource.getSchema());
>
> My problem is now: the second version also loads all included etc. schemas
> so I have the full hierarchy (which is the final goal for me). But it does
> only so when given an absolute file (or another valid URI I suppose,
> haven't tried). It cannot load schemas from the resource of an Eclipse
> project. The first version in contrast does not load included schemas, but
> only loads the main file.
>
> So my question is: How can I make a combined version so that regardless of
> the actual location of the schema (URL, local file, resouce file -> maybe
> in jar) the main schema file and all those, which are referenced by it (or
> recursively by the others) are loaded successfully?
>
> I already looked at the traceLoading sample code, which uses an URI map,
> however this does not help for resource files. I would need stream support
> for a generic solution, but I have not found any stream reference in the
> documentation.
>
> Mike
> --
> www.soft-gems.net


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Schema locations [message #586317 is a reply to message #42727] Thu, 29 April 2004 13:18 Go to previous message
Mike Lischke is currently offline Mike LischkeFriend
Messages: 78
Registered: July 2009
Member
Ed Merks wrote:

> For relative locations in a document to resolve, the URI of the document must
> be an absolute URI. Have a look at XSDMainTest in org.eclipse.xsd.test to
> see how it makes sure an input "path" is turned into an absolute URI.

Since my include schema files can again include other schema files all
with relative file names, it seems I have to set up some URL mapping. Is
this correct?

> For loading from a "class loader resource", use the URL returned by
> getClass().getClassLoader().getResource(...) as the URI of the schema
> resource. This should give you an absolute URI against which the relative
> schemaLocation URIs can be resolved.

This does suprisingly not work, simply because getResource() returns an
invalid file URL. It looks like:

file:D:/projects/.....

so the double slash is missing after the protocol and hence
URIConverterImpl.createInputStream does not find the file. As I can't
imagine that this is a bug I supposed there must be something missing on
my side. But what?


>Hopefully its a jar: scheme because zip:
> doesn't work, I don't think. If it's zip:, please let me know.

Yes, it will be a jar once I have finished development. Until then it is
just a file in one of my Eclipse projects.

Thank you for your help Ed.

Mike
--
www.soft-gems.net
Re: Schema locations [message #586330 is a reply to message #42758] Thu, 29 April 2004 14:03 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Mike,

No you shouldn't need to do anything fancy like a URI map. As long as the URI of
the resource is a proper hierarchical absolute URI, relative locations will resolve
properly and find the right absolute resources. For a URI to be hierarchical,
according to the RFC (see javadoc for our URI class), the scheme must be followed
by a "/" (and to be absolute there must be a scheme.). So this file:D: thing is
bogus. You should "massage" the URL you get to not be bogus and then all should
work well...


Mike Lischke wrote:

> Ed Merks wrote:
>
> > For relative locations in a document to resolve, the URI of the document must
> > be an absolute URI. Have a look at XSDMainTest in org.eclipse.xsd.test to
> > see how it makes sure an input "path" is turned into an absolute URI.
>
> Since my include schema files can again include other schema files all
> with relative file names, it seems I have to set up some URL mapping. Is
> this correct?
>
> > For loading from a "class loader resource", use the URL returned by
> > getClass().getClassLoader().getResource(...) as the URI of the schema
> > resource. This should give you an absolute URI against which the relative
> > schemaLocation URIs can be resolved.
>
> This does suprisingly not work, simply because getResource() returns an
> invalid file URL. It looks like:
>
> file:D:/projects/.....
>
> so the double slash is missing after the protocol and hence
> URIConverterImpl.createInputStream does not find the file. As I can't
> imagine that this is a bug I supposed there must be something missing on
> my side. But what?
>
> >Hopefully its a jar: scheme because zip:
> > doesn't work, I don't think. If it's zip:, please let me know.
>
> Yes, it will be a jar once I have finished development. Until then it is
> just a file in one of my Eclipse projects.
>
> Thank you for your help Ed.
>
> Mike
> --
> www.soft-gems.net


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Schema locations [message #586364 is a reply to message #42789] Fri, 30 April 2004 06:57 Go to previous message
Mike Lischke is currently offline Mike LischkeFriend
Messages: 78
Registered: July 2009
Member
Ed Merks wrote:

> You should "massage" the URL you get to not be bogus and then all should
> work well...

Yep, works great. Thanks!

Mike
--
www.soft-gems.net
Re: Schema locations [message #592103 is a reply to message #42696] Thu, 14 October 2004 04:40 Go to previous message
Wayne is currently offline WayneFriend
Messages: 5
Registered: July 2009
Junior Member
Mike,
I saw that you have been discussing xsd on the news group. I am new to =
the Schema Infoset and an having some problems opening a file from a =
file. I have the follwoing method and continuelly get exceptions when =
trying to be the Resource. I was wounder if you have the time could you =
look at my method and provide some guidence.

private static XSDSchema loadXSDSchema(File xsdFile) {
String schemaName = xsdFile.getPath();
try {
URI uri = URI.createURI(schemaName);
ResourceSet resourceSet = new ResourceSetImpl();
XSDResourceImpl xsdResource =
(XSDResourceImpl)resourceSet.getResource(uri, true);
XSDSchema resultSchema = xsdResource.getSchema();
} catch (Exception e) {
e.printStackTrace();
}
return null;
}

the exception is:
java.lang.RuntimeException: Cannot create a resource for =
'E:\DublinCore1.xsd'; a registered resource factory is needed

at =
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
etImpl.java:282)

at =
schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
ava:26)

at =
schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
er.java:35)

at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)

at
=org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)

at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)

at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)

at xmlProcessing.xmlUI.main(xmlUI.java:257)

Any help would be appreciated.

Regards

Wayne



Mike Lischke wrote:

> Hi group,

> Currently I'm trying to find a consistent solution to load an XML schema
> together will all its imported, included and redefined schemas. Until now
> I have two versions to load schemas. One loads a schema fine when it is
> located in an Eclipse project (with relative path name). It can also load
> the schema from the file system when given with absolute path.

> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
> xsdSchemaResource.setURI(URI.createURI(schemaName));
> InputStream stream =
> getClass().getClassLoader().getResourceAsStream(schemaName);
> if (stream == null)
> stream = new FileInputStream(schemaName);

> if (stream != null)
> {
> try
> {
> xsdSchemaResource.load(stream, null);
> schemas.add(xsdSchemaResource.getSchema());
> }
> catch(Exception e)
> {
> ...
> }
> }

> The second one can load schemas from the file system when I specify the
> file:// protocol.

> URI uri = URI.createURI(schemaLocation);
> ResourceSet resourceSet = new ResourceSetImpl();
> XSDResourceImpl xsdResource =
> (XSDResourceImpl)resourceSet.getResource(uri, true);
> schemas.add(xsdResource.getSchema());

> My problem is now: the second version also loads all included etc. schemas
> so I have the full hierarchy (which is the final goal for me). But it does
> only so when given an absolute file (or another valid URI I suppose,
> haven't tried). It cannot load schemas from the resource of an Eclipse
> project. The first version in contrast does not load included schemas, but
> only loads the main file.

> So my question is: How can I make a combined version so that regardless of
> the actual location of the schema (URL, local file, resouce file -> maybe
> in jar) the main schema file and all those, which are referenced by it (or
> recursively by the others) are loaded successfully?

> I already looked at the traceLoading sample code, which uses an URI map,
> however this does not help for resource files. I would need stream support
> for a generic solution, but I have not found any stream reference in the
> documentation.

> Mike
> --
> www.soft-gems.net
Re: Schema locations [message #592116 is a reply to message #54045] Thu, 14 October 2004 10:43 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070403080103000103000208
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Wayne,

A file system path is not a URI and the "\" character is not treated as
"/" in a URI. If you have a file path, use URI.createFileURI to convert
it to a proper URI. E.g., E:\DublinCore1.xsd should be
file:/E:/DublinCore.xsd


Wayne wrote:

>Mike,
>I saw that you have been discussing xsd on the news group. I am new to =
>the Schema Infoset and an having some problems opening a file from a =
>file. I have the follwoing method and continuelly get exceptions when =
>trying to be the Resource. I was wounder if you have the time could you =
>look at my method and provide some guidence.
>
> private static XSDSchema loadXSDSchema(File xsdFile) {
> String schemaName = xsdFile.getPath();
> try {
> URI uri = URI.createURI(schemaName);
> ResourceSet resourceSet = new ResourceSetImpl();
> XSDResourceImpl xsdResource =
>(XSDResourceImpl)resourceSet.getResource(uri, true);
> XSDSchema resultSchema = xsdResource.getSchema();
> } catch (Exception e) {
> e.printStackTrace();
> }
> return null;
> }
>
>the exception is:
>java.lang.RuntimeException: Cannot create a resource for =
>'E:\DublinCore1.xsd'; a registered resource factory is needed
>
>at =
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>etImpl.java:282)
>
>at =
> schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>ava:26)
>
>at =
> schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>er.java:35)
>
>at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>
>at
> =org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>
>at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>
>at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>
>at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>
>at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>
>at xmlProcessing.xmlUI.main(xmlUI.java:257)
>
>Any help would be appreciated.
>
>Regards
>
>Wayne
>
>
>
>Mike Lischke wrote:
>
>
>
>>Hi group,
>>
>>
>
>
>
>>Currently I'm trying to find a consistent solution to load an XML schema
>>together will all its imported, included and redefined schemas. Until now
>>I have two versions to load schemas. One loads a schema fine when it is
>>located in an Eclipse project (with relative path name). It can also load
>>the schema from the file system when given with absolute path.
>>
>>
>
>
>
>> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
>> xsdSchemaResource.setURI(URI.createURI(schemaName));
>> InputStream stream =
>> getClass().getClassLoader().getResourceAsStream(schemaName);
>> if (stream == null)
>> stream = new FileInputStream(schemaName);
>>
>>
>
>
>
>> if (stream != null)
>> {
>> try
>> {
>> xsdSchemaResource.load(stream, null);
>> schemas.add(xsdSchemaResource.getSchema());
>> }
>> catch(Exception e)
>> {
>> ...
>> }
>> }
>>
>>
>
>
>
>>The second one can load schemas from the file system when I specify the
>>file:// protocol.
>>
>>
>
>
>
>> URI uri = URI.createURI(schemaLocation);
>> ResourceSet resourceSet = new ResourceSetImpl();
>> XSDResourceImpl xsdResource =
>>(XSDResourceImpl)resourceSet.getResource(uri, true);
>> schemas.add(xsdResource.getSchema());
>>
>>
>
>
>
>>My problem is now: the second version also loads all included etc. schemas
>>so I have the full hierarchy (which is the final goal for me). But it does
>>only so when given an absolute file (or another valid URI I suppose,
>>haven't tried). It cannot load schemas from the resource of an Eclipse
>>project. The first version in contrast does not load included schemas, but
>>only loads the main file.
>>
>>
>
>
>
>>So my question is: How can I make a combined version so that regardless of
>>the actual location of the schema (URL, local file, resouce file -> maybe
>>in jar) the main schema file and all those, which are referenced by it (or
>>recursively by the others) are loaded successfully?
>>
>>
>
>
>
>>I already looked at the traceLoading sample code, which uses an URI map,
>>however this does not help for resource files. I would need stream support
>>for a generic solution, but I have not found any stream reference in the
>>documentation.
>>
>>
>
>
>
>>Mike
>>--
>>www.soft-gems.net
>>
>>
>
>
>
>


--------------070403080103000103000208
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Wayne,<br>
<br>
A file system path is not a URI and the "\" character is not treated as
"/" in a URI.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Schema locations [message #593037 is a reply to message #54072] Mon, 06 December 2004 11:58 Go to previous message
Eclipse UserFriend
Originally posted by: ooi.de.ibm.com

Hi!

I've tried using the URI.createFileURI instead of URI.createURI and i got
the following exception:

java.lang.RuntimeException: Cannot create a resource for
'file:/C:/workspace/eCute4ODI/import/wsrf-WS-ResourcePropert ies-1.2-draft-01.xsd';
a registered resource factory is needed

what could be the problem?


Ed Merks wrote:

> Wayne,

> A file system path is not a URI and the "" character is not treated as
> "/" in a URI. If you have a file path, use URI.createFileURI to convert
> it to a proper URI. E.g., E:DublinCore1.xsd should be
> file:/E:/DublinCore.xsd


> Wayne wrote:

>>Mike,
>>I saw that you have been discussing xsd on the news group. I am new to =
>>the Schema Infoset and an having some problems opening a file from a =
>>file. I have the follwoing method and continuelly get exceptions when =
>>trying to be the Resource. I was wounder if you have the time could you =
>>look at my method and provide some guidence.
>>
>> private static XSDSchema loadXSDSchema(File xsdFile) {
>> String schemaName = xsdFile.getPath();
>> try {
>> URI uri = URI.createURI(schemaName);
>> ResourceSet resourceSet = new ResourceSetImpl();
>> XSDResourceImpl xsdResource =
>>(XSDResourceImpl)resourceSet.getResource(uri, true);
>> XSDSchema resultSchema = xsdResource.getSchema();
>> } catch (Exception e) {
>> e.printStackTrace();
>> }
>> return null;
>> }
>>
>>the exception is:
>>java.lang.RuntimeException: Cannot create a resource for =
>>'E:DublinCore1.xsd'; a registered resource factory is needed
>>
>>at =
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>>etImpl.java:282)
>>
>>at =
>> schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>>ava:26)
>>
>>at =
>> schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>>er.java:35)
>>
>>at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>>
>>at
>> =org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>>
>>at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>
>>at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>
>>at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>
>>at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>
>>at xmlProcessing.xmlUI.main(xmlUI.java:257)
>>
>>Any help would be appreciated.
>>
>>Regards
>>
>>Wayne
>>
>>
>>
>>Mike Lischke wrote:
>>
>>
>>
>>>Hi group,
>>>
>>>
>>
>>
>>
>>>Currently I'm trying to find a consistent solution to load an XML schema
>>>together will all its imported, included and redefined schemas. Until now
>>>I have two versions to load schemas. One loads a schema fine when it is
>>>located in an Eclipse project (with relative path name). It can also load
>>>the schema from the file system when given with absolute path.
>>>
>>>
>>
>>
>>
>>> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
>>> xsdSchemaResource.setURI(URI.createURI(schemaName));
>>> InputStream stream =
>>> getClass().getClassLoader().getResourceAsStream(schemaName);
>>> if (stream == null)
>>> stream = new FileInputStream(schemaName);
>>>
>>>
>>
>>
>>
>>> if (stream != null)
>>> {
>>> try
>>> {
>>> xsdSchemaResource.load(stream, null);
>>> schemas.add(xsdSchemaResource.getSchema());
>>> }
>>> catch(Exception e)
>>> {
>>> ...
>>> }
>>> }
>>>
>>>
>>
>>
>>
>>>The second one can load schemas from the file system when I specify the
>>>file:// protocol.
>>>
>>>
>>
>>
>>
>>> URI uri = URI.createURI(schemaLocation);
>>> ResourceSet resourceSet = new ResourceSetImpl();
>>> XSDResourceImpl xsdResource =
>>>(XSDResourceImpl)resourceSet.getResource(uri, true);
>>> schemas.add(xsdResource.getSchema());
>>>
>>>
>>
>>
>>
>>>My problem is now: the second version also loads all included etc. schemas
>>>so I have the full hierarchy (which is the final goal for me). But it does
>>>only so when given an absolute file (or another valid URI I suppose,
>>>haven't tried). It cannot load schemas from the resource of an Eclipse
>>>project. The first version in contrast does not load included schemas, but
>>>only loads the main file.
>>>
>>>
>>
>>
>>
>>>So my question is: How can I make a combined version so that regardless of
>>>the actual location of the schema (URL, local file, resouce file -> maybe
>>>in jar) the main schema file and all those, which are referenced by it (or
>>>recursively by the others) are loaded successfully?
>>>
>>>
>>
>>
>>
>>>I already looked at the traceLoading sample code, which uses an URI map,
>>>however this does not help for resource files. I would need stream support
>>>for a generic solution, but I have not found any stream reference in the
>>>documentation.
>>>
>>>
>>
>>
>>
>>>Mike
>>>--
>>>www.soft-gems.net
>>>
>>>
>>
>>
>>
>>
Re: Schema locations [message #593050 is a reply to message #55925] Mon, 06 December 2004 12:20 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000708030101030107000501
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

HT,

I think you get this not matter how you create the URI since it sounds
like you are running standalone and still need to do:

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


HT Ooi wrote:

> Hi!
>
> I've tried using the URI.createFileURI instead of URI.createURI and i
> got the following exception:
>
> java.lang.RuntimeException: Cannot create a resource for
> 'file:/C:/workspace/eCute4ODI/import/wsrf-WS-ResourcePropert ies-1.2-draft-01.xsd';
> a registered resource factory is needed
>
> what could be the problem?
>
>
> Ed Merks wrote:
>
>> Wayne,
>
>
>> A file system path is not a URI and the "" character is not treated
>> as "/" in a URI. If you have a file path, use URI.createFileURI to
>> convert it to a proper URI. E.g., E:DublinCore1.xsd should be
>> file:/E:/DublinCore.xsd
>
>
>
>> Wayne wrote:
>
>
>>> Mike,
>>> I saw that you have been discussing xsd on the news group. I am new
>>> to =
>>> the Schema Infoset and an having some problems opening a file from a =
>>> file. I have the follwoing method and continuelly get exceptions when =
>>> trying to be the Resource. I was wounder if you have the time could
>>> you =
>>> look at my method and provide some guidence.
>>>
>>> private static XSDSchema loadXSDSchema(File xsdFile) {
>>> String schemaName = xsdFile.getPath();
>>> try {
>>> URI uri = URI.createURI(schemaName);
>>> ResourceSet resourceSet = new ResourceSetImpl();
>>> XSDResourceImpl xsdResource =
>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>> XSDSchema resultSchema = xsdResource.getSchema();
>>> } catch (Exception e) {
>>> e.printStackTrace();
>>> }
>>> return null;
>>> }
>>>
>>> the exception is:
>>> java.lang.RuntimeException: Cannot create a resource for =
>>> 'E:DublinCore1.xsd'; a registered resource factory is needed
>>>
>>> at =
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>>>
>>> etImpl.java:282)
>>>
>>> at =
>>> schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>>>
>>> ava:26)
>>>
>>> at =
>>> schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>>>
>>> er.java:35)
>>>
>>> at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>>>
>>> at
>>> =org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>>>
>>>
>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>>
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>>
>>> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>>
>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>>
>>> at xmlProcessing.xmlUI.main(xmlUI.java:257)
>>>
>>> Any help would be appreciated.
>>>
>>> Regards
>>>
>>> Wayne
>>>
>>>
>>>
>>> Mike Lischke wrote:
>>>
>>>
>>>
>>>> Hi group,
>>>>
>>>
>>>
>>>
>>>
>>>> Currently I'm trying to find a consistent solution to load an XML
>>>> schema
>>>> together will all its imported, included and redefined schemas.
>>>> Until now
>>>> I have two versions to load schemas. One loads a schema fine when
>>>> it is
>>>> located in an Eclipse project (with relative path name). It can
>>>> also load
>>>> the schema from the file system when given with absolute path.
>>>>
>>>
>>>
>>>
>>>
>>>> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
>>>> xsdSchemaResource.setURI(URI.createURI(schemaName));
>>>> InputStream stream =
>>>> getClass().getClassLoader().getResourceAsStream(schemaName);
>>>> if (stream == null)
>>>> stream = new FileInputStream(schemaName);
>>>>
>>>
>>>
>>>
>>>
>>>> if (stream != null)
>>>> {
>>>> try
>>>> {
>>>> xsdSchemaResource.load(stream, null);
>>>> schemas.add(xsdSchemaResource.getSchema());
>>>> }
>>>> catch(Exception e)
>>>> {
>>>> ...
>>>> }
>>>> }
>>>>
>>>
>>>
>>>
>>>
>>>> The second one can load schemas from the file system when I specify
>>>> the
>>>> file:// protocol.
>>>>
>>>
>>>
>>>
>>>
>>>> URI uri = URI.createURI(schemaLocation);
>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>> XSDResourceImpl xsdResource =
>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>> schemas.add(xsdResource.getSchema());
>>>>
>>>
>>>
>>>
>>>
>>>> My problem is now: the second version also loads all included etc.
>>>> schemas
>>>> so I have the full hierarchy (which is the final goal for me). But
>>>> it does
>>>> only so when given an absolute file (or another valid URI I suppose,
>>>> haven't tried). It cannot load schemas from the resource of an Eclipse
>>>> project. The first version in contrast does not load included
>>>> schemas, but
>>>> only loads the main file.
>>>>
>>>
>>>
>>>
>>>
>>>> So my question is: How can I make a combined version so that
>>>> regardless of
>>>> the actual location of the schema (URL, local file, resouce file ->
>>>> maybe
>>>> in jar) the main schema file and all those, which are referenced by
>>>> it (or
>>>> recursively by the others) are loaded successfully?
>>>>
>>>
>>>
>>>
>>>
>>>> I already looked at the traceLoading sample code, which uses an URI
>>>> map,
>>>> however this does not help for resource files. I would need stream
>>>> support
>>>> for a generic solution, but I have not found any stream reference
>>>> in the
>>>> documentation.
>>>>
>>>
>>>
>>>
>>>
>>>> Mike
>>>> --
>>>> www.soft-gems.net
>>>>
>>>
>>>
>>>
>>>
>>>
>
>


--------------000708030101030107000501
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
HT,<br>
<br>
I think you get this not matter how you create the URI since it sounds
like you are running standalone and still need to do:<br>
<blockquote> resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put <br>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Schema locations [message #594059 is a reply to message #55941] Thu, 17 February 2005 09:42 Go to previous message
Eclipse UserFriend
Originally posted by: johan.naudts.ing.be

Hi,

I am currently facing a similar problem, but ONLY when running inside a
Web application server (WebSphere v5.1 in this case). This is a summary
the Exception I'm getting:

java.lang.RuntimeException: Cannot create a resource for
'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
a registered resource factory is needed
[17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
[17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
[17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:611)
[17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
[17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
[17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
[17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
[17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
[17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
[17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
[17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
[17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
[17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)


java.lang.NullPointerException
at org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1475)
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2234)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1202)
at
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:827)
at org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
at
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
at
test.XsdOnlineContentParser.getSigningEnvelopeFields(XsdOnli neContentParser.java:54)
at org.apache.jsp._TestXsdParser._jspService(_TestXsdParser.jav a:80)
at
com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(Http JspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWra pper.service(JspServlet.java:344)
at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFil e(JspServlet.java:662)
at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspSe rvlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:182)
at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)

This is an excerpt from my code:

// Register resource factory first
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd",
new XSDResourceFactoryImpl());

// Create a resource set and load the main schema file into it.
ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_L OCATION,
Boolean.TRUE);
URI uri = URI.createURI(schemaURL);
Resource res = resourceSet.getResource(uri, true);
XSDResourceImpl xsdSchemaResource = (XSDResourceImpl)res;

The schemaURL = "file:/E:/Wta/Workspace/WEB WTA BROWSER TEST/XSD
Files/IngSigEnvSchema.xsd"

But again: when running standalone with exactly the same code, I don't
have this problem, so it seems to me that, inside of a servlet/JSP
container, XSD has difficulties locating some necessary files?

Can anyone help?

Thanks!
Johan



Ed Merks wrote:

> HT,

> I think you get this not matter how you create the URI since it sounds
> like you are running standalone and still need to do:

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


> HT Ooi wrote:

>> Hi!
>>
>> I've tried using the URI.createFileURI instead of URI.createURI and i
>> got the following exception:
>>
>> java.lang.RuntimeException: Cannot create a resource for
>>
'file:/C:/workspace/eCute4ODI/import/wsrf-WS-ResourcePropert ies-1.2-draft-01.xsd';
>> a registered resource factory is needed
>>
>> what could be the problem?
>>
>>
>> Ed Merks wrote:
>>
>>> Wayne,
>>
>>
>>> A file system path is not a URI and the "" character is not treated
>>> as "/" in a URI. If you have a file path, use URI.createFileURI to
>>> convert it to a proper URI. E.g., E:DublinCore1.xsd should be
>>> file:/E:/DublinCore.xsd
>>
>>
>>
>>> Wayne wrote:
>>
>>
>>>> Mike,
>>>> I saw that you have been discussing xsd on the news group. I am new
>>>> to =
>>>> the Schema Infoset and an having some problems opening a file from a =
>>>> file. I have the follwoing method and continuelly get exceptions when =
>>>> trying to be the Resource. I was wounder if you have the time could
>>>> you =
>>>> look at my method and provide some guidence.
>>>>
>>>> private static XSDSchema loadXSDSchema(File xsdFile) {
>>>> String schemaName = xsdFile.getPath();
>>>> try {
>>>> URI uri = URI.createURI(schemaName);
>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>> XSDResourceImpl xsdResource =
>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>> XSDSchema resultSchema = xsdResource.getSchema();
>>>> } catch (Exception e) {
>>>> e.printStackTrace();
>>>> }
>>>> return null;
>>>> }
>>>>
>>>> the exception is:
>>>> java.lang.RuntimeException: Cannot create a resource for =
>>>> 'E:DublinCore1.xsd'; a registered resource factory is needed
>>>>
>>>> at =
>>>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>>>>
>>>> etImpl.java:282)
>>>>
>>>> at =
>>>>
schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>>>>
>>>> ava:26)
>>>>
>>>> at =
>>>>
schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>>>>
>>>> er.java:35)
>>>>
>>>> at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>>>>
>>>> at
>>>> =org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>>>>
>>>>
>>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>>>
>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>>>
>>>> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>>>
>>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>>>
>>>> at xmlProcessing.xmlUI.main(xmlUI.java:257)
>>>>
>>>> Any help would be appreciated.
>>>>
>>>> Regards
>>>>
>>>> Wayne
>>>>
>>>>
>>>>
>>>> Mike Lischke wrote:
>>>>
>>>>
>>>>
>>>>> Hi group,
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> Currently I'm trying to find a consistent solution to load an XML
>>>>> schema
>>>>> together will all its imported, included and redefined schemas.
>>>>> Until now
>>>>> I have two versions to load schemas. One loads a schema fine when
>>>>> it is
>>>>> located in an Eclipse project (with relative path name). It can
>>>>> also load
>>>>> the schema from the file system when given with absolute path.
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
>>>>> xsdSchemaResource.setURI(URI.createURI(schemaName));
>>>>> InputStream stream =
>>>>> getClass().getClassLoader().getResourceAsStream(schemaName);
>>>>> if (stream == null)
>>>>> stream = new FileInputStream(schemaName);
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> if (stream != null)
>>>>> {
>>>>> try
>>>>> {
>>>>> xsdSchemaResource.load(stream, null);
>>>>> schemas.add(xsdSchemaResource.getSchema());
>>>>> }
>>>>> catch(Exception e)
>>>>> {
>>>>> ...
>>>>> }
>>>>> }
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> The second one can load schemas from the file system when I specify
>>>>> the
>>>>> file:// protocol.
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> URI uri = URI.createURI(schemaLocation);
>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>> XSDResourceImpl xsdResource =
>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>> schemas.add(xsdResource.getSchema());
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> My problem is now: the second version also loads all included etc.
>>>>> schemas
>>>>> so I have the full hierarchy (which is the final goal for me). But
>>>>> it does
>>>>> only so when given an absolute file (or another valid URI I suppose,
>>>>> haven't tried). It cannot load schemas from the resource of an Eclipse
>>>>> project. The first version in contrast does not load included
>>>>> schemas, but
>>>>> only loads the main file.
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> So my question is: How can I make a combined version so that
>>>>> regardless of
>>>>> the actual location of the schema (URL, local file, resouce file ->
>>>>> maybe
>>>>> in jar) the main schema file and all those, which are referenced by
>>>>> it (or
>>>>> recursively by the others) are loaded successfully?
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> I already looked at the traceLoading sample code, which uses an URI
>>>>> map,
>>>>> however this does not help for resource files. I would need stream
>>>>> support
>>>>> for a generic solution, but I have not found any stream reference
>>>>> in the
>>>>> documentation.
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> Mike
>>>>> --
>>>>> www.soft-gems.net
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>>
Re: Schema locations [message #594072 is a reply to message #57821] Thu, 17 February 2005 11:48 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090006050408040801080308
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Johan,

Only "zip" and "jar" are recognized as archive schemes by
org.eclipse.emf.common.util.URI by default but some JRE sometimes use
other schemes in their class loaders, such as "wsjar". If you define
the system property "org.eclipse.emf.common.util.URI.archiveSchemes" to
be "jar zip *wsjar*" it should work correctly because of this code in
the URI class:

// Static initializer for archiveSchemes.
static
{
Set set = new HashSet();
String propertyValue =
System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");

if (propertyValue == null)
{
set.add(SCHEME_JAR);
set.add(SCHEME_ZIP);
}
else
{
for (StringTokenizer t = new StringTokenizer(propertyValue);
t.hasMoreTokens(); )
{
set.add(t.nextToken().toLowerCase());
}
}

archiveSchemes = Collections.unmodifiableSet(set);
}



Johan Naudts wrote:

> Hi,
>
> I am currently facing a similar problem, but ONLY when running inside
> a Web application server (WebSphere v5.1 in this case). This is a
> summary the Exception I'm getting:
>
> java.lang.RuntimeException: Cannot create a resource for
> 'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
> TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
> a registered resource factory is needed
> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
>
> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
>
> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:611)
>
> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
>
> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
>
> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>
> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>
> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>
> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>
> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>
> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
> test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>
>
>
> java.lang.NullPointerException
> at org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1475)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2234)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1202)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:827)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>
> at
> test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>
> at
> test.XsdOnlineContentParser.getSigningEnvelopeFields(XsdOnli neContentParser.java:54)
>
> at org.apache.jsp._TestXsdParser._jspService(_TestXsdParser.jav a:80)
> at
> com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(Http JspBase.java:89)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWra pper.service(JspServlet.java:344)
>
> at
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFil e(JspServlet.java:662)
>
> at
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspSe rvlet.java:760)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
> at
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
> at
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
> at
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
> at
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
> at
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
> at
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
> at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
> at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
> at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
> at
> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>
> at
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
> at
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
> at
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:182)
>
> at
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
> at
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
> at
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
> at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>
> This is an excerpt from my code:
>
> // Register resource factory first
> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd",
> new XSDResourceFactoryImpl());
>
> // Create a resource set and load the main schema file into it.
> ResourceSet resourceSet = new ResourceSetImpl();
> resourceSet.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_L OCATION,
> Boolean.TRUE);
> URI uri = URI.createURI(schemaURL);
> Resource res = resourceSet.getResource(uri, true);
> XSDResourceImpl xsdSchemaResource = (XSDResourceImpl)res;
> The schemaURL = "file:/E:/Wta/Workspace/WEB WTA BROWSER TEST/XSD
> Files/IngSigEnvSchema.xsd"
>
> But again: when running standalone with exactly the same code, I don't
> have this problem, so it seems to me that, inside of a servlet/JSP
> container, XSD has difficulties locating some necessary files?
>
> Can anyone help?
>
> Thanks!
> Johan
>
>
>
> Ed Merks wrote:
>
>> HT,
>
>
>> I think you get this not matter how you create the URI since it
>> sounds like you are running standalone and still need to do:
>
>
>>
>> resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put
>> ("xsd", new XSDResourceFactoryImpl());
>
>
>
>> HT Ooi wrote:
>
>
>>> Hi!
>>>
>>> I've tried using the URI.createFileURI instead of URI.createURI and
>>> i got the following exception:
>>>
>>> java.lang.RuntimeException: Cannot create a resource for
>>
> 'file:/C:/workspace/eCute4ODI/import/wsrf-WS-ResourcePropert ies-1.2-draft-01.xsd';
>
>
>>> a registered resource factory is needed
>>>
>>> what could be the problem?
>>>
>>>
>>> Ed Merks wrote:
>>>
>>>> Wayne,
>>>
>>>
>>>
>>>> A file system path is not a URI and the "" character is not treated
>>>> as "/" in a URI. If you have a file path, use URI.createFileURI to
>>>> convert it to a proper URI. E.g., E:DublinCore1.xsd should be
>>>> file:/E:/DublinCore.xsd
>>>
>>>
>>>
>>>
>>>> Wayne wrote:
>>>
>>>
>>>
>>>>> Mike,
>>>>> I saw that you have been discussing xsd on the news group. I am
>>>>> new to =
>>>>> the Schema Infoset and an having some problems opening a file from
>>>>> a =
>>>>> file. I have the follwoing method and continuelly get exceptions
>>>>> when =
>>>>> trying to be the Resource. I was wounder if you have the time
>>>>> could you =
>>>>> look at my method and provide some guidence.
>>>>>
>>>>> private static XSDSchema loadXSDSchema(File xsdFile) {
>>>>> String schemaName = xsdFile.getPath();
>>>>> try {
>>>>> URI uri = URI.createURI(schemaName);
>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>> XSDResourceImpl xsdResource =
>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>> XSDSchema resultSchema = xsdResource.getSchema();
>>>>> } catch (Exception e) {
>>>>> e.printStackTrace();
>>>>> }
>>>>> return null;
>>>>> }
>>>>>
>>>>> the exception is:
>>>>> java.lang.RuntimeException: Cannot create a resource for =
>>>>> 'E:DublinCore1.xsd'; a registered resource factory is needed
>>>>>
>>>>> at =
>>>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>
>
>>>>>
>>>>> etImpl.java:282)
>>>>>
>>>>> at =
>>>>>
> schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>
>
>>>>>
>>>>> ava:26)
>>>>>
>>>>> at =
>>>>>
> schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>
>
>>>>>
>>>>> er.java:35)
>>>>>
>>>>> at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>>>>>
>>>>> at
>>>>> =org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>>>>>
>>>>>
>>>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>>>>
>>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>>>>
>>>>> at
>>>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>>>>
>>>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>>>>
>>>>> at xmlProcessing.xmlUI.main(xmlUI.java:257)
>>>>>
>>>>> Any help would be appreciated.
>>>>>
>>>>> Regards
>>>>>
>>>>> Wayne
>>>>>
>>>>>
>>>>>
>>>>> Mike Lischke wrote:
>>>>>
>>>>>
>>>>>
>>>>>> Hi group,
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Currently I'm trying to find a consistent solution to load an XML
>>>>>> schema
>>>>>> together will all its imported, included and redefined schemas.
>>>>>> Until now
>>>>>> I have two versions to load schemas. One loads a schema fine when
>>>>>> it is
>>>>>> located in an Eclipse project (with relative path name). It can
>>>>>> also load
>>>>>> the schema from the file system when given with absolute path.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
>>>>>> xsdSchemaResource.setURI(URI.createURI(schemaName));
>>>>>> InputStream stream =
>>>>>> getClass().getClassLoader().getResourceAsStream(schemaName);
>>>>>> if (stream == null)
>>>>>> stream = new FileInputStream(schemaName);
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> if (stream != null)
>>>>>> {
>>>>>> try
>>>>>> {
>>>>>> xsdSchemaResource.load(stream, null);
>>>>>> schemas.add(xsdSchemaResource.getSchema());
>>>>>> }
>>>>>> catch(Exception e)
>>>>>> {
>>>>>> ...
>>>>>> }
>>>>>> }
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> The second one can load schemas from the file system when I
>>>>>> specify the
>>>>>> file:// protocol.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> URI uri = URI.createURI(schemaLocation);
>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>> XSDResourceImpl xsdResource =
>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>> schemas.add(xsdResource.getSchema());
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> My problem is now: the second version also loads all included
>>>>>> etc. schemas
>>>>>> so I have the full hierarchy (which is the final goal for me).
>>>>>> But it does
>>>>>> only so when given an absolute file (or another valid URI I suppose,
>>>>>> haven't tried). It cannot load schemas from the resource of an
>>>>>> Eclipse
>>>>>> project. The first version in contrast does not load included
>>>>>> schemas, but
>>>>>> only loads the main file.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> So my question is: How can I make a combined version so that
>>>>>> regardless of
>>>>>> the actual location of the schema (URL, local file, resouce file
>>>>>> -> maybe
>>>>>> in jar) the main schema file and all those, which are referenced
>>>>>> by it (or
>>>>>> recursively by the others) are loaded successfully?
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> I already looked at the traceLoading sample code, which uses an
>>>>>> URI map,
>>>>>> however this does not help for resource files. I would need
>>>>>> stream support
>>>>>> for a generic solution, but I have not found any stream reference
>>>>>> in the
>>>>>> documentation.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Mike
>>>>>> --
>>>>>> www.soft-gems.net
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>
>


--------------090006050408040801080308
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Johan,<br>
<br>
Only "zip" and "jar" are recognized as archive schemes by
org.eclipse.emf.common.util.URI by default but some JRE sometimes use
other schemes in their class loaders, such as "wsjar".


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Schema locations [message #594132 is a reply to message #57849] Mon, 21 February 2005 13:25 Go to previous message
Eclipse UserFriend
Originally posted by: johan.naudts.ing.be

Dear Ed,

that seems to solve it BUT.... now I get a NullPointerException, caused by
a ClassCastException:

[21/02/05 14:21:08:761 CET] 1e50aa55 SystemErr R
java.lang.NullPointerException
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2035)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2296)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:399)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1348)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1725)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1125)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:115)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:103)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
Code))
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled Code))
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2075)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1947)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1232)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2245)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2797)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2829)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2368)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:442)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:348)
[21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
java.lang.reflect.Method.invoke(Method.java:386)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
[21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R
java.lang.ClassCastException:
org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaInstance(XSDSche maImpl.java:713)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2040)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1485)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2241)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
Code))
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled Code))
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
java.lang.reflect.Method.invoke(Method.java:386)
[21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
[21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)


Any ideas?

Thanks
Johan



Ed Merks wrote:

> Johan,

> Only "zip" and "jar" are recognized as archive schemes by
> org.eclipse.emf.common.util.URI by default but some JRE sometimes use
> other schemes in their class loaders, such as "wsjar". If you define
> the system property "org.eclipse.emf.common.util.URI.archiveSchemes" to
> be "jar zip *wsjar*" it should work correctly because of this code in
> the URI class:

> // Static initializer for archiveSchemes.
> static
> {
> Set set = new HashSet();
> String propertyValue =
> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");

> if (propertyValue == null)
> {
> set.add(SCHEME_JAR);
> set.add(SCHEME_ZIP);
> }
> else
> {
> for (StringTokenizer t = new StringTokenizer(propertyValue);
> t.hasMoreTokens(); )
> {
> set.add(t.nextToken().toLowerCase());
> }
> }

> archiveSchemes = Collections.unmodifiableSet(set);
> }



> Johan Naudts wrote:

>> Hi,
>>
>> I am currently facing a similar problem, but ONLY when running inside
>> a Web application server (WebSphere v5.1 in this case). This is a
>> summary the Exception I'm getting:
>>
>> java.lang.RuntimeException: Cannot create a resource for
>> 'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>
TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
>> a registered resource factory is needed
>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
>>
>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
>>
>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:611)
>>
>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
>>
>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
>>
>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>>
>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>>
>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>>
>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>>
>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>>
>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>>
>>
>>
>> java.lang.NullPointerException
>> at org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1475)
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2234)
>>
>> at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1202)
>>
>> at
>>
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:827)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
>> at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>>
>> at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>>
>> at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>>
>> at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>>
>> at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>>
>> at
>>
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>>
>> at
>>
test.XsdOnlineContentParser.getSigningEnvelopeFields(XsdOnli neContentParser.java:54)
>>
>> at org.apache.jsp._TestXsdParser._jspService(_TestXsdParser.jav a:80)
>> at
>>
com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(Http JspBase.java:89)
>>
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> at
>>
com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWra pper.service(JspServlet.java:344)
>>
>> at
>>
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFil e(JspServlet.java:662)
>>
>> at
>> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspSe rvlet.java:760)
>>
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> at
>>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>>
>> at
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>>
>> at
>>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>>
>> at
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>>
>> at
>>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>>
>> at
>>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>>
>> at
>>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>>
>> at
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>>
>> at
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>>
>> at
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>>
>> at
>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>
>> at
>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>>
>> at
>>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>>
>> at
>>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:182)
>>
>> at
>>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>>
>> at
>>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>>
>> at
>>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>>
>> at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>
>> This is an excerpt from my code:
>>
>> // Register resource factory first
>> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd",
>> new XSDResourceFactoryImpl());
>>
>> // Create a resource set and load the main schema file into it.
>> ResourceSet resourceSet = new ResourceSetImpl();
>> resourceSet.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_L OCATION,
>> Boolean.TRUE);
>> URI uri = URI.createURI(schemaURL);
>> Resource res = resourceSet.getResource(uri, true);
>> XSDResourceImpl xsdSchemaResource = (XSDResourceImpl)res;
>> The schemaURL = "file:/E:/Wta/Workspace/WEB WTA BROWSER TEST/XSD
>> Files/IngSigEnvSchema.xsd"
>>
>> But again: when running standalone with exactly the same code, I don't
>> have this problem, so it seems to me that, inside of a servlet/JSP
>> container, XSD has difficulties locating some necessary files?
>>
>> Can anyone help?
>>
>> Thanks!
>> Johan
>>
>>
>>
>> Ed Merks wrote:
>>
>>> HT,
>>
>>
>>> I think you get this not matter how you create the URI since it
>>> sounds like you are running standalone and still need to do:
>>
>>
>>>
>>> resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put
>>> ("xsd", new XSDResourceFactoryImpl());
>>
>>
>>
>>> HT Ooi wrote:
>>
>>
>>>> Hi!
>>>>
>>>> I've tried using the URI.createFileURI instead of URI.createURI and
>>>> i got the following exception:
>>>>
>>>> java.lang.RuntimeException: Cannot create a resource for
>>>
>>
'file:/C:/workspace/eCute4ODI/import/wsrf-WS-ResourcePropert ies-1.2-draft-01.xsd';
>>
>>
>>>> a registered resource factory is needed
>>>>
>>>> what could be the problem?
>>>>
>>>>
>>>> Ed Merks wrote:
>>>>
>>>>> Wayne,
>>>>
>>>>
>>>>
>>>>> A file system path is not a URI and the "" character is not treated
>>>>> as "/" in a URI. If you have a file path, use URI.createFileURI to
>>>>> convert it to a proper URI. E.g., E:DublinCore1.xsd should be
>>>>> file:/E:/DublinCore.xsd
>>>>
>>>>
>>>>
>>>>
>>>>> Wayne wrote:
>>>>
>>>>
>>>>
>>>>>> Mike,
>>>>>> I saw that you have been discussing xsd on the news group. I am
>>>>>> new to =
>>>>>> the Schema Infoset and an having some problems opening a file from
>>>>>> a =
>>>>>> file. I have the follwoing method and continuelly get exceptions
>>>>>> when =
>>>>>> trying to be the Resource. I was wounder if you have the time
>>>>>> could you =
>>>>>> look at my method and provide some guidence.
>>>>>>
>>>>>> private static XSDSchema loadXSDSchema(File xsdFile) {
>>>>>> String schemaName = xsdFile.getPath();
>>>>>> try {
>>>>>> URI uri = URI.createURI(schemaName);
>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>> XSDResourceImpl xsdResource =
>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>> XSDSchema resultSchema = xsdResource.getSchema();
>>>>>> } catch (Exception e) {
>>>>>> e.printStackTrace();
>>>>>> }
>>>>>> return null;
>>>>>> }
>>>>>>
>>>>>> the exception is:
>>>>>> java.lang.RuntimeException: Cannot create a resource for =
>>>>>> 'E:DublinCore1.xsd'; a registered resource factory is needed
>>>>>>
>>>>>> at =
>>>>>>
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>>
>>
>>>>>>
>>>>>> etImpl.java:282)
>>>>>>
>>>>>> at =
>>>>>>
>> schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>>
>>
>>>>>>
>>>>>> ava:26)
>>>>>>
>>>>>> at =
>>>>>>
>> schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>>
>>
>>>>>>
>>>>>> er.java:35)
>>>>>>
>>>>>> at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>>>>>>
>>>>>> at
>>>>>>
=org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>>>>>>
>>>>>>
>>>>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>>>>>
>>>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>>>>>
>>>>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>>>>>
>>>>>> at xmlProcessing.xmlUI.main(xmlUI.java:257)
>>>>>>
>>>>>> Any help would be appreciated.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Wayne
>>>>>>
>>>>>>
>>>>>>
>>>>>> Mike Lischke wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hi group,
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Currently I'm trying to find a consistent solution to load an XML
>>>>>>> schema
>>>>>>> together will all its imported, included and redefined schemas.
>>>>>>> Until now
>>>>>>> I have two versions to load schemas. One loads a schema fine when
>>>>>>> it is
>>>>>>> located in an Eclipse project (with relative path name). It can
>>>>>>> also load
>>>>>>> the schema from the file system when given with absolute path.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
>>>>>>> xsdSchemaResource.setURI(URI.createURI(schemaName));
>>>>>>> InputStream stream =
>>>>>>> getClass().getClassLoader().getResourceAsStream(schemaName);
>>>>>>> if (stream == null)
>>>>>>> stream = new FileInputStream(schemaName);
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> if (stream != null)
>>>>>>> {
>>>>>>> try
>>>>>>> {
>>>>>>> xsdSchemaResource.load(stream, null);
>>>>>>> schemas.add(xsdSchemaResource.getSchema());
>>>>>>> }
>>>>>>> catch(Exception e)
>>>>>>> {
>>>>>>> ...
>>>>>>> }
>>>>>>> }
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> The second one can load schemas from the file system when I
>>>>>>> specify the
>>>>>>> file:// protocol.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> URI uri = URI.createURI(schemaLocation);
>>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>>> XSDResourceImpl xsdResource =
>>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>>> schemas.add(xsdResource.getSchema());
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> My problem is now: the second version also loads all included
>>>>>>> etc. schemas
>>>>>>> so I have the full hierarchy (which is the final goal for me).
>>>>>>> But it does
>>>>>>> only so when given an absolute file (or another valid URI I suppose,
>>>>>>> haven't tried). It cannot load schemas from the resource of an
>>>>>>> Eclipse
>>>>>>> project. The first version in contrast does not load included
>>>>>>> schemas, but
>>>>>>> only loads the main file.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> So my question is: How can I make a combined version so that
>>>>>>> regardless of
>>>>>>> the actual location of the schema (URL, local file, resouce file
>>>>>>> -> maybe
>>>>>>> in jar) the main schema file and all those, which are referenced
>>>>>>> by it (or
>>>>>>> recursively by the others) are loaded successfully?
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> I already looked at the traceLoading sample code, which uses an
>>>>>>> URI map,
>>>>>>> however this does not help for resource files. I would need
>>>>>>> stream support
>>>>>>> for a generic solution, but I have not found any stream reference
>>>>>>> in the
>>>>>>> documentation.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Mike
>>>>>>> --
>>>>>>> www.soft-gems.net
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>
Re: Schema locations [message #594150 is a reply to message #57929] Mon, 21 February 2005 14:47 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Johan,

The first exception looks like what would happen if the global schema
for schema can't be loaded and the second exception looks like the
global schema was loaded with an XMIResourceImpl instead of an
XSDResourceImpl and hence failed to load. Both these problems are
likely caused by the use of a scheme other than jar: or zip: in the
classpath.


Johan Naudts wrote:

> Dear Ed,
>
> that seems to solve it BUT.... now I get a NullPointerException,
> caused by a ClassCastException:
>
> [21/02/05 14:21:08:761 CET] 1e50aa55 SystemErr R
> java.lang.NullPointerException
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2035)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2296)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:399)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1348)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1725)
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1125)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:115)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:103)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
> Code))
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
> Code))
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2075)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1947)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1232)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2245)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2797)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2829)
>
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2368)
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:442)
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:348)
> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> java.lang.reflect.Method.invoke(Method.java:386)
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R
> java.lang.ClassCastException:
> org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaInstance(XSDSche maImpl.java:713)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2040)
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1485)
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2241)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
> Code))
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
> Code))
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> java.lang.reflect.Method.invoke(Method.java:386)
> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
> org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>
>
> Any ideas?
>
> Thanks
> Johan
>
>
>
> Ed Merks wrote:
>
>> Johan,
>
>
>> Only "zip" and "jar" are recognized as archive schemes by
>> org.eclipse.emf.common.util.URI by default but some JRE sometimes use
>> other schemes in their class loaders, such as "wsjar". If you define
>> the system property "org.eclipse.emf.common.util.URI.archiveSchemes"
>> to be "jar zip *wsjar*" it should work correctly because of this code
>> in the URI class:
>
>
>> // Static initializer for archiveSchemes.
>> static
>> {
>> Set set = new HashSet();
>> String propertyValue =
>>
>> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");
>
>
>> if (propertyValue == null)
>> {
>> set.add(SCHEME_JAR);
>> set.add(SCHEME_ZIP);
>> }
>> else
>> {
>> for (StringTokenizer t = new StringTokenizer(propertyValue);
>> t.hasMoreTokens(); )
>> {
>> set.add(t.nextToken().toLowerCase());
>> }
>> }
>
>
>> archiveSchemes = Collections.unmodifiableSet(set);
>> }
>
>
>
>
>> Johan Naudts wrote:
>
>
>>> Hi,
>>>
>>> I am currently facing a similar problem, but ONLY when running
>>> inside a Web application server (WebSphere v5.1 in this case). This
>>> is a summary the Exception I'm getting:
>>>
>>> java.lang.RuntimeException: Cannot create a resource for
>>> 'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>
> TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
>
>
>>> a registered resource factory is needed
>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
>
>
>>>
>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
>
>
>>>
>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:611)
>
>
>>>
>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>
> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
>
>
>>>
>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
>>>
>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>
>
>>>
>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>
>
>>>
>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>
>
>>>
>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>
>
>>>
>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>
>
>>>
>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>
> test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>
>
>>>
>>>
>>>
>>> java.lang.NullPointerException
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1475)
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2234)
>>>
>>> at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1202)
>
>
>>>
>>> at
>>
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:827)
>
>
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
>>> at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>
>
>>>
>>> at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>
>
>>>
>>> at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>
>
>>>
>>> at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>
>
>>>
>>> at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>
>
>>>
>>> at
>>
> test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>
>
>>>
>>> at
>>
> test.XsdOnlineContentParser.getSigningEnvelopeFields(XsdOnli neContentParser.java:54)
>
>
>>>
>>> at
>>> org.apache.jsp._TestXsdParser._jspService(_TestXsdParser.jav a:80)
>>> at
>>
> com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(Http JspBase.java:89)
>
>
>>>
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>> at
>>
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWra pper.service(JspServlet.java:344)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFil e(JspServlet.java:662)
>
>
>>>
>>> at
>>> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspSe rvlet.java:760)
>>>
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>> at
>>
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
>
>>>
>>> at
>>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>>
>>> at
>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:182)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
>
>>>
>>> at
>>
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
>
>>>
>>> at
>>
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
>
>>>
>>> at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>
>>> This is an excerpt from my code:
>>>
>>> // Register resource factory first
>>> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd",
>>> new XSDResourceFactoryImpl());
>>> // Create a resource set and load the main schema file into it.
>>> ResourceSet resourceSet = new ResourceSetImpl();
>>> resourceSet.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_L OCATION,
>>> Boolean.TRUE);
>>> URI uri = URI.createURI(schemaURL);
>>> Resource res = resourceSet.getResource(uri, true);
>>> XSDResourceImpl xsdSchemaResource = (XSDResourceImpl)res;
>>> The schemaURL = "file:/E:/Wta/Workspace/WEB WTA BROWSER TEST/XSD
>>> Files/IngSigEnvSchema.xsd"
>>>
>>> But again: when running standalone with exactly the same code, I
>>> don't have this problem, so it seems to me that, inside of a
>>> servlet/JSP container, XSD has difficulties locating some necessary
>>> files?
>>>
>>> Can anyone help?
>>>
>>> Thanks!
>>> Johan
>>>
>>>
>>>
>>> Ed Merks wrote:
>>>
>>>> HT,
>>>
>>>
>>>
>>>> I think you get this not matter how you create the URI since it
>>>> sounds like you are running standalone and still need to do:
>>>
>>>
>>>
>>>>
>>>> resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put
>>>>
>>>> ("xsd", new XSDResourceFactoryImpl());
>>>
>>>
>>>
>>>
>>>> HT Ooi wrote:
>>>
>>>
>>>
>>>>> Hi!
>>>>>
>>>>> I've tried using the URI.createFileURI instead of URI.createURI
>>>>> and i got the following exception:
>>>>>
>>>>> java.lang.RuntimeException: Cannot create a resource for
>>>>
>>>>
>>>
> 'file:/C:/workspace/eCute4ODI/import/wsrf-WS-ResourcePropert ies-1.2-draft-01.xsd';
>
>
>>>
>>>
>>>>> a registered resource factory is needed
>>>>>
>>>>> what could be the problem?
>>>>>
>>>>>
>>>>> Ed Merks wrote:
>>>>>
>>>>>> Wayne,
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> A file system path is not a URI and the "" character is not
>>>>>> treated as "/" in a URI. If you have a file path, use
>>>>>> URI.createFileURI to convert it to a proper URI. E.g.,
>>>>>> E:DublinCore1.xsd should be file:/E:/DublinCore.xsd
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Wayne wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>> Mike,
>>>>>>> I saw that you have been discussing xsd on the news group. I am
>>>>>>> new to =
>>>>>>> the Schema Infoset and an having some problems opening a file
>>>>>>> from a =
>>>>>>> file. I have the follwoing method and continuelly get exceptions
>>>>>>> when =
>>>>>>> trying to be the Resource. I was wounder if you have the time
>>>>>>> could you =
>>>>>>> look at my method and provide some guidence.
>>>>>>>
>>>>>>> private static XSDSchema loadXSDSchema(File xsdFile) {
>>>>>>> String schemaName = xsdFile.getPath();
>>>>>>> try {
>>>>>>> URI uri = URI.createURI(schemaName);
>>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>>> XSDResourceImpl xsdResource =
>>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>>> XSDSchema resultSchema = xsdResource.getSchema();
>>>>>>> } catch (Exception e) {
>>>>>>> e.printStackTrace();
>>>>>>> }
>>>>>>> return null;
>>>>>>> }
>>>>>>>
>>>>>>> the exception is:
>>>>>>> java.lang.RuntimeException: Cannot create a resource for =
>>>>>>> 'E:DublinCore1.xsd'; a registered resource factory is needed
>>>>>>>
>>>>>>> at =
>>>>>>>
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>>>
>>>
>>>>>>>
>>>>>>> etImpl.java:282)
>>>>>>>
>>>>>>> at =
>>>>>>>
>>> schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>>>
>>>
>>>>>>>
>>>>>>> ava:26)
>>>>>>>
>>>>>>> at =
>>>>>>>
>>> schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>>>
>>>
>>>>>>>
>>>>>>> er.java:35)
>>>>>>>
>>>>>>> at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>>>>>>>
>>>>>>> at
>>>>>>>
> =org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>
>>>>>>>
>>>>>>>
>>>>>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>>>>>>
>>>>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>>>>>>
>>>>>>> at xmlProcessing.xmlUI.main(xmlUI.java:257)
>>>>>>>
>>>>>>> Any help would be appreciated.
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> Wayne
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Mike Lischke wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Hi group,
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Currently I'm trying to find a consistent solution to load an
>>>>>>>> XML schema
>>>>>>>> together will all its imported, included and redefined schemas.
>>>>>>>> Until now
>>>>>>>> I have two versions to load schemas. One loads a schema fine
>>>>>>>> when it is
>>>>>>>> located in an Eclipse project (with relative path name). It can
>>>>>>>> also load
>>>>>>>> the schema from the file system when given with absolute path.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
>>>>>>>> xsdSchemaResource.setURI(URI.createURI(schemaName));
>>>>>>>> InputStream stream =
>>>>>>>> getClass().getClassLoader().getResourceAsStream(schemaName);
>>>>>>>> if (stream == null)
>>>>>>>> stream = new FileInputStream(schemaName);
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> if (stream != null)
>>>>>>>> {
>>>>>>>> try
>>>>>>>> {
>>>>>>>> xsdSchemaResource.load(stream, null);
>>>>>>>> schemas.add(xsdSchemaResource.getSchema());
>>>>>>>> }
>>>>>>>> catch(Exception e)
>>>>>>>> {
>>>>>>>> ...
>>>>>>>> }
>>>>>>>> }
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> The second one can load schemas from the file system when I
>>>>>>>> specify the
>>>>>>>> file:// protocol.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> URI uri = URI.createURI(schemaLocation);
>>>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>>>> XSDResourceImpl xsdResource =
>>>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>>>> schemas.add(xsdResource.getSchema());
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> My problem is now: the second version also loads all included
>>>>>>>> etc. schemas
>>>>>>>> so I have the full hierarchy (which is the final goal for me).
>>>>>>>> But it does
>>>>>>>> only so when given an absolute file (or another valid URI I
>>>>>>>> suppose,
>>>>>>>> haven't tried). It cannot load schemas from the resource of an
>>>>>>>> Eclipse
>>>>>>>> project. The first version in contrast does not load included
>>>>>>>> schemas, but
>>>>>>>> only loads the main file.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> So my question is: How can I make a combined version so that
>>>>>>>> regardless of
>>>>>>>> the actual location of the schema (URL, local file, resouce
>>>>>>>> file -> maybe
>>>>>>>> in jar) the main schema file and all those, which are
>>>>>>>> referenced by it (or
>>>>>>>> recursively by the others) are loaded successfully?
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> I already looked at the traceLoading sample code, which uses an
>>>>>>>> URI map,
>>>>>>>> however this does not help for resource files. I would need
>>>>>>>> stream support
>>>>>>>> for a generic solution, but I have not found any stream
>>>>>>>> reference in the
>>>>>>>> documentation.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Mike
>>>>>>>> --
>>>>>>>> www.soft-gems.net
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>
>>>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Schema locations [message #594221 is a reply to message #57956] Thu, 24 February 2005 08:05 Go to previous message
Eclipse UserFriend
Originally posted by: johan.naudts.ing.be

Dear Ed,

if I unzip xsd.resources.jar and put the directory structure in my
classpath, it works fine. So it looks as if WebSphere can't seem to solve
some resources when zipped. Could that be the reason?

thanks
Johan


Ed Merks wrote:

> Johan,

> The first exception looks like what would happen if the global schema
> for schema can't be loaded and the second exception looks like the
> global schema was loaded with an XMIResourceImpl instead of an
> XSDResourceImpl and hence failed to load. Both these problems are
> likely caused by the use of a scheme other than jar: or zip: in the
> classpath.


> Johan Naudts wrote:

>> Dear Ed,
>>
>> that seems to solve it BUT.... now I get a NullPointerException,
>> caused by a ClassCastException:
>>
>> [21/02/05 14:21:08:761 CET] 1e50aa55 SystemErr R
>> java.lang.NullPointerException
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2035)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2296)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:399)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1348)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1725)
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1125)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:115)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:103)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>> Code))
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>> Code))
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2075)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1947)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1232)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2245)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2797)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2829)
>>
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2368)
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:442)
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:348)
>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>> java.lang.reflect.Method.invoke(Method.java:386)
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>>
>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R
>> java.lang.ClassCastException:
>> org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaInstance(XSDSche maImpl.java:713)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2040)
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1485)
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2241)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>> Code))
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>> Code))
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>>
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>> java.lang.reflect.Method.invoke(Method.java:386)
>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>>
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>
>>
>> Any ideas?
>>
>> Thanks
>> Johan
>>
>>
>>
>> Ed Merks wrote:
>>
>>> Johan,
>>
>>
>>> Only "zip" and "jar" are recognized as archive schemes by
>>> org.eclipse.emf.common.util.URI by default but some JRE sometimes use
>>> other schemes in their class loaders, such as "wsjar". If you define
>>> the system property "org.eclipse.emf.common.util.URI.archiveSchemes"
>>> to be "jar zip *wsjar*" it should work correctly because of this code
>>> in the URI class:
>>
>>
>>> // Static initializer for archiveSchemes.
>>> static
>>> {
>>> Set set = new HashSet();
>>> String propertyValue =
>>>
>>> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");
>>
>>
>>> if (propertyValue == null)
>>> {
>>> set.add(SCHEME_JAR);
>>> set.add(SCHEME_ZIP);
>>> }
>>> else
>>> {
>>> for (StringTokenizer t = new StringTokenizer(propertyValue);
>>> t.hasMoreTokens(); )
>>> {
>>> set.add(t.nextToken().toLowerCase());
>>> }
>>> }
>>
>>
>>> archiveSchemes = Collections.unmodifiableSet(set);
>>> }
>>
>>
>>
>>
>>> Johan Naudts wrote:
>>
>>
>>>> Hi,
>>>>
>>>> I am currently facing a similar problem, but ONLY when running
>>>> inside a Web application server (WebSphere v5.1 in this case). This
>>>> is a summary the Exception I'm getting:
>>>>
>>>> java.lang.RuntimeException: Cannot create a resource for
>>>> 'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>>
>>
TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
>>
>>
>>>> a registered resource factory is needed
>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
>>
>>
>>>>
>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
>>
>>
>>>>
>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:611)
>>
>>
>>>>
>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>
>>
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
>>
>>
>>>>
>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>
org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
>>>>
>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>>
>>
>>>>
>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>>
>>
>>>>
>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>>
>>
>>>>
>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>>
>>
>>>>
>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>>
>>
>>>>
>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>
>>
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>>
>>
>>>>
>>>>
>>>>
>>>> java.lang.NullPointerException
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1475)
>>>> at
>>>>
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2234)
>>>>
>>>> at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1202)
>>
>>
>>>>
>>>> at
>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:827)
>>
>>
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
>>>> at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>>
>>
>>>>
>>>> at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>>
>>
>>>>
>>>> at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>>
>>
>>>>
>>>> at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>>
>>
>>>>
>>>> at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>>
>>
>>>>
>>>> at
>>>
>>
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>>
>>
>>>>
>>>> at
>>>
>>
test.XsdOnlineContentParser.getSigningEnvelopeFields(XsdOnli neContentParser.java:54)
>>
>>
>>>>
>>>> at
>>>> org.apache.jsp._TestXsdParser._jspService(_TestXsdParser.jav a:80)
>>>> at
>>>
>>
com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(Http JspBase.java:89)
>>
>>
>>>>
>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>> at
>>>
>>
com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWra pper.service(JspServlet.java:344)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFil e(JspServlet.java:662)
>>
>>
>>>>
>>>> at
>>>>
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspSe rvlet.java:760)
>>>>
>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>> at
>>>
>>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>>
>>
>>>>
>>>> at
>>>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:182)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>>
>>
>>>>
>>>> at
>>>
>>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>>
>>
>>>>
>>>> at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>
>>>> This is an excerpt from my code:
>>>>
>>>> // Register resource factory first
>>>> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd",
>>>> new XSDResourceFactoryImpl());
>>>> // Create a resource set and load the main schema file into it.
>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>> resourceSet.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_L OCATION,
>>>> Boolean.TRUE);
>>>> URI uri = URI.createURI(schemaURL);
>>>> Resource res = resourceSet.getResource(uri, true);
>>>> XSDResourceImpl xsdSchemaResource = (XSDResourceImpl)res;
>>>> The schemaURL = "file:/E:/Wta/Workspace/WEB WTA BROWSER TEST/XSD
>>>> Files/IngSigEnvSchema.xsd"
>>>>
>>>> But again: when running standalone with exactly the same code, I
>>>> don't have this problem, so it seems to me that, inside of a
>>>> servlet/JSP container, XSD has difficulties locating some necessary
>>>> files?
>>>>
>>>> Can anyone help?
>>>>
>>>> Thanks!
>>>> Johan
>>>>
>>>>
>>>>
>>>> Ed Merks wrote:
>>>>
>>>>> HT,
>>>>
>>>>
>>>>
>>>>> I think you get this not matter how you create the URI since it
>>>>> sounds like you are running standalone and still need to do:
>>>>
>>>>
>>>>
>>>>>
>>>>> resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put
>>>>>
>>>>> ("xsd", new XSDResourceFactoryImpl());
>>>>
>>>>
>>>>
>>>>
>>>>> HT Ooi wrote:
>>>>
>>>>
>>>>
>>>>>> Hi!
>>>>>>
>>>>>> I've tried using the URI.createFileURI instead of URI.createURI
>>>>>> and i got the following exception:
>>>>>>
>>>>>> java.lang.RuntimeException: Cannot create a resource for
>>>>>
>>>>>
>>>>
>>
'file:/C:/workspace/eCute4ODI/import/wsrf-WS-ResourcePropert ies-1.2-draft-01.xsd';
>>
>>
>>>>
>>>>
>>>>>> a registered resource factory is needed
>>>>>>
>>>>>> what could be the problem?
>>>>>>
>>>>>>
>>>>>> Ed Merks wrote:
>>>>>>
>>>>>>> Wayne,
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> A file system path is not a URI and the "" character is not
>>>>>>> treated as "/" in a URI. If you have a file path, use
>>>>>>> URI.createFileURI to convert it to a proper URI. E.g.,
>>>>>>> E:DublinCore1.xsd should be file:/E:/DublinCore.xsd
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Wayne wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>> Mike,
>>>>>>>> I saw that you have been discussing xsd on the news group. I am
>>>>>>>> new to =
>>>>>>>> the Schema Infoset and an having some problems opening a file
>>>>>>>> from a =
>>>>>>>> file. I have the follwoing method and continuelly get exceptions
>>>>>>>> when =
>>>>>>>> trying to be the Resource. I was wounder if you have the time
>>>>>>>> could you =
>>>>>>>> look at my method and provide some guidence.
>>>>>>>>
>>>>>>>> private static XSDSchema loadXSDSchema(File xsdFile) {
>>>>>>>> String schemaName = xsdFile.getPath();
>>>>>>>> try {
>>>>>>>> URI uri = URI.createURI(schemaName);
>>>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>>>> XSDResourceImpl xsdResource =
>>>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>>>> XSDSchema resultSchema = xsdResource.getSchema();
>>>>>>>> } catch (Exception e) {
>>>>>>>> e.printStackTrace();
>>>>>>>> }
>>>>>>>> return null;
>>>>>>>> }
>>>>>>>>
>>>>>>>> the exception is:
>>>>>>>> java.lang.RuntimeException: Cannot create a resource for =
>>>>>>>> 'E:DublinCore1.xsd'; a registered resource factory is needed
>>>>>>>>
>>>>>>>> at =
>>>>>>>>
>>>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>>>>
>>>>
>>>>>>>>
>>>>>>>> etImpl.java:282)
>>>>>>>>
>>>>>>>> at =
>>>>>>>>
>>>>
schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>>>>
>>>>
>>>>>>>>
>>>>>>>> ava:26)
>>>>>>>>
>>>>>>>> at =
>>>>>>>>
>>>>
schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>>>>
>>>>
>>>>>>>>
>>>>>>>> er.java:35)
>>>>>>>>
>>>>>>>> at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>>>>>>>>
>>>>>>>> at
>>>>>>>>
>> =org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>>>>>>>
>>>>>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>>>>>>>
>>>>>>>> at xmlProcessing.xmlUI.main(xmlUI.java:257)
>>>>>>>>
>>>>>>>> Any help would be appreciated.
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>> Wayne
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Mike Lischke wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Hi group,
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Currently I'm trying to find a consistent solution to load an
>>>>>>>>> XML schema
>>>>>>>>> together will all its imported, included and redefined schemas.
>>>>>>>>> Until now
>>>>>>>>> I have two versions to load schemas. One loads a schema fine
>>>>>>>>> when it is
>>>>>>>>> located in an Eclipse project (with relative path name). It can
>>>>>>>>> also load
>>>>>>>>> the schema from the file system when given with absolute path.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
>>>>>>>>> xsdSchemaResource.setURI(URI.createURI(schemaName));
>>>>>>>>> InputStream stream =
>>>>>>>>> getClass().getClassLoader().getResourceAsStream(schemaName);
>>>>>>>>> if (stream == null)
>>>>>>>>> stream = new FileInputStream(schemaName);
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> if (stream != null)
>>>>>>>>> {
>>>>>>>>> try
>>>>>>>>> {
>>>>>>>>> xsdSchemaResource.load(stream, null);
>>>>>>>>> schemas.add(xsdSchemaResource.getSchema());
>>>>>>>>> }
>>>>>>>>> catch(Exception e)
>>>>>>>>> {
>>>>>>>>> ...
>>>>>>>>> }
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> The second one can load schemas from the file system when I
>>>>>>>>> specify the
>>>>>>>>> file:// protocol.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> URI uri = URI.createURI(schemaLocation);
>>>>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>>>>> XSDResourceImpl xsdResource =
>>>>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>>>>> schemas.add(xsdResource.getSchema());
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> My problem is now: the second version also loads all included
>>>>>>>>> etc. schemas
>>>>>>>>> so I have the full hierarchy (which is the final goal for me).
>>>>>>>>> But it does
>>>>>>>>> only so when given an absolute file (or another valid URI I
>>>>>>>>> suppose,
>>>>>>>>> haven't tried). It cannot load schemas from the resource of an
>>>>>>>>> Eclipse
>>>>>>>>> project. The first version in contrast does not load included
>>>>>>>>> schemas, but
>>>>>>>>> only loads the main file.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> So my question is: How can I make a combined version so that
>>>>>>>>> regardless of
>>>>>>>>> the actual location of the schema (URL, local file, resouce
>>>>>>>>> file -> maybe
>>>>>>>>> in jar) the main schema file and all those, which are
>>>>>>>>> referenced by it (or
>>>>>>>>> recursively by the others) are loaded successfully?
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> I already looked at the traceLoading sample code, which uses an
>>>>>>>>> URI map,
>>>>>>>>> however this does not help for resource files. I would need
>>>>>>>>> stream support
>>>>>>>>> for a generic solution, but I have not found any stream
>>>>>>>>> reference in the
>>>>>>>>> documentation.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Mike
>>>>>>>>> --
>>>>>>>>> www.soft-gems.net
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>
Re: Schema locations [message #594252 is a reply to message #58108] Thu, 24 February 2005 11:05 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010902070605020909020208
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Johan,

I believe it's still caused by WebSphere using wsjar for the things on
the classpath and the xsd.resources.jar will be on the classpath. You
earlier showed this trace:

wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d

If wsjar is not configured to be recognized as an archive scheme, this
URI will be treated as opaque. (The RFC http://www.ietf.org/rfc/rfc2396.txt
defines this term; a URI is opaque if the schema is not followed by a
/.) An opaque URI has no file extension so the .xsd in the name is not
recognized and the XSDResourceFactory is not used, resulting in either
no factory for standalone or an XMIResourceFactory for Eclipse/headless
being used.

Are you sure you've set the system property to configure the archive
schemes? All symptoms still seem to indicate you've not...


Johan Naudts wrote:

> Dear Ed,
>
> if I unzip xsd.resources.jar and put the directory structure in my
> classpath, it works fine. So it looks as if WebSphere can't seem to
> solve some resources when zipped. Could that be the reason?
>
> thanks
> Johan
>
>
> Ed Merks wrote:
>
>> Johan,
>
>
>> The first exception looks like what would happen if the global schema
>> for schema can't be loaded and the second exception looks like the
>> global schema was loaded with an XMIResourceImpl instead of an
>> XSDResourceImpl and hence failed to load. Both these problems are
>> likely caused by the use of a scheme other than jar: or zip: in the
>> classpath.
>
>
>
>> Johan Naudts wrote:
>
>
>>> Dear Ed,
>>>
>>> that seems to solve it BUT.... now I get a NullPointerException,
>>> caused by a ClassCastException:
>>>
>>> [21/02/05 14:21:08:761 CET] 1e50aa55 SystemErr R
>>> java.lang.NullPointerException
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2035)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2296)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:399)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1348)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1725)
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1125)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:115)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:103)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>
>
>>> Code))
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>> Code))
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2075)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1947)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1232)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2245)
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2797)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2829)
>
>
>>>
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2368)
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:442)
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:348)
>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>> java.lang.reflect.Method.invoke(Method.java:386)
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
>
>>>
>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R
>>> java.lang.ClassCastException:
>>> org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaInstance(XSDSche maImpl.java:713)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2040)
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1485)
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2241)
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>
>
>>> Code))
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>> Code))
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>
>
>>>
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>> java.lang.reflect.Method.invoke(Method.java:386)
>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>
> org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
>
>>>
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>
>>>
>>> Any ideas?
>>>
>>> Thanks
>>> Johan
>>>
>>>
>>>
>>> Ed Merks wrote:
>>>
>>>> Johan,
>>>
>>>
>>>
>>>> Only "zip" and "jar" are recognized as archive schemes by
>>>> org.eclipse.emf.common.util.URI by default but some JRE sometimes
>>>> use other schemes in their class loaders, such as "wsjar". If you
>>>> define the system property
>>>> "org.eclipse.emf.common.util.URI.archiveSchemes" to be "jar zip
>>>> *wsjar*" it should work correctly because of this code in the URI
>>>> class:
>>>
>>>
>>>
>>>> // Static initializer for archiveSchemes.
>>>> static
>>>> {
>>>> Set set = new HashSet();
>>>> String propertyValue =
>>>>
>>>> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");
>>>
>>>
>>>
>>>> if (propertyValue == null)
>>>> {
>>>> set.add(SCHEME_JAR);
>>>> set.add(SCHEME_ZIP);
>>>> }
>>>> else
>>>> {
>>>> for (StringTokenizer t = new StringTokenizer(propertyValue);
>>>> t.hasMoreTokens(); )
>>>> {
>>>> set.add(t.nextToken().toLowerCase());
>>>> }
>>>> }
>>>
>>>
>>>
>>>> archiveSchemes = Collections.unmodifiableSet(set);
>>>> }
>>>
>>>
>>>
>>>
>>>
>>>> Johan Naudts wrote:
>>>
>>>
>>>
>>>>> Hi,
>>>>>
>>>>> I am currently facing a similar problem, but ONLY when running
>>>>> inside a Web application server (WebSphere v5.1 in this case).
>>>>> This is a summary the Exception I'm getting:
>>>>>
>>>>> java.lang.RuntimeException: Cannot create a resource for
>>>>> 'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>>>
>>>>
>>>
> TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
>
>
>>>
>>>
>>>>> a registered resource factory is needed
>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
>
>
>>>
>>>
>>>>>
>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
>
>
>>>
>>>
>>>>>
>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:611)
>
>
>>>
>>>
>>>>>
>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>>>>>
>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
>
>
>>>
>>>
>>>>>
>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>
> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
>
>
>>>>>
>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>
>
>>>
>>>
>>>>>
>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>
>
>>>
>>>
>>>>>
>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>
>
>>>
>>>
>>>>>
>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>
>
>>>
>>>
>>>>>
>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>
>
>>>
>>>
>>>>>
>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>
>>>>
>>>
> test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>
>>>>> java.lang.NullPointerException
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1475)
>>>>> at
>>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2234)
>
>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1202)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:827)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
>>>>> at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> test.XsdOnlineContentParser.getSigningEnvelopeFields(XsdOnli neContentParser.java:54)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>> org.apache.jsp._TestXsdParser._jspService(_TestXsdParser.jav a:80)
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(Http JspBase.java:89)
>
>
>>>
>>>
>>>>>
>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWra pper.service(JspServlet.java:344)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFil e(JspServlet.java:662)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspSe rvlet.java:760)
>
>
>>>>>
>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>
>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:182)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
>
>>>
>>>
>>>>>
>>>>> at
>>>>
>>>>
>>>
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
>
>>>
>>>
>>>>>
>>>>> at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>>
>>>>> This is an excerpt from my code:
>>>>>
>>>>> // Register resource factory first
>>>>> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd",
>>>>> new XSDResourceFactoryImpl());
>>>>> // Create a resource set and load the main schema file into
>>>>> it.
>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>> resourceSet.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_L OCATION,
>>>>> Boolean.TRUE);
>>>>> URI uri = URI.createURI(schemaURL);
>>>>> Resource res = resourceSet.getResource(uri, true);
>>>>> XSDResourceImpl xsdSchemaResource = (XSDResourceImpl)res;
>>>>> The schemaURL = "file:/E:/Wta/Workspace/WEB WTA BROWSER TEST/XSD
>>>>> Files/IngSigEnvSchema.xsd"
>>>>>
>>>>> But again: when running standalone with exactly the same code, I
>>>>> don't have this problem, so it seems to me that, inside of a
>>>>> servlet/JSP container, XSD has difficulties locating some
>>>>> necessary files?
>>>>>
>>>>> Can anyone help?
>>>>>
>>>>> Thanks!
>>>>> Johan
>>>>>
>>>>>
>>>>>
>>>>> Ed Merks wrote:
>>>>>
>>>>>> HT,
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> I think you get this not matter how you create the URI since it
>>>>>> sounds like you are running standalone and still need to do:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>> resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put
>>>>>>
>>>>>> ("xsd", new XSDResourceFactoryImpl());
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> HT Ooi wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>> Hi!
>>>>>>>
>>>>>>> I've tried using the URI.createFileURI instead of URI.createURI
>>>>>>> and i got the following exception:
>>>>>>>
>>>>>>> java.lang.RuntimeException: Cannot create a resource for
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> 'file:/C:/workspace/eCute4ODI/import/wsrf-WS-ResourcePropert ies-1.2-draft-01.xsd';
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>> a registered resource factory is needed
>>>>>>>
>>>>>>> what could be the problem?
>>>>>>>
>>>>>>>
>>>>>>> Ed Merks wrote:
>>>>>>>
>>>>>>>> Wayne,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> A file system path is not a URI and the "" character is not
>>>>>>>> treated as "/" in a URI. If you have a file path, use
>>>>>>>> URI.createFileURI to convert it to a proper URI. E.g.,
>>>>>>>> E:DublinCore1.xsd should be file:/E:/DublinCore.xsd
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Wayne wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>> Mike,
>>>>>>>>> I saw that you have been discussing xsd on the news group. I
>>>>>>>>> am new to =
>>>>>>>>> the Schema Infoset and an having some problems opening a file
>>>>>>>>> from a =
>>>>>>>>> file. I have the follwoing method and continuelly get
>>>>>>>>> exceptions when =
>>>>>>>>> trying to be the Resource. I was wounder if you have the time
>>>>>>>>> could you =
>>>>>>>>> look at my method and provide some guidence.
>>>>>>>>>
>>>>>>>>> private static XSDSchema loadXSDSchema(File xsdFile) {
>>>>>>>>> String schemaName = xsdFile.getPath();
>>>>>>>>> try {
>>>>>>>>> URI uri = URI.createURI(schemaName);
>>>>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>>>>> XSDResourceImpl xsdResource =
>>>>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>>>>> XSDSchema resultSchema = xsdResource.getSchema();
>>>>>>>>> } catch (Exception e) {
>>>>>>>>> e.printStackTrace();
>>>>>>>>> }
>>>>>>>>> return null;
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> the exception is:
>>>>>>>>> java.lang.RuntimeException: Cannot create a resource for =
>>>>>>>>> 'E:DublinCore1.xsd'; a registered resource factory is needed
>>>>>>>>>
>>>>>>>>> at =
>>>>>>>>>
>>>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>
>
>>>>>
>>>>>
>>>>>>>>>
>>>>>>>>> etImpl.java:282)
>>>>>>>>>
>>>>>>>>> at =
>>>>>>>>>
>>>>>
> schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>
>
>>>>>
>>>>>
>>>>>>>>>
>>>>>>>>> ava:26)
>>>>>>>>>
>>>>>>>>> at =
>>>>>>>>>
>>>>>
> schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>
>
>>>>>
>>>>>
>>>>>>>>>
>>>>>>>>> er.java:35)
>>>>>>>>>
>>>>>>>>> at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>>
>>> =org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>>>
>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>>>>>>>>
>>>>>>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at xmlProcessing.xmlUI.main(xmlUI.java:257)
>>>>>>>>>
>>>>>>>>> Any help would be appreciated.
>>>>>>>>>
>>>>>>>>> Regards
>>>>>>>>>
>>>>>>>>> Wayne
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Mike Lischke wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Hi group,
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Currently I'm trying to find a consistent solution to load an
>>>>>>>>>> XML schema
>>>>>>>>>> together will all its imported, included and redefined
>>>>>>>>>> schemas. Until now
>>>>>>>>>> I have two versions to load schemas. One loads a schema fine
>>>>>>>>>> when it is
>>>>>>>>>> located in an Eclipse project (with relative path name). It
>>>>>>>>>> can also load
>>>>>>>>>> the schema from the file system when given with absolute path.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> XSDResourceImpl xsdSchemaResource = new XSDResourceImpl();
>>>>>>>>>> xsdSchemaResource.setURI(URI.createURI(schemaName));
>>>>>>>>>> InputStream stream =
>>>>>>>>>> getClass().getClassLoader().getResourceAsStream(schemaName);
>>>>>>>>>> if (stream == null)
>>>>>>>>>> stream = new FileInputStream(schemaName);
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> if (stream != null)
>>>>>>>>>> {
>>>>>>>>>> try
>>>>>>>>>> {
>>>>>>>>>> xsdSchemaResource.load(stream, null);
>>>>>>>>>> schemas.add(xsdSchemaResource.getSchema());
>>>>>>>>>> }
>>>>>>>>>> catch(Exception e)
>>>>>>>>>> {
>>>>>>>>>> ...
>>>>>>>>>> }
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> The second one can load schemas from the file system when I
>>>>>>>>>> specify the
>>>>>>>>>> file:// protocol.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> URI uri = URI.createURI(schemaLocation);
>>>>>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>>>>>> XSDResourceImpl xsdResource =
>>>>>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>>>>>> schemas.add(xsdResource.getSchema());
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> My problem is now: the second version also loads all included
>>>>>>>>>> etc. schemas
>>>>>>>>>> so I have the full hierarchy (which is the final goal for
>>>>>>>>>> me). But it does
>>>>>>>>>> only so when given an absolute file (or another valid URI I
>>>>>>>>>> suppose,
>>>>>>>>>> haven't tried). It cannot load schemas from the resource of
>>>>>>>>>> an Eclipse
>>>>>>>>>> project. The first version in contrast does not load included
>>>>>>>>>> schemas, but
>>>>>>>>>> only loads the main file.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> So my question is: How can I make a combined version so that
>>>>>>>>>> regardless of
>>>>>>>>>> the actual location of the schema (URL, local file, resouce
>>>>>>>>>> file -> maybe
>>>>>>>>>> in jar) the main schema file and all those, which are
>>>>>>>>>> referenced by it (or
>>>>>>>>>> recursively by the others) are loaded successfully?
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> I already looked at the traceLoading sample code, which uses
>>>>>>>>>> an URI map,
>>>>>>>>>> however this does not help for resource files. I would need
>>>>>>>>>> stream support
>>>>>>>>>> for a generic solution, but


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Schema locations [message #594298 is a reply to message #58182] Fri, 25 February 2005 13:07 Go to previous message
Eclipse UserFriend
Originally posted by: johan.naudts.ing.be

Ed,

I am sure I set the system property in the WebSphere server configuration.
It will be passed as a "-D" parameter at startup. Apparently it doesn't
change anything. Is there any way I could set this parameter
programmatically instead of passing it as a system property?

Johan

Ed Merks wrote:

> Johan,

> I believe it's still caused by WebSphere using wsjar for the things on
> the classpath and the xsd.resources.jar will be on the classpath. You
> earlier showed this trace:

> wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>
TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d

> If wsjar is not configured to be recognized as an archive scheme, this
> URI will be treated as opaque. (The RFC http://www.ietf.org/rfc/rfc2396.txt
> defines this term; a URI is opaque if the schema is not followed by a
> /.) An opaque URI has no file extension so the .xsd in the name is not
> recognized and the XSDResourceFactory is not used, resulting in either
> no factory for standalone or an XMIResourceFactory for Eclipse/headless
> being used.

> Are you sure you've set the system property to configure the archive
> schemes? All symptoms still seem to indicate you've not...


> Johan Naudts wrote:

>> Dear Ed,
>>
>> if I unzip xsd.resources.jar and put the directory structure in my
>> classpath, it works fine. So it looks as if WebSphere can't seem to
>> solve some resources when zipped. Could that be the reason?
>>
>> thanks
>> Johan
>>
>>
>> Ed Merks wrote:
>>
>>> Johan,
>>
>>
>>> The first exception looks like what would happen if the global schema
>>> for schema can't be loaded and the second exception looks like the
>>> global schema was loaded with an XMIResourceImpl instead of an
>>> XSDResourceImpl and hence failed to load. Both these problems are
>>> likely caused by the use of a scheme other than jar: or zip: in the
>>> classpath.
>>
>>
>>
>>> Johan Naudts wrote:
>>
>>
>>>> Dear Ed,
>>>>
>>>> that seems to solve it BUT.... now I get a NullPointerException,
>>>> caused by a ClassCastException:
>>>>
>>>> [21/02/05 14:21:08:761 CET] 1e50aa55 SystemErr R
>>>> java.lang.NullPointerException
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2035)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2296)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:399)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1348)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1725)
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1125)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:115)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:103)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>>
>>
>>>> Code))
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>>> Code))
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2075)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1947)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1232)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2245)
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2797)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2829)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2368)
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:442)
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:348)
>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>> java.lang.reflect.Method.invoke(Method.java:386)
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R
>>>> java.lang.ClassCastException:
>>>> org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaInstance(XSDSche maImpl.java:713)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2040)
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1485)
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2241)
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>>
>>
>>>> Code))
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>>> Code))
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>> java.lang.reflect.Method.invoke(Method.java:386)
>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>
>>
org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>
>>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>>
>>
>>>>
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>
>>>>
>>>> Any ideas?
>>>>
>>>> Thanks
>>>> Johan
>>>>
>>>>
>>>>
>>>> Ed Merks wrote:
>>>>
>>>>> Johan,
>>>>
>>>>
>>>>
>>>>> Only "zip" and "jar" are recognized as archive schemes by
>>>>> org.eclipse.emf.common.util.URI by default but some JRE sometimes
>>>>> use other schemes in their class loaders, such as "wsjar". If you
>>>>> define the system property
>>>>> "org.eclipse.emf.common.util.URI.archiveSchemes" to be "jar zip
>>>>> *wsjar*" it should work correctly because of this code in the URI
>>>>> class:
>>>>
>>>>
>>>>
>>>>> // Static initializer for archiveSchemes.
>>>>> static
>>>>> {
>>>>> Set set = new HashSet();
>>>>> String propertyValue =
>>>>>
>>>>> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");
>>>>
>>>>
>>>>
>>>>> if (propertyValue == null)
>>>>> {
>>>>> set.add(SCHEME_JAR);
>>>>> set.add(SCHEME_ZIP);
>>>>> }
>>>>> else
>>>>> {
>>>>> for (StringTokenizer t = new StringTokenizer(propertyValue);
>>>>> t.hasMoreTokens(); )
>>>>> {
>>>>> set.add(t.nextToken().toLowerCase());
>>>>> }
>>>>> }
>>>>
>>>>
>>>>
>>>>> archiveSchemes = Collections.unmodifiableSet(set);
>>>>> }
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> Johan Naudts wrote:
>>>>
>>>>
>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I am currently facing a similar problem, but ONLY when running
>>>>>> inside a Web application server (WebSphere v5.1 in this case).
>>>>>> This is a summary the Exception I'm getting:
>>>>>>
>>>>>> java.lang.RuntimeException: Cannot create a resource for
>>>>>> 'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>>>>
>>>>>
>>>>
>>
TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
>>
>>
>>>>
>>>>
>>>>>> a registered resource factory is needed
>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:611)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>>>>>>
>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>
>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
>>
>>
>>>>>>
>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>
>>>>>
>>>>
>>
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> java.lang.NullPointerException
>>>>>> at
>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1475)
>>>>>> at
>>>>>
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2234)
>>
>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1202)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:827)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
>>>>>> at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
test.XsdOnlineContentParser.getSigningEnvelopeFields(XsdOnli neContentParser.java:54)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>> org.apache.jsp._TestXsdParser._jspService(_TestXsdParser.jav a:80)
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(Http JspBase.java:89)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWra pper.service(JspServlet.java:344)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFil e(JspServlet.java:662)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspSe rvlet.java:760)
>>
>>
>>>>>>
>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>
>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:182)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>>>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>>>
>>>>>> This is an excerpt from my code:
>>>>>>
>>>>>> // Register resource factory first
>>>>>>
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "xsd",
>>>>>> new XSDResourceFactoryImpl());
>>>>>> // Create a resource set and load the main schema file into
>>>>>> it.
>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>> resourceSet.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_L OCATION,
>>>>>> Boolean.TRUE);
>>>>>> URI uri = URI.createURI(schemaURL);
>>>>>> Resource res = resourceSet.getResource(uri, true);
>>>>>> XSDResourceImpl xsdSchemaResource = (XSDResourceImpl)res;
>>>>>> The schemaURL = "file:/E:/Wta/Workspace/WEB WTA BROWSER TEST/XSD
>>>>>> Files/IngSigEnvSchema.xsd"
>>>>>>
>>>>>> But again: when running standalone with exactly the same code, I
>>>>>> don't have this problem, so it seems to me that, inside of a
>>>>>> servlet/JSP container, XSD has difficulties locating some
>>>>>> necessary files?
>>>>>>
>>>>>> Can anyone help?
>>>>>>
>>>>>> Thanks!
>>>>>> Johan
>>>>>>
>>>>>>
>>>>>>
>>>>>> Ed Merks wrote:
>>>>>>
>>>>>>> HT,
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> I think you get this not matter how you create the URI since it
>>>>>>> sounds like you are running standalone and still need to do:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>>
resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put
>>>>>>>
>>>>>>> ("xsd", new XSDResourceFactoryImpl());
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> HT Ooi wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>> Hi!
>>>>>>>>
>>>>>>>> I've tried using the URI.createFileURI instead of URI.createURI
>>>>>>>> and i got the following exception:
>>>>>>>>
>>>>>>>> java.lang.RuntimeException: Cannot create a resource for
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
'file:/C:/workspace/eCute4ODI/import/wsrf-WS-ResourcePropert ies-1.2-draft-01.xsd';
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>> a registered resource factory is needed
>>>>>>>>
>>>>>>>> what could be the problem?
>>>>>>>>
>>>>>>>>
>>>>>>>> Ed Merks wrote:
>>>>>>>>
>>>>>>>>> Wayne,
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> A file system path is not a URI and the "" character is not
>>>>>>>>> treated as "/" in a URI. If you have a file path, use
>>>>>>>>> URI.createFileURI to convert it to a proper URI. E.g.,
>>>>>>>>> E:DublinCore1.xsd should be file:/E:/DublinCore.xsd
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Wayne wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>> Mike,
>>>>>>>>>> I saw that you have been discussing xsd on the news group. I
>>>>>>>>>> am new to =
>>>>>>>>>> the Schema Infoset and an having some problems opening a file
>>>>>>>>>> from a =
>>>>>>>>>> file. I have the follwoing method and continuelly get
>>>>>>>>>> exceptions when =
>>>>>>>>>> trying to be the Resource. I was wounder if you have the time
>>>>>>>>>> could you =
>>>>>>>>>> look at my method and provide some guidence.
>>>>>>>>>>
>>>>>>>>>> private static XSDSchema loadXSDSchema(File xsdFile) {
>>>>>>>>>> String schemaName = xsdFile.getPath();
>>>>>>>>>> try {
>>>>>>>>>> URI uri = URI.createURI(schemaName);
>>>>>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>>>>>> XSDResourceImpl xsdResource =
>>>>>>>>>> (XSDResourceImpl)resourceSet.getResource(uri, true);
>>>>>>>>>> XSDSchema resultSchema = xsdResource.getSchema();
>>>>>>>>>> } catch (Exception e) {
>>>>>>>>>> e.printStackTrace();
>>>>>>>>>> }
>>>>>>>>>> return null;
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> the exception is:
>>>>>>>>>> java.lang.RuntimeException: Cannot create a resource for =
>>>>>>>>>> 'E:DublinCore1.xsd'; a registered resource factory is needed
>>>>>>>>>>
>>>>>>>>>> at =
>>>>>>>>>>
>>>>>>
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceS=
>>
>>
>>>>>>
>>>>>>
>>>>>>>>>>
>>>>>>>>>> etImpl.java:282)
>>>>>>>>>>
>>>>>>>>>> at =
>>>>>>>>>>
>>>>>>
>> schemaHandler.schemaDocumentHandler.loadXSDSchema(schemaDocu mentHandler.j=
>>
>>
>>>>>>
>>>>>>
>>>>>>>>>>
>>>>>>>>>> ava:26)
>>>>>>>>>>
>>>>>>>>>> at =
>>>>>>>>>>
>>>>>>
>> schemaHandler.schemaDocumentHandler.getGlobalElements(schema DocumentHandl=
>>
>>
>>>>>>
>>>>>>
>>>>>>>>>>
>>>>>>>>>> er.java:35)
>>>>>>>>>>
>>>>>>>>>> at xmlProcessing.xmlUI$1.widgetSelected(xmlUI.java:171)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>> =org.eclipse.swt.widgets.TypedListener.handleEvent(TypedList ener.java:89)
>>>>
>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>>>>>>>>>
>>>>>>>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at xmlProcessing.xmlUI.main(xmlUI.java:257)
>>>>>>>>>>
>>>>>>>>>> Any help would be appreciated.
>>>>>>>>>>
>>>>>>>>>> Regards
>>>>>>>>>>
>>>>>>>>>> Wayne
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Mike Lischke wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Hi group,
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Currently I'm trying to find a consistent solution to load an
>>>>>>>>>>> XML schema
>>>>>>>>>>> together will all its imported, included and redefined
>>>>>>>>>>> schemas. Until now
>>>>>>>>>>> I have two versions to load schemas. One loads a schema fine
>>>>>>>>>>> when it is
>>>>>>>>>>> located in an Eclipse
Re: Schema locations [message #594317 is a reply to message #58258] Fri, 25 February 2005 17:32 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020804030907080609060000
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Johan,

Setting a breakpoint in the URI code that does this will help, if that's
possible to do

static
{
Set set = new HashSet();
String propertyValue =
System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");

if (propertyValue == null)
{
set.add(SCHEME_JAR);
set.add(SCHEME_ZIP);
}
else
{
for (StringTokenizer t = new StringTokenizer(propertyValue);
t.hasMoreTokens(); )
{
set.add(t.nextToken().toLowerCase());
}
}

archiveSchemes = Collections.unmodifiableSet(set);
}

You should be able to set this with System.setProperty. You should
double check that the property is indeed set to the right value.
Obviously a typo in the property name will ruin everything. Maybe it's
as simple as needing to put quotes around the space separated schemes.
in the startup parameter.


Johan Naudts wrote:

> Ed,
>
> I am sure I set the system property in the WebSphere server
> configuration. It will be passed as a "-D" parameter at startup.
> Apparently it doesn't change anything. Is there any way I could set
> this parameter programmatically instead of passing it as a system
> property?
>
> Johan
>
> Ed Merks wrote:
>
>> Johan,
>
>
>> I believe it's still caused by WebSphere using wsjar for the things
>> on the classpath and the xsd.resources.jar will be on the classpath.
>> You earlier showed this trace:
>
>
>> wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>
>
> TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d
>
>
>> If wsjar is not configured to be recognized as an archive scheme,
>> this URI will be treated as opaque. (The RFC
>> http://www.ietf.org/rfc/rfc2396.txt
>> defines this term; a URI is opaque if the schema is not followed by a
>> /.) An opaque URI has no file extension so the .xsd in the name is
>> not recognized and the XSDResourceFactory is not used, resulting in
>> either no factory for standalone or an XMIResourceFactory for
>> Eclipse/headless being used.
>
>
>> Are you sure you've set the system property to configure the archive
>> schemes? All symptoms still seem to indicate you've not...
>
>
>
>> Johan Naudts wrote:
>
>
>>> Dear Ed,
>>>
>>> if I unzip xsd.resources.jar and put the directory structure in my
>>> classpath, it works fine. So it looks as if WebSphere can't seem to
>>> solve some resources when zipped. Could that be the reason?
>>>
>>> thanks
>>> Johan
>>>
>>>
>>> Ed Merks wrote:
>>>
>>>> Johan,
>>>
>>>
>>>
>>>> The first exception looks like what would happen if the global
>>>> schema for schema can't be loaded and the second exception looks
>>>> like the global schema was loaded with an XMIResourceImpl instead
>>>> of an XSDResourceImpl and hence failed to load. Both these
>>>> problems are likely caused by the use of a scheme other than jar:
>>>> or zip: in the classpath.
>>>
>>>
>>>
>>>
>>>> Johan Naudts wrote:
>>>
>>>
>>>
>>>>> Dear Ed,
>>>>>
>>>>> that seems to solve it BUT.... now I get a NullPointerException,
>>>>> caused by a ClassCastException:
>>>>>
>>>>> [21/02/05 14:21:08:761 CET] 1e50aa55 SystemErr R
>>>>> java.lang.NullPointerException
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2035)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2296)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:399)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1348)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1725)
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1125)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:115)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:103)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>
>
>>>
>>>
>>>>> Code))
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>>>> Code))
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2075)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1947)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1232)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2245)
>
>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2797)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2829)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2368)
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:442)
>>>>>
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:348)
>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>> java.lang.reflect.Method.invoke(Method.java:386)
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>
>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R
>>>>> java.lang.ClassCastException:
>>>>> org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaInstance(XSDSche maImpl.java:713)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2040)
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1485)
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2241)
>
>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>
>
>>>
>>>
>>>>> Code))
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>>>> Code))
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>> java.lang.reflect.Method.invoke(Method.java:386)
>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>
>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>
>>>>
>>>
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
>
>>>
>>>
>>>>>
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>>
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> Thanks
>>>>> Johan
>>>>>
>>>>>
>>>>>
>>>>> Ed Merks wrote:
>>>>>
>>>>>> Johan,
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Only "zip" and "jar" are recognized as archive schemes by
>>>>>> org.eclipse.emf.common.util.URI by default but some JRE sometimes
>>>>>> use other schemes in their class loaders, such as "wsjar". If
>>>>>> you define the system property
>>>>>> "org.eclipse.emf.common.util.URI.archiveSchemes" to be "jar zip
>>>>>> *wsjar*" it should work correctly because of this code in the URI
>>>>>> class:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> // Static initializer for archiveSchemes.
>>>>>> static
>>>>>> {
>>>>>> Set set = new HashSet();
>>>>>> String propertyValue =
>>>>>>
>>>>>> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> if (propertyValue == null)
>>>>>> {
>>>>>> set.add(SCHEME_JAR);
>>>>>> set.add(SCHEME_ZIP);
>>>>>> }
>>>>>> else
>>>>>> {
>>>>>> for (StringTokenizer t = new
>>>>>> StringTokenizer(propertyValue);
>>>>>> t.hasMoreTokens(); )
>>>>>> {
>>>>>> set.add(t.nextToken().toLowerCase());
>>>>>> }
>>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> archiveSchemes = Collections.unmodifiableSet(set);
>>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Johan Naudts wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I am currently facing a similar problem, but ONLY when running
>>>>>>> inside a Web application server (WebSphere v5.1 in this case).
>>>>>>> This is a summary the Exception I'm getting:
>>>>>>>
>>>>>>> java.lang.RuntimeException: Cannot create a resource for
>>>>>>> 'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>> a registered resource factory is needed
>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:611)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>>>>>>>
>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
>>>
>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
>>>>>>>
>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> java.lang.NullPointerException
>>>>>>> at
>>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1475)
>>>>>>> at
>>>>>>
>>>>>>
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2234)
>>>
>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1202)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:827)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> test.XsdOnlineContentParser.getSigningEnvelopeFields(XsdOnli neContentParser.java:54)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.apache.jsp._TestXsdParser._jspService(_TestXsdParser.jav a:80)
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(Http JspBase.java:89)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWra pper.service(JspServlet.java:344)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFil e(JspServlet.java:662)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspSe rvlet.java:760)
>>>
>>>
>>>>>>>
>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>>
>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:182)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> at
>>>>>>
>>>>>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Schema locations [message #594334 is a reply to message #58310] Mon, 28 February 2005 13:39 Go to previous message
Eclipse UserFriend
Originally posted by: johan.naudts.ing.be

Ed,

I cannot seem to locate this code in version 1.x of EMF. If I try to run
WebSphere with EMF version 2.x, I run into NoSuchMethodErrors:

"java.lang.NoSuchMethodError: org.eclipse.xsd.impl.XSDPackageImpl: method
initEClas(Lorg/eclipse/emf/ecore/EClass;Ljava/lang/Class;Lja va/lang/String;ZZZ)Lorg/eclipse/emf/ecore/EClass;
not found at
org.eclipse.xsd.impl.XSDPackageImpl.initializePackageContent s(XSDPackageImpl.java:4248)... "

This is probably because of conflicts with my current WSAD: I'm using WSAD
version 5.1.1, which corresponds to Eclipse 2.1.2.
Still, this doesn't explain why it works fine when I unzip
xsd.resources.jar???

Help :-)

Ed Merks wrote:

> Johan,

> Setting a breakpoint in the URI code that does this will help, if that's
> possible to do

> static
> {
> Set set = new HashSet();
> String propertyValue =
> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");

> if (propertyValue == null)
> {
> set.add(SCHEME_JAR);
> set.add(SCHEME_ZIP);
> }
> else
> {
> for (StringTokenizer t = new StringTokenizer(propertyValue);
> t.hasMoreTokens(); )
> {
> set.add(t.nextToken().toLowerCase());
> }
> }

> archiveSchemes = Collections.unmodifiableSet(set);
> }

> You should be able to set this with System.setProperty. You should
> double check that the property is indeed set to the right value.
> Obviously a typo in the property name will ruin everything. Maybe it's
> as simple as needing to put quotes around the space separated schemes.
> in the startup parameter.


> Johan Naudts wrote:

>> Ed,
>>
>> I am sure I set the system property in the WebSphere server
>> configuration. It will be passed as a "-D" parameter at startup.
>> Apparently it doesn't change anything. Is there any way I could set
>> this parameter programmatically instead of passing it as a system
>> property?
>>
>> Johan
>>
>> Ed Merks wrote:
>>
>>> Johan,
>>
>>
>>> I believe it's still caused by WebSphere using wsjar for the things
>>> on the classpath and the xsd.resources.jar will be on the classpath.
>>> You earlier showed this trace:
>>
>>
>>> wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>>
>>
>>
TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d
>>
>>
>>> If wsjar is not configured to be recognized as an archive scheme,
>>> this URI will be treated as opaque. (The RFC
>>> http://www.ietf.org/rfc/rfc2396.txt
>>> defines this term; a URI is opaque if the schema is not followed by a
>>> /.) An opaque URI has no file extension so the .xsd in the name is
>>> not recognized and the XSDResourceFactory is not used, resulting in
>>> either no factory for standalone or an XMIResourceFactory for
>>> Eclipse/headless being used.
>>
>>
>>> Are you sure you've set the system property to configure the archive
>>> schemes? All symptoms still seem to indicate you've not...
>>
>>
>>
>>> Johan Naudts wrote:
>>
>>
>>>> Dear Ed,
>>>>
>>>> if I unzip xsd.resources.jar and put the directory structure in my
>>>> classpath, it works fine. So it looks as if WebSphere can't seem to
>>>> solve some resources when zipped. Could that be the reason?
>>>>
>>>> thanks
>>>> Johan
>>>>
>>>>
>>>> Ed Merks wrote:
>>>>
>>>>> Johan,
>>>>
>>>>
>>>>
>>>>> The first exception looks like what would happen if the global
>>>>> schema for schema can't be loaded and the second exception looks
>>>>> like the global schema was loaded with an XMIResourceImpl instead
>>>>> of an XSDResourceImpl and hence failed to load. Both these
>>>>> problems are likely caused by the use of a scheme other than jar:
>>>>> or zip: in the classpath.
>>>>
>>>>
>>>>
>>>>
>>>>> Johan Naudts wrote:
>>>>
>>>>
>>>>
>>>>>> Dear Ed,
>>>>>>
>>>>>> that seems to solve it BUT.... now I get a NullPointerException,
>>>>>> caused by a ClassCastException:
>>>>>>
>>>>>> [21/02/05 14:21:08:761 CET] 1e50aa55 SystemErr R
>>>>>> java.lang.NullPointerException
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2035)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2296)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:399)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1348)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1725)
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1125)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:115)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:103)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>>
>>
>>>>
>>>>
>>>>>> Code))
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>>>>> Code))
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2075)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1947)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1232)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2245)
>>
>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2797)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2829)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2368)
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:442)
>>>>>>
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:348)
>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>> java.lang.reflect.Method.invoke(Method.java:386)
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>
>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R
>>>>>> java.lang.ClassCastException:
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaInstance(XSDSche maImpl.java:713)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2040)
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1485)
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2241)
>>
>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>>
>>
>>>>
>>>>
>>>>>> Code))
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>>>>> Code))
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>> java.lang.reflect.Method.invoke(Method.java:386)
>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>
>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>
>>>>>
>>>>
>>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>>>
>>>>>>
>>>>>> Any ideas?
>>>>>>
>>>>>> Thanks
>>>>>> Johan
>>>>>>
>>>>>>
>>>>>>
>>>>>> Ed Merks wrote:
>>>>>>
>>>>>>> Johan,
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Only "zip" and "jar" are recognized as archive schemes by
>>>>>>> org.eclipse.emf.common.util.URI by default but some JRE sometimes
>>>>>>> use other schemes in their class loaders, such as "wsjar". If
>>>>>>> you define the system property
>>>>>>> "org.eclipse.emf.common.util.URI.archiveSchemes" to be "jar zip
>>>>>>> *wsjar*" it should work correctly because of this code in the URI
>>>>>>> class:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> // Static initializer for archiveSchemes.
>>>>>>> static
>>>>>>> {
>>>>>>> Set set = new HashSet();
>>>>>>> String propertyValue =
>>>>>>>
>>>>>>> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> if (propertyValue == null)
>>>>>>> {
>>>>>>> set.add(SCHEME_JAR);
>>>>>>> set.add(SCHEME_ZIP);
>>>>>>> }
>>>>>>> else
>>>>>>> {
>>>>>>> for (StringTokenizer t = new
>>>>>>> StringTokenizer(propertyValue);
>>>>>>> t.hasMoreTokens(); )
>>>>>>> {
>>>>>>> set.add(t.nextToken().toLowerCase());
>>>>>>> }
>>>>>>> }
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> archiveSchemes = Collections.unmodifiableSet(set);
>>>>>>> }
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Johan Naudts wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I am currently facing a similar problem, but ONLY when running
>>>>>>>> inside a Web application server (WebSphere v5.1 in this case).
>>>>>>>> This is a summary the Exception I'm getting:
>>>>>>>>
>>>>>>>> java.lang.RuntimeException: Cannot create a resource for
>>>>>>>> 'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>> a registered resource factory is needed
>>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:611)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>>>
org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>
org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
>>>>
>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> [17/02/05 9:34:07:708 CET] 59cceede SystemErr R at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> java.lang.NullPointerException
>>>>>>>> at
>>>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1475)
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2234)
>>>>
>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1202)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:827)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
>>>>>>>>
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:884)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:741)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:247)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:262)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:346)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
test.XsdOnlineContentParser.loadSchemaUsingResourceSet(XsdOn lineContentParser.java:109)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
test.XsdOnlineContentParser.getSigningEnvelopeFields(XsdOnli neContentParser.java:54)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.apache.jsp._TestXsdParser._jspService(_TestXsdParser.jav a:80)
>>>>>>>> at
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(Http JspBase.java:89)
>>
>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>>>
>>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>>>>> at
>>>>>>>
Re: Schema locations [message #594349 is a reply to message #58340] Mon, 28 February 2005 22:32 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Johan,

Sorry, I assumed you were using the latest and you can't just switch
without affecting WebSphere itself. The only work around with the
older EMF is to unzip the jar. In this case, the URI does not need to
use jar:/wsjar:, since the files aren't in a jar and the whole problem
is avoided. It might work to patch in the newer
org.eclipse.emf.common.util.URI.class into the older build version's jar
so that you can use the system property approach...


Johan Naudts wrote:

> Ed,
>
> I cannot seem to locate this code in version 1.x of EMF. If I try to
> run WebSphere with EMF version 2.x, I run into NoSuchMethodErrors:
>
> "java.lang.NoSuchMethodError: org.eclipse.xsd.impl.XSDPackageImpl:
> method
> initEClas(Lorg/eclipse/emf/ecore/EClass;Ljava/lang/Class;Lja va/lang/String;ZZZ)Lorg/eclipse/emf/ecore/EClass;
> not found at
> org.eclipse.xsd.impl.XSDPackageImpl.initializePackageContent s(XSDPackageImpl.java:4248)... "
>
>
> This is probably because of conflicts with my current WSAD: I'm using
> WSAD version 5.1.1, which corresponds to Eclipse 2.1.2.
> Still, this doesn't explain why it works fine when I unzip
> xsd.resources.jar???
>
> Help :-)
>
> Ed Merks wrote:
>
>> Johan,
>
>
>> Setting a breakpoint in the URI code that does this will help, if
>> that's possible to do
>
>
>> static
>> {
>> Set set = new HashSet();
>> String propertyValue =
>>
>> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");
>
>
>> if (propertyValue == null)
>> {
>> set.add(SCHEME_JAR);
>> set.add(SCHEME_ZIP);
>> }
>> else
>> {
>> for (StringTokenizer t = new StringTokenizer(propertyValue);
>> t.hasMoreTokens(); )
>> {
>> set.add(t.nextToken().toLowerCase());
>> }
>> }
>
>
>> archiveSchemes = Collections.unmodifiableSet(set);
>> }
>
>
>> You should be able to set this with System.setProperty. You should
>> double check that the property is indeed set to the right value.
>> Obviously a typo in the property name will ruin everything. Maybe
>> it's as simple as needing to put quotes around the space separated
>> schemes. in the startup parameter.
>
>
>
>> Johan Naudts wrote:
>
>
>>> Ed,
>>>
>>> I am sure I set the system property in the WebSphere server
>>> configuration. It will be passed as a "-D" parameter at startup.
>>> Apparently it doesn't change anything. Is there any way I could set
>>> this parameter programmatically instead of passing it as a system
>>> property?
>>>
>>> Johan
>>>
>>> Ed Merks wrote:
>>>
>>>> Johan,
>>>
>>>
>>>
>>>> I believe it's still caused by WebSphere using wsjar for the things
>>>> on the classpath and the xsd.resources.jar will be on the
>>>> classpath. You earlier showed this trace:
>>>
>>>
>>>
>>>> wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>>>
>>>
>>>
>>>
> TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d
>
>
>>>
>>>
>>>> If wsjar is not configured to be recognized as an archive scheme,
>>>> this URI will be treated as opaque. (The RFC
>>>> http://www.ietf.org/rfc/rfc2396.txt
>>>> defines this term; a URI is opaque if the schema is not followed by
>>>> a /.) An opaque URI has no file extension so the .xsd in the name
>>>> is not recognized and the XSDResourceFactory is not used, resulting
>>>> in either no factory for standalone or an XMIResourceFactory for
>>>> Eclipse/headless being used.
>>>
>>>
>>>
>>>> Are you sure you've set the system property to configure the
>>>> archive schemes? All symptoms still seem to indicate you've not...
>>>
>>>
>>>
>>>
>>>> Johan Naudts wrote:
>>>
>>>
>>>
>>>>> Dear Ed,
>>>>>
>>>>> if I unzip xsd.resources.jar and put the directory structure in my
>>>>> classpath, it works fine. So it looks as if WebSphere can't seem
>>>>> to solve some resources when zipped. Could that be the reason?
>>>>>
>>>>> thanks
>>>>> Johan
>>>>>
>>>>>
>>>>> Ed Merks wrote:
>>>>>
>>>>>> Johan,
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> The first exception looks like what would happen if the global
>>>>>> schema for schema can't be loaded and the second exception looks
>>>>>> like the global schema was loaded with an XMIResourceImpl instead
>>>>>> of an XSDResourceImpl and hence failed to load. Both these
>>>>>> problems are likely caused by the use of a scheme other than jar:
>>>>>> or zip: in the classpath.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Johan Naudts wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>> Dear Ed,
>>>>>>>
>>>>>>> that seems to solve it BUT.... now I get a NullPointerException,
>>>>>>> caused by a ClassCastException:
>>>>>>>
>>>>>>> [21/02/05 14:21:08:761 CET] 1e50aa55 SystemErr R
>>>>>>> java.lang.NullPointerException
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2035)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2296)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:399)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1348)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1725)
>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1125)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:115)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:103)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>> Code))
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>>>>>> Code))
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2075)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1947)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1018)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:952)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1232)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2245)
>>>
>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2797)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2829)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2368)
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:442)
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:348)
>>>>>>>
>>>>>>> [21/02/05 14:21:08:776 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>> java.lang.reflect.Method.invoke(Method.java:386)
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:792 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>>
>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R
>>>>>>> java.lang.ClassCastException:
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaInstance(XSDSche maImpl.java:713)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2040)
>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1485)
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2241)
>>>
>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java(Compiled
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>> Code))
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java(C ompiled
>>>>>>> Code))
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.loadSchemaUsingResourceSet(XsdOnlineContentPar ser.java:112)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.XsdOnline ContentParser.getOnlineContentFields(XsdOnlineContentParser. java:61)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.onlinecontent.xsd.OnlineCon tentFactory.getOnlineContentFields(OnlineContentFactory.java :54)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.service.OnlineContentServic e.lookupOnlineContentFields(OnlineContentService.java:64)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ing.web.security.wta.browser.action.OnlineContentBrowser Action.displaySearchFields(OnlineContentBrowserAction.java:7 2)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>> java.lang.reflect.Method.invoke(Method.java:386)
>>>>>>> [21/02/05 14:21:08:808 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.apache.struts.actions.DispatchAction.dispatchMethod(Disp atchAction.java:280)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.apache.struts.actions.LookupDispatchAction.execute(Looku pDispatchAction.java:252)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.apache.struts.action.RequestProcessor.processActionPerfo rm(RequestProcessor.java:484)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> org.apache.struts.action.RequestProcessor.process(RequestPro cessor.java:274)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>> org.apache.struts.action.ActionServlet.process(ActionServlet .java:1482)
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet. java:525)
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServ ice(StrictServletInstance.java:110)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv ice(StrictLifecycleServlet.java:174)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str ictLifecycleServlet.java:313)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi ce(StrictLifecycleServlet.java:116)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv letInstance.java:283)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d ispatch(ValidServletReferenceState.java:42)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis patch(ServletInstanceReference.java:40)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl eWebAppDispatch(WebAppRequestDispatcher.java:974)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa tch(WebAppRequestDispatcher.java:555)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa rd(WebAppRequestDispatcher.java:200)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn voker.java:119)
>>>
>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo ok(WebAppInvoker.java:276)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha ndleInvocation(CachedInvocation.java:71)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.cache.invocation.CacheableInvocation Context.invoke(CacheableInvocationContext.java:114)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch ByURI(ServletRequestProcessor.java:186)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se rvice(OSEListener.java:334)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht tpConnection.java:56)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn ection.java:618)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>>>>>> [21/02/05 14:21:08:823 CET] 1e50aa55 SystemErr R at
>>>>>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
>>>>>>>
>>>>>>>
>>>>>>> Any ideas?
>>>>>>>
>>>>>>> Thanks
>>>>>>> Johan
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Ed Merks wrote:
>>>>>>>
>>>>>>>> Johan,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Only "zip" and "jar" are recognized as archive schemes by
>>>>>>>> org.eclipse.emf.common.util.URI by default but some JRE
>>>>>>>> sometimes use other schemes in their class loaders, such as
>>>>>>>> "wsjar". If you define the system property
>>>>>>>> "org.eclipse.emf.common.util.URI.archiveSchemes" to be "jar zip
>>>>>>>> *wsjar*" it should work correctly because of this code in the
>>>>>>>> URI class:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> // Static initializer for archiveSchemes.
>>>>>>>> static
>>>>>>>> {
>>>>>>>> Set set = new HashSet();
>>>>>>>> String propertyValue =
>>>>>>>>
>>>>>>>> System.getProperty("org.eclipse.emf.common.util.URI.archiveSchemes ");
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> if (propertyValue == null)
>>>>>>>> {
>>>>>>>> set.add(SCHEME_JAR);
>>>>>>>> set.add(SCHEME_ZIP);
>>>>>>>> }
>>>>>>>> else
>>>>>>>> {
>>>>>>>> for (StringTokenizer t = new
>>>>>>>> StringTokenizer(propertyValue);
>>>>>>>> t.hasMoreTokens(); )
>>>>>>>> {
>>>>>>>> set.add(t.nextToken().toLowerCase());
>>>>>>>> }
>>>>>>>> }
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> archiveSchemes = Collections.unmodifiableSet(set);
>>>>>>>> }
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Johan Naudts wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I am currently facing a similar problem, but ONLY when running
>>>>>>>>> inside a Web application server (WebSphere v5.1 in this case).
>>>>>>>>> This is a summary the Exception I'm getting:
>>>>>>>>>
>>>>>>>>> java.lang.RuntimeException: Cannot create a resource for
>>>>>>>>> 'wsjar:file:/E:/Wta/Workspace/WEB WTA BROWSER
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>
>>>
> TEST/WebContent/WEB-INF/lib/xsd.resources.jar!/org/eclipse/x sd/plugin.properties/cache/www.w3.org/2001/MagicXMLSchema.xs d';
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>> a registered resource factory is needed
>>>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>
>>>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:343)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>
>>>>>>>>> [17/02/05 9:34:07:692 CET] 59cceede SystemErr R at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>
>>>
> org.eclipse.xsd.impl.XSDSchemaImpl.getMagicSchemaForSchema(X SDSchemaImpl.java:534)
>
>
>>>
>>>
>>>>>
>>>>>
>>>>>&


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Test Program
Next Topic:Resolving TypeDefinitions from <xsd:include> doesn't match TypeDefintion from element declare
Goto Forum:
  


Current Time: Thu Apr 25 00:24:43 GMT 2024

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

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

Back to the top