I filed a bug at Spring JIRA and this is the response I get ( https://jira.spring.io/browse/SPR-17599):
There seems to be a misunderstanding in that conversation on the Tomcat mailing list: It's not that we can't find the class of the name javax.websocket.server.ServerContainer, it's the *ServletContext attribute* with name "javax.websocket.server.ServerContainer" that we can't find. In other words, we can't find a pre-initialized WebSocket container instance. So the root of the problem you can easily reproduce without Spring: Simply implement a Servlet and check the return value of getServletContext().getAttribute("javax.websocket.server.ServerContainer") ... People - Assignee:[image: juergen.hoeller] Juergen HoellerReporter:[image: khteh] Teh Kok HowLast updater:Juergen Hoeller - Votes:0 Vote for this issueWatchers:2 Start watching this issue Dates - Created:YesterdayUpdated:YesterdayDays since last comment:10 hours, 48 minutes ago On Mon, Dec 10, 2018 at 11:41 PM Christopher Schultz < ch...@christopherschultz.net> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > KH, > > On 12/9/18 22:10, Kok How Teh wrote: > > Hi; I use Spring Boot to develop GraphQL applications. However, > > when the application is packaged as WAR and deployed to Tomcat 9, > > it throws illegalstate exception. I have tried the workaround by > > adding a ServletContextAware bean but it doesn't help on Tomcat 9. > > I have filed 2 issues in separate github projects: > > > > https://github.com/eh3rrera/graphql-java-spring-boot-example/issues/10 > #issuecomment-445095690 > <https://github.com/eh3rrera/graphql-java-spring-boot-example/issues/10#issuecomment-445095690> > > > > > > https://github.com/graphql-java-kickstart/graphql-spring-boot/issues/1 > 65 > > > > It's reported that the exception is only specific to Tomcat 9. Any > > advice and insight is appreciated. > > Spring is throwing the exception. Tomcat ships with the > javax.websocket.server.ServerContainer class. > > I don't believe there are any differences between Tomcat 8.5.x and > 9.0.x when it comes to ClassLoader layout and class visibility. > > I'd ask Spring how they are performing that sanity check to see why > they are throwing that exception. > > - -chris > -----BEGIN PGP SIGNATURE----- > Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ > > iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlwOiT0ACgkQHPApP6U8 > pFj3AhAAjhGBIid6nN/KUBJiIeuNHGi6A3pzJ9Gn4T5irwWgqvUS+i3nDvc63Od6 > vOVsMab0HdVUhIrzGkSNAr/dhK2TaOET2taDR9Q9OcnGorYOJ8xaG2uV5++ydI9D > xk3rWWeBKbIH/ESElSyU4oJ7FtdL/+3LIi77+HZL8KrF0OOkn4Ac/pYJkH5BDslx > Tds5OIhCiUUtsP621sLvcarqN+Dqx3/2iJSQMz7qWmPp9fqpzvkLquZcQHRbcYq1 > D7yrKxkr1lrjydqeXIEotfwCPOkai2WH97rFKru2rwZNriUzFUmz6k7OOgXIACRY > WDKlyaqCWVmZR9UgBQ5xnxVkVY/CTDJO0KkT0mFbAtAD1VDT2Vx88ShhZPXlQWQu > PtKeDMSNvt0Wsz9sbaewaHMSyGDNd+P8P0KURtSymTw+3IOMDLSaIIr8KvJFKpN1 > XXpho2tusH7YJEsXx9e1VnPUND+si6uMW+fVT51f3fjUos5S5LVD6lUjYDI9kvtY > LiqB0lflXYLgLU6zQYGGwadU2lGlM9skSza+EzEdLaN1HjMHrwAEtUOa4C5k60x/ > 3snuiWj98aMrjG3KK18KJLnVsx18QDxj6ptTg9kRaZbCOCrfNWzgyBcAYmtgPjV9 > cP2MheADzGXO9bIsDPu4aOjND96X64yPLueKVBQuY9qyAmKFLeA= > =sXt5 > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >