Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » resource
resource [message #112719] Wed, 20 February 2008 16:16 Go to next message
a is currently offline aFriend
Messages: 75
Registered: July 2009
Member
Hello,

import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
public class merge {
public static void main(String[] args) {
URI uri = URI.createFileURI("C:/uml.ecore");
Resource res =
Resource.Factory.Registry.INSTANCE.getFactory(uri).createRes ource(uri);
}}

I got NullPointerException for this so short code.
I use simple java with plugin dependencies, and I would like to create a
file using uri, resource.
What should be the mistake and how can I repair it?

Regards,
Attila
Re: resource [message #112761 is a reply to message #112719] Wed, 20 February 2008 18:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Hi Attila,

I suggest that you ask this question on the EMF newsgroup which I added.

Cheers
/Eike


Attila schrieb:
> Hello,
>
> import org.eclipse.emf.common.util.URI;
> import org.eclipse.emf.ecore.resource.Resource;
> public class merge {
> public static void main(String[] args) {
> URI uri = URI.createFileURI("C:/uml.ecore");
> Resource res =
> Resource.Factory.Registry.INSTANCE.getFactory(uri).createRes ource(uri);
> }}
>
> I got NullPointerException for this so short code.
> I use simple java with plugin dependencies, and I would like to create a
> file using uri, resource.
> What should be the mistake and how can I repair it?
>
> Regards,
> Attila
>
Re: resource [message #112774 is a reply to message #112761] Wed, 20 February 2008 18:52 Go to previous message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Ahh, a cross posting, naughty!


Eike Stepper schrieb:
> Hi Attila,
>
> I suggest that you ask this question on the EMF newsgroup which I added.
>
> Cheers
> /Eike
>
>
> Attila schrieb:
>> Hello,
>>
>> import org.eclipse.emf.common.util.URI;
>> import org.eclipse.emf.ecore.resource.Resource;
>> public class merge {
>> public static void main(String[] args) {
>> URI uri = URI.createFileURI("C:/uml.ecore");
>> Resource res =
>> Resource.Factory.Registry.INSTANCE.getFactory(uri).createRes ource(uri);
>> }}
>>
>> I got NullPointerException for this so short code.
>> I use simple java with plugin dependencies, and I would like to create
>> a file using uri, resource.
>> What should be the mistake and how can I repair it?
>>
>> Regards,
>> Attila
>>
Re: resource [message #615524 is a reply to message #112719] Wed, 20 February 2008 18:51 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Attila,

I suggest that you ask this question on the EMF newsgroup which I added.

Cheers
/Eike


Attila schrieb:
> Hello,
>
> import org.eclipse.emf.common.util.URI;
> import org.eclipse.emf.ecore.resource.Resource;
> public class merge {
> public static void main(String[] args) {
> URI uri = URI.createFileURI("C:/uml.ecore");
> Resource res =
> Resource.Factory.Registry.INSTANCE.getFactory(uri).createRes ource(uri);
> }}
>
> I got NullPointerException for this so short code.
> I use simple java with plugin dependencies, and I would like to create a
> file using uri, resource.
> What should be the mistake and how can I repair it?
>
> Regards,
> Attila
>


Re: resource [message #615525 is a reply to message #112761] Wed, 20 February 2008 18:52 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Ahh, a cross posting, naughty!


Eike Stepper schrieb:
> Hi Attila,
>
> I suggest that you ask this question on the EMF newsgroup which I added.
>
> Cheers
> /Eike
>
>
> Attila schrieb:
>> Hello,
>>
>> import org.eclipse.emf.common.util.URI;
>> import org.eclipse.emf.ecore.resource.Resource;
>> public class merge {
>> public static void main(String[] args) {
>> URI uri = URI.createFileURI("C:/uml.ecore");
>> Resource res =
>> Resource.Factory.Registry.INSTANCE.getFactory(uri).createRes ource(uri);
>> }}
>>
>> I got NullPointerException for this so short code.
>> I use simple java with plugin dependencies, and I would like to create
>> a file using uri, resource.
>> What should be the mistake and how can I repair it?
>>
>> Regards,
>> Attila
>>


Previous Topic:HbResourceImpl
Next Topic:Too many join - issue with the HibernateMapping file
Goto Forum:
  


Current Time: Fri Mar 29 12:29:04 GMT 2024

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

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

Back to the top