Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » "a registered resource factory is needed" error with absolute path
"a registered resource factory is needed" error with absolute path [message #1060915] Wed, 29 May 2013 07:02 Go to next message
chris yo is currently offline chris yoFriend
Messages: 146
Registered: February 2013
Senior Member
I have an xtext.jar file that I try to run in DOS command line.

When I try to use the absolute path for my input file, I am getting an error "Cannot create a resource for 'D:\01\Sample\Test\Mod1\sample.txt'; a registered resource factory is needed." This is the command I used:

java -jar xtext.jar D:\01\Sample\Test\Mod1\sample.txt


But, when I use relative paths, the jar file will work without any error.

java -jar xtext.jar Mod1\sample.txt


Anyone has any idea why this is so?
Re: "a registered resource factory is needed" error with absolute path [message #1060918 is a reply to message #1060915] Wed, 29 May 2013 07:17 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Could be that "D:" is recognized as URI scheme. Try to prefix with "file:".

Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Re: "a registered resource factory is needed" error with absolute path [message #1060950 is a reply to message #1060918] Wed, 29 May 2013 09:31 Go to previous messageGo to next message
chris yo is currently offline chris yoFriend
Messages: 146
Registered: February 2013
Senior Member
I tried File:\\D:\01\Sample\Test\Mod1\sample.txt, but still the same error. Am I using it the wrong way?

In my workflow, I have disabled these for importURI.
// scoping and exporting API
// fragment = scoping.ImportURIScopingFragment {}
// fragment = exporting.SimpleNamesFragment {}


Could this be the reason?
Re: "a registered resource factory is needed" error with absolute path [message #1061010 is a reply to message #1060950] Wed, 29 May 2013 13:44 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Chris,

If this API wants a URI, keep in mind that \ is not a segment separator
in a URI (it's treated just like other punctuation as as "-" or "_") ,
so perhaps file:/D:/01/Sample/Test/Mod1/sample.txt would work properly


On 29/05/2013 11:31 AM, chris yo wrote:
> I tried File:\\D:\01\Sample\Test\Mod1\sample.txt, but still the same
> error. Am I using it the wrong way?
>
> In my workflow, I have disabled these for importURI.
> // scoping and exporting API
> // fragment = scoping.ImportURIScopingFragment {}
> // fragment = exporting.SimpleNamesFragment {}
>
> Could this be the reason?


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Automatically adding Xtext nature to project
Next Topic:JvmModelInferrer: multiple input files
Goto Forum:
  


Current Time: Fri Mar 29 12:32:06 GMT 2024

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

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

Back to the top