Send data to a project through web service
Description
Hi,
Is it possible to perform any kind of data persistence through ws? I'm currently using your che-serverservice sample and if I import FsManager dependencies I'm not able to run che. It freezes before the docker be launched.
In order to do that, I have just injected the FsManager component in my ws contructor like this:
@Inject
public MyService(FsManager fsManager) {
this.fsManager = fsManager;
}
I would like to use this web service to send files to a specific project inside of my running workspace.
Thanks,
More info:
This is what I see on my terminal:
ERROR: (che start): Timeout waiting for server. Run "docker logs che" to inspect.
Then:
Exception sending context initialized event to listener instance of class [org.eclipse.che.inject.CheBootstrap]
com.google.inject.CreationException: Unable to create injector, see the following errors:
1) No implementation for org.eclipse.che.api.fs.server.FsManager was bound.
while locating org.eclipse.che.api.fs.server.FsManager
for the 1st parameter of org.eclipse.che.server.serverservice.MyService.<init>(MyService.java:47)
at org.eclipse.che.server.serverservice.inject.ServerServiceGuiceModule.configure(ServerServiceGuiceModule.java:20)
1 error
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:470)
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
at com.google.inject.Guice.createInjector(Guice.java:99)
at org.everrest.guice.servlet.EverrestGuiceContextListener.getInjector(EverrestGuiceContextListener.java:140)
at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:47)
at org.everrest.guice.servlet.EverrestGuiceContextListener.contextInitialized(EverrestGuiceContextListener.java:85)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4745)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:988)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1860)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
@vparfonov or @vzhukovskii may know
Hi @eivantsov @vparfonov and @vzhukovskii
Any news about this?
Thanks,
Hi guys,
Any news?
Thanks,
@eivantsov @vparfonov @vzhukovskii any news?
Is it possible to perform any kind of data persistence through ws?
Yes. you can use such ways.
- over user attributes. UserService
- User Preferences.
- workspace attributes
- workspace local filesystem.
@skabashnyuk ok, thanks you can close it.