Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » using emfstore client in a standard java app (without eclipse)
using emfstore client in a standard java app (without eclipse) [message #1446136] Thu, 16 October 2014 12:11 Go to next message
Christian Reuter is currently offline Christian ReuterFriend
Messages: 34
Registered: October 2010
Member
Hi,

I want to access an emfstore server from an existing plain Java application which is not eclipse- or OSGI-based.

In order to do this I created a project containing the required jars and added a dependency to this project to my application project.

The build process works but when I try to run the code I get an error when accessing the emfstore server by executing:

ESWorkspace workspace = ESWorkspaceProvider.INSTANCE.getWorkspace();


The error message is:

Exception in thread "main" java.lang.ExceptionInInitializerError
	at 

... (the stack of my modules)

Caused by: java.lang.NullPointerException
	at org.eclipse.emf.emfstore.common.extensionpoint.ESExtensionPoint.reload(ESExtensionPoint.java:79)
	at org.eclipse.emf.emfstore.common.extensionpoint.ESExtensionPoint.<init>(ESExtensionPoint.java:56)
	at org.eclipse.emf.emfstore.internal.common.observer.ObserverBus.collectionExtensionPoints(ObserverBus.java:348)
	at org.eclipse.emf.emfstore.internal.common.observer.ObserverBus.<init>(ObserverBus.java:99)
	at org.eclipse.emf.emfstore.internal.client.model.ESWorkspaceProviderImpl.initialize(ESWorkspaceProviderImpl.java:404)
	at org.eclipse.emf.emfstore.internal.client.model.ESWorkspaceProviderImpl.getInstance(ESWorkspaceProviderImpl.java:102)
	at org.eclipse.emf.emfstore.client.ESWorkspaceProvider.<clinit>(ESWorkspaceProvider.java:32)
	... 4 more


It seems that the code relies on an OSGI implementation to run.
Is there any chance to get the client working without it?

Thx,

chris

[Updated on: Thu, 16 October 2014 12:12]

Report message to a moderator

Re: using emfstore client in a standard java app (without eclipse) [message #1448070 is a reply to message #1446136] Sun, 19 October 2014 10:01 Go to previous message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi Christian,

EMFStore uses extension points as well as OSGi services. So those parts
would need to be refactored to enable a plain Java version.

Best regards

Jonas

Am 16.10.2014 14:11, schrieb Christian Reuter:
> Hi,
>
> I want to access an emfstore server from an existing plain Java
> application which is not eclipse- or OSGI-based.
>
> In order to do this I created a project containing the required jars and
> added a dependency to this project to my application project.
>
> The build process works but when I try to access run the code I get an
> error when accessing the emfstore server by executing:
>
>
> ESWorkspace workspace = ESWorkspaceProvider.INSTANCE.getWorkspace();
>
>
> The error message is:
>
>
> Exception in thread "main" java.lang.ExceptionInInitializerError
> at
> .. (the stack of my modules)
>
> Caused by: java.lang.NullPointerException
> at
> org.eclipse.emf.emfstore.common.extensionpoint.ESExtensionPoint.reload(ESExtensionPoint.java:79)
>
> at
> org.eclipse.emf.emfstore.common.extensionpoint.ESExtensionPoint.<init>(ESExtensionPoint.java:56)
>
> at
> org.eclipse.emf.emfstore.internal.common.observer.ObserverBus.collectionExtensionPoints(ObserverBus.java:348)
>
> at
> org.eclipse.emf.emfstore.internal.common.observer.ObserverBus.<init>(ObserverBus.java:99)
>
> at
> org.eclipse.emf.emfstore.internal.client.model.ESWorkspaceProviderImpl.initialize(ESWorkspaceProviderImpl.java:404)
>
> at
> org.eclipse.emf.emfstore.internal.client.model.ESWorkspaceProviderImpl.getInstance(ESWorkspaceProviderImpl.java:102)
>
> at
> org.eclipse.emf.emfstore.client.ESWorkspaceProvider.<clinit>(ESWorkspaceProvider.java:32)
>
> ... 4 more
>
>
> It seems that the code relies on an OSGI implementation to run.
> Is there any chance to get the client working without it?
>
> Thx,
>
> chris
Previous Topic:[EMFStore] Working with multiple usersessions
Next Topic:[ECP] Model Explorer Treeview Events
Goto Forum:
  


Current Time: Thu Apr 25 08:44:34 GMT 2024

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

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

Back to the top