graphql-java-kickstart/graphql-java-tools

Works fine after removing - implements GraphQLQueryResolver

sandeepsangole opened this issue · 0 comments

Application not starting due to GraphQLQueryResolver. Works fine after it's removed.

{"timestamp":"2021-08-27T20:43:13,786Z","level":"ERROR","thread":"main","message":"Application run failed","logger":"org.springframework.boot.SpringApplication","throwable":{"class":"org.springframework.beans.factory.BeanCreationException","msg":"Error creating bean with name 'serverEndpointExporter' defined in class path resource [graphql/kickstart/spring/web/boot/GraphQLWebsocketAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: javax.websocket.server.ServerContainer not available","stack":["org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)","org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)","org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)","org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)","org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)","org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)","org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)","org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879)","org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)","org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)","org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)","org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)","org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)","org.springframework.boot.SpringApplication.run(SpringApplication.java:315)","org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)","org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)","com..Application.main(Application.java:14)"],"cause":{"class":"java.lang.IllegalStateException","msg":"javax.websocket.server.ServerContainer not available","stack":["org.springframework.util.Assert.state(Assert.java:73)","org.springframework.web.socket.server.standard.ServerEndpointExporter.afterPropertiesSet(ServerEndpointExporter.java:107)","org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855)","org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792)","org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)","org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)","org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)","org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)","org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)","org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)","org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879)","org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)","org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)","org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)","org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)","org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)","org.springframework.boot.SpringApplication.run(SpringApplication.java:315)","org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)","org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)","com..Application.main(Application.java:14)"]}}}

pom.xml

    <graphql.spring.version>7.2.0</graphql.spring.version>


  <dependency>
        <groupId>com.graphql-java-kickstart</groupId>
        <artifactId>graphql-spring-boot-starter</artifactId>
        <version>${graphql.spring.version}</version>
    </dependency>
    <dependency>
        <groupId>com.graphql-java-kickstart</groupId>
        <artifactId>graphiql-spring-boot-starter</artifactId>
        <version>${graphql.spring.version}</version>
    </dependency>
    <dependency>
        <groupId>com.graphql-java-kickstart</groupId>
        <artifactId>graphql-spring-boot-starter-test</artifactId>
        <version>${graphql.spring.version}</version>
        <scope>test</scope>
    </dependency>