I'm back! And trying to fix up the container I built for this project once upon a time.
Added by Nate Lager 15 days ago
Hi VRSpace! Sorry I've been away. Life gets busy sometimes.
I was involved in a conversation on reddit that reminded me of this project, and It inspired me to get back over here, and I realized that my published vrspace container is woefully out of date.
So, I decided to work on updating it, ive also learned a bit about automated builds, so I can hopefully make it a little more automatic in its updates. But first! I have to get the dang thing building with the latest server jar.
I use the precompiled Jar, because I never had any luck building it from scratch. So with 0.7.6, and OpenJDK17.... I am getting an error while trying to run the jar. the error follows:
. ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v3.3.5) 2024-12-16T00:32:29.267Z INFO 1 --- [ main] org.vrspace.server.ServerApplication : Starting ServerApplication using Java 17.0.13 with PID 1 (/app/vrspace/server/target/server.jar started by root in /app/vrspace/server/target) 2024-12-16T00:32:29.268Z DEBUG 1 --- [ main] org.vrspace.server.ServerApplication : Running with Spring Boot v3.3.5, Spring v6.1.14 2024-12-16T00:32:29.269Z INFO 1 --- [ main] org.vrspace.server.ServerApplication : No active profile set, falling back to 1 default profile: "default" 2024-12-16T00:32:30.347Z INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Neo4j repositories in DEFAULT mode. 2024-12-16T00:32:30.471Z INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 120 ms. Found 0 Neo4j repository interfaces. 2024-12-16T00:32:30.475Z INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Neo4j repositories in DEFAULT mode. 2024-12-16T00:32:30.498Z INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 22 ms. Found 1 Neo4j repository interface. 2024-12-16T00:32:30.870Z DEBUG 1 --- [ main] org.vrspace.server.core.ClassUtil : VRSpace home directory: /app/vrspace deduced from location of org/vrspace/server/core/ClassUtil.class: jar:file:/app/vrspace/server/target/server.jar!/BOOT-INF/classes!/org/vrspace/server/core/ClassUtil.class 2024-12-16T00:32:30.983Z INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (https) 2024-12-16T00:32:31.025Z INFO 1 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1693 ms 2024-12-16T00:32:31.028Z INFO 1 --- [ main] o.vrspace.server.config.SeleniumConfig : Servlet context initialized, installing web garbage collector 2024-12-16T00:32:31.145Z INFO 1 --- [ main] org.vrspace.server.ServerApplication : VRSpace servlet context initialized, starting components 2024-12-16T00:32:31.344Z INFO 1 --- [ main] o.neo4j.driver.internal.DriverFactory : Direct driver instance 2083154356 created for server address localhost:7687 2024-12-16T00:32:31.725Z WARN 1 --- [ main] o.vrspace.server.config.SeleniumConfig : Enabling remote browsing - security risk 2024-12-16T00:32:32.186Z INFO 1 --- [ main] i.g.bonigarcia.wdm.WebDriverManager : Reading https://raw.githubusercontent.com/bonigarcia/webdrivermanager/master/docs/mirror/geckodriver to seek geckodriver 2024-12-16T00:32:32.475Z INFO 1 --- [ main] i.g.bonigarcia.wdm.online.Downloader : Downloading https://github.com/mozilla/geckodriver/releases/download/v0.35.0/geckodriver-v0.35.0-linux64.tar.gz 2024-12-16T00:32:33.143Z INFO 1 --- [ main] i.g.bonigarcia.wdm.online.Downloader : Extracting driver from compressed file geckodriver-v0.35.0-linux64.tar.gz 2024-12-16T00:32:33.193Z INFO 1 --- [ main] i.g.bonigarcia.wdm.WebDriverManager : Exporting webdriver.gecko.driver as /root/.cache/selenium/geckodriver/linux64/0.35.0/geckodriver 2024-12-16T00:32:33.214Z DEBUG 1 --- [ main] org.vrspace.server.core.ClassUtil : VRSpace home directory: /app/vrspace deduced from location of org/vrspace/server/core/ClassUtil.class: jar:file:/app/vrspace/server/target/server.jar!/BOOT-INF/classes!/org/vrspace/server/core/ClassUtil.class 2024-12-16T00:32:33.218Z INFO 1 --- [ main] org.vrspace.server.config.NeoConfig : Configured database uri: file:./vrspace.db 2024-12-16T00:32:33.218Z INFO 1 --- [ main] org.vrspace.server.config.NeoConfig : Absolute database path: /app/vrspace/server/target/vrspace.db 2024-12-16T00:32:33.218Z INFO 1 --- [ main] org.vrspace.server.config.NeoConfig : Starting database on bolt://localhost 2024-12-16T00:32:33.881Z WARN 1 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'uploadController': Unsatisfied dependency expressed through field 'worldManager': Error creating bean with name 'database' defined in class path resource [org/vrspace/server/config/NeoConfig.class]: Failed to instantiate [org.neo4j.graphdb.GraphDatabaseService]: Factory method 'config' threw exception with message: Cannot to link java.nio.DirectByteBuffer 2024-12-16T00:32:33.882Z INFO 1 --- [ main] o.neo4j.driver.internal.InternalDriver : Closing driver instance 2083154356 2024-12-16T00:32:34.089Z INFO 1 --- [ main] org.vrspace.server.ServerApplication : VRSpace servlet context destroyed 2024-12-16T00:32:34.090Z ERROR 1 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Exception sending context destroyed event to listener instance of class [org.vrspace.server.ServerApplication$$SpringCGLIB$$0] java.lang.NullPointerException: Cannot invoke "org.springframework.context.ConfigurableApplicationContext.stop()" because "org.vrspace.server.ServerApplication.ctx" is null at org.vrspace.server.ServerApplication.contextDestroyed(ServerApplication.java:32) ~[classes!/:na] at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4039) ~[tomcat-embed-core-10.1.31.jar!/:na] at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:4648) ~[tomcat-embed-core-10.1.31.jar!/:na] at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:231) ~[tomcat-embed-core-10.1.31.jar!/:na] at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1219) ~[tomcat-embed-core-10.1.31.jar!/:na] at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1208) ~[tomcat-embed-core-10.1.31.jar!/:na] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-10.1.31.jar!/:na] at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) ~[na:na] at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:814) ~[tomcat-embed-core-10.1.31.jar!/:na] at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:231) ~[tomcat-embed-core-10.1.31.jar!/:na] at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1219) ~[tomcat-embed-core-10.1.31.jar!/:na] at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1208) ~[tomcat-embed-core-10.1.31.jar!/:na] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-10.1.31.jar!/:na] at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) ~[na:na] at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:814) ~[tomcat-embed-core-10.1.31.jar!/:na] at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:231) ~[tomcat-embed-core-10.1.31.jar!/:na] at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:471) ~[tomcat-embed-core-10.1.31.jar!/:na] at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:231) ~[tomcat-embed-core-10.1.31.jar!/:na] at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:915) ~[tomcat-embed-core-10.1.31.jar!/:na] at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:231) ~[tomcat-embed-core-10.1.31.jar!/:na] at org.apache.catalina.startup.Tomcat.stop(Tomcat.java:447) ~[tomcat-embed-core-10.1.31.jar!/:na] at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.stopTomcat(TomcatWebServer.java:301) ~[spring-boot-3.3.5.jar!/:3.3.5] at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.destroy(TomcatWebServer.java:374) ~[spring-boot-3.3.5.jar!/:3.3.5] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:152) ~[spring-boot-3.3.5.jar!/:3.3.5] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.3.5.jar!/:3.3.5] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.3.5.jar!/:3.3.5] at org.springframework.boot.SpringApplication.run(SpringApplication.java:335) ~[spring-boot-3.3.5.jar!/:3.3.5] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363) ~[spring-boot-3.3.5.jar!/:3.3.5] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352) ~[spring-boot-3.3.5.jar!/:3.3.5] at org.vrspace.server.ServerApplication.main(ServerApplication.java:25) ~[classes!/:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:569) ~[na:na] at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[server.jar:na] at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[server.jar:na] at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[server.jar:na] at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) ~[server.jar:na] 2024-12-16T00:32:34.092Z DEBUG 1 --- [ main] o.vrspace.server.config.SeleniumConfig : ServletContext destroyed, cleaning up 0 web sessions 2024-12-16T00:32:34.093Z DEBUG 1 --- [ main] o.vrspace.server.config.SeleniumConfig : ServletContext destroyed, cleaning up 0 web sessions 2024-12-16T00:32:34.108Z INFO 1 --- [ main] .s.b.a.l.ConditionEvaluationReportLogger : Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2024-12-16T00:32:34.120Z ERROR 1 --- [ main] o.s.boot.SpringApplication : Application run failed org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'uploadController': Unsatisfied dependency expressed through field 'worldManager': Error creating bean with name 'database' defined in class path resource [org/vrspace/server/config/NeoConfig.class]: Failed to instantiate [org.neo4j.graphdb.GraphDatabaseService]: Factory method 'config' threw exception with message: Cannot to link java.nio.DirectByteBuffer at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:788) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:768) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:509) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1439) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:975) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:971) ~[spring-context-6.1.14.jar!/:6.1.14] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:625) ~[spring-context-6.1.14.jar!/:6.1.14] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.3.5.jar!/:3.3.5] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.3.5.jar!/:3.3.5] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.3.5.jar!/:3.3.5] at org.springframework.boot.SpringApplication.run(SpringApplication.java:335) ~[spring-boot-3.3.5.jar!/:3.3.5] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363) ~[spring-boot-3.3.5.jar!/:3.3.5] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352) ~[spring-boot-3.3.5.jar!/:3.3.5] at org.vrspace.server.ServerApplication.main(ServerApplication.java:25) ~[classes!/:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:569) ~[na:na] at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[server.jar:na] at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[server.jar:na] at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[server.jar:na] at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) ~[server.jar:na] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'database' defined in class path resource [org/vrspace/server/config/NeoConfig.class]: Failed to instantiate [org.neo4j.graphdb.GraphDatabaseService]: Factory method 'config' threw exception with message: Cannot to link java.nio.DirectByteBuffer at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:648) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:485) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1355) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1185) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:313) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1443) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1353) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:785) ~[spring-beans-6.1.14.jar!/:6.1.14] ... 28 common frames omitted Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.neo4j.graphdb.GraphDatabaseService]: Factory method 'config' threw exception with message: Cannot to link java.nio.DirectByteBuffer at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:178) ~[spring-beans-6.1.14.jar!/:6.1.14] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644) ~[spring-beans-6.1.14.jar!/:6.1.14] ... 43 common frames omitted Caused by: java.lang.LinkageError: Cannot to link java.nio.DirectByteBuffer at org.neo4j.internal.unsafe.UnsafeUtil.<clinit>(UnsafeUtil.java:128) ~[neo4j-unsafe-4.4.34.jar!/:4.4.34] at org.neo4j.memory.RuntimeInternals.guessHeaderSize(RuntimeInternals.java:158) ~[neo4j-unsafe-4.4.34.jar!/:4.4.34] at org.neo4j.memory.RuntimeInternals.<clinit>(RuntimeInternals.java:53) ~[neo4j-unsafe-4.4.34.jar!/:4.4.34] at org.neo4j.memory.HeapEstimator.<clinit>(HeapEstimator.java:103) ~[neo4j-unsafe-4.4.34.jar!/:4.4.34] at org.neo4j.internal.collector.RecentQueryBuffer.<clinit>(RecentQueryBuffer.java:37) ~[neo4j-data-collector-4.4.34.jar!/:4.4.34] at org.neo4j.graphdb.factory.module.GlobalModule.<init>(GlobalModule.java:212) ~[neo4j-4.4.34.jar!/:4.4.34] at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.createGlobalModule(DatabaseManagementServiceFactory.java:272) ~[neo4j-4.4.34.jar!/:4.4.34] at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:133) ~[neo4j-4.4.34.jar!/:4.4.34] at org.neo4j.dbms.api.DatabaseManagementServiceBuilder.newDatabaseManagementService(DatabaseManagementServiceBuilder.java:101) ~[neo4j-4.4.34.jar!/:4.4.34] at org.neo4j.dbms.api.DatabaseManagementServiceBuilder.build(DatabaseManagementServiceBuilder.java:94) ~[neo4j-4.4.34.jar!/:4.4.34] at org.vrspace.server.config.NeoConfig.neoStart(NeoConfig.java:99) ~[classes!/:na] at org.vrspace.server.config.NeoConfig.config(NeoConfig.java:76) ~[classes!/:na] at org.vrspace.server.config.NeoConfig$$SpringCGLIB$$0.CGLIB$config$1(<generated>) ~[classes!/:na] at org.vrspace.server.config.NeoConfig$$SpringCGLIB$$FastClass$$1.invoke(<generated>) ~[classes!/:na] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258) ~[spring-core-6.1.14.jar!/:6.1.14] at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:348) ~[spring-context-6.1.14.jar!/:6.1.14] at org.vrspace.server.config.NeoConfig$$SpringCGLIB$$0.config(<generated>) ~[classes!/:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:569) ~[na:na] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:146) ~[spring-beans-6.1.14.jar!/:6.1.14] ... 44 common frames omitted Caused by: java.lang.IllegalAccessException: module java.base does not open java.nio to unnamed module @3f0ee7cb at java.base/java.lang.invoke.MethodHandles.privateLookupIn(MethodHandles.java:259) ~[na:na] at org.neo4j.internal.unsafe.UnsafeUtil.<clinit>(UnsafeUtil.java:111) ~[neo4j-unsafe-4.4.34.jar!/:4.4.34] ... 65 common frames omitted
I am downloading the server jar release from: https://github.com/jalmasi/vrspace/releases/
I run it with /usr/lib/jvm/jre-17/java -jar /path/to/server.jar This is how the container has always run it. I get the error above. I am not (and never have been) a java developer, and i have to be honest, Java errors are difficult to follow.
Any idea why this isnt running?
Replies (9)
RE: I'm back! And trying to fix up the container I built for this project once upon a time. - Added by Nate Lager 15 days ago
I think ive figured it out. You have a run.sh now that I'm supposed to use. Ive changed how I place things so I can use that startup script.
Next question though. I used to place a config file in /config, so someone running the container could easily map that file in, and then when I ran the server jar, i added a --spring.config.location=/config/application.properties
so vrspace would load that config. Am I still able to do that with your run.sh?
Edit: ideally it'd be nice to be able to specify environment variables when I run the container, that would get read by java/vrspace. Is that even possible here?
RE: I'm back! And trying to fix up the container I built for this project once upon a time. - Added by Nate Lager 15 days ago
Ok, repo is here:
https://git.undrground.org/gangrif/vrspace-container that should be public, let me know if it doesnt work.
Container isnt pushed to docker hub yet, as i want to figure out that config file question from my first reply before I publish there.
RE: I'm back! And trying to fix up the container I built for this project once upon a time. - Added by Josip Almasi 14 days ago
Hey Nate, welcome back!
Yeah these modules allegedly pose security risk when running many java applications in java application servers, so people running java clusters managed to get their security concerns in the way of running java apps in containers :>
But it's easy enough to copy and paste that around.
Yes, it's possible, but may be quite tricky, due to large number of config parameters.
Every property that exists in application.properties config file can be passed to JVM with simple -Dproperty=value argument, and additionally, this value can address environment variable like ${variable}.
Example:
SERVER_SSL_ENABLED=true
SERVER_PORT=8443
java <sausage> -Dserver.ssl.enabled='${SERVER_SSL_ENABLED}' -Dserver.port='${SERVER_PORT}'
Mind the single quotes: we don't want to pass value to the application, we want the application to expand the value.
Kinda defeats the purpose though, it's easier to simply pass the value, i.e. we get the same result without quotes:
java <sausage> -Dserver.ssl.enabled=${SERVER_SSL_ENABLED} -Dserver.port=${SERVER_PORT}
lets the shell expand variable values and pass them over to the server.
Simple enough, right? Alas, current application.properties file is 174 lines long, and is only ever getting longer as I add more integrations.
Maintaining sane defaults in run.sh/bat could easily become an effort.
So maybe we'd better just
VRSPACE_ENVIRONMENT="-Dserver.ssl.enabled=true -Dserver.port=8443"
java <sausage> $VRSPACE_ENVIRONMENT
Yes I can see your stuff, will try it out ASAP.
RE: I'm back! And trying to fix up the container I built for this project once upon a time. - Added by Nate Lager 14 days ago
Here's what I ended up with:
In my prep script (i run this before I build the container) I clone the vrspace repo, and do this on the run.sh:
sed -i 's/-jar \$JAR/-jar \$JAR \$@/' vrspace/server/bin/run.sh
Which has the effect of just changing the last line, from:
-jar $JAR
to
-jar $JAR $@
That let's me run the run.sh with command line args, that get passed on to java where the $@ is. Then my CMD at the end of my containerfile is:
CMD ["/app/server/bin/run.sh","--spring.config.location=/config/application.properties"]
If you want to try my resulting container you can get it from the gitlab internal registry here:
registry.undrground.org/gangrif/vrspace-container
Something like
<podman|docker> run -it --rm registry.undrground.org/gangrif/vrspace-container
should get you running in a very basic test container. Running with the output in the foreground so you can see the logs.
putting the application.proerties into a directory somewhere, and then running:
<podman|docker> run -it --rm -v /some/config/path:/config:Z registry.undrground.org/gangrif/vrspace-container
again, in the foreground, usual container-fu like replacing -it with -d would put it in the background, remove the --rm if you want it to stay around after you stop it. Give it a name with --name vrspace-test or something.
Anyway, hopefully you get the idea.
I upped it to UBI 9, was UBI 8, and the latest code, 0.7.6 from vrspace. Once this is all settled, i'd love to start working on a definition that'll get supporting services up as well. Looks like youre still using openvidu? any other supporting services that have come along in the last 2 years?
RE: I'm back! And trying to fix up the container I built for this project once upon a time. - Added by Josip Almasi 14 days ago
OK I think I get it, thanks.
Yep, openvidu, latest 2, will switch to 3 when I get the time.
There's only one new supporting service, and is not merged yet: elastic search. VRSpace server will happily forward all events to ES, and that easy turn out to be 1M/sec. So I made it asynchronous, batching, etc.
Any prod scenario needs observability, of course. I'll be tinkering with metrics soon, but that should be easier.
And now that I mention prod, I imagine folks would want to use external Neo4j rather than embedded. You edit your space, add some stuff, update the server image, and it's all gone.
But the most important thing IMHO is to get developers - web and mobile folks - up and running with as little effort as possible. While Android guys are familiar with java environment, most of other front-end devs use node as their primary environment.
So a 'download and run' thing of both vrspace and openvidu would be great.
RE: I'm back! And trying to fix up the container I built for this project once upon a time. - Added by Nate Lager 14 days ago
The goal of the container has always been to make it as easy as possible for someone to stand up vrspace for testing. I don't know how much it helps with development, as it doesnt build the source, it just grabs your compiled binary.
I may be able to switch to a build model, but i always had trouble getting the jar to compile IN a container. Maybe I could build it outside of the container and bring it in... Either way, if thats a priority for the project, I could poke around at it and see what I can do.
In the next day or two I'll see if I can get the builds I have pushing to docker hub, to get that image updated to latest.
Thanks!
RE: I'm back! And trying to fix up the container I built for this project once upon a time. - Added by Josip Almasi 14 days ago
Ah wait, let me explain in more details.
Front end developers don't need to build the project - at all!
I've made a simple example of a front-end app to show this: https://github.com/jalmasi/vrspace-webapp-vue
(it's in the readme, but too brief)
Vue, but pretty much the same thing with any JS framework. So a node.js dev just does
npm install
npm run dev
and that's all. By default, they connect to server at vrspace.org, and do their UI. Because vrspace client is published and available as any other js package ;)
But but pretty soon they need to run their own server, if nothing else, than because I keep tinkering with whatever is on vrspace.org. And that's where curated docker image(s) comes handy.
(And for back end folks, vrspace server is published to maven central like any other java package. and there's another starter app: https://github.com/jalmasi/vrspace-server-springboot)
So you're on the right track with your initial approach.
RE: I'm back! And trying to fix up the container I built for this project once upon a time. - Added by Josip Almasi 12 days ago
Works as advertised.
Well, with a small exception, the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty', but that's solved as advertised, just do winpty docker <cmd>. And of course, -p 8080:8080.
We could create and publish an image on deploy, using maven docker plugin: https://github.com/fabric8io/docker-maven-plugin
Whenever I make a release, I do a
mvn deploy -P publish
that publishes vrspace client lib to npmjs.com and server to sonatype.com.
That requires some signatures and whatnot, and I'll probably have to do some more accounts and signatures to push docker image(s).
Would you like to contribute to vrspace repo? Like, make PR for changes to run.sh for starters? :)
RE: I'm back! And trying to fix up the container I built for this project once upon a time. - Added by Nate Lager 12 days ago
ok! I have my builds automatically pushing to docker hub now. docker.io/gangrif/vrspce is now 0.7.6!