|
|
|
|
|
|
|
|
|
Re: createSAXParseException on Windows [message #1781984 is a reply to message #1781978] |
Thu, 15 February 2018 13:26 |
M V Messages: 31 Registered: July 2017 |
Member |
|
|
Christian Dietrich wrote on Thu, 15 February 2018 12:16iwonder e.g. how you create/injetc the class that does this.
final Injector injector = AwlInjector.getInstance().getInjector();
...
injector.injectMembers(generator);
Ed Willink wrote on Thu, 15 February 2018 11:57Hi
The difference strongly suggests that your extension/protocol/content-type has not been registered on Windows. Presumably you are using extension-based resource discrimination so you need to see what the ResourceSet.getResourceFactory().getExternsionFactory() contains for both your resourceSet and the Resource.Registry.INSTANCE to which your resourceSet delegates. I generally single step through createResource to understand why it gives me whatever ResourceFactory it does.
However before single stepping you might check your source file folder to confirm that you do not have any uppercase/lowercase file name confusions. e.g. if on Windows you have a *.AWL file as a consequence of an inappropriate Linux to Windows file copy, everything is explained.
Regards
Ed Willink
After all, the solution was simple, but not so simple to find.
Quote:
Resource.Factory resourceFactory = getResourceFactoryRegistry().getFactory(uri, contentType);
Windows:
org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl@56fb87cd
Linux:
org.eclipse.xtext.resource.XtextResourceFactory@53d87c9
extensionToFactoryMap
Windows:
key: awl
value: org.eclipse.emf.ecore.plugin.RegistryReader$ResourceFactoryDescriptor@231e5af
Linux:
key: awl
value: org.eclipse.emf.ecore.plugin.RegistryReader$ResourceFactoryDescriptor@3b89bccf
return of uri.fileExtension()
Windows
-- null
Linux
awl
The URI is not parsed right on Windows I has URI$Opaque and on Linux URI$Hierarchical after add "file:///" all work fine on Windows. Now I know to fix it!
Big Thanks for your great Support!
[Updated on: Thu, 15 February 2018 13:33] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.05222 seconds