Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create and Test Native Build & Docker Image #18

Open
dlabordus opened this issue Mar 1, 2022 · 3 comments
Open

Create and Test Native Build & Docker Image #18

dlabordus opened this issue Mar 1, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@dlabordus
Copy link

Create and test the Native Build to check that all required classes and files (like the OCL Files) are included.
Next create the docker image (including a volume to included custom OCL Files) and also test the Docker Image.

@dlabordus dlabordus self-assigned this Mar 1, 2022
@dlabordus dlabordus added the enhancement New feature or request label Mar 1, 2022
@dlabordus dlabordus linked a pull request Mar 2, 2022 that will close this issue
@dlabordus
Copy link
Author

dlabordus commented Mar 2, 2022

First attempt was made in the branch 'native-runner-attempt' to create a native runner, but this version fails on runtime.
Eclipse uses Google Guice as DI Framework and it seems to give problems.

The error returning is:

2022-03-02 10:20:37,733 FINE  [com.goo.inj.int.uti.ContinuousStopwatch] (executor-thread-0) Preloading singletons: 0ms
2022-03-02 10:20:37,734 WARN  [org.lfe.com.cor.jax.exc.GenericExceptionHandler] (executor-thread-0) Unknown exception occurred.: com.google.inject.ConfigurationException: Guice configuration errors:

1) [Guice/MissingImplementation]: No implementation for IResourceFactory was bound.

Learn more:
  https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION

1 error

======================
Full classname legend:
======================
IResourceFactory: "org.eclipse.xtext.resource.IResourceFactory"
========================
End of classname legend:
========================

	at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1126)
	at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1086)
	at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1138)
	at org.eclipse.ocl.xtext.essentialocl.EssentialOCLStandaloneSetupGenerated.register(EssentialOCLStandaloneSetupGenerated.java:41)
	at org.eclipse.ocl.xtext.essentialocl.EssentialOCLStandaloneSetupGenerated.createInjectorAndDoEMFRegistration(EssentialOCLStandaloneSetupGenerated.java:31)
	at org.eclipse.ocl.xtext.essentialocl.EssentialOCLStandaloneSetup.createInjectorAndDoEMFRegistration(EssentialOCLStandaloneSetup.java:77)
	at org.eclipse.ocl.xtext.essentialocl.EssentialOCLStandaloneSetup.doSetup(EssentialOCLStandaloneSetup.java:38)
	at org.eclipse.ocl.xtext.completeocl.CompleteOCLStandaloneSetupGenerated.createInjectorAndDoEMFRegistration(CompleteOCLStandaloneSetupGenerated.java:28)
	at org.eclipse.ocl.xtext.completeocl.CompleteOCLStandaloneSetup.doSetup(CompleteOCLStandaloneSetup.java:32)
	at org.lfenergy.compas.scl.validator.impl.OclFileLoader.<init>(OclFileLoader.java:36)

Use local debugging it looks like the implementation it's searching for is the class 'org.eclipse.xtext.resource.XtextResourceFactory'.

@dlabordus
Copy link
Author

Some small remark about how to come to this error. There where errors before.

  • First we needed a extra library from Eclipse, that why the module "riseclipse-extra-p2" was added to download that. Otherwise the build of the native already fails. It's strange it is only needed for the Native Build, runtime it doesn't seems to be needed.
  • Next for Google Guice to work a lot of java.lang Classes where added to the Configuration Class with @RegisterForReflection.
  • Next try to added the needed factory classes, but it doesn't seem to be working.

Couldn't find a lot about GraalVM and Google Guice, only the same issue about the java.lang classes.

@Sander3003
Copy link
Member

Making it works with GraalVM is a low priority for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants