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

Error when running the teamvm-flavour-example #33

Open
Olafxso opened this issue Sep 3, 2019 · 0 comments
Open

Error when running the teamvm-flavour-example #33

Olafxso opened this issue Sep 3, 2019 · 0 comments

Comments

@Olafxso
Copy link

Olafxso commented Sep 3, 2019

I want to discover the teamvm-flavour-example, but get an error when I want to run it in a Jetty server:

2019-09-03 15:59:29.430:WARN:oeja.AnnotationParser:qtp1639622804-15: org.osgi.service.jpa.EntityManagerFactoryBuilder scanned from multiple locations: jar:file:///C:/Users/olaf.XSODOMAIN/AppData/Local/Temp/jetty-0.0.0.0-8080-teavm-flavour-example-0.2.0-SNAPSHOT.war-_teavm-flavour-example-0.2.0-SNAPSHOT-any-810478781382524930.dir/webapp/WEB-INF/lib/javax.persistence-2.1.0.jar!/org/osgi/service/jpa/EntityManagerFactoryBuilder.class, jar:file:///C:/Users/olaf.XSODOMAIN/AppData/Local/Temp/jetty-0.0.0.0-8080-teavm-flavour-example-0.2.0-SNAPSHOT.war-_teavm-flavour-example-0.2.0-SNAPSHOT-any-810478781382524930.dir/webapp/WEB-INF/lib/jakarta.persistence-2.2.2.jar!/org/osgi/service/jpa/EntityManagerFactoryBuilder.class
2019-09-03 15:59:29.430:INFO:oeja.AnnotationConfiguration:main: Scanning elapsed time=702ms
2019-09-03 15:59:29.508:INFO:oejshC.teavm_flavour_example_0_2_0_SNAPSHOT:main: 1 Spring WebApplicationInitializers detected on classpath
2019-09-03 15:59:29.570:INFO:oejshC.teavm_flavour_example_0_2_0_SNAPSHOT:main: Initializing Spring root WebApplicationContext
sep 03, 2019 3:59:29 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
sep 03, 2019 3:59:29 PM org.springframework.context.support.AbstractApplicationContext refresh
WARNING: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [org.teavm.flavour.example.server.ApplicationConfiguration]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/config.properties]
sep 03, 2019 3:59:29 PM org.springframework.web.context.ContextLoader initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [org.teavm.flavour.example.server.ApplicationConfiguration]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/config.properties]
        at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:181)
        at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:315)
        at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232)
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275)
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:705)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:531)
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:957)
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:553)
        at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:922)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:365)
        at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:852)
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:278)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:46)
        at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:192)
        at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:502)
        at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:151)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:172)
        at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:430)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:65)
        at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:610)
        at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:529)
        at org.eclipse.jetty.util.Scanner.scan(Scanner.java:392)
        at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:145)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:576)
        at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:238)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
        at org.eclipse.jetty.server.Server.start(Server.java:418)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:119)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at org.eclipse.jetty.server.Server.doStart(Server.java:382)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1572)
        at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1512)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1511)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jetty.start.Main.invokeMain(Main.java:220)
        at org.eclipse.jetty.start.Main.start(Main.java:490)
        at org.eclipse.jetty.start.Main.main(Main.java:77)
Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/config.properties]
        at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:158)
        at org.springframework.core.io.support.EncodedResource.getInputStream(EncodedResource.java:159)
        at org.springframework.core.io.support.PropertiesLoaderUtils.fillProperties(PropertiesLoaderUtils.java:99)
        at org.springframework.core.io.support.PropertiesLoaderUtils.fillProperties(PropertiesLoaderUtils.java:73)
        at org.springframework.core.io.support.PropertiesLoaderUtils.loadProperties(PropertiesLoaderUtils.java:59)
        at org.springframework.core.io.support.ResourcePropertySource.<init>(ResourcePropertySource.java:67)
        at org.springframework.core.io.support.DefaultPropertySourceFactory.createPropertySource(DefaultPropertySourceFactory.java:37)
        at org.springframework.context.annotation.ConfigurationClassParser.processPropertySource(ConfigurationClassParser.java:452)
        at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:271)
        at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:242)
        at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:199)
        at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:167)
        ... 53 more

I have built it using mvn clean install. Then copied the war to the jetty distribution webapps folder and started jetty server.

any idea's?

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

No branches or pull requests

1 participant