Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Encoding related error in Xtend 2.4
Encoding related error in Xtend 2.4 [message #1030083] Sat, 30 March 2013 17:00 Go to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 226
Registered: July 2009
Senior Member
Hi all,

when starting the generator using the new versions of MWE and Xtend the
console log gets filled up with stacktraces of java.io.FileNotFoundException
for each generated file.
Looking like this:

9359 [main] ERROR esource.generic.XMLEncodingProvider  - Error detecting 
encoding for file:/home/.../some/file
java.io.FileNotFoundException: /home/.../some/file (No such file or 
directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:137)
	at 
org.eclipse.emf.ecore.resource.impl.FileURIHandlerImpl.createInputStream(FileURIHandlerImpl.java:99)
	at 
org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:354)
	at 
org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:348)
	at 
org.eclipse.xtext.resource.generic.XMLEncodingProvider.getEncoding(XMLEncodingProvider.java:32)
	at 
org.eclipse.xtext.generator.JavaIoFileSystemAccess.getEncoding(JavaIoFileSystemAccess.java:140)
	at 
org.eclipse.xtext.generator.JavaIoFileSystemAccess.generateFile(JavaIoFileSystemAccess.java:81)
	at 
org.eclipse.xtext.generator.AbstractFileSystemAccess.generateFile(AbstractFileSystemAccess.java:75)
....


Basically the problem occurs in XMLEncodingProvider#getEncoding() which
creates an input stream without checking properly if the file exists before.

Did I forget to setup something or is it a bug?

Axel

[Updated on: Sat, 30 March 2013 17:07]

Report message to a moderator

Re: Encoding related error in Xtend 2.4 [message #1034201 is a reply to message #1030083] Fri, 05 April 2013 06:09 Go to previous messageGo to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 226
Registered: July 2009
Senior Member
Any clue?


Axel Guckelsberger wrote:

> Hi all,
>
> when starting the generator using the new versions of MWE and Xtend the
> console log gets filled up with stacktraces of
> java.io.FileNotFoundException for each generated file.
> Looking like this:
>
> 9359 [main] ERROR esource.generic.XMLEncodingProvider - Error detecting
> encoding for file:/home/.../some/file
> java.io.FileNotFoundException: /home/.../some/file (No such file or
> directory)
> at java.io.FileInputStream.open(Native Method)
> at java.io.FileInputStream.<init>(FileInputStream.java:137)
> at
>
org.eclipse.emf.ecore.resource.impl.FileURIHandlerImpl.createInputStream(FileURIHandlerImpl.java:99)
> at
>
org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:354)
> at
>
org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:348)
> at
>
org.eclipse.xtext.resource.generic.XMLEncodingProvider.getEncoding(XMLEncodingProvider.java:32)
> at
>
org.eclipse.xtext.generator.JavaIoFileSystemAccess.getEncoding(JavaIoFileSystemAccess.java:140)
> at
>
org.eclipse.xtext.generator.JavaIoFileSystemAccess.generateFile(JavaIoFileSystemAccess.java:81)
> at
>
org.eclipse.xtext.generator.AbstractFileSystemAccess.generateFile(AbstractFileSystemAccess.java:75)
> ...
>
> Basically the problem occurs in XMLEncodingProvider#getEncoding() which
> creates an input stream without checking properly if the file exists
> before.
>
> Did I forget to setup something or is it a bug?
>
> Axel
Re: Encoding related error in Xtend 2.4 [message #1034230 is a reply to message #1034201] Fri, 05 April 2013 07:08 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6499
Registered: July 2009
Senior Member
Hi,

the encoding provider is for reading model (xmi) files. so it may not been optimized for the use in the generator.
sounds like a bug to me.

~Christian
Re: Encoding related error in Xtend 2.4 [message #1060511 is a reply to message #1030083] Sat, 25 May 2013 17:53 Go to previous messageGo to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 226
Registered: July 2009
Senior Member
Thanks Christian,

I added bug 409069 for this issue.
Re: Encoding related error in Xtend 2.4 [message #1101261 is a reply to message #1030083] Wed, 04 September 2013 08:13 Go to previous message
Dennis D. is currently offline Dennis D.Friend
Messages: 23
Registered: April 2013
Junior Member
Hi,

i can confirm this for 1.3.0.v201302260541 in Juno. Strange enough, when I run it from an eclipse via "run as -> eclipse application", it works all fine without that exception. Installing the plugin and running this eclipse, I get the error above. Even with the exception being thrown, all files are generated.

dennis
Previous Topic:Simplest way to build Xtext (TMF) from source code
Next Topic:Infinite loop while generating Java sources
Goto Forum:
  


Current Time: Fri Nov 28 16:21:14 GMT 2014

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

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